diff options
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 44 |
1 files changed, 15 insertions, 29 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 7a9511e8c6..de0465a160 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -90,6 +90,7 @@ #include "editor/editor_paths.h" #include "editor/editor_plugin.h" #include "editor/editor_properties.h" +#include "editor/editor_property_name_processor.h" #include "editor/editor_resource_picker.h" #include "editor/editor_resource_preview.h" #include "editor/editor_run.h" @@ -700,7 +701,7 @@ void EditorNode::_notification(int p_what) { } break; case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { - scene_tabs->set_tab_close_display_policy((bool(EDITOR_GET("interface/scene_tabs/always_show_close_button")) ? TabBar::CLOSE_BUTTON_SHOW_ALWAYS : TabBar::CLOSE_BUTTON_SHOW_ACTIVE_ONLY)); + scene_tabs->set_tab_close_display_policy((TabBar::CloseButtonDisplayPolicy)EDITOR_GET("interface/scene_tabs/display_close_button").operator int()); bool theme_changed = EditorSettings::get_singleton()->check_changed_settings_in_group("interface/theme") || @@ -3858,18 +3859,18 @@ void EditorNode::register_editor_types() { GDREGISTER_CLASS(EditorScript); GDREGISTER_CLASS(EditorSelection); GDREGISTER_CLASS(EditorFileDialog); - GDREGISTER_VIRTUAL_CLASS(EditorSettings); + GDREGISTER_ABSTRACT_CLASS(EditorSettings); GDREGISTER_CLASS(EditorNode3DGizmo); GDREGISTER_CLASS(EditorNode3DGizmoPlugin); - GDREGISTER_VIRTUAL_CLASS(EditorResourcePreview); + GDREGISTER_ABSTRACT_CLASS(EditorResourcePreview); GDREGISTER_CLASS(EditorResourcePreviewGenerator); - GDREGISTER_VIRTUAL_CLASS(EditorFileSystem); + GDREGISTER_ABSTRACT_CLASS(EditorFileSystem); GDREGISTER_CLASS(EditorFileSystemDirectory); GDREGISTER_CLASS(EditorVCSInterface); - GDREGISTER_VIRTUAL_CLASS(ScriptEditor); - GDREGISTER_VIRTUAL_CLASS(ScriptEditorBase); + GDREGISTER_ABSTRACT_CLASS(ScriptEditor); + GDREGISTER_ABSTRACT_CLASS(ScriptEditorBase); GDREGISTER_CLASS(EditorSyntaxHighlighter); - GDREGISTER_VIRTUAL_CLASS(EditorInterface); + GDREGISTER_ABSTRACT_CLASS(EditorInterface); GDREGISTER_CLASS(EditorExportPlugin); GDREGISTER_CLASS(EditorResourceConversionPlugin); GDREGISTER_CLASS(EditorSceneFormatImporter); @@ -3884,7 +3885,7 @@ void EditorNode::register_editor_types() { GDREGISTER_CLASS(EditorResourcePicker); GDREGISTER_CLASS(EditorScriptPicker); - GDREGISTER_VIRTUAL_CLASS(FileSystemDock); + GDREGISTER_ABSTRACT_CLASS(FileSystemDock); // FIXME: Is this stuff obsolete, or should it be ported to new APIs? GDREGISTER_CLASS(EditorScenePostImport); @@ -5803,6 +5804,9 @@ void EditorNode::notify_settings_changed() { } EditorNode::EditorNode() { + EditorPropertyNameProcessor *epnp = memnew(EditorPropertyNameProcessor); + add_child(epnp); + Input::get_singleton()->set_use_accumulated_input(true); Resource::_get_local_scene_func = _resource_get_edited_scene; @@ -5837,16 +5841,7 @@ EditorNode::EditorNode() { } singleton = this; - exiting = false; - dimmed = false; last_checked_version = 0; - changing_scene = false; - _initializing_addons = false; - docks_visible = true; - restoring_scenes = false; - cmdline_export_mode = false; - scene_distraction = false; - script_distraction = false; TranslationServer::get_singleton()->set_enabled(false); // load settings @@ -6021,10 +6016,10 @@ EditorNode::EditorNode() { ClassDB::set_class_enabled("RootMotionView", true); // defs here, use EDITOR_GET in logic - EDITOR_DEF_RST("interface/scene_tabs/always_show_close_button", false); EDITOR_DEF("interface/editor/save_on_focus_loss", false); EDITOR_DEF("interface/editor/show_update_spinner", false); EDITOR_DEF("interface/editor/update_continuously", false); + EDITOR_DEF("interface/editor/translate_properties", true); EDITOR_DEF_RST("interface/scene_tabs/restore_scenes_on_load", true); EDITOR_DEF_RST("interface/inspector/capitalize_properties", true); EDITOR_DEF_RST("interface/inspector/default_float_step", 0.001); @@ -6246,7 +6241,7 @@ EditorNode::EditorNode() { scene_tabs->set_select_with_rmb(true); scene_tabs->add_tab("unsaved"); scene_tabs->set_tab_alignment(TabBar::ALIGNMENT_LEFT); - scene_tabs->set_tab_close_display_policy((bool(EDITOR_GET("interface/scene_tabs/always_show_close_button")) ? TabBar::CLOSE_BUTTON_SHOW_ALWAYS : TabBar::CLOSE_BUTTON_SHOW_ACTIVE_ONLY)); + scene_tabs->set_tab_close_display_policy((TabBar::CloseButtonDisplayPolicy)EDITOR_GET("interface/scene_tabs/display_close_button").operator int()); scene_tabs->set_max_tab_width(int(EDITOR_GET("interface/scene_tabs/maximum_width")) * EDSCALE); scene_tabs->set_drag_to_rearrange_enabled(true); scene_tabs->connect("tab_changed", callable_mp(this, &EditorNode::_scene_tab_changed)); @@ -6511,7 +6506,7 @@ EditorNode::EditorNode() { ED_SHORTCUT_OVERRIDE("editor/take_screenshot", "macos", KeyModifierMask::CMD | Key::F12); p->add_shortcut(ED_GET_SHORTCUT("editor/take_screenshot"), EDITOR_SCREENSHOT); - p->set_item_tooltip(p->get_item_count() - 1, TTR("Screenshots are stored in the Editor Data/Settings Folder.")); + p->set_item_tooltip(-1, TTR("Screenshots are stored in the Editor Data/Settings Folder.")); ED_SHORTCUT_AND_COMMAND("editor/fullscreen_mode", TTR("Toggle Fullscreen"), KeyModifierMask::SHIFT | Key::F11); ED_SHORTCUT_OVERRIDE("editor/fullscreen_mode", "macos", KeyModifierMask::CMD | KeyModifierMask::CTRL | Key::F); @@ -7107,9 +7102,6 @@ EditorNode::EditorNode() { current = nullptr; saving_resource = Ref<Resource>(); - reference_resource_mem = true; - save_external_resources_mem = true; - set_process(true); open_imported = memnew(ConfirmationDialog); @@ -7120,7 +7112,6 @@ EditorNode::EditorNode() { gui_base->add_child(open_imported); saved_version = 1; - unsaved_cache = true; _last_instantiated_scene = nullptr; quick_open = memnew(EditorQuickOpen); @@ -7134,10 +7125,7 @@ EditorNode::EditorNode() { _update_recent_scenes(); editor_data.restore_editor_global_states(); - convert_old = false; - opening_prev = false; set_process_unhandled_input(true); - _playing_edited = false; load_errors = memnew(RichTextLabel); load_error_dialog = memnew(AcceptDialog); @@ -7178,8 +7166,6 @@ EditorNode::EditorNode() { FileAccess::set_file_close_fail_notify_callback(_file_access_close_error_notify); - waiting_for_first_scan = true; - print_handler.printfunc = _print_handler; print_handler.userdata = this; add_print_handler(&print_handler); |