From 6918525795b713f32cd7642f94371ef4445c280a Mon Sep 17 00:00:00 2001 From: "Wilson E. Alvarez" Date: Thu, 7 Sep 2023 11:12:02 -0400 Subject: [PATCH] Expose EditorInspector::get_edited_object to GDScript --- doc/classes/EditorInspector.xml | 6 ++++++ editor/editor_inspector.cpp | 1 + 2 files changed, 7 insertions(+) diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml index 26f00fcb1ea..6ba3a16881c 100644 --- a/doc/classes/EditorInspector.xml +++ b/doc/classes/EditorInspector.xml @@ -13,6 +13,12 @@ + + + + Returns the object currently selected in this inspector. + + diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 7e63a8bbecc..c049f515ebe 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -2331,6 +2331,7 @@ void EditorInspector::_bind_methods() { ClassDB::bind_method("_object_id_selected", &EditorInspector::_object_id_selected); ClassDB::bind_method("_vscroll_changed", &EditorInspector::_vscroll_changed); ClassDB::bind_method("_feature_profile_changed", &EditorInspector::_feature_profile_changed); + ClassDB::bind_method("get_edited_object", &EditorInspector::get_edited_object); ClassDB::bind_method("refresh", &EditorInspector::refresh);