diff options
Diffstat (limited to 'editor/editor_plugin.cpp')
-rw-r--r-- | editor/editor_plugin.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index e79f662cc9..866d7ae233 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -31,6 +31,7 @@ #include "editor_plugin.h" #include "editor/debugger/editor_debugger_node.h" +#include "editor/editor_dock_manager.h" #include "editor/editor_file_system.h" #include "editor/editor_inspector.h" #include "editor/editor_interface.h" @@ -84,12 +85,12 @@ Button *EditorPlugin::add_control_to_bottom_panel(Control *p_control, const Stri void EditorPlugin::add_control_to_dock(DockSlot p_slot, Control *p_control) { ERR_FAIL_NULL(p_control); - EditorNode::get_singleton()->add_control_to_dock(EditorNode::DockSlot(p_slot), p_control); + EditorDockManager::get_singleton()->add_control_to_dock(EditorDockManager::DockSlot(p_slot), p_control); } void EditorPlugin::remove_control_from_docks(Control *p_control) { ERR_FAIL_NULL(p_control); - EditorNode::get_singleton()->remove_control_from_dock(p_control); + EditorDockManager::get_singleton()->remove_control_from_dock(p_control); } void EditorPlugin::remove_control_from_bottom_panel(Control *p_control) { @@ -248,6 +249,10 @@ void EditorPlugin::notify_resource_saved(const Ref<Resource> &p_resource) { emit_signal(SNAME("resource_saved"), p_resource); } +void EditorPlugin::notify_scene_saved(const String &p_scene_filepath) { + emit_signal(SNAME("scene_saved"), p_scene_filepath); +} + bool EditorPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p_event) { bool success = false; GDVIRTUAL_CALL(_forward_canvas_gui_input, p_event, success); @@ -402,13 +407,13 @@ void EditorPlugin::remove_translation_parser_plugin(const Ref<EditorTranslationP void EditorPlugin::add_import_plugin(const Ref<EditorImportPlugin> &p_importer, bool p_first_priority) { ERR_FAIL_COND(!p_importer.is_valid()); ResourceFormatImporter::get_singleton()->add_importer(p_importer, p_first_priority); - EditorFileSystem::get_singleton()->call_deferred(SNAME("scan")); + callable_mp(EditorFileSystem::get_singleton(), &EditorFileSystem::scan).call_deferred(); } void EditorPlugin::remove_import_plugin(const Ref<EditorImportPlugin> &p_importer) { ERR_FAIL_COND(!p_importer.is_valid()); ResourceFormatImporter::get_singleton()->remove_importer(p_importer); - EditorFileSystem::get_singleton()->call_deferred(SNAME("scan")); + callable_mp(EditorFileSystem::get_singleton(), &EditorFileSystem::scan).call_deferred(); } void EditorPlugin::add_export_plugin(const Ref<EditorExportPlugin> &p_exporter) { @@ -631,6 +636,7 @@ void EditorPlugin::_bind_methods() { ADD_SIGNAL(MethodInfo("scene_closed", PropertyInfo(Variant::STRING, "filepath"))); ADD_SIGNAL(MethodInfo("main_screen_changed", PropertyInfo(Variant::STRING, "screen_name"))); ADD_SIGNAL(MethodInfo("resource_saved", PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource"))); + ADD_SIGNAL(MethodInfo("scene_saved", PropertyInfo(Variant::STRING, "filepath"))); ADD_SIGNAL(MethodInfo("project_settings_changed")); BIND_ENUM_CONSTANT(CONTAINER_TOOLBAR); |