From cee8bd9e765c93c2ba890b94fc6750431e1e3c12 Mon Sep 17 00:00:00 2001 From: Marc Gilleron Date: Mon, 19 Sep 2022 15:20:34 +0100 Subject: Expose `EditorInspector.get_selected_path` --- doc/classes/EditorInspector.xml | 8 ++++++++ editor/editor_inspector.cpp | 1 + 2 files changed, 9 insertions(+) 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 @@ + + + + + Gets the path of the currently selected property. + + + diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 413eb52556..830115704d 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -4060,6 +4060,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"))); -- cgit v1.2.3