diff options
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 128 |
1 files changed, 66 insertions, 62 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 1aed86c132..11efe7202e 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 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 */ @@ -477,6 +477,7 @@ void EditorNode::_update_from_settings() { RS::get_singleton()->environment_set_ssao_quality(RS::EnvironmentSSAOQuality(int(GLOBAL_GET("rendering/environment/ssao/quality"))), GLOBAL_GET("rendering/environment/ssao/half_size"), GLOBAL_GET("rendering/environment/ssao/adaptive_target"), GLOBAL_GET("rendering/environment/ssao/blur_passes"), GLOBAL_GET("rendering/environment/ssao/fadeout_from"), GLOBAL_GET("rendering/environment/ssao/fadeout_to")); RS::get_singleton()->screen_space_roughness_limiter_set_active(GLOBAL_GET("rendering/anti_aliasing/screen_space_roughness_limiter/enabled"), GLOBAL_GET("rendering/anti_aliasing/screen_space_roughness_limiter/amount"), GLOBAL_GET("rendering/anti_aliasing/screen_space_roughness_limiter/limit")); bool glow_bicubic = int(GLOBAL_GET("rendering/environment/glow/upscale_mode")) > 0; + RS::get_singleton()->environment_set_ssil_quality(RS::EnvironmentSSILQuality(int(GLOBAL_GET("rendering/environment/ssil/quality"))), GLOBAL_GET("rendering/environment/ssil/half_size"), GLOBAL_GET("rendering/environment/ssil/adaptive_target"), GLOBAL_GET("rendering/environment/ssil/blur_passes"), GLOBAL_GET("rendering/environment/ssil/fadeout_from"), GLOBAL_GET("rendering/environment/ssil/fadeout_to")); RS::get_singleton()->environment_glow_set_use_bicubic_upscale(glow_bicubic); bool glow_high_quality = GLOBAL_GET("rendering/environment/glow/use_high_quality"); RS::get_singleton()->environment_glow_set_use_high_quality(glow_high_quality); @@ -521,8 +522,8 @@ void EditorNode::_update_from_settings() { Viewport::SDFScale sdf_scale = Viewport::SDFScale(int(GLOBAL_GET("rendering/2d/sdf/scale"))); scene_root->set_sdf_scale(sdf_scale); - float lod_threshold = GLOBAL_GET("rendering/mesh_lod/lod_change/threshold_pixels"); - scene_root->set_lod_threshold(lod_threshold); + float mesh_lod_threshold = GLOBAL_GET("rendering/mesh_lod/lod_change/threshold_pixels"); + scene_root->set_mesh_lod_threshold(mesh_lod_threshold); RS::get_singleton()->decals_set_filter(RS::DecalFilter(int(GLOBAL_GET("rendering/textures/decals/filter")))); RS::get_singleton()->light_projectors_set_filter(RS::LightProjectorFilter(int(GLOBAL_GET("rendering/textures/light_projectors/filter")))); @@ -858,7 +859,7 @@ void EditorNode::_resources_changed(const Vector<String> &p_resources) { continue; } - if (res->get_import_path() != String()) { + if (!res->get_import_path().is_empty()) { // this is an imported resource, will be reloaded if reimported via the _resources_reimported() callback continue; } @@ -886,7 +887,7 @@ void EditorNode::_fs_changed() { // FIXME: Move this to a cleaner location, it's hacky to do this is _fs_changed. String export_error; - if (export_defer.preset != "" && !EditorFileSystem::get_singleton()->is_scanning()) { + if (!export_defer.preset.is_empty() && !EditorFileSystem::get_singleton()->is_scanning()) { String preset_name = export_defer.preset; // Ensures export_project does not loop infinitely, because notifications may // come during the export. @@ -1006,7 +1007,7 @@ void EditorNode::_sources_changed(bool p_exist) { _load_docks(); - if (defer_load_scene != "") { + if (!defer_load_scene.is_empty()) { load_scene(defer_load_scene); defer_load_scene = ""; } @@ -1242,7 +1243,7 @@ void EditorNode::save_resource_as(const Ref<Resource> &p_resource, const String preferred.move_to_front(tres_element); } - if (p_at_path != String()) { + if (!p_at_path.is_empty()) { file->set_current_dir(p_at_path); if (p_resource->get_path().is_resource_file()) { file->set_current_file(p_resource->get_path().get_file()); @@ -1254,7 +1255,7 @@ void EditorNode::save_resource_as(const Ref<Resource> &p_resource, const String file->set_current_file(String()); } } - } else if (p_resource->get_path() != "") { + } else if (!p_resource->get_path().is_empty()) { file->set_current_path(p_resource->get_path()); if (extensions.size()) { String ext = p_resource->get_path().get_extension().to_lower(); @@ -1676,7 +1677,7 @@ void EditorNode::_save_scene(String p_file, int idx) { return; } - if (scene->get_scene_file_path() != String() && _validate_scene_recursive(scene->get_scene_file_path(), scene)) { + if (!scene->get_scene_file_path().is_empty() && _validate_scene_recursive(scene->get_scene_file_path(), 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; } @@ -1780,7 +1781,7 @@ void EditorNode::restart_editor() { args.push_back("--path"); args.push_back(ProjectSettings::get_singleton()->get_resource_path()); args.push_back("-e"); - if (to_reopen != String()) { + if (!to_reopen.is_empty()) { args.push_back(to_reopen); } @@ -1792,13 +1793,13 @@ void EditorNode::_save_all_scenes() { for (int i = 0; i < editor_data.get_edited_scene_count(); i++) { Node *scene = editor_data.get_edited_scene_root(i); if (scene) { - if (scene->get_scene_file_path() != "" && DirAccess::exists(scene->get_scene_file_path().get_base_dir())) { + if (!scene->get_scene_file_path().is_empty() && DirAccess::exists(scene->get_scene_file_path().get_base_dir())) { if (i != editor_data.get_edited_scene()) { _save_scene(scene->get_scene_file_path(), i); } else { _save_scene_with_preview(scene->get_scene_file_path()); } - } else if (scene->get_scene_file_path() != "") { + } else if (!scene->get_scene_file_path().is_empty()) { all_saved = false; } } @@ -1818,7 +1819,7 @@ void EditorNode::_mark_unsaved_scenes() { } String path = node->get_scene_file_path(); - if (!(path == String() || FileAccess::exists(path))) { + if (!(path.is_empty() || FileAccess::exists(path))) { if (i == editor_data.get_edited_scene()) { set_current_version(-1); } else { @@ -2080,7 +2081,7 @@ void EditorNode::push_item(Object *p_object, const String &p_property, bool p_in if (id != editor_history.get_current()) { if (p_inspector_only) { editor_history.add_object_inspector_only(id); - } else if (p_property == "") { + } else if (p_property.is_empty()) { editor_history.add_object(id); } else { editor_history.add_object(id, p_property); @@ -2128,11 +2129,19 @@ static bool overrides_external_editor(Object *p_object) { return script->get_language()->overrides_external_editor(); } -void EditorNode::_edit_current() { +void EditorNode::_edit_current(bool p_skip_foreign) { ObjectID current = editor_history.get_current(); Object *current_obj = current.is_valid() ? ObjectDB::get_instance(current) : nullptr; - bool inspector_only = editor_history.is_current_inspector_only(); + RES res = Object::cast_to<Resource>(current_obj); + if (p_skip_foreign && res.is_valid()) { + if (res->get_path().find("::") > -1 && res->get_path().get_slice("::", 0) != editor_data.get_scene_path(get_current_tab())) { + // Trying to edit resource that belongs to another scene; abort. + current_obj = nullptr; + } + } + + bool inspector_only = editor_history.is_current_inspector_only(); this->current = current_obj; if (!current_obj) { @@ -2193,7 +2202,7 @@ void EditorNode::_edit_current() { inspector_dock->update(nullptr); } - if (get_edited_scene() && get_edited_scene()->get_scene_file_path() != String()) { + if (get_edited_scene() && !get_edited_scene()->get_scene_file_path().is_empty()) { String source_scene = get_edited_scene()->get_scene_file_path(); if (FileAccess::exists(source_scene + ".import")) { editable_warning = TTR("This scene was imported, so changes to it won't be kept.\nInstancing it or inheriting will allow making changes to it.\nPlease read the documentation relevant to importing scenes to better understand this workflow."); @@ -2263,8 +2272,8 @@ void EditorNode::_edit_current() { if (main_plugin) { // special case if use of external editor is true - Resource *res = Object::cast_to<Resource>(current_obj); - if (main_plugin->get_name() == "Script" && current_obj->get_class_name() != StringName("VisualScript") && res && !res->is_built_in() && (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor")) || overrides_external_editor(current_obj))) { + Resource *current_res = Object::cast_to<Resource>(current_obj); + if (main_plugin->get_name() == "Script" && current_obj->get_class_name() != StringName("VisualScript") && current_res && !current_res->is_built_in() && (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor")) || overrides_external_editor(current_obj))) { if (!changing_scene) { main_plugin->edit(current_obj); } @@ -2316,7 +2325,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) { String run_filename; - if (p_current || (editor_data.get_edited_scene_root() && p_custom != String() && p_custom == editor_data.get_edited_scene_root()->get_scene_file_path())) { + if (p_current || (editor_data.get_edited_scene_root() && !p_custom.is_empty() && p_custom == editor_data.get_edited_scene_root()->get_scene_file_path())) { Node *scene = editor_data.get_edited_scene_root(); if (!scene) { @@ -2324,7 +2333,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) { return; } - if (scene->get_scene_file_path() == "") { + if (scene->get_scene_file_path().is_empty()) { current_option = -1; _menu_option(FILE_SAVE_AS_SCENE); // Set the option to save and run so when the dialog is accepted, the scene runs. @@ -2334,11 +2343,11 @@ void EditorNode::_run(bool p_current, const String &p_custom) { } run_filename = scene->get_scene_file_path(); - } else if (p_custom != "") { + } else if (!p_custom.is_empty()) { run_filename = p_custom; } - if (run_filename == "") { + if (run_filename.is_empty()) { // evidently, run the scene if (!ensure_main_scene(false)) { return; @@ -2349,7 +2358,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) { if (unsaved_cache) { Node *scene = editor_data.get_edited_scene_root(); - if (scene && scene->get_scene_file_path() != "") { // Only autosave if there is a scene and if it has a path. + if (scene && !scene->get_scene_file_path().is_empty()) { // Only autosave if there is a scene and if it has a path. _save_scene_with_preview(scene->get_scene_file_path()); } } @@ -2381,7 +2390,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) { if (p_current) { play_scene_button->set_pressed(true); play_scene_button->set_icon(gui_base->get_theme_icon(SNAME("Reload"), SNAME("EditorIcons"))); - } else if (p_custom != "") { + } else if (!p_custom.is_empty()) { run_custom_filename = p_custom; play_custom_scene_button->set_pressed(true); play_custom_scene_button->set_icon(gui_base->get_theme_icon(SNAME("Reload"), SNAME("EditorIcons"))); @@ -2501,7 +2510,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { if (scene_root) { String scene_filename = scene_root->get_scene_file_path(); save_confirmation->get_ok_button()->set_text(TTR("Save & Close")); - save_confirmation->set_text(vformat(TTR("Save changes to '%s' before closing?"), scene_filename != "" ? scene_filename : "unsaved scene")); + save_confirmation->set_text(vformat(TTR("Save changes to '%s' before closing?"), !scene_filename.is_empty() ? scene_filename : "unsaved scene")); save_confirmation->popup_centered(); break; } @@ -2519,7 +2528,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { case FILE_SAVE_SCENE: { int scene_idx = (p_option == FILE_SAVE_SCENE) ? -1 : tab_closing; Node *scene = editor_data.get_edited_scene_root(scene_idx); - if (scene && scene->get_scene_file_path() != "") { + if (scene && !scene->get_scene_file_path().is_empty()) { if (DirAccess::exists(scene->get_scene_file_path().get_base_dir())) { if (scene_idx != editor_data.get_edited_scene()) { _save_scene_with_preview(scene->get_scene_file_path(), scene_idx); @@ -2575,7 +2584,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { file->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper()); } - if (scene->get_scene_file_path() != "") { + if (!scene->get_scene_file_path().is_empty()) { String path = scene->get_scene_file_path(); file->set_current_path(path); if (extensions.size()) { @@ -2657,7 +2666,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { if (!editor_data.get_undo_redo().undo()) { log->add_message(TTR("Nothing to undo."), EditorLog::MSG_TYPE_EDITOR); - } else if (action != "") { + } else if (!action.is_empty()) { log->add_message(vformat(TTR("Undo: %s"), action), EditorLog::MSG_TYPE_EDITOR); } } @@ -2684,7 +2693,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { String filename = scene->get_scene_file_path(); - if (filename == String()) { + if (filename.is_empty()) { show_warning(TTR("Can't reload a scene that was never saved.")); break; } @@ -2754,7 +2763,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { case FILE_SHOW_IN_FILESYSTEM: { String path = editor_data.get_scene_path(editor_data.get_edited_scene()); - if (path != String()) { + if (!path.is_empty()) { filesystem_dock->navigate_to_path(path); } } break; @@ -2779,8 +2788,8 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { } } } break; - case RUN_PROJECT_DATA_FOLDER: { - // ensure_user_data_dir() to prevent the edge case: "Open Project Data Folder" won't work after the project was renamed in ProjectSettingsEditor unless the project is saved + case RUN_USER_DATA_FOLDER: { + // ensure_user_data_dir() to prevent the edge case: "Open User Data Folder" won't work after the project was renamed in ProjectSettingsEditor unless the project is saved OS::get_singleton()->ensure_user_data_dir(); OS::get_singleton()->shell_open(String("file://") + OS::get_singleton()->get_user_data_dir()); } break; @@ -2860,11 +2869,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { DisplayServer::get_singleton()->window_set_mode(DisplayServer::get_singleton()->window_get_mode() == DisplayServer::WINDOW_MODE_FULLSCREEN ? DisplayServer::WINDOW_MODE_WINDOWED : DisplayServer::WINDOW_MODE_FULLSCREEN); } break; - case SETTINGS_TOGGLE_CONSOLE: { - bool was_visible = DisplayServer::get_singleton()->is_console_visible(); - DisplayServer::get_singleton()->console_set_visible(!was_visible); - EditorSettings::get_singleton()->set_setting("interface/editor/hide_console_window", was_visible); - } break; case EDITOR_SCREENSHOT: { screenshot_timer->start(); } break; @@ -3019,7 +3023,7 @@ void EditorNode::_discard_changes(const String &p_str) { Node *scene = editor_data.get_edited_scene_root(tab_closing); if (scene != nullptr) { String scene_filename = scene->get_scene_file_path(); - if (scene_filename != "") { + if (!scene_filename.is_empty()) { previous_scenes.push_back(scene_filename); } } @@ -3146,7 +3150,7 @@ void EditorNode::_editor_select(int p_which) { } void EditorNode::select_editor_by_name(const String &p_name) { - ERR_FAIL_COND(p_name == ""); + ERR_FAIL_COND(p_name.is_empty()); for (int i = 0; i < main_editor_buttons.size(); i++) { if (main_editor_buttons[i]->get_text() == p_name) { @@ -3501,7 +3505,7 @@ void EditorNode::set_current_scene(int p_idx) { } Dictionary state = editor_data.restore_edited_scene_state(editor_selection, &editor_history); - _edit_current(); + _edit_current(true); _update_title(); @@ -4499,13 +4503,13 @@ void EditorNode::_save_docks_to_config(Ref<ConfigFile> p_layout, const String &p String names; for (int j = 0; j < dock_slot[i]->get_tab_count(); j++) { String name = dock_slot[i]->get_tab_control(j)->get_name(); - if (names != "") { + if (!names.is_empty()) { names += ","; } names += name; } - if (names != "") { + if (!names.is_empty()) { p_layout->set_value(p_section, "dock_" + itos(i + 1), names); } } @@ -4530,7 +4534,7 @@ void EditorNode::_save_open_scenes_to_config(Ref<ConfigFile> p_layout, const Str Array scenes; for (int i = 0; i < editor_data.get_edited_scene_count(); i++) { String path = editor_data.get_scene_path(i); - if (path == "") { + if (path.is_empty()) { continue; } scenes.push_back(path); @@ -4797,7 +4801,7 @@ bool EditorNode::ensure_main_scene(bool p_from_native) { pick_main_scene->set_meta("from_native", p_from_native); // whether from play button or native run String main_scene = GLOBAL_DEF("application/run/main_scene", ""); - if (main_scene == "") { + if (main_scene.is_empty()) { current_option = -1; pick_main_scene->set_text(TTR("No main scene has ever been defined, select one?\nYou can change it later in \"Project Settings\" under the 'application' category.")); pick_main_scene->popup_centered(); @@ -4860,7 +4864,7 @@ bool EditorNode::is_run_playing() const { String EditorNode::get_run_playing_scene() const { String run_filename = editor_run.get_running_scene(); - if (run_filename == "" && is_run_playing()) { + if (run_filename.is_empty() && is_run_playing()) { run_filename = GLOBAL_DEF("application/run/main_scene", ""); // Must be the main scene then. } @@ -4986,7 +4990,7 @@ void EditorNode::_scene_tab_closed(int p_tab, int option) { : editor_data.get_scene_version(p_tab) != 0; if (unsaved) { save_confirmation->get_ok_button()->set_text(TTR("Save & Close")); - save_confirmation->set_text(vformat(TTR("Save changes to '%s' before closing?"), scene->get_scene_file_path() != "" ? scene->get_scene_file_path() : "unsaved scene")); + save_confirmation->set_text(vformat(TTR("Save changes to '%s' before closing?"), !scene->get_scene_file_path().is_empty() ? scene->get_scene_file_path() : "unsaved scene")); save_confirmation->popup_centered(); } else { _discard_changes(); @@ -5006,7 +5010,7 @@ void EditorNode::_scene_tab_hovered(int p_tab) { tab_preview_panel->hide(); } else { String path = editor_data.get_scene_path(p_tab); - if (path != String()) { + if (!path.is_empty()) { EditorResourcePreview::get_singleton()->queue_resource_preview(path, this, "_thumbnail_done", p_tab); } } @@ -5315,7 +5319,7 @@ Variant EditorNode::drag_resource(const Ref<Resource> &p_res, Control *p_from) { drag_control->add_child(drag_preview); if (p_res->get_path().is_resource_file()) { label->set_text(p_res->get_path().get_file()); - } else if (p_res->get_name() != "") { + } else if (!p_res->get_name().is_empty()) { label->set_text(p_res->get_name()); } else { label->set_text(p_res->get_class()); @@ -5454,7 +5458,7 @@ void EditorNode::_add_dropped_files_recursive(const Vector<String> &p_files, Str sub_dir->list_dir_begin(); String next_file = sub_dir->get_next(); - while (next_file != "") { + while (!next_file.is_empty()) { if (next_file == "." || next_file == "..") { next_file = sub_dir->get_next(); continue; @@ -6039,6 +6043,11 @@ EditorNode::EditorNode() { EDITOR_DEF("interface/inspector/default_color_picker_shape", (int32_t)ColorPicker::SHAPE_VHS_CIRCLE); EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "interface/inspector/default_color_picker_shape", PROPERTY_HINT_ENUM, "HSV Rectangle,HSV Rectangle Wheel,VHS Circle", PROPERTY_USAGE_DEFAULT)); EDITOR_DEF("run/auto_save/save_before_running", true); + EDITOR_DEF("interface/editors/sub_editor_panning_scheme", 0); + EDITOR_DEF("interface/editors/animation_editors_panning_scheme", 1); + // Should be in sync with ControlScheme in ViewPanner. + EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "interface/editors/sub_editor_panning_scheme", PROPERTY_HINT_ENUM, "Scroll Zooms,Scroll Pans", PROPERTY_USAGE_DEFAULT)); + EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "interface/editors/animation_editors_panning_scheme", PROPERTY_HINT_ENUM, "Scroll Zooms,Scroll Pans", PROPERTY_USAGE_DEFAULT)); const Vector<String> textfile_ext = ((String)(EditorSettings::get_singleton()->get("docks/filesystem/textfile_extensions"))).split(",", false); for (const String &E : textfile_ext) { @@ -6160,7 +6169,7 @@ EditorNode::EditorNode() { Label *dock_label = memnew(Label); dock_label->set_text(TTR("Dock Position")); dock_label->set_h_size_flags(Control::SIZE_EXPAND_FILL); - dock_label->set_align(Label::ALIGN_CENTER); + dock_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER); dock_hb->add_child(dock_label); dock_tab_move_right = memnew(Button); @@ -6200,7 +6209,7 @@ EditorNode::EditorNode() { dock_slot[i]->set_v_size_flags(Control::SIZE_EXPAND_FILL); dock_slot[i]->set_popup(dock_select_popup); dock_slot[i]->connect("pre_popup_pressed", callable_mp(this, &EditorNode::_dock_pre_popup), varray(i)); - dock_slot[i]->set_tab_align(TabContainer::ALIGN_LEFT); + dock_slot[i]->set_tab_alignment(TabContainer::ALIGNMENT_LEFT); dock_slot[i]->set_drag_to_rearrange_enabled(true); dock_slot[i]->set_tabs_rearrange_group(1); dock_slot[i]->connect("tab_changed", callable_mp(this, &EditorNode::_dock_tab_changed)); @@ -6240,7 +6249,7 @@ EditorNode::EditorNode() { scene_tabs->add_theme_style_override("tab_unselected", gui_base->get_theme_stylebox(SNAME("SceneTabBG"), SNAME("EditorStyles"))); scene_tabs->set_select_with_rmb(true); scene_tabs->add_tab("unsaved"); - scene_tabs->set_tab_align(TabBar::ALIGN_LEFT); + scene_tabs->set_tab_alignment(TabBar::ALIGNMENT_LEFT); scene_tabs->set_tab_close_display_policy((bool(EDITOR_DEF("interface/scene_tabs/always_show_close_button", false)) ? TabBar::CLOSE_BUTTON_SHOW_ALWAYS : TabBar::CLOSE_BUTTON_SHOW_ACTIVE_ONLY)); scene_tabs->set_min_width(int(EDITOR_DEF("interface/scene_tabs/minimum_width", 50)) * EDSCALE); scene_tabs->set_drag_to_rearrange_enabled(true); @@ -6444,7 +6453,7 @@ EditorNode::EditorNode() { p->add_separator(); p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/export", TTR("Export..."), Key::NONE, TTR("Export")), FILE_EXPORT_PROJECT); p->add_item(TTR("Install Android Build Template..."), FILE_INSTALL_ANDROID_SOURCE); - p->add_item(TTR("Open Project Data Folder"), RUN_PROJECT_DATA_FOLDER); + p->add_item(TTR("Open User Data Folder"), RUN_USER_DATA_FOLDER); plugin_config_dialog = memnew(PluginConfigDialog); plugin_config_dialog->connect("plugin_ready", callable_mp(this, &EditorNode::_on_plugin_ready)); @@ -6510,11 +6519,6 @@ EditorNode::EditorNode() { ED_SHORTCUT_OVERRIDE("editor/fullscreen_mode", "macos", KeyModifierMask::CMD | KeyModifierMask::CTRL | Key::F); p->add_shortcut(ED_GET_SHORTCUT("editor/fullscreen_mode"), SETTINGS_TOGGLE_FULLSCREEN); -#if defined(WINDOWS_ENABLED) && defined(WINDOWS_SUBSYSTEM_CONSOLE) - // The console can only be toggled if the application was built for the console subsystem, - // not the GUI subsystem. - p->add_item(TTR("Toggle System Console"), SETTINGS_TOGGLE_CONSOLE); -#endif p->add_separator(); if (OS::get_singleton()->get_data_path() == OS::get_singleton()->get_config_path()) { @@ -7020,7 +7024,7 @@ EditorNode::EditorNode() { add_editor_plugin(memnew(PhysicalBone3DEditorPlugin(this))); add_editor_plugin(memnew(MeshEditorPlugin(this))); add_editor_plugin(memnew(MaterialEditorPlugin(this))); - add_editor_plugin(memnew(GPUParticlesCollisionSDFEditorPlugin(this))); + add_editor_plugin(memnew(GPUParticlesCollisionSDF3DEditorPlugin(this))); add_editor_plugin(memnew(InputEventEditorPlugin(this))); add_editor_plugin(memnew(SubViewportPreviewEditorPlugin(this))); add_editor_plugin(memnew(TextControlEditorPlugin(this))); @@ -7212,7 +7216,7 @@ EditorNode::~EditorNode() { EditorTranslationParser::get_singleton()->clean_parsers(); remove_print_handler(&print_handler); - memdelete(EditorHelp::get_doc_data()); + EditorHelp::cleanup_doc(); memdelete(editor_selection); memdelete(editor_plugins_over); memdelete(editor_plugins_force_over); |