diff options
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 250 |
1 files changed, 156 insertions, 94 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index dbbf5d08b8..719130621e 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */ +/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -384,7 +384,6 @@ void EditorNode::_notification(int p_what) { update_menu->set_icon(gui_base->get_icon("Progress1", "EditorIcons")); PopupMenu *p = help_menu->get_popup(); - p->set_item_icon(p->get_item_index(HELP_CLASSES), gui_base->get_icon("ClassList", "EditorIcons")); p->set_item_icon(p->get_item_index(HELP_SEARCH), gui_base->get_icon("HelpSearch", "EditorIcons")); p->set_item_icon(p->get_item_index(HELP_DOCS), gui_base->get_icon("Instance", "EditorIcons")); p->set_item_icon(p->get_item_index(HELP_QA), gui_base->get_icon("Instance", "EditorIcons")); @@ -410,51 +409,50 @@ void EditorNode::_on_plugin_ready(Object *p_script, const String &p_activate_nam push_item(script.operator->()); } -void EditorNode::_fs_changed() { +void EditorNode::_resources_changed(const PoolVector<String> &p_resources) { - for (Set<FileDialog *>::Element *E = file_dialogs.front(); E; E = E->next()) { + List<Ref<Resource> > changed; - E->get()->invalidate(); - } + int rc = p_resources.size(); + for (int i = 0; i < rc; i++) { - for (Set<EditorFileDialog *>::Element *E = editor_file_dialogs.front(); E; E = E->next()) { + Ref<Resource> res(ResourceCache::get(p_resources.get(i))); + if (res.is_null()) { + continue; + } - E->get()->invalidate(); - } + if (!res->editor_can_reload_from_file()) + continue; + if (!res->get_path().is_resource_file() && !res->get_path().is_abs_path()) + continue; + if (!FileAccess::exists(res->get_path())) + continue; - { - //reload changed resources - List<Ref<Resource> > changed; + if (res->get_import_path() != String()) { + //this is an imported resource, will be reloaded if reimported via the _resources_reimported() callback + continue; + } - List<Ref<Resource> > cached; - ResourceCache::get_cached_resources(&cached); - // FIXME: This should be done in a thread. - for (List<Ref<Resource> >::Element *E = cached.front(); E; E = E->next()) { + changed.push_back(res); + } - if (!E->get()->editor_can_reload_from_file()) - continue; - if (!E->get()->get_path().is_resource_file() && !E->get()->get_path().is_abs_path()) - continue; - if (!FileAccess::exists(E->get()->get_path())) - continue; + if (changed.size()) { + for (List<Ref<Resource> >::Element *E = changed.front(); E; E = E->next()) { + E->get()->reload_from_file(); + } + } +} - if (E->get()->get_import_path() != String()) { - //this is an imported resource, will be reloaded if reimported via the _resources_reimported() callback - continue; - } +void EditorNode::_fs_changed() { - uint64_t mt = FileAccess::get_modified_time(E->get()->get_path()); + for (Set<FileDialog *>::Element *E = file_dialogs.front(); E; E = E->next()) { - if (mt != E->get()->get_last_modified_time()) { - changed.push_back(E->get()); - } - } + E->get()->invalidate(); + } - if (changed.size()) { - for (List<Ref<Resource> >::Element *E = changed.front(); E; E = E->next()) { - E->get()->reload_from_file(); - } - } + for (Set<EditorFileDialog *>::Element *E = editor_file_dialogs.front(); E; E = E->next()) { + + E->get()->invalidate(); } _mark_unsaved_scenes(); @@ -496,7 +494,7 @@ void EditorNode::_fs_changed() { } } - get_tree()->quit(); + _exit_editor(); } } @@ -637,6 +635,7 @@ void EditorNode::save_resource(const Ref<Resource> &p_resource) { void EditorNode::save_resource_as(const Ref<Resource> &p_resource, const String &p_at_path) { file->set_mode(EditorFileDialog::MODE_SAVE_FILE); + saving_resource = p_resource; current_option = RESOURCE_SAVE_AS; List<String> extensions; @@ -1000,6 +999,22 @@ void EditorNode::_save_scene_with_preview(String p_file, int p_idx) { EditorResourcePreview::get_singleton()->check_for_invalidation(p_file); } +bool EditorNode::_validate_scene_recursive(const String &p_filename, Node *p_node) { + + for (int i = 0; i < p_node->get_child_count(); i++) { + Node *child = p_node->get_child(i); + if (child->get_filename() == p_filename) { + return true; + } + + if (_validate_scene_recursive(p_filename, child)) { + return true; + } + } + + return false; +} + void EditorNode::_save_scene(String p_file, int idx) { Node *scene = editor_data.get_edited_scene_root(idx); @@ -1010,6 +1025,11 @@ void EditorNode::_save_scene(String p_file, int idx) { return; } + if (scene->get_filename() != String() && _validate_scene_recursive(scene->get_filename(), scene)) { + show_accept(TTR("This scene can't be saved because there is a cyclic instancing inclusion.\nPlease resolve it and then attempt to save again."), TTR("OK")); + return; + } + editor_data.apply_changes_in_editors(); _save_default_environment(); @@ -1100,7 +1120,7 @@ void EditorNode::save_all_scenes_and_restart() { to_reopen = get_tree()->get_edited_scene_root()->get_filename(); } - get_tree()->quit(); + _exit_editor(); String exec = OS::get_singleton()->get_executable_path(); List<String> args; @@ -1263,15 +1283,13 @@ void EditorNode::_dialog_action(String p_file) { case RESOURCE_SAVE: case RESOURCE_SAVE_AS: { - uint32_t current = editor_history.get_current(); + ERR_FAIL_COND(saving_resource.is_null()) + save_resource_in_path(saving_resource, p_file); + saving_resource = Ref<Resource>(); + ObjectID current = editor_history.get_current(); Object *current_obj = current > 0 ? ObjectDB::get_instance(current) : NULL; - - ERR_FAIL_COND(!Object::cast_to<Resource>(current_obj)) - - RES current_res = RES(Object::cast_to<Resource>(current_obj)); - - save_resource_in_path(current_res, p_file); - + ERR_FAIL_COND(!current_obj); + current_obj->_change_notify(); } break; case SETTINGS_LAYOUT_SAVE: { @@ -2003,7 +2021,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { if (err != OK) ERR_PRINT("Failed to load scene"); editor_data.move_edited_scene_to_index(cur_idx); - get_undo_redo()->clear_history(); + get_undo_redo()->clear_history(false); scene_tabs->set_current_tab(cur_idx); } break; @@ -2263,9 +2281,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { file->popup_centered_ratio(); } break; - case HELP_CLASSES: { - emit_signal("request_help_index", ""); - } break; case HELP_SEARCH: { emit_signal("request_help_search", ""); } break; @@ -2341,6 +2356,12 @@ int EditorNode::_next_unsaved_scene(bool p_valid_filename, int p_start) { return -1; } +void EditorNode::_exit_editor() { + exiting = true; + resource_preview->stop(); //stop early to avoid crashes + get_tree()->quit(); +} + void EditorNode::_discard_changes(const String &p_str) { switch (current_option) { @@ -2368,14 +2389,13 @@ void EditorNode::_discard_changes(const String &p_str) { case FILE_QUIT: { _menu_option_confirm(RUN_STOP, true); - exiting = true; - get_tree()->quit(); + _exit_editor(); + } break; case RUN_PROJECT_MANAGER: { _menu_option_confirm(RUN_STOP, true); - exiting = true; - get_tree()->quit(); + _exit_editor(); String exec = OS::get_singleton()->get_executable_path(); List<String> args; @@ -2456,7 +2476,7 @@ void EditorNode::_editor_select(int p_which) { } } -void EditorNode::add_editor_plugin(EditorPlugin *p_editor) { +void EditorNode::add_editor_plugin(EditorPlugin *p_editor, bool p_config_changed) { if (p_editor->has_main_screen()) { @@ -2481,9 +2501,11 @@ void EditorNode::add_editor_plugin(EditorPlugin *p_editor) { } singleton->editor_data.add_editor_plugin(p_editor); singleton->add_child(p_editor); + if (p_config_changed) + p_editor->enable_plugin(); } -void EditorNode::remove_editor_plugin(EditorPlugin *p_editor) { +void EditorNode::remove_editor_plugin(EditorPlugin *p_editor, bool p_config_changed) { if (p_editor->has_main_screen()) { @@ -2506,6 +2528,8 @@ void EditorNode::remove_editor_plugin(EditorPlugin *p_editor) { } p_editor->make_visible(false); p_editor->clear(); + if (p_config_changed) + p_editor->disable_plugin(); singleton->editor_plugins_over->get_plugins_list().erase(p_editor); singleton->remove_child(p_editor); singleton->editor_data.remove_editor_plugin(p_editor); @@ -2531,7 +2555,7 @@ void EditorNode::_update_addon_config() { project_settings->queue_save(); } -void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled) { +void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled, bool p_config_changed) { ERR_FAIL_COND(p_enabled && plugin_addons.has(p_addon)); ERR_FAIL_COND(!p_enabled && !plugin_addons.has(p_addon)); @@ -2539,7 +2563,7 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled) if (!p_enabled) { EditorPlugin *addon = plugin_addons[p_addon]; - remove_editor_plugin(addon); + remove_editor_plugin(addon, p_config_changed); memdelete(addon); //bye plugin_addons.erase(p_addon); _update_addon_config(); @@ -2570,6 +2594,12 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled) return; } + //errors in the script cause the base_type to be "" + if (String(script->get_instance_base_type()) == "") { + show_warning(vformat(TTR("Unable to load addon script from path: '%s' There seems to be an error in the code, please check the syntax."), path)); + return; + } + //could check inheritance.. if (String(script->get_instance_base_type()) != "EditorPlugin") { show_warning(vformat(TTR("Unable to load addon script from path: '%s' Base type is not EditorPlugin."), path)); @@ -2585,7 +2615,7 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled) ep->set_script(script.get_ref_ptr()); ep->set_dir_cache(p_addon); plugin_addons[p_addon] = ep; - add_editor_plugin(ep); + add_editor_plugin(ep, p_config_changed); _update_addon_config(); } @@ -2613,7 +2643,7 @@ void EditorNode::_remove_edited_scene() { } _scene_tab_changed(new_index); editor_data.remove_scene(old_index); - editor_data.get_undo_redo().clear_history(); + editor_data.get_undo_redo().clear_history(false); _update_title(); _update_scene_tabs(); } @@ -2926,7 +2956,12 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b _update_scene_tabs(); _add_to_recent_scenes(lpath); - editor_folding.load_scene_folding(new_scene, lpath); + if (editor_folding.has_folding_data(lpath)) { + editor_folding.load_scene_folding(new_scene, lpath); + } else if (EDITOR_GET("interface/inspector/auto_unfold_foreign_scenes")) { + editor_folding.unfold_scene(new_scene); + editor_folding.save_scene_folding(new_scene, lpath); + } prev_scene->set_disabled(previous_scenes.size() == 0); opening_prev = false; @@ -3105,6 +3140,9 @@ bool EditorNode::is_scene_in_use(const String &p_path) { void EditorNode::register_editor_types() { + ResourceLoader::set_timestamp_on_load(true); + ResourceSaver::set_timestamp_on_save(true); + ClassDB::register_class<EditorPlugin>(); ClassDB::register_class<EditorImportPlugin>(); ClassDB::register_class<EditorScript>(); @@ -3112,6 +3150,7 @@ void EditorNode::register_editor_types() { ClassDB::register_class<EditorFileDialog>(); ClassDB::register_virtual_class<EditorSettings>(); ClassDB::register_class<EditorSpatialGizmo>(); + ClassDB::register_class<EditorSpatialGizmoPlugin>(); ClassDB::register_virtual_class<EditorResourcePreview>(); ClassDB::register_class<EditorResourcePreviewGenerator>(); ClassDB::register_virtual_class<EditorFileSystem>(); @@ -3223,17 +3262,31 @@ Ref<Texture> EditorNode::get_class_icon(const String &p_class, const String &p_f void EditorNode::progress_add_task(const String &p_task, const String &p_label, int p_steps, bool p_can_cancel) { - singleton->progress_dialog->add_task(p_task, p_label, p_steps, p_can_cancel); + if (singleton->disable_progress_dialog) { + print_line(p_task + ": begin: " + p_label + " steps: " + itos(p_steps)); + } else { + singleton->progress_dialog->add_task(p_task, p_label, p_steps, p_can_cancel); + } } bool EditorNode::progress_task_step(const String &p_task, const String &p_state, int p_step, bool p_force_refresh) { - return singleton->progress_dialog->task_step(p_task, p_state, p_step, p_force_refresh); + if (singleton->disable_progress_dialog) { + print_line("\t" + p_task + ": step " + itos(p_step) + ": " + p_state); + return false; + } else { + + return singleton->progress_dialog->task_step(p_task, p_state, p_step, p_force_refresh); + } } void EditorNode::progress_end_task(const String &p_task) { - singleton->progress_dialog->end_task(p_task); + if (singleton->disable_progress_dialog) { + print_line(p_task + ": end"); + } else { + singleton->progress_dialog->end_task(p_task); + } } void EditorNode::progress_add_task_bg(const String &p_task, const String &p_label, int p_steps) { @@ -3315,7 +3368,7 @@ Error EditorNode::export_preset(const String &p_preset, const String &p_path, bo export_defer.path = p_path; export_defer.debug = p_debug; export_defer.password = p_password; - + disable_progress_dialog = true; return OK; } @@ -3605,6 +3658,7 @@ void EditorNode::_load_docks() { _load_docks_from_config(config, "docks"); _load_open_scenes_from_config(config, "EditorNode"); + editor_data.set_plugin_window_layout(config); } @@ -3799,6 +3853,23 @@ void EditorNode::_load_open_scenes_from_config(Ref<ConfigFile> p_layout, const S restoring_scenes = false; } +bool EditorNode::has_scenes_in_session() { + if (!bool(EDITOR_GET("interface/scene_tabs/restore_scenes_on_load"))) { + return false; + } + Ref<ConfigFile> config; + config.instance(); + Error err = config->load(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg")); + if (err != OK) { + return false; + } + if (!config->has_section("EditorNode") || !config->has_section_key("EditorNode", "open_scenes")) { + return false; + } + Array scenes = config->get_value("EditorNode", "open_scenes"); + return !scenes.empty(); +} + void EditorNode::_update_layouts_menu() { editor_layouts->clear(); @@ -4588,6 +4659,8 @@ void EditorNode::_bind_methods() { ClassDB::bind_method("edit_node", &EditorNode::edit_node); ClassDB::bind_method("_unhandled_input", &EditorNode::_unhandled_input); + ClassDB::bind_method(D_METHOD("push_item", "object", "property", "inspector_only"), &EditorNode::push_item, DEFVAL(""), DEFVAL(false)); + ClassDB::bind_method("_get_scene_metadata", &EditorNode::_get_scene_metadata); ClassDB::bind_method("set_edited_scene", &EditorNode::set_edited_scene); ClassDB::bind_method("open_request", &EditorNode::open_request); @@ -4651,11 +4724,12 @@ void EditorNode::_bind_methods() { ClassDB::bind_method(D_METHOD("_video_driver_selected"), &EditorNode::_video_driver_selected); + ClassDB::bind_method(D_METHOD("_resources_changed"), &EditorNode::_resources_changed); + ADD_SIGNAL(MethodInfo("play_pressed")); ADD_SIGNAL(MethodInfo("pause_pressed")); ADD_SIGNAL(MethodInfo("stop_pressed")); ADD_SIGNAL(MethodInfo("request_help_search")); - ADD_SIGNAL(MethodInfo("request_help_index")); ADD_SIGNAL(MethodInfo("script_add_function_request", PropertyInfo(Variant::OBJECT, "obj"), PropertyInfo(Variant::STRING, "function"), PropertyInfo(Variant::POOL_STRING_ARRAY, "args"))); ADD_SIGNAL(MethodInfo("resource_saved", PropertyInfo(Variant::OBJECT, "obj"))); } @@ -4704,7 +4778,7 @@ EditorNode::EditorNode() { _initializing_addons = false; docks_visible = true; restoring_scenes = false; - + disable_progress_dialog = false; scene_distraction = false; script_distraction = false; @@ -4763,9 +4837,6 @@ EditorNode::EditorNode() { ResourceLoader::set_error_notify_func(this, _load_error_notify); ResourceLoader::set_dependency_error_notify_func(this, _dependency_error_report); - ResourceLoader::set_timestamp_on_load(true); - ResourceSaver::set_timestamp_on_save(true); - { //register importers at the beginning, so dialogs are created with the right extensions Ref<ResourceImporterTexture> import_texture; import_texture.instance(); @@ -4877,7 +4948,7 @@ EditorNode::EditorNode() { EDITOR_DEF_RST("interface/scene_tabs/show_thumbnail_on_hover", true); EDITOR_DEF_RST("interface/inspector/capitalize_properties", true); EDITOR_DEF_RST("interface/inspector/disable_folding", false); - EDITOR_DEF_RST("interface/inspector/auto_unfold_edited", true); + EDITOR_DEF_RST("interface/inspector/auto_unfold_foreign_scenes", true); EDITOR_DEF("interface/inspector/horizontal_vector2_editing", false); EDITOR_DEF("interface/inspector/horizontal_vector_types_editing", true); EDITOR_DEF("interface/inspector/open_resources_in_current_inspector", true); @@ -5128,14 +5199,9 @@ EditorNode::EditorNode() { top_region->add_child(left_menu_hb); menu_hb->add_child(top_region); - { - Control *sp = memnew(Control); - sp->set_custom_minimum_size(Size2(30, 0) * EDSCALE); - menu_hb->add_child(sp); - } - file_menu = memnew(MenuButton); file_menu->set_flat(false); + file_menu->set_switch_on_hover(true); file_menu->set_text(TTR("Scene")); file_menu->add_style_override("hover", gui_base->get_stylebox("MenuHover", "EditorStyles")); left_menu_hb->add_child(file_menu); @@ -5227,6 +5293,7 @@ EditorNode::EditorNode() { project_menu = memnew(MenuButton); project_menu->set_flat(false); + project_menu->set_switch_on_hover(true); project_menu->set_tooltip(TTR("Miscellaneous project or scene-wide tools.")); project_menu->set_text(TTR("Project")); project_menu->add_style_override("hover", gui_base->get_stylebox("MenuHover", "EditorStyles")); @@ -5268,6 +5335,7 @@ EditorNode::EditorNode() { debug_menu = memnew(MenuButton); debug_menu->set_flat(false); + debug_menu->set_switch_on_hover(true); debug_menu->set_text(TTR("Debug")); debug_menu->add_style_override("hover", gui_base->get_stylebox("MenuHover", "EditorStyles")); left_menu_hb->add_child(debug_menu); @@ -5298,6 +5366,7 @@ EditorNode::EditorNode() { settings_menu = memnew(MenuButton); settings_menu->set_flat(false); + settings_menu->set_switch_on_hover(true); settings_menu->set_text(TTR("Editor")); settings_menu->add_style_override("hover", gui_base->get_stylebox("MenuHover", "EditorStyles")); left_menu_hb->add_child(settings_menu); @@ -5334,6 +5403,7 @@ EditorNode::EditorNode() { // Help Menu help_menu = memnew(MenuButton); help_menu->set_flat(false); + help_menu->set_switch_on_hover(true); help_menu->set_text(TTR("Help")); help_menu->add_style_override("hover", gui_base->get_stylebox("MenuHover", "EditorStyles")); left_menu_hb->add_child(help_menu); @@ -5341,8 +5411,7 @@ EditorNode::EditorNode() { p = help_menu->get_popup(); p->set_hide_on_window_lose_focus(true); p->connect("id_pressed", this, "_menu_option"); - p->add_icon_item(gui_base->get_icon("ClassList", "EditorIcons"), TTR("Classes"), HELP_CLASSES); - p->add_icon_item(gui_base->get_icon("HelpSearch", "EditorIcons"), TTR("Search"), HELP_SEARCH); + p->add_icon_shortcut(gui_base->get_icon("HelpSearch", "EditorIcons"), ED_SHORTCUT("editor/editor_help", TTR("Search"), KEY_F4), HELP_SEARCH); p->add_separator(); p->add_icon_item(gui_base->get_icon("Instance", "EditorIcons"), TTR("Online Docs"), HELP_DOCS); p->add_icon_item(gui_base->get_icon("Instance", "EditorIcons"), TTR("Q&A"), HELP_QA); @@ -5351,12 +5420,8 @@ EditorNode::EditorNode() { p->add_separator(); p->add_icon_item(gui_base->get_icon("Godot", "EditorIcons"), TTR("About"), HELP_ABOUT); - play_cc = memnew(CenterContainer); - play_cc->set_mouse_filter(Control::MOUSE_FILTER_IGNORE); - menu_hb->add_child(play_cc); - play_button_panel = memnew(PanelContainer); - play_cc->add_child(play_button_panel); + menu_hb->add_child(play_button_panel); HBoxContainer *play_hb = memnew(HBoxContainer); play_button_panel->add_child(play_hb); @@ -5402,11 +5467,6 @@ EditorNode::EditorNode() { run_native = memnew(EditorRunNative); play_hb->add_child(run_native); - native_play_button = memnew(MenuButton); - native_play_button->set_text("NTV"); - menu_hb->add_child(native_play_button); - native_play_button->hide(); - native_play_button->get_popup()->connect("id_pressed", this, "_run_in_device"); run_native->connect("native_run", this, "_menu_option", varray(RUN_PLAY_NATIVE)); play_scene_button = memnew(ToolButton); @@ -5435,6 +5495,9 @@ EditorNode::EditorNode() { play_custom_scene_button->set_shortcut(ED_SHORTCUT("editor/play_custom_scene", TTR("Play Custom Scene"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F5)); #endif + HBoxContainer *right_menu_hb = memnew(HBoxContainer); + menu_hb->add_child(right_menu_hb); + // Toggle for video driver video_driver = memnew(OptionButton); video_driver->set_flat(true); @@ -5442,7 +5505,7 @@ EditorNode::EditorNode() { video_driver->set_v_size_flags(Control::SIZE_SHRINK_CENTER); video_driver->connect("item_selected", this, "_video_driver_selected"); video_driver->add_font_override("font", gui_base->get_font("bold", "EditorFonts")); - menu_hb->add_child(video_driver); + right_menu_hb->add_child(video_driver); String video_drivers = ProjectSettings::get_singleton()->get_custom_property_info()["rendering/quality/driver/driver_name"].hint_string; String current_video_driver = OS::get_singleton()->get_video_driver_name(OS::get_singleton()->get_current_video_driver()); @@ -5468,9 +5531,6 @@ EditorNode::EditorNode() { progress_hb = memnew(BackgroundProgress); - HBoxContainer *right_menu_hb = memnew(HBoxContainer); - menu_hb->add_child(right_menu_hb); - layout_dialog = memnew(EditorNameDialog); gui_base->add_child(layout_dialog); layout_dialog->set_hide_on_ok(false); @@ -5777,6 +5837,7 @@ EditorNode::EditorNode() { _edit_current(); current = NULL; + saving_resource = Ref<Resource>(); reference_resource_mem = true; save_external_resources_mem = true; @@ -5819,6 +5880,7 @@ EditorNode::EditorNode() { EditorFileSystem::get_singleton()->connect("sources_changed", this, "_sources_changed"); EditorFileSystem::get_singleton()->connect("filesystem_changed", this, "_fs_changed"); EditorFileSystem::get_singleton()->connect("resources_reimported", this, "_resources_reimported"); + EditorFileSystem::get_singleton()->connect("resources_reload", this, "_resources_changed"); _build_icon_type_cache(); |