You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-01 16:38:31 +00:00
Add API for inspecting objects from EditorPlugin, as requested in one of the comments of #6254
This commit is contained in:
@@ -298,6 +298,10 @@ Control *EditorPlugin::get_base_control() {
|
|||||||
return EditorNode::get_singleton()->get_gui_base();
|
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() {
|
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("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("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_base_control:Control"),&EditorPlugin::get_base_control);
|
||||||
ObjectTypeDB::bind_method(_MD("get_undo_redo:UndoRedo"),&EditorPlugin::_get_undo_redo);
|
ObjectTypeDB::bind_method(_MD("get_undo_redo:UndoRedo"),&EditorPlugin::_get_undo_redo);
|
||||||
|
|||||||
@@ -116,7 +116,10 @@ public:
|
|||||||
virtual bool get_remove_list(List<Node*> *p_list);
|
virtual bool get_remove_list(List<Node*> *p_list);
|
||||||
virtual void set_window_layout(Ref<ConfigFile> p_layout);
|
virtual void set_window_layout(Ref<ConfigFile> p_layout);
|
||||||
virtual void get_window_layout(Ref<ConfigFile> p_layout);
|
virtual void get_window_layout(Ref<ConfigFile> p_layout);
|
||||||
virtual void edited_scene_changed(){}; // if changes are pending in editor, apply them
|
virtual void edited_scene_changed(){} // if changes are pending in editor, apply them
|
||||||
|
|
||||||
|
|
||||||
|
virtual void inspect_object(Object *p_obj,const String& p_for_property=String());
|
||||||
|
|
||||||
void queue_save_layout() const;
|
void queue_save_layout() const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user