diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-19 22:01:32 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-19 22:01:32 +0200 |
commit | 82961dda3dbc2707777741711daf592094f0738f (patch) | |
tree | bb9f7648efe9828aa8c6971c6df4a6042e0c4a2f | |
parent | 6f5704d86f95171ba8b6b2ac9f56e284c4d35d7a (diff) | |
parent | cee8bd9e765c93c2ba890b94fc6750431e1e3c12 (diff) |
Merge pull request #66108 from Zylann/editor_inspector_get_selected_path
Expose `EditorInspector.get_selected_path`
-rw-r--r-- | doc/classes/EditorInspector.xml | 8 | ||||
-rw-r--r-- | editor/editor_inspector.cpp | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml index 280a7bf34a..a1a43dd5bf 100644 --- a/doc/classes/EditorInspector.xml +++ b/doc/classes/EditorInspector.xml @@ -13,6 +13,14 @@ </description> <tutorials> </tutorials> + <methods> + <method name="get_selected_path" qualifiers="const"> + <return type="String" /> + <description> + Gets the path of the currently selected property. + </description> + </method> + </methods> <members> <member name="horizontal_scroll_mode" type="int" setter="set_horizontal_scroll_mode" getter="get_horizontal_scroll_mode" overrides="ScrollContainer" enum="ScrollContainer.ScrollMode" default="0" /> </members> diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index fb819f418b..e786461722 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -4065,6 +4065,7 @@ void EditorInspector::_show_add_meta_dialog() { void EditorInspector::_bind_methods() { ClassDB::bind_method("_edit_request_change", &EditorInspector::_edit_request_change); + ClassDB::bind_method("get_selected_path", &EditorInspector::get_selected_path); ADD_SIGNAL(MethodInfo("property_selected", PropertyInfo(Variant::STRING, "property"))); ADD_SIGNAL(MethodInfo("property_keyed", PropertyInfo(Variant::STRING, "property"), PropertyInfo(Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT), PropertyInfo(Variant::BOOL, "advance"))); |