diff options
| author | Juan Linietsky | 2016-09-10 14:44:28 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-09-10 14:44:28 -0300 |
| commit | 75f292f8eb1d5afa9c29817e8cb9401ab5fa166f (patch) | |
| tree | edf9fe3fb997fe3de9dc4b02d4279de4060e072a /tools/editor/editor_plugin.cpp | |
| parent | b16f41a10aa307adaa7e6af9f666ec0526658ad9 (diff) | |
| download | godot-75f292f8eb1d5afa9c29817e8cb9401ab5fa166f.tar.gz godot-75f292f8eb1d5afa9c29817e8cb9401ab5fa166f.tar.zst godot-75f292f8eb1d5afa9c29817e8cb9401ab5fa166f.zip | |
Add API for inspecting objects from EditorPlugin, as requested in one of the comments of #6254
Diffstat (limited to 'tools/editor/editor_plugin.cpp')
| -rw-r--r-- | tools/editor/editor_plugin.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/editor/editor_plugin.cpp b/tools/editor/editor_plugin.cpp index 5e671549e..fa5de096e 100644 --- a/tools/editor/editor_plugin.cpp +++ b/tools/editor/editor_plugin.cpp @@ -298,6 +298,10 @@ Control *EditorPlugin::get_base_control() { return EditorNode::get_singleton()->get_gui_base(); } +void EditorPlugin::inspect_object(Object *p_obj,const String& p_for_property) { + + EditorNode::get_singleton()->push_item(p_obj,p_for_property); +} void EditorPlugin::_bind_methods() { @@ -315,6 +319,7 @@ void EditorPlugin::_bind_methods() { ObjectTypeDB::bind_method(_MD("add_export_plugin","plugin:EditorExportPlugin"),&EditorPlugin::add_export_plugin); ObjectTypeDB::bind_method(_MD("remove_export_plugin","plugin:EditorExportPlugin"),&EditorPlugin::remove_export_plugin); + ObjectTypeDB::bind_method(_MD("inspect_object","object","for_property"),&EditorPlugin::inspect_object,DEFVAL(String())); ObjectTypeDB::bind_method(_MD("get_base_control:Control"),&EditorPlugin::get_base_control); ObjectTypeDB::bind_method(_MD("get_undo_redo:UndoRedo"),&EditorPlugin::_get_undo_redo); |
