1
0
Fork 0

Expose EditorInspector.edit to scripting

This commit is contained in:
Aaron Franke 2024-07-21 17:11:24 -07:00
parent b9437c3938
commit 298daa8b6f
No known key found for this signature in database
GPG Key ID: 40A1750B977E56BF
2 changed files with 9 additions and 0 deletions

View File

@ -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>

View File

@ -4648,6 +4648,7 @@ void EditorInspector::_handle_menu_option(int p_option) {
}
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);