diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml index d55c1847e4e..cfdc172fd1d 100644 --- a/doc/classes/EditorInspector.xml +++ b/doc/classes/EditorInspector.xml @@ -14,6 +14,12 @@ + + + + Returns the object currently selected in this inspector. + + diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 3fa3768d4b8..ab689ad0566 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -4242,6 +4242,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); + ClassDB::bind_method("get_edited_object", &EditorInspector::get_edited_object); 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")));