Skip to content

Commit

Permalink
Expose EditorInspector.edit to scripting
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronfranke committed Oct 30, 2024
1 parent 8004c75 commit 0f4a1a0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doc/classes/EditorInspector.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
<tutorials>
</tutorials>
<methods>
<method name="edit">
<return type="void" />
<param index="0" name="object" type="Object" />
<description>
Shows the properties of the given [param object] in this inspector for editing. To clear the inspector, call this method with [code]null[/code].
[b]Note:[/b] If you want to edit an object in the editor's main inspector, use the [code]edit_*[/code] methods in [EditorInterface] instead.
</description>
</method>
<method name="get_edited_object">
<return type="Object" />
<description>
Expand Down
1 change: 1 addition & 0 deletions editor/editor_inspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4279,6 +4279,7 @@ void EditorInspector::_add_meta_confirm() {
}

void EditorInspector::_bind_methods() {
ClassDB::bind_method(D_METHOD("edit", "object"), &EditorInspector::edit);
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);
Expand Down

0 comments on commit 0f4a1a0

Please sign in to comment.