diff options
Diffstat (limited to 'editor')
60 files changed, 297 insertions, 294 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 5599076c40..0c49a7169d 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -834,11 +834,9 @@ void CodeTextEditor::_line_col_changed() { } StringBuilder sb; - sb.append("("); - sb.append(itos(text_editor->get_caret_line() + 1).lpad(3)); - sb.append(","); + sb.append(itos(text_editor->get_caret_line() + 1).lpad(4)); + sb.append(" : "); sb.append(itos(positional_column + 1).lpad(3)); - sb.append(")"); line_and_col_txt->set_text(sb.as_string()); } diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 7631e425e8..4832cd6994 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -803,15 +803,19 @@ void EditorProperty::unhandled_key_input(const Ref<InputEvent> &p_event) { return; } - if (ED_IS_SHORTCUT("property_editor/copy_property", p_event)) { - menu_option(MENU_COPY_PROPERTY); - accept_event(); - } else if (ED_IS_SHORTCUT("property_editor/paste_property", p_event) && !is_read_only()) { - menu_option(MENU_PASTE_PROPERTY); - accept_event(); - } else if (ED_IS_SHORTCUT("property_editor/copy_property_path", p_event)) { - menu_option(MENU_COPY_PROPERTY_PATH); - accept_event(); + const Ref<InputEventKey> k = p_event; + + if (k.is_valid() && k->is_pressed()) { + if (ED_IS_SHORTCUT("property_editor/copy_property", p_event)) { + menu_option(MENU_COPY_PROPERTY); + accept_event(); + } else if (ED_IS_SHORTCUT("property_editor/paste_property", p_event) && !is_read_only()) { + menu_option(MENU_PASTE_PROPERTY); + accept_event(); + } else if (ED_IS_SHORTCUT("property_editor/copy_property_path", p_event)) { + menu_option(MENU_COPY_PROPERTY_PATH); + accept_event(); + } } } diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 8d579753c2..1953270b08 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -300,6 +300,14 @@ bool EditorSettings::has_default_value(const String &p_setting) const { void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { _THREAD_SAFE_METHOD_ +// Sets up the editor setting with a default value and hint PropertyInfo. +#define EDITOR_SETTING(m_type, m_property_hint, m_name, m_default_value, m_hint_string) \ + _initial_set(m_name, m_default_value); \ + hints[m_name] = PropertyInfo(m_type, m_name, m_property_hint, m_hint_string); + +#define EDITOR_SETTING_USAGE(m_type, m_property_hint, m_name, m_default_value, m_hint_string, m_usage) \ + _initial_set(m_name, m_default_value); \ + hints[m_name] = PropertyInfo(m_type, m_name, m_property_hint, m_hint_string, m_usage); /* Languages */ @@ -363,103 +371,76 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { best = "en"; } - _initial_set("interface/editor/editor_language", best); - set_restart_if_changed("interface/editor/editor_language", true); - hints["interface/editor/editor_language"] = PropertyInfo(Variant::STRING, "interface/editor/editor_language", PROPERTY_HINT_ENUM, lang_hint, PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); + EDITOR_SETTING_USAGE(Variant::STRING, PROPERTY_HINT_ENUM, "interface/editor/editor_language", best, lang_hint, PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); } /* Interface */ // Editor - _initial_set("interface/editor/display_scale", 0); // Display what the Auto display scale setting effectively corresponds to. - float scale = get_auto_display_scale(); + const String display_scale_hint_string = vformat("Auto (%d%%),75%%,100%%,125%%,150%%,175%%,200%%,Custom", Math::round(get_auto_display_scale() * 100)); + EDITOR_SETTING_USAGE(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/display_scale", 0, display_scale_hint_string, PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) _initial_set("interface/editor/enable_debugging_pseudolocalization", false); set_restart_if_changed("interface/editor/enable_debugging_pseudolocalization", true); // Use pseudolocalization in editor. - hints["interface/editor/display_scale"] = PropertyInfo(Variant::INT, "interface/editor/display_scale", PROPERTY_HINT_ENUM, vformat("Auto (%d%%),75%%,100%%,125%%,150%%,175%%,200%%,Custom", Math::round(scale * 100)), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); - _initial_set("interface/editor/custom_display_scale", 1.0f); - hints["interface/editor/custom_display_scale"] = PropertyInfo(Variant::FLOAT, "interface/editor/custom_display_scale", PROPERTY_HINT_RANGE, "0.5,3,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); - _initial_set("interface/editor/main_font_size", 14); - hints["interface/editor/main_font_size"] = PropertyInfo(Variant::INT, "interface/editor/main_font_size", PROPERTY_HINT_RANGE, "8,48,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); - _initial_set("interface/editor/code_font_size", 14); - hints["interface/editor/code_font_size"] = PropertyInfo(Variant::INT, "interface/editor/code_font_size", PROPERTY_HINT_RANGE, "8,48,1", PROPERTY_USAGE_DEFAULT); - _initial_set("interface/editor/code_font_contextual_ligatures", 0); - hints["interface/editor/code_font_contextual_ligatures"] = PropertyInfo(Variant::INT, "interface/editor/code_font_contextual_ligatures", PROPERTY_HINT_ENUM, "Default,Disable Contextual Alternates (Coding Ligatures),Use Custom OpenType Feature Set", PROPERTY_USAGE_DEFAULT); + EDITOR_SETTING_USAGE(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/editor/custom_display_scale", 1.0, "0.5,3,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + EDITOR_SETTING_USAGE(Variant::INT, PROPERTY_HINT_RANGE, "interface/editor/main_font_size", 14, "8,48,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "interface/editor/code_font_size", 14, "8,48,1") + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/code_font_contextual_ligatures", 0, "Default,Disable Contextual Alternates (Coding Ligatures),Use Custom OpenType Feature Set") _initial_set("interface/editor/code_font_custom_opentype_features", ""); _initial_set("interface/editor/code_font_custom_variations", ""); _initial_set("interface/editor/font_antialiased", true); - _initial_set("interface/editor/font_hinting", 0); #ifdef OSX_ENABLED - hints["interface/editor/font_hinting"] = PropertyInfo(Variant::INT, "interface/editor/font_hinting", PROPERTY_HINT_ENUM, "Auto (None),None,Light,Normal", PROPERTY_USAGE_DEFAULT); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/font_hinting", 0, "Auto (None),None,Light,Normal") #else - hints["interface/editor/font_hinting"] = PropertyInfo(Variant::INT, "interface/editor/font_hinting", PROPERTY_HINT_ENUM, "Auto (Light),None,Light,Normal", PROPERTY_USAGE_DEFAULT); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/font_hinting", 0, "Auto (Light),None,Light,Normal") #endif - _initial_set("interface/editor/main_font", ""); - hints["interface/editor/main_font"] = PropertyInfo(Variant::STRING, "interface/editor/main_font", PROPERTY_HINT_GLOBAL_FILE, "*.ttf,*.otf", PROPERTY_USAGE_DEFAULT); - _initial_set("interface/editor/main_font_bold", ""); - hints["interface/editor/main_font_bold"] = PropertyInfo(Variant::STRING, "interface/editor/main_font_bold", PROPERTY_HINT_GLOBAL_FILE, "*.ttf,*.otf", PROPERTY_USAGE_DEFAULT); - _initial_set("interface/editor/code_font", ""); - hints["interface/editor/code_font"] = PropertyInfo(Variant::STRING, "interface/editor/code_font", PROPERTY_HINT_GLOBAL_FILE, "*.ttf,*.otf", PROPERTY_USAGE_DEFAULT); - _initial_set("interface/editor/low_processor_mode_sleep_usec", 6900); // ~144 FPS - hints["interface/editor/low_processor_mode_sleep_usec"] = PropertyInfo(Variant::FLOAT, "interface/editor/low_processor_mode_sleep_usec", PROPERTY_HINT_RANGE, "1,100000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); - _initial_set("interface/editor/unfocused_low_processor_mode_sleep_usec", 100000); // 10 FPS - // Allow an unfocused FPS limit as low as 1 FPS for those who really need low power usage - // (but don't need to preview particles or shaders while the editor is unfocused). - // With very low FPS limits, the editor can take a small while to become usable after being focused again, - // so this should be used at the user's discretion. - hints["interface/editor/unfocused_low_processor_mode_sleep_usec"] = PropertyInfo(Variant::FLOAT, "interface/editor/unfocused_low_processor_mode_sleep_usec", PROPERTY_HINT_RANGE, "1,1000000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); + EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "interface/editor/main_font", "", "*.ttf,*.otf") + EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "interface/editor/main_font_bold", "", "*.ttf,*.otf") + EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "interface/editor/code_font", "", "*.ttf,*.otf") + EDITOR_SETTING_USAGE(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/editor/low_processor_mode_sleep_usec", 6900, "1,100000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + // Default unfocused usec sleep is for 10 FPS. Allow an unfocused FPS limit + // as low as 1 FPS for those who really need low power usage (but don't need + // to preview particles or shaders while the editor is unfocused). With very + // low FPS limits, the editor can take a small while to become usable after + // being focused again, so this should be used at the user's discretion. + EDITOR_SETTING_USAGE(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/editor/unfocused_low_processor_mode_sleep_usec", 100000, "1,1000000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) _initial_set("interface/editor/separate_distraction_mode", false); _initial_set("interface/editor/automatically_open_screenshots", true); - _initial_set("interface/editor/single_window_mode", false); - hints["interface/editor/single_window_mode"] = PropertyInfo(Variant::BOOL, "interface/editor/single_window_mode", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); + EDITOR_SETTING_USAGE(Variant::BOOL, PROPERTY_HINT_NONE, "interface/editor/single_window_mode", false, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) _initial_set("interface/editor/hide_console_window", false); _initial_set("interface/editor/save_each_scene_on_quit", true); // Regression // Inspector - _initial_set("interface/inspector/max_array_dictionary_items_per_page", 20); - hints["interface/inspector/max_array_dictionary_items_per_page"] = PropertyInfo(Variant::INT, "interface/inspector/max_array_dictionary_items_per_page", PROPERTY_HINT_RANGE, "10,100,1", PROPERTY_USAGE_DEFAULT); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "interface/inspector/max_array_dictionary_items_per_page", 20, "10,100,1") // Theme - _initial_set("interface/theme/preset", "Default"); - hints["interface/theme/preset"] = PropertyInfo(Variant::STRING, "interface/theme/preset", PROPERTY_HINT_ENUM, "Default,Breeze Dark,Godot 2,Grey,Light,Solarized (Dark),Solarized (Light),Custom", PROPERTY_USAGE_DEFAULT); - _initial_set("interface/theme/icon_and_font_color", 0); - hints["interface/theme/icon_and_font_color"] = PropertyInfo(Variant::INT, "interface/theme/icon_and_font_color", PROPERTY_HINT_ENUM, "Auto,Dark,Light", PROPERTY_USAGE_DEFAULT); - _initial_set("interface/theme/base_color", Color(0.2, 0.23, 0.31)); - hints["interface/theme/base_color"] = PropertyInfo(Variant::COLOR, "interface/theme/base_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT); - _initial_set("interface/theme/accent_color", Color(0.41, 0.61, 0.91)); - hints["interface/theme/accent_color"] = PropertyInfo(Variant::COLOR, "interface/theme/accent_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT); - _initial_set("interface/theme/contrast", 0.3); - hints["interface/theme/contrast"] = PropertyInfo(Variant::FLOAT, "interface/theme/contrast", PROPERTY_HINT_RANGE, "-1, 1, 0.01"); - _initial_set("interface/theme/icon_saturation", 1.0); - hints["interface/theme/icon_saturation"] = PropertyInfo(Variant::FLOAT, "interface/theme/icon_saturation", PROPERTY_HINT_RANGE, "0,2,0.01", PROPERTY_USAGE_DEFAULT); - _initial_set("interface/theme/relationship_line_opacity", 0.1); - hints["interface/theme/relationship_line_opacity"] = PropertyInfo(Variant::FLOAT, "interface/theme/relationship_line_opacity", PROPERTY_HINT_RANGE, "0.00, 1, 0.01"); - _initial_set("interface/theme/border_size", 0); - hints["interface/theme/border_size"] = PropertyInfo(Variant::INT, "interface/theme/border_size", PROPERTY_HINT_RANGE, "0,2,1", PROPERTY_USAGE_DEFAULT); - _initial_set("interface/theme/corner_radius", 3); - hints["interface/theme/corner_radius"] = PropertyInfo(Variant::INT, "interface/theme/corner_radius", PROPERTY_HINT_RANGE, "0,6,1", PROPERTY_USAGE_DEFAULT); - _initial_set("interface/theme/additional_spacing", 0); - hints["interface/theme/additional_spacing"] = PropertyInfo(Variant::FLOAT, "interface/theme/additional_spacing", PROPERTY_HINT_RANGE, "0,5,0.1", PROPERTY_USAGE_DEFAULT); - _initial_set("interface/theme/custom_theme", ""); - hints["interface/theme/custom_theme"] = PropertyInfo(Variant::STRING, "interface/theme/custom_theme", PROPERTY_HINT_GLOBAL_FILE, "*.res,*.tres,*.theme", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); + EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_ENUM, "interface/theme/preset", "Default", "Default,Breeze Dark,Godot 2,Grey,Light,Solarized (Dark),Solarized (Light),Custom") + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/theme/icon_and_font_color", 0, "Auto,Dark,Light") + EDITOR_SETTING(Variant::COLOR, PROPERTY_HINT_NONE, "interface/theme/base_color", Color(0.2, 0.23, 0.31), "") + EDITOR_SETTING(Variant::COLOR, PROPERTY_HINT_NONE, "interface/theme/accent_color", Color(0.41, 0.61, 0.91), "") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/theme/contrast", 0.3, "-1,1,0.01") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/theme/icon_saturation", 1.0, "0,2,0.01") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/theme/relationship_line_opacity", 0.1, "0.00,1,0.01") + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "interface/theme/border_size", 0, "0,2,1") + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "interface/theme/corner_radius", 3, "0,6,1") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/theme/additional_spacing", 0.0, "0,5,0.1") + EDITOR_SETTING_USAGE(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "interface/theme/custom_theme", "", "*.res,*.tres,*.theme", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) // Scene tabs _initial_set("interface/scene_tabs/show_thumbnail_on_hover", true); _initial_set("interface/scene_tabs/resize_if_many_tabs", true); - _initial_set("interface/scene_tabs/minimum_width", 50); - hints["interface/scene_tabs/minimum_width"] = PropertyInfo(Variant::INT, "interface/scene_tabs/minimum_width", PROPERTY_HINT_RANGE, "50,500,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); + EDITOR_SETTING_USAGE(Variant::INT, PROPERTY_HINT_RANGE, "interface/scene_tabs/minimum_width", 50, "50,500,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) _initial_set("interface/scene_tabs/show_script_button", false); /* Filesystem */ // Directories - _initial_set("filesystem/directories/autoscan_project_path", ""); - hints["filesystem/directories/autoscan_project_path"] = PropertyInfo(Variant::STRING, "filesystem/directories/autoscan_project_path", PROPERTY_HINT_GLOBAL_DIR); - _initial_set("filesystem/directories/default_project_path", OS::get_singleton()->has_environment("HOME") ? OS::get_singleton()->get_environment("HOME") : OS::get_singleton()->get_system_dir(OS::SYSTEM_DIR_DOCUMENTS)); - hints["filesystem/directories/default_project_path"] = PropertyInfo(Variant::STRING, "filesystem/directories/default_project_path", PROPERTY_HINT_GLOBAL_DIR); + EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_DIR, "filesystem/directories/autoscan_project_path", "", "") + const String fs_dir_default_project_path = OS::get_singleton()->has_environment("HOME") ? OS::get_singleton()->get_environment("HOME") : OS::get_singleton()->get_system_dir(OS::SYSTEM_DIR_DOCUMENTS); + EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_DIR, "filesystem/directories/default_project_path", fs_dir_default_project_path, "") // On save _initial_set("filesystem/on_save/compress_binary_resources", true); @@ -467,10 +448,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { // File dialog _initial_set("filesystem/file_dialog/show_hidden_files", false); - _initial_set("filesystem/file_dialog/display_mode", 0); - hints["filesystem/file_dialog/display_mode"] = PropertyInfo(Variant::INT, "filesystem/file_dialog/display_mode", PROPERTY_HINT_ENUM, "Thumbnails,List"); - _initial_set("filesystem/file_dialog/thumbnail_size", 64); - hints["filesystem/file_dialog/thumbnail_size"] = PropertyInfo(Variant::INT, "filesystem/file_dialog/thumbnail_size", PROPERTY_HINT_RANGE, "32,128,16"); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "filesystem/file_dialog/display_mode", 0, "Thumbnails,List") + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "filesystem/file_dialog/thumbnail_size", 64, "32,128,16") /* Docks */ @@ -478,40 +457,33 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { _initial_set("docks/scene_tree/start_create_dialog_fully_expanded", false); // FileSystem - _initial_set("docks/filesystem/thumbnail_size", 64); - hints["docks/filesystem/thumbnail_size"] = PropertyInfo(Variant::INT, "docks/filesystem/thumbnail_size", PROPERTY_HINT_RANGE, "32,128,16"); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "docks/filesystem/thumbnail_size", 64, "32,128,16") _initial_set("docks/filesystem/always_show_folders", true); // Property editor _initial_set("docks/property_editor/auto_refresh_interval", 0.2); //update 5 times per second by default - _initial_set("docks/property_editor/subresource_hue_tint", 0.75); - hints["docks/property_editor/subresource_hue_tint"] = PropertyInfo(Variant::FLOAT, "docks/property_editor/subresource_hue_tint", PROPERTY_HINT_RANGE, "0,1,0.01", PROPERTY_USAGE_DEFAULT); + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "docks/property_editor/subresource_hue_tint", 0.75, "0,1,0.01") /* Text editor */ // Theme - _initial_set("text_editor/theme/color_theme", "Default"); - hints["text_editor/theme/color_theme"] = PropertyInfo(Variant::STRING, "text_editor/theme/color_theme", PROPERTY_HINT_ENUM, "Default,Godot 2,Custom"); + EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_ENUM, "text_editor/theme/color_theme", "Default", "Default,Godot 2,Custom") // Theme: Highlighting _load_godot2_text_editor_theme(); // Appearance // Appearance: Caret - _initial_set("text_editor/appearance/caret/type", 0); - hints["text_editor/appearance/caret/type"] = PropertyInfo(Variant::INT, "text_editor/appearance/caret/type", PROPERTY_HINT_ENUM, "Line,Block"); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "text_editor/appearance/caret/type", 0, "Line,Block") _initial_set("text_editor/appearance/caret/caret_blink", true); - _initial_set("text_editor/appearance/caret/caret_blink_speed", 0.5); - hints["text_editor/appearance/caret/caret_blink_speed"] = PropertyInfo(Variant::FLOAT, "text_editor/appearance/caret/caret_blink_speed", PROPERTY_HINT_RANGE, "0.1, 10, 0.01"); + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "text_editor/appearance/caret/caret_blink_speed", 0.5, "0.1,10,0.01") _initial_set("text_editor/appearance/caret/highlight_current_line", true); _initial_set("text_editor/appearance/caret/highlight_all_occurrences", true); // Appearance: Guidelines _initial_set("text_editor/appearance/guidelines/show_line_length_guidelines", true); - _initial_set("text_editor/appearance/guidelines/line_length_guideline_soft_column", 80); - hints["text_editor/appearance/guidelines/line_length_guideline_soft_column"] = PropertyInfo(Variant::INT, "text_editor/appearance/guidelines/line_length_guideline_soft_column", PROPERTY_HINT_RANGE, "20, 160, 1"); - _initial_set("text_editor/appearance/guidelines/line_length_guideline_hard_column", 100); - hints["text_editor/appearance/guidelines/line_length_guideline_hard_column"] = PropertyInfo(Variant::INT, "text_editor/appearance/guidelines/line_length_guideline_hard_column", PROPERTY_HINT_RANGE, "20, 160, 1"); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/appearance/guidelines/line_length_guideline_soft_column", 80, "20,160,1") + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/appearance/guidelines/line_length_guideline_hard_column", 100, "20,160,1") // Appearance: Gutters _initial_set("text_editor/appearance/gutters/show_line_numbers", true); @@ -522,19 +494,16 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { // Appearance: Minimap _initial_set("text_editor/appearance/minimap/show_minimap", true); - _initial_set("text_editor/appearance/minimap/minimap_width", 80); - hints["text_editor/appearance/minimap/minimap_width"] = PropertyInfo(Variant::INT, "text_editor/appearance/minimap/minimap_width", PROPERTY_HINT_RANGE, "50,250,1"); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/appearance/minimap/minimap_width", 80, "50,250,1") // Appearance: Lines _initial_set("text_editor/appearance/lines/code_folding", true); - _initial_set("text_editor/appearance/lines/word_wrap", 0); - hints["text_editor/appearance/lines/word_wrap"] = PropertyInfo(Variant::INT, "text_editor/appearance/lines/word_wrap", PROPERTY_HINT_ENUM, "None,Boundary"); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "text_editor/appearance/lines/word_wrap", 0, "None,Boundary") // Appearance: Whitespace _initial_set("text_editor/appearance/whitespace/draw_tabs", true); _initial_set("text_editor/appearance/whitespace/draw_spaces", false); - _initial_set("text_editor/appearance/whitespace/line_spacing", 6); - hints["text_editor/appearance/whitespace/line_spacing"] = PropertyInfo(Variant::INT, "text_editor/appearance/whitespace/line_spacing", PROPERTY_HINT_RANGE, "0,50,1"); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/appearance/whitespace/line_spacing", 6, "0,50,1") // Behavior // Behavior: Navigation @@ -544,10 +513,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { _initial_set("text_editor/behavior/navigation/v_scroll_speed", 80); // Behavior: Indent - _initial_set("text_editor/behavior/indent/type", 0); - hints["text_editor/behavior/indent/type"] = PropertyInfo(Variant::INT, "text_editor/behavior/indent/type", PROPERTY_HINT_ENUM, "Tabs,Spaces"); - _initial_set("text_editor/behavior/indent/size", 4); - hints["text_editor/behavior/indent/size"] = PropertyInfo(Variant::INT, "text_editor/behavior/indent/size", PROPERTY_HINT_RANGE, "1, 64, 1"); // size of 0 crashes. + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "text_editor/behavior/indent/type", 0, "Tabs,Spaces") + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/behavior/indent/size", 4, "1,64,1") // size of 0 crashes. _initial_set("text_editor/behavior/indent/auto_indent", true); // Behavior: Files @@ -561,11 +528,9 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { _initial_set("text_editor/script_list/sort_members_outline_alphabetically", false); // Completion - _initial_set("text_editor/completion/idle_parse_delay", 2.0); - hints["text_editor/completion/idle_parse_delay"] = PropertyInfo(Variant::FLOAT, "text_editor/completion/idle_parse_delay", PROPERTY_HINT_RANGE, "0.1, 10, 0.01"); + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "text_editor/completion/idle_parse_delay", 2.0, "0.1,10,0.01") _initial_set("text_editor/completion/auto_brace_complete", true); - _initial_set("text_editor/completion/code_complete_delay", 0.3); - hints["text_editor/completion/code_complete_delay"] = PropertyInfo(Variant::FLOAT, "text_editor/completion/code_complete_delay", PROPERTY_HINT_RANGE, "0.01, 5, 0.01"); + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "text_editor/completion/code_complete_delay", 0.3, "0.01,5,0.01") _initial_set("text_editor/completion/put_callhint_tooltip_below_current_line", true); _initial_set("text_editor/completion/complete_file_paths", true); _initial_set("text_editor/completion/add_type_hints", false); @@ -573,14 +538,10 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { // Help _initial_set("text_editor/help/show_help_index", true); - _initial_set("text_editor/help/help_font_size", 15); - hints["text_editor/help/help_font_size"] = PropertyInfo(Variant::INT, "text_editor/help/help_font_size", PROPERTY_HINT_RANGE, "8,48,1"); - _initial_set("text_editor/help/help_source_font_size", 14); - hints["text_editor/help/help_source_font_size"] = PropertyInfo(Variant::INT, "text_editor/help/help_source_font_size", PROPERTY_HINT_RANGE, "8,48,1"); - _initial_set("text_editor/help/help_title_font_size", 23); - hints["text_editor/help/help_title_font_size"] = PropertyInfo(Variant::INT, "text_editor/help/help_title_font_size", PROPERTY_HINT_RANGE, "8,48,1"); - _initial_set("text_editor/help/class_reference_examples", 0); - hints["text_editor/help/class_reference_examples"] = PropertyInfo(Variant::INT, "text_editor/help/class_reference_examples", PROPERTY_HINT_ENUM, "GDScript,C#,GDScript and C#"); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/help/help_font_size", 15, "8,48,1") + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/help/help_source_font_size", 14, "8,48,1") + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/help/help_title_font_size", 23, "8,48,1") + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "text_editor/help/class_reference_examples", 0, "GDScript,C#,GDScript and C#") /* Editors */ @@ -588,39 +549,23 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { _initial_set("editors/grid_map/pick_distance", 5000.0); // 3D - _initial_set("editors/3d/primary_grid_color", Color(0.56, 0.56, 0.56, 0.5)); - hints["editors/3d/primary_grid_color"] = PropertyInfo(Variant::COLOR, "editors/3d/primary_grid_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT); - - _initial_set("editors/3d/secondary_grid_color", Color(0.38, 0.38, 0.38, 0.5)); - hints["editors/3d/secondary_grid_color"] = PropertyInfo(Variant::COLOR, "editors/3d/secondary_grid_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT); + EDITOR_SETTING(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d/primary_grid_color", Color(0.56, 0.56, 0.56, 0.5), "") + EDITOR_SETTING(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d/secondary_grid_color", Color(0.38, 0.38, 0.38, 0.5), "") // Use a similar color to the 2D editor selection. - _initial_set("editors/3d/selection_box_color", Color(1.0, 0.5, 0)); - hints["editors/3d/selection_box_color"] = PropertyInfo(Variant::COLOR, "editors/3d/selection_box_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); + EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d/selection_box_color", Color(1.0, 0.5, 0), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) // If a line is a multiple of this, it uses the primary grid color. // Use a power of 2 value by default as it's more common to use powers of 2 in level design. - _initial_set("editors/3d/primary_grid_steps", 8); - hints["editors/3d/primary_grid_steps"] = PropertyInfo(Variant::INT, "editors/3d/primary_grid_steps", PROPERTY_HINT_RANGE, "1,100,1", PROPERTY_USAGE_DEFAULT); - - // At 1000, the grid mostly looks like it has no edge. - _initial_set("editors/3d/grid_size", 200); - hints["editors/3d/grid_size"] = PropertyInfo(Variant::INT, "editors/3d/grid_size", PROPERTY_HINT_RANGE, "1,2000,1", PROPERTY_USAGE_DEFAULT); - - // Default largest grid size is 100m, 10^2 (primary grid lines are 1km apart when primary_grid_steps is 10). - _initial_set("editors/3d/grid_division_level_max", 2); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "editors/3d/primary_grid_steps", 8, "1,100,1") + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "editors/3d/grid_size", 200, "1,2000,1") // Higher values produce graphical artifacts when far away unless View Z-Far // is increased significantly more than it really should need to be. - hints["editors/3d/grid_division_level_max"] = PropertyInfo(Variant::INT, "editors/3d/grid_division_level_max", PROPERTY_HINT_RANGE, "-1,3,1", PROPERTY_USAGE_DEFAULT); - - // Default smallest grid size is 1m, 10^0. - _initial_set("editors/3d/grid_division_level_min", 0); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "editors/3d/grid_division_level_max", 2, "-1,3,1") // Lower values produce graphical artifacts regardless of view clipping planes, so limit to -2 as a lower bound. - hints["editors/3d/grid_division_level_min"] = PropertyInfo(Variant::INT, "editors/3d/grid_division_level_min", PROPERTY_HINT_RANGE, "-2,2,1", PROPERTY_USAGE_DEFAULT); - + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "editors/3d/grid_division_level_min", 0, "-2,2,1") // -0.2 seems like a sensible default. -1.0 gives Blender-like behavior, 0.5 gives huge grids. - _initial_set("editors/3d/grid_division_level_bias", -0.2); - hints["editors/3d/grid_division_level_bias"] = PropertyInfo(Variant::FLOAT, "editors/3d/grid_division_level_bias", PROPERTY_HINT_RANGE, "-1.0,0.5,0.1", PROPERTY_USAGE_DEFAULT); + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/grid_division_level_bias", -0.2, "-1.0,0.5,0.1") _initial_set("editors/3d/grid_xz_plane", true); _initial_set("editors/3d/grid_xy_plane", false); @@ -629,56 +574,37 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { // Use a lower default FOV for the 3D camera compared to the // Camera3D node as the 3D viewport doesn't span the whole screen. // This means it's technically viewed from a further distance, which warrants a narrower FOV. - _initial_set("editors/3d/default_fov", 70.0); - hints["editors/3d/default_fov"] = PropertyInfo(Variant::FLOAT, "editors/3d/default_fov", PROPERTY_HINT_RANGE, "1,179,0.1"); - _initial_set("editors/3d/default_z_near", 0.05); - hints["editors/3d/default_z_near"] = PropertyInfo(Variant::FLOAT, "editors/3d/default_z_near", PROPERTY_HINT_RANGE, "0.01,10,0.01,or_greater"); - _initial_set("editors/3d/default_z_far", 4000.0); - hints["editors/3d/default_z_far"] = PropertyInfo(Variant::FLOAT, "editors/3d/default_z_far", PROPERTY_HINT_RANGE, "0.1,4000,0.1,or_greater"); + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/default_fov", 70.0, "1,179,0.1") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/default_z_near", 0.05, "0.01,10,0.01,or_greater") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/default_z_far", 4000.0, "0.1,4000,0.1,or_greater") // 3D: Navigation - _initial_set("editors/3d/navigation/navigation_scheme", 0); - _initial_set("editors/3d/navigation/invert_y_axis", false); _initial_set("editors/3d/navigation/invert_x_axis", false); - hints["editors/3d/navigation/navigation_scheme"] = PropertyInfo(Variant::INT, "editors/3d/navigation/navigation_scheme", PROPERTY_HINT_ENUM, "Godot,Maya,Modo"); - _initial_set("editors/3d/navigation/zoom_style", 0); - hints["editors/3d/navigation/zoom_style"] = PropertyInfo(Variant::INT, "editors/3d/navigation/zoom_style", PROPERTY_HINT_ENUM, "Vertical, Horizontal"); + _initial_set("editors/3d/navigation/invert_y_axis", false); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/3d/navigation/navigation_scheme", 0, "Godot,Maya,Modo") + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/3d/navigation/zoom_style", 0, "Vertical,Horizontal") _initial_set("editors/3d/navigation/emulate_numpad", false); _initial_set("editors/3d/navigation/emulate_3_button_mouse", false); - _initial_set("editors/3d/navigation/orbit_modifier", 0); - hints["editors/3d/navigation/orbit_modifier"] = PropertyInfo(Variant::INT, "editors/3d/navigation/orbit_modifier", PROPERTY_HINT_ENUM, "None,Shift,Alt,Meta,Ctrl"); - _initial_set("editors/3d/navigation/pan_modifier", 1); - hints["editors/3d/navigation/pan_modifier"] = PropertyInfo(Variant::INT, "editors/3d/navigation/pan_modifier", PROPERTY_HINT_ENUM, "None,Shift,Alt,Meta,Ctrl"); - _initial_set("editors/3d/navigation/zoom_modifier", 4); - hints["editors/3d/navigation/zoom_modifier"] = PropertyInfo(Variant::INT, "editors/3d/navigation/zoom_modifier", PROPERTY_HINT_ENUM, "None,Shift,Alt,Meta,Ctrl"); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/3d/navigation/orbit_modifier", 0, "None,Shift,Alt,Meta,Ctrl") + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/3d/navigation/pan_modifier", 1, "None,Shift,Alt,Meta,Ctrl") + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/3d/navigation/zoom_modifier", 4, "None,Shift,Alt,Meta,Ctrl") _initial_set("editors/3d/navigation/warped_mouse_panning", true); // 3D: Navigation feel - _initial_set("editors/3d/navigation_feel/orbit_sensitivity", 0.4); - hints["editors/3d/navigation_feel/orbit_sensitivity"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/orbit_sensitivity", PROPERTY_HINT_RANGE, "0.0, 2, 0.01"); - _initial_set("editors/3d/navigation_feel/orbit_inertia", 0.05); - hints["editors/3d/navigation_feel/orbit_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/orbit_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); - _initial_set("editors/3d/navigation_feel/translation_inertia", 0.15); - hints["editors/3d/navigation_feel/translation_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/translation_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); - _initial_set("editors/3d/navigation_feel/zoom_inertia", 0.075); - hints["editors/3d/navigation_feel/zoom_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/zoom_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); - _initial_set("editors/3d/navigation_feel/manipulation_orbit_inertia", 0.075); - hints["editors/3d/navigation_feel/manipulation_orbit_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/manipulation_orbit_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); - _initial_set("editors/3d/navigation_feel/manipulation_translation_inertia", 0.075); - hints["editors/3d/navigation_feel/manipulation_translation_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/manipulation_translation_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/navigation_feel/orbit_sensitivity", 0.4, "0.0,2,0.01") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/navigation_feel/orbit_inertia", 0.05, "0.0,1,0.01") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/navigation_feel/translation_inertia", 0.15, "0.0,1,0.01") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/navigation_feel/zoom_inertia", 0.075, "0.0,1,0.01") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/navigation_feel/manipulation_orbit_inertia", 0.075, "0.0,1,0.01") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/navigation_feel/manipulation_translation_inertia", 0.075, "0.0,1,0.01") // 3D: Freelook - _initial_set("editors/3d/freelook/freelook_navigation_scheme", false); - hints["editors/3d/freelook/freelook_navigation_scheme"] = PropertyInfo(Variant::INT, "editors/3d/freelook/freelook_navigation_scheme", PROPERTY_HINT_ENUM, "Default,Partially Axis-Locked (id Tech),Fully Axis-Locked (Minecraft)"); - _initial_set("editors/3d/freelook/freelook_sensitivity", 0.4); - hints["editors/3d/freelook/freelook_sensitivity"] = PropertyInfo(Variant::FLOAT, "editors/3d/freelook/freelook_sensitivity", PROPERTY_HINT_RANGE, "0.0, 2, 0.01"); - _initial_set("editors/3d/freelook/freelook_inertia", 0.1); - hints["editors/3d/freelook/freelook_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/freelook/freelook_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); - _initial_set("editors/3d/freelook/freelook_base_speed", 5.0); - hints["editors/3d/freelook/freelook_base_speed"] = PropertyInfo(Variant::FLOAT, "editors/3d/freelook/freelook_base_speed", PROPERTY_HINT_RANGE, "0.0, 10, 0.01"); - _initial_set("editors/3d/freelook/freelook_activation_modifier", 0); - hints["editors/3d/freelook/freelook_activation_modifier"] = PropertyInfo(Variant::INT, "editors/3d/freelook/freelook_activation_modifier", PROPERTY_HINT_ENUM, "None,Shift,Alt,Meta,Ctrl"); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/3d/freelook/freelook_navigation_scheme", 0, "Default,Partially Axis-Locked (id Tech),Fully Axis-Locked (Minecraft)") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/freelook/freelook_sensitivity", 0.4, "0.0,2,0.01") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/freelook/freelook_inertia", 0.1, "0.0,1,0.01") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/freelook/freelook_base_speed", 5.0, "0.0,10,0.01") + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/3d/freelook/freelook_activation_modifier", 0, "None,Shift,Alt,Meta,Ctrl") _initial_set("editors/3d/freelook/freelook_speed_zoom_link", false); // 2D @@ -716,28 +642,24 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { _initial_set("editors/animation/onion_layers_future_color", Color(0, 1, 0)); // Visual editors - _initial_set("editors/visual_editors/minimap_opacity", 0.85); - hints["editors/visual_editors/minimap_opacity"] = PropertyInfo(Variant::FLOAT, "editors/visual_editors/minimap_opacity", PROPERTY_HINT_RANGE, "0.0,1.0,0.01", PROPERTY_USAGE_DEFAULT); + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/visual_editors/minimap_opacity", 0.85, "0.0,1.0,0.01") /* Run */ // Window placement - _initial_set("run/window_placement/rect", 1); - hints["run/window_placement/rect"] = PropertyInfo(Variant::INT, "run/window_placement/rect", PROPERTY_HINT_ENUM, "Top Left,Centered,Custom Position,Force Maximized,Force Fullscreen"); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "run/window_placement/rect", 1, "Top Left,Centered,Custom Position,Force Maximized,Force Fullscreen") String screen_hints = "Same as Editor,Previous Monitor,Next Monitor"; for (int i = 0; i < DisplayServer::get_singleton()->get_screen_count(); i++) { screen_hints += ",Monitor " + itos(i + 1); } _initial_set("run/window_placement/rect_custom_position", Vector2()); - _initial_set("run/window_placement/screen", 0); - hints["run/window_placement/screen"] = PropertyInfo(Variant::INT, "run/window_placement/screen", PROPERTY_HINT_ENUM, screen_hints); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "run/window_placement/screen", 0, screen_hints) // Auto save _initial_set("run/auto_save/save_before_running", true); // Output - _initial_set("run/output/font_size", 13); - hints["run/output/font_size"] = PropertyInfo(Variant::INT, "run/output/font_size", PROPERTY_HINT_RANGE, "8,48,1"); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "run/output/font_size", 13, "8,48,1") _initial_set("run/output/always_clear_output_on_play", true); _initial_set("run/output/always_open_output_on_play", true); _initial_set("run/output/always_close_output_on_stop", false); @@ -747,17 +669,14 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { // Debug _initial_set("network/debug/remote_host", "127.0.0.1"); // Hints provided in setup_network - _initial_set("network/debug/remote_port", 6007); - hints["network/debug/remote_port"] = PropertyInfo(Variant::INT, "network/debug/remote_port", PROPERTY_HINT_RANGE, "1,65535,1"); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "network/debug/remote_port", 6007, "1,65535,1") // SSL - _initial_set("network/ssl/editor_ssl_certificates", _SYSTEM_CERTS_PATH); - hints["network/ssl/editor_ssl_certificates"] = PropertyInfo(Variant::STRING, "network/ssl/editor_ssl_certificates", PROPERTY_HINT_GLOBAL_FILE, "*.crt,*.pem"); + EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "network/ssl/editor_ssl_certificates", _SYSTEM_CERTS_PATH, "*.crt,*.pem") /* Extra config */ - _initial_set("project_manager/sorting_order", 0); - hints["project_manager/sorting_order"] = PropertyInfo(Variant::INT, "project_manager/sorting_order", PROPERTY_HINT_ENUM, "Name,Path,Last Edited"); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "project_manager/sorting_order", 0, "Name,Path,Last Edited") if (p_extra_config.is_valid()) { if (p_extra_config->has_section("init_projects") && p_extra_config->has_section_key("init_projects", "list")) { diff --git a/editor/icons/AddSplit.svg b/editor/icons/AddSplit.svg deleted file mode 100644 index e46949182c..0000000000 --- a/editor/icons/AddSplit.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 13 10-10" fill="none" stroke="#f5f5f5" stroke-opacity=".39216" stroke-width="2"/><path d="m11 9v2h-2v2h2v2h2v-2h2v-2h-2v-2z" fill="#5fff97"/><circle cx="4" cy="12" fill="none" r="2"/><path d="m13 1a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2-2 2 2 0 0 0 -2-2zm-10 10a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2-2 2 2 0 0 0 -2-2z" fill="#e0e0e0"/></svg> diff --git a/editor/icons/AutoEndBackwards.svg b/editor/icons/AutoEndBackwards.svg deleted file mode 100644 index c6de305069..0000000000 --- a/editor/icons/AutoEndBackwards.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0"><path d="m2 14c-.552262-.000055-.999945-.447738-1-1v-10c.000055-.5522619.447738-.9999448 1-1h8c.303863-.0001753.591325.1378063.78125.375l4 5c.291397.3649711.291397.8830289 0 1.248l-4 5c-.189538.237924-.477058.376652-.78125.37695h-8zm1-2h6.5195004l3.1991996-4-3.1991996-4h-6.5195004zm6.0000004-2v-4l1.9999996 2z" fill-rule="evenodd"/><path d="m3.8685125 4.9095434h4.1550816v1.1637426h-2.6154217v1.1117544h2.4594562v1.1637428h-2.4594562v1.3676976h2.7034024v1.1637432h-4.2430623z" stroke-width=".204755"/></g></svg> diff --git a/editor/icons/AutoPlayBackwards.svg b/editor/icons/AutoPlayBackwards.svg deleted file mode 100644 index 20602ba348..0000000000 --- a/editor/icons/AutoPlayBackwards.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m13.999798 2a-1.0001 1.0001 0 0 1 1 1v10a-1.0001 1.0001 0 0 1 -1 1h-8.0000003a-1.0001 1.0001 0 0 1 -.78125-.375l-4-5a-1.0001 1.0001 0 0 1 0-1.248l4-5a-1.0001 1.0001 0 0 1 .78125-.37695h8.0000003zm-1 2h-6.5195003l-3.1992 4 3.1992 4h6.5195003zm-3.0000003 1c1.1046003 0 2.0000003.8954 2.0000003 2v4h-1v-2h-2.0000003v2h-1v-4c0-1.1046.89543-2 2-2zm0 1a-1 1 0 0 0 -1 1v1h2.0000003v-1a-1 1 0 0 0 -1.0000003-1zm-3 0v4l-2-2z" fill="#e0e0e0" fill-rule="evenodd"/></svg> diff --git a/editor/icons/BoneTrack.svg b/editor/icons/BoneTrack.svg deleted file mode 100644 index 69a32f3595..0000000000 --- a/editor/icons/BoneTrack.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m10.478 1037.4a2.4664 2.4663 0 0 0 -1.7804.7205 2.4664 2.4663 0 0 0 -.31408 3.1041l-3.559 3.5608a2.4664 2.4663 0 0 0 -3.1023.3121 2.4664 2.4663 0 0 0 0 3.4876 2.4664 2.4663 0 0 0 1.397.6955 2.4664 2.4663 0 0 0 .69561 1.397 2.4664 2.4663 0 0 0 3.4877 0 2.4664 2.4663 0 0 0 .31408-3.1041l3.5609-3.5608a2.4664 2.4663 0 0 0 3.1004-.3102 2.4664 2.4663 0 0 0 0-3.4875 2.4664 2.4663 0 0 0 -1.397-.6974 2.4664 2.4663 0 0 0 -.69561-1.3971 2.4664 2.4663 0 0 0 -1.7072-.7205z" fill="#c38ef1" transform="translate(0 -1036.4)"/></svg> diff --git a/editor/icons/CanvasItemShader.svg b/editor/icons/CanvasItemShader.svg deleted file mode 100644 index 9aeb2f0fdc..0000000000 --- a/editor/icons/CanvasItemShader.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m13.303 1c-.4344 0-.86973.16881-1.2012.50586l-1.4688 1.4941h4.3418c.082839-.52789-.072596-1.0872-.47266-1.4941-.33144-.33705-.76482-.50586-1.1992-.50586z" fill="#ff4545"/><path d="m10.633 3-1.9668 2h4.8008l1.0352-1.0527c.2628-.2673.41824-.60049.47266-.94727h-4.3418z" fill="#ffe345"/><path d="m8.666 5-1.9648 2h4.7988l1.9668-2z" fill="#80ff45"/><path d="m6.7012 7-1.4004 1.4238.56641.57617h3.668l1.9648-2h-4.7988z" fill="#45ffa2"/><path d="m5.8672 9 1.834 1.8652 1.834-1.8652zm-1.752.57812c-.48501-.048725-.90521.12503-1.1953.45508-.21472.24426-.35243.57797-.39844.9668h3.5625c-.10223-.1935-.22224-.37965-.38281-.54297-.55011-.55955-1.1009-.83018-1.5859-.87891z" fill="#45d7ff"/><path d="m1.3242 13c.18414.24071.43707.53374.83789.94141.88382.899 2.6552.67038 3.5391-.22852.20747-.21103.36064-.45476.4707-.71289h-4.8477z" fill="#ff4596"/><path d="m2.5215 11c-.0105.088737-.021484.17696-.021484.27148 0 1.3947-2.2782.28739-1.1758 1.7285h4.8477c.27363-.64173.24047-1.3785-.087891-2h-3.5625z" fill="#8045ff"/></svg> diff --git a/editor/icons/CanvasItemShaderGraph.svg b/editor/icons/CanvasItemShaderGraph.svg deleted file mode 100644 index 70db53a4ba..0000000000 --- a/editor/icons/CanvasItemShaderGraph.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path d="m8.0625 1025.9a3.375 3 0 0 0 -3.375 3 3.375 3 0 0 0 1.6875 2.5957v9.8115a3.375 3 0 0 0 -1.6875 2.5928 3.375 3 0 0 0 3.375 3 3.375 3 0 0 0 3.375-3 3.375 3 0 0 0 -1.6875-2.5957v-8.7832l11.931 10.605a3.375 3 0 0 0 -.11865.7735 3.375 3 0 0 0 3.375 3 3.375 3 0 0 0 3.375-3 3.375 3 0 0 0 -3.375-3 3.375 3 0 0 0 -.87341.1025l-11.928-10.602h9.8844a3.375 3 0 0 0 2.9169 1.5 3.375 3 0 0 0 3.375-3 3.375 3 0 0 0 -3.375-3 3.375 3 0 0 0 -2.9202 1.5h-11.038a3.375 3 0 0 0 -2.9169-1.5z"/></clipPath><g transform="translate(0 -1036.4)"><g clip-path="url(#a)" transform="matrix(.59259 0 0 .66667 -1.7778 353.45)"><path d="m3 1025.9h27v3h-27z" fill="#ff4545"/><path d="m3 1028.9h27v3h-27z" fill="#ffe345"/><path d="m3 1031.9h27v3h-27z" fill="#80ff45"/><path d="m3 1034.9h27v3h-27z" fill="#45ffa2"/><path d="m3 1037.9h27v3h-27z" fill="#45d7ff"/><path d="m3 1043.9h27v3h-27z" fill="#ff4596"/><path d="m3 1040.9h27v3h-27z" fill="#8045ff"/></g><ellipse cx="3" cy="1039.4" fill="#6e6e6e"/></g></svg> diff --git a/editor/icons/ColorRamp.svg b/editor/icons/ColorRamp.svg deleted file mode 100644 index 13e05dd1ee..0000000000 --- a/editor/icons/ColorRamp.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(.51852 0 0 .7 -.55556 1034.6)" gradientUnits="userSpaceOnUse" x1="4" x2="30" y1="14" y2="14"><stop offset="0" stop-color="#afff68"/><stop offset="1" stop-color="#ff6b6b"/></linearGradient><path d="m1 1051.4h14v-14z" fill="url(#a)" transform="translate(0 -1036.4)"/></svg> diff --git a/editor/icons/ControlAlignCenterLeft.svg b/editor/icons/ControlAlignCenterLeft.svg deleted file mode 100644 index fc4674af48..0000000000 --- a/editor/icons/ControlAlignCenterLeft.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 6h6v4h-6z" fill="#d6d6d6"/></svg> diff --git a/editor/icons/ControlAlignCenterRight.svg b/editor/icons/ControlAlignCenterRight.svg deleted file mode 100644 index c66a3d59b5..0000000000 --- a/editor/icons/ControlAlignCenterRight.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 6h6v4h-6z" fill="#d6d6d6"/></svg> diff --git a/editor/icons/DeleteSplit.svg b/editor/icons/DeleteSplit.svg deleted file mode 100644 index 4ae590f78b..0000000000 --- a/editor/icons/DeleteSplit.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m.623213 6.939446h1.845669v2.085366h-1.845669z" fill="#800000"/><path d="m12.488225 7.179143h1.629941v1.989487h-1.629941z" fill="#800000"/><g fill="#e9afaf"><path d="m2.540791 7.970143h3.164003v.407485h-3.164003z"/><path d="m9.012615 8.042052h3.523549v.527334h-3.523549z"/><g transform="matrix(-.55917959 .82904655 -.82904655 -.55917959 0 0)"><path d="m1.511097-9.732645h3.643398v.455425h-3.643398z"/><path d="m.07207-12.144793h3.643398v.455425h-3.643398z"/></g></g></svg> diff --git a/editor/icons/EditResource.svg b/editor/icons/EditResource.svg deleted file mode 100644 index 3b14428b90..0000000000 --- a/editor/icons/EditResource.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="8" viewBox="0 0 8 8" width="8" xmlns="http://www.w3.org/2000/svg"><path d="m3.9902-.0097656a1.0001 1.0001 0 0 0 -.69727 1.7168l1.293 1.293h-3.5859v2h3.5859l-1.293 1.293a1.0001 1.0001 0 1 0 1.4141 1.4141l3-3a1.0001 1.0001 0 0 0 0-1.4141l-3-3a1.0001 1.0001 0 0 0 -.7168-.30273z" fill="#e0e0e0" fill-opacity=".78431"/></svg> diff --git a/editor/icons/EditorInternalHandle.svg b/editor/icons/EditorInternalHandle.svg deleted file mode 100644 index dbb7bc289f..0000000000 --- a/editor/icons/EditorInternalHandle.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg"><circle cx="5" cy="5" fill-opacity=".29412" r="5"/><circle cx="5" cy="5" fill="#fff" r="4"/><circle cx="5" cy="5" fill="#84b1ff" r="3"/></svg> diff --git a/editor/icons/ErrorSign.svg b/editor/icons/ErrorSign.svg deleted file mode 100644 index 85a2cda346..0000000000 --- a/editor/icons/ErrorSign.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="32" viewBox="0 0 32 32" width="32" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 -1020.4)"><path d="m10 1048.4h12l6-6v-12l-6-6h-12l-6 6v12z" fill="#ff5d5d" fill-rule="evenodd"/><path d="m14 8 1 10h2l1-10zm2 12a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2-2 2 2 0 0 0 -2-2z" fill="#fff" transform="translate(0 1020.4)"/></g></svg> diff --git a/editor/icons/FixedMaterial.svg b/editor/icons/FixedMaterial.svg deleted file mode 100644 index 2c30ecac24..0000000000 --- a/editor/icons/FixedMaterial.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1037.4a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0 -7-7zm-2 2a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2-2 2 2 0 0 1 2-2z" fill="#e0e0e0" fill-opacity=".99608" transform="translate(0 -1036.4)"/></svg> diff --git a/editor/icons/FixedSpatialMaterial.svg b/editor/icons/FixedSpatialMaterial.svg deleted file mode 100644 index 322465a0c7..0000000000 --- a/editor/icons/FixedSpatialMaterial.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1a7 7 0 0 0 -4.8887 2h2.8887 6.8965a7 7 0 0 0 -4.8965-2z" fill="#ff4545"/><path d="m3.1113 3a7 7 0 0 0 -1.4277 2h2.3164a2 2 0 0 1 2-2zm2.8887 0a2 2 0 0 1 2 2h6.3145a7 7 0 0 0 -1.418-2z" fill="#ffe345"/><path d="m1.6836 5a7 7 0 0 0 -.60547 2h4.9219a2 2 0 0 1 -2-2h-2.3164zm4.3164 2h8.9199a7 7 0 0 0 -.60547-2h-6.3145a2 2 0 0 1 -2 2z" fill="#80ff45"/><path d="m1.0781 7a7 7 0 0 0 -.078125 1 7 7 0 0 0 .080078 1h13.842a7 7 0 0 0 .078125-1 7 7 0 0 0 -.080078-1h-8.9199-4.9219z" fill="#45ffa2"/><path d="m1.0801 9a7 7 0 0 0 .60547 2h12.631a7 7 0 0 0 .60547-2h-13.842z" fill="#45d7ff"/><path d="m3.1035 13a7 7 0 0 0 4.8965 2 7 7 0 0 0 4.8887-2z" fill="#ff4596"/><path d="m1.6855 11a7 7 0 0 0 1.418 2h9.7852a7 7 0 0 0 1.4277-2h-12.631z" fill="#8045ff"/></svg> diff --git a/editor/icons/GizmoCamera.svg b/editor/icons/GizmoCamera.svg deleted file mode 100644 index 1fa2186197..0000000000 --- a/editor/icons/GizmoCamera.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 -924.36)"><path d="m76 16a28 28 0 0 0 -26.631 19.4 28 28 0 0 0 -13.369-3.4004 28 28 0 0 0 -28 28 28 28 0 0 0 16 25.26v14.74c0 6.648 5.352 12 12 12h48c6.648 0 12-5.352 12-12l24 16v-64l-24 16v-4.4434a28 28 0 0 0 8-19.557 28 28 0 0 0 -28-28z" fill-opacity=".29412" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".98824" stroke-width="2" transform="translate(0 924.36)"/><path d="m76 944.36a24 24 0 0 0 -23.906 22.219 24 24 0 0 0 -16.094-6.2192 24 24 0 0 0 -24 24 24 24 0 0 0 16 22.594v17.406c0 4.432 3.5679 8 8 8h48c4.4321 0 8-3.568 8-8v-8l24 16v-48l-24 16v-14.156a24 24 0 0 0 8-17.844 24 24 0 0 0 -24-24z" fill="#f7f5cf"/></g></svg> diff --git a/editor/icons/GizmoListener.svg b/editor/icons/GizmoListener3D.svg index 9d3ddf8b85..9d3ddf8b85 100644 --- a/editor/icons/GizmoListener.svg +++ b/editor/icons/GizmoListener3D.svg diff --git a/editor/icons/GuiHTick.svg b/editor/icons/GuiHTick.svg deleted file mode 100644 index a8a2fe58f6..0000000000 --- a/editor/icons/GuiHTick.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 4 15.999999" width="4" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" fill="#fff" fill-opacity=".39216" r="1"/></svg> diff --git a/editor/icons/GuiResizerMirrored.svg b/editor/icons/GuiResizerMirrored.svg deleted file mode 100644 index 8227f5b648..0000000000 --- a/editor/icons/GuiResizerMirrored.svg +++ /dev/null @@ -1 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill-opacity=".588" fill="#fff" d="M4 3a1 1 0 0 1 1 1v6h6a1 1 0 0 1 0 2H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"/></svg> diff --git a/editor/icons/GuiTabMirrored.svg b/editor/icons/GuiTabMirrored.svg deleted file mode 100644 index a0011a5b2d..0000000000 --- a/editor/icons/GuiTabMirrored.svg +++ /dev/null @@ -1 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8"><path fill-opacity=".196" fill="#fff" d="M2 0v8H0V0zm5.014.002a-1 1 0 0 1 .693.291-1 1 0 0 1 0 1.414L5.414 4l2.293 2.293a-1 1 0 0 1 0 1.414-1 1 0 0 1-1.414 0l-3-3a-1 1 0 0 1 0-1.414l3-3a-1 1 0 0 1 .72-.29z"/></svg> diff --git a/editor/icons/GuiTreeArrowUp.svg b/editor/icons/GuiTreeArrowUp.svg deleted file mode 100644 index f5399bc7f9..0000000000 --- a/editor/icons/GuiTreeArrowUp.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="12" viewBox="0 0 12 12" width="12" xmlns="http://www.w3.org/2000/svg"><path d="m3 1045.4 3 3 3-3" style="fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:.39216" transform="matrix(-1 0 0 -1 12 1052.16952)"/></svg> diff --git a/editor/icons/GuiVTick.svg b/editor/icons/GuiVTick.svg deleted file mode 100644 index c0af1df8fb..0000000000 --- a/editor/icons/GuiVTick.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="4" viewBox="0 0 16 3.9999998" width="16" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" fill="#fff" fill-opacity=".39216" r="1"/></svg> diff --git a/editor/icons/Headphones.svg b/editor/icons/Headphones.svg deleted file mode 100644 index 76f92d58a7..0000000000 --- a/editor/icons/Headphones.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1a7 7 0 0 0 -7 7v2 3a2 2 0 0 0 2 2h2v-5h-2v-2a5 5 0 0 1 5-5 5 5 0 0 1 5 5v2h-2v3 2h2a2 2 0 0 0 2-2v-3-2a7 7 0 0 0 -7-7z" fill="#e0e0e0"/></svg> diff --git a/editor/icons/InformationSign.svg b/editor/icons/InformationSign.svg deleted file mode 100644 index 8cf1ac78e3..0000000000 --- a/editor/icons/InformationSign.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g stroke-width=".570241"><path d="m4.5291945 14.892249h6.8428865l3.421444-3.421444v-6.8428864l-3.421444-3.4214437h-6.8428865l-3.4214436 3.4214437v6.8428864z" fill="#ffb65d" fill-rule="evenodd"/><g fill="#fff"><path d="m6.69985 6.347754h2.624354v6.50621h-2.624354z"/><ellipse cx="8.039363" cy="4.215466" rx="1.394188" ry="1.366851"/></g></g></svg> diff --git a/editor/icons/InverseKinematics.svg b/editor/icons/InverseKinematics.svg deleted file mode 100644 index 4c6dbd4546..0000000000 --- a/editor/icons/InverseKinematics.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v10.27h2v-10.271a2 2 0 0 0 .73047-.72852h4.541a2 2 0 0 0 .72852.73047v3.2695h-2v2l-1 2 3 2v-4h2v4l3-2-1-2v-2h-2v-3.2715a2 2 0 0 0 1-1.7285 2 2 0 0 0 -2-2 2 2 0 0 0 -1.7305 1h-4.541a2 2 0 0 0 -1.7285-1z" fill="#fc7f7f" fill-rule="evenodd"/></svg> diff --git a/editor/icons/Issue.svg b/editor/icons/Issue.svg deleted file mode 100644 index 457d070d89..0000000000 --- a/editor/icons/Issue.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0"><path d="m5.2902433 14.98657h1.9512087v2.441414h-1.9512087zm0-11.909101h1.9512087v6.2957719l-.1922373 3.4314361h-1.5571222l-.2018492-3.4314361z" transform="matrix(1.2172834 0 0 .60107067 .478728 1.839214)"/><path d="m8.0503291 1.1522775a6.8983747 6.8983747 0 0 0 -6.8980516 6.8980516 6.8983747 6.8983747 0 0 0 6.8980516 6.8997839 6.8983747 6.8983747 0 0 0 6.8997839-6.8997839 6.8983747 6.8983747 0 0 0 -6.8997839-6.8980516zm-.0294418 1.1430364a5.6659852 5.6659852 0 0 1 5.6666897 5.6649578 5.6659852 5.6659852 0 0 1 -5.6666897 5.6666893 5.6659852 5.6659852 0 0 1 -5.6666896-5.6666893 5.6659852 5.6659852 0 0 1 5.6666896-5.6649578z" stroke-width=".886719"/></g></svg> diff --git a/editor/icons/KeyHover.svg b/editor/icons/KeyHover.svg deleted file mode 100644 index b67d7ff78d..0000000000 --- a/editor/icons/KeyHover.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="8" viewBox="0 0 8 8" width="8" xmlns="http://www.w3.org/2000/svg"><rect fill="#fff" height="6.1027" ry=".76286" transform="matrix(.70710678 -.70710678 .70710678 .70710678 0 -1044.4)" width="6.1027" x="-741.53" y="741.08"/></svg> diff --git a/editor/icons/LoopInterpolation.svg b/editor/icons/LoopInterpolation.svg deleted file mode 100644 index 5e3f919043..0000000000 --- a/editor/icons/LoopInterpolation.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m6 1v2h-2a2 2 0 0 0 -1.7324 1 2 2 0 0 0 -.26562 1h-.0019531v.046875 5.2246a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 2-2 2 2 0 0 0 -1-1.7305v-3.2695-2h2v2l4-3-4-3zm7 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v3.2695 2h-2v-2l-4 3 4 3v-2h2a2 2 0 0 0 1.7324-1 2 2 0 0 0 .26562-1h.001953v-5.2715a2 2 0 0 0 1-1.7285 2 2 0 0 0 -2-2z" fill="#e0e0e0" fill-opacity=".99608"/></svg> diff --git a/editor/icons/MirrorX.svg b/editor/icons/MirrorX.svg deleted file mode 100644 index fa668986ac..0000000000 --- a/editor/icons/MirrorX.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="#e0e0e0" stroke-opacity=".99608" stroke-width="2" transform="translate(0 -1036.4)"><path d="m4 1042.4-2 2 2 2" stroke-linecap="round" stroke-linejoin="round"/><path d="m2 1044.4h11"/><path d="m12 1042.4 2 2-2 2" stroke-linecap="round" stroke-linejoin="round"/></g></svg> diff --git a/editor/icons/MirrorY.svg b/editor/icons/MirrorY.svg deleted file mode 100644 index bb4e4d3543..0000000000 --- a/editor/icons/MirrorY.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m11.012 1048.4a1.0001 1.0001 0 0 0 -1.7168-.6973l-.29297.293v-7.1719l.29297.293a1.0001 1.0001 0 0 0 1.7148-.7266 1.0001 1.0001 0 0 0 -.30078-.6875l-2-2a1.0001 1.0001 0 0 0 -1.4141 0l-2 2a1.0001 1.0001 0 1 0 1.4141 1.4141l.29297-.293v7.1719l-.29297-.293a1.0001 1.0001 0 1 0 -1.4141 1.4141l2 2a1.0001 1.0001 0 0 0 1.4141 0l2-2a1.0001 1.0001 0 0 0 .30273-.7168z" fill="#e0e0e0" fill-opacity=".99608" transform="translate(0 -1036.4)"/></svg> diff --git a/editor/icons/MultiEdit.svg b/editor/icons/MultiEdit.svg deleted file mode 100644 index d1409e16ca..0000000000 --- a/editor/icons/MultiEdit.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1c-.554 0-1 .446-1 1v2h4v-2c0-.554-.446-1-1-1zm-1 4v7l2 3 2-3v-7zm1 1h1v5h-1zm8 1v3h-3v2h3v3h2v-3h3v-2h-3v-3z" fill="#e0e0e0"/></svg> diff --git a/editor/icons/MultiLine.svg b/editor/icons/MultiLine.svg deleted file mode 100644 index 634086fd51..0000000000 --- a/editor/icons/MultiLine.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v2h7v-2zm9 0v2h5v-2zm-9 4v2h11v-2zm0 4v2h4v-2zm6 0v2h8v-2zm-6 4v2h13v-2z" fill="#e0e0e0"/></svg> diff --git a/editor/icons/Portal.svg b/editor/icons/Portal.svg deleted file mode 100644 index 9365c450da..0000000000 --- a/editor/icons/Portal.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1a5 7 0 0 0 -5 7 5 7 0 0 0 5 7 5 7 0 0 0 5-7 5 7 0 0 0 -5-7zm0 2a3 5 0 0 1 3 5 3 5 0 0 1 -3 5 3 5 0 0 1 -3-5 3 5 0 0 1 3-5z" fill="#fc7f7f" fill-opacity=".99608"/></svg> diff --git a/editor/icons/Rayito.svg b/editor/icons/Rayito.svg deleted file mode 100644 index 1d4f9ca458..0000000000 --- a/editor/icons/Rayito.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m4 1-1 7h2.875l-.875 7 9-8h-3.8574l.85742-6h-7z" fill="#ffca5f"/></svg> diff --git a/editor/icons/RigidBody2D.svg b/editor/icons/RigidDynamicBody2D.svg index 5d08e991ae..5d08e991ae 100644 --- a/editor/icons/RigidBody2D.svg +++ b/editor/icons/RigidDynamicBody2D.svg diff --git a/editor/icons/RigidBody3D.svg b/editor/icons/RigidDynamicBody3D.svg index 7f5db4ce88..7f5db4ce88 100644 --- a/editor/icons/RigidBody3D.svg +++ b/editor/icons/RigidDynamicBody3D.svg diff --git a/editor/icons/Room.svg b/editor/icons/Room.svg deleted file mode 100644 index 2bc165e736..0000000000 --- a/editor/icons/Room.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7.9629 1.002a1.0001 1.0001 0 0 0 -.41016.10352l-6 3a1.0001 1.0001 0 0 0 -.55273.89453v6a1.0001 1.0001 0 0 0 .55273.89453l6 3a1.0001 1.0001 0 0 0 .89453 0l6-3a1.0001 1.0001 0 0 0 .55273-.89453v-6a1.0001 1.0001 0 0 0 -.55273-.89453l-6-3a1.0001 1.0001 0 0 0 -.48438-.10352zm1.0371 2.6172 4 2v3.7637l-4-2zm-1 5.5 3.7637 1.8809-3.7637 1.8828-3.7637-1.8828z" fill="#fc7f7f" fill-opacity=".99608" fill-rule="evenodd"/></svg> diff --git a/editor/icons/RoomBounds.svg b/editor/icons/RoomBounds.svg deleted file mode 100644 index 66901d7895..0000000000 --- a/editor/icons/RoomBounds.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v2h1v-1h1v-1zm12 0v1h1v1h1v-2zm-5.0371.00195c-.14254.00487-.28238.04016-.41016.10352l-6 3c-.33878.16944-.55276.51574-.55273.89453v6c-.00002576.37879.21395.72509.55273.89453l6 3c.28156.14078.61297.14078.89453 0l6-3c.33878-.16944.55276-.51574.55273-.89453v-6c.000026-.37879-.21395-.72509-.55273-.89453l-6-3c-.15022-.074574-.31679-.11017-.48438-.10352zm1.0371 2.6172 4 2v3.7637l-4-2zm-1 5.5 3.7637 1.8809-3.7637 1.8828-3.7637-1.8828zm-7 3.8809v2h2v-1h-1v-1zm13 0v1h-1v1h2v-2z" fill="#e0e0e0" fill-rule="evenodd"/></svg> diff --git a/editor/icons/Rotate0.svg b/editor/icons/Rotate0.svg deleted file mode 100644 index 670a6f09c3..0000000000 --- a/editor/icons/Rotate0.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0 -7-7zm1 2.1016a5 5 0 0 1 4 4.8984 5 5 0 0 1 -5 5 5 5 0 0 1 -5-5 5 5 0 0 1 4-4.8945v5.8945h2z" fill="#e0e0e0"/></svg> diff --git a/editor/icons/Rotate180.svg b/editor/icons/Rotate180.svg deleted file mode 100644 index fdd0882fba..0000000000 --- a/editor/icons/Rotate180.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-3.8541 0-7 3.1459-7 7 0 3.8542 3.1459 7 7 7s7-3.1458 7-7c0-3.8541-3.1459-7-7-7zm0 2v10c-2.7733 0-5-2.2267-5-5 0-2.7732 2.2267-5 5-5z" fill="#e0e0e0"/></svg> diff --git a/editor/icons/Rotate270.svg b/editor/icons/Rotate270.svg deleted file mode 100644 index 7ffd43d147..0000000000 --- a/editor/icons/Rotate270.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0 -7-7zm0 2v5h-5a5 5 0 0 1 5-5z" fill="#e0e0e0"/></svg> diff --git a/editor/icons/Rotate90.svg b/editor/icons/Rotate90.svg deleted file mode 100644 index ef4d631df6..0000000000 --- a/editor/icons/Rotate90.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-3.8541 0-7 3.1459-7 7 0 3.8542 3.1459 7 7 7 3.7179 0 6.7102-2.9486 6.9219-6.6152a1 1 0 0 0 .078125-.38477 1 1 0 0 0 -.078125-.38867 1 1 0 0 0 -.001953-.0039062c-.21589-3.6627-3.2049-6.6074-6.9199-6.6074zm0 2v5h5c0 2.7733-2.2267 5-5 5s-5-2.2267-5-5c0-2.7732 2.2267-5 5-5z" fill="#e0e0e0"/></svg> diff --git a/editor/icons/RotateLeft.svg b/editor/icons/RotateLeft.svg deleted file mode 100644 index 1200df1dde..0000000000 --- a/editor/icons/RotateLeft.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".99608" transform="translate(0 -1036.4)"><path d="m9 2a6 6 0 0 0 -6 6h2a4 4 0 0 1 4-4 4 4 0 0 1 4 4 4 4 0 0 1 -4 4v2a6 6 0 0 0 6-6 6 6 0 0 0 -6-6z" transform="translate(0 1036.4)"/><path d="m4.118 1048.3-1.6771-.9683-1.6771-.9682 1.6771-.9683 1.6771-.9682-.0000001 1.9365z" transform="matrix(0 -1.1926 1.5492 0 -1617 1049.3)"/></g></svg> diff --git a/editor/icons/RotateRight.svg b/editor/icons/RotateRight.svg deleted file mode 100644 index d69e6a7705..0000000000 --- a/editor/icons/RotateRight.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".99608" transform="matrix(-1 0 0 1 16.026308 -1036.4)"><path d="m9 2a6 6 0 0 0 -6 6h2a4 4 0 0 1 4-4 4 4 0 0 1 4 4 4 4 0 0 1 -4 4v2a6 6 0 0 0 6-6 6 6 0 0 0 -6-6z" transform="translate(0 1036.4)"/><path d="m4.118 1048.3-1.6771-.9683-1.6771-.9682 1.6771-.9683 1.6771-.9682-.0000001 1.9365z" transform="matrix(0 -1.1926 1.5492 0 -1617 1049.3)"/></g></svg> diff --git a/editor/icons/SoftBody3D.svg b/editor/icons/SoftDynamicBody3D.svg index 7bc9a22c22..7bc9a22c22 100644 --- a/editor/icons/SoftBody3D.svg +++ b/editor/icons/SoftDynamicBody3D.svg diff --git a/editor/icons/TestCube.svg b/editor/icons/TestCube.svg deleted file mode 100644 index 9995f5b5f4..0000000000 --- a/editor/icons/TestCube.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7.9629 1.002a1.0001 1.0001 0 0 0 -.41016.10352l-6 3a1.0001 1.0001 0 0 0 -.55273.89453v6a1.0001 1.0001 0 0 0 .55273.89453l6 3a1.0001 1.0001 0 0 0 .89453 0l6-3a1.0001 1.0001 0 0 0 .55273-.89453v-6a1.0001 1.0001 0 0 0 -.55273-.89453l-6-3a1.0001 1.0001 0 0 0 -.48438-.10352zm.037109 2.1172 3.7637 1.8809-3.7637 1.8828-3.7637-1.8828zm-5 3.5 4 2v3.7637l-4-2zm10 0v3.7637l-4 2v-3.7637z" fill="#fc7f7f" fill-opacity=".99608" fill-rule="evenodd" transform="translate(0 .000012)"/></svg> diff --git a/editor/icons/TextureArray.svg b/editor/icons/Texture2DArray.svg index a71860023b..a71860023b 100644 --- a/editor/icons/TextureArray.svg +++ b/editor/icons/Texture2DArray.svg diff --git a/editor/icons/TrackAddKey.svg b/editor/icons/TrackAddKey.svg deleted file mode 100644 index 82eff5d2bf..0000000000 --- a/editor/icons/TrackAddKey.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="8" viewBox="0 0 8 8" width="8" xmlns="http://www.w3.org/2000/svg"><path d="m3 0v3h-3v2h3v3h2v-3h3v-2h-3v-3z" fill="#5fff97"/></svg> diff --git a/editor/icons/TrackAddKeyHl.svg b/editor/icons/TrackAddKeyHl.svg deleted file mode 100644 index 03fb90f1e9..0000000000 --- a/editor/icons/TrackAddKeyHl.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="8" viewBox="0 0 8 8" width="8" xmlns="http://www.w3.org/2000/svg"><path d="m3 0v3h-3v2h3v3h2v-3h3v-2h-3v-3z" fill="#5fff97"/><path d="m3 0v3h-3v2h3v3h2v-3h3v-2h-3v-3z" fill="#fff" fill-opacity=".42424"/></svg> diff --git a/editor/icons/Unbone.svg b/editor/icons/Unbone.svg deleted file mode 100644 index 2aa0b8ad8c..0000000000 --- a/editor/icons/Unbone.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m10.479 1a2.4664 2.4663 0 0 0 -1.7813.7207 2.4664 2.4663 0 0 0 -.31445 3.1035l-1.0723 1.0723 2.791 2.791 1.0762-1.0742a2.4664 2.4663 0 0 0 3.0996-.31055 2.4664 2.4663 0 0 0 0-3.4883 2.4664 2.4663 0 0 0 -1.3965-.69727 2.4664 2.4663 0 0 0 -.69531-1.3965 2.4664 2.4663 0 0 0 -1.707-.7207zm-4.582 6.3105-1.0723 1.0742a2.4664 2.4663 0 0 0 -3.1016.3125 2.4664 2.4663 0 0 0 0 3.4883 2.4664 2.4663 0 0 0 1.3965.69531 2.4664 2.4663 0 0 0 .69531 1.3965 2.4664 2.4663 0 0 0 3.4883 0 2.4664 2.4663 0 0 0 .31445-3.1035l1.0703-1.0723-2.791-2.791z" fill="#e0e0e0" fill-opacity=".99608"/></svg> diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index 753dcb1275..c48d9bb117 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -414,8 +414,8 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<E _pre_gen_shape_list(mesh, shapes, true); } - RigidBody3D *rigid_body = memnew(RigidBody3D); - rigid_body->set_name(_fixstr(name, "rigid")); + RigidDynamicBody3D *rigid_body = memnew(RigidDynamicBody3D); + rigid_body->set_name(_fixstr(name, "rigid_body")); p_node->replace_by(rigid_body); rigid_body->set_transform(mi->get_transform()); p_node = rigid_body; @@ -622,7 +622,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< base = col; } break; case MESH_PHYSICS_RIGID_BODY_AND_MESH: { - RigidBody3D *rigid_body = memnew(RigidBody3D); + RigidDynamicBody3D *rigid_body = memnew(RigidDynamicBody3D); rigid_body->set_name(p_node->get_name()); p_node->replace_by(rigid_body); rigid_body->set_transform(mi->get_transform() * get_collision_shapes_transform(node_settings)); diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp index 778046f45c..04ddf3552b 100644 --- a/editor/inspector_dock.cpp +++ b/editor/inspector_dock.cpp @@ -30,11 +30,22 @@ #include "inspector_dock.h" -#include "editor/editor_node.h" -#include "editor/editor_settings.h" +#include "editor/editor_scale.h" #include "editor/plugins/animation_player_editor_plugin.h" void InspectorDock::_menu_option(int p_option) { + _menu_option_confirm(p_option, false); +} + +void InspectorDock::_menu_confirm_current() { + _menu_option_confirm(current_option, true); +} + +void InspectorDock::_menu_option_confirm(int p_option, bool p_confirmed) { + if (!p_confirmed) { + current_option = p_option; + } + switch (p_option) { case EXPAND_ALL: { _menu_expandall(); @@ -82,39 +93,81 @@ void InspectorDock::_menu_option(int p_option) { } break; case OBJECT_UNIQUE_RESOURCES: { - editor_data->apply_changes_in_editors(); - if (current) { - List<PropertyInfo> props; - current->get_property_list(&props); - Map<RES, RES> duplicates; - for (const PropertyInfo &E : props) { - if (!(E.usage & PROPERTY_USAGE_STORAGE)) { - continue; - } + if (!p_confirmed) { + Vector<String> resource_propnames; - Variant v = current->get(E.name); - if (v.is_ref()) { + if (current) { + List<PropertyInfo> props; + current->get_property_list(&props); + + for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) { + if (!(E->get().usage & PROPERTY_USAGE_STORAGE)) { + continue; + } + + Variant v = current->get(E->get().name); REF ref = v; - if (ref.is_valid()) { - RES res = ref; - if (res.is_valid()) { - if (!duplicates.has(res)) { - duplicates[res] = res->duplicate(); - } - res = duplicates[res]; + RES res = ref; + if (v.is_ref() && ref.is_valid() && res.is_valid()) { + // Valid resource which would be duplicated if action is confirmed. + resource_propnames.append(E->get().name); + } + } + } + + if (resource_propnames.size()) { + unique_resources_list_tree->clear(); + TreeItem *root = unique_resources_list_tree->create_item(); - current->set(E.name, res); - editor->get_inspector()->update_property(E.name); + for (int i = 0; i < resource_propnames.size(); i++) { + String propname = resource_propnames[i].replace("/", " / "); + + TreeItem *ti = unique_resources_list_tree->create_item(root); + ti->set_text(0, bool(EDITOR_GET("interface/inspector/capitalize_properties")) ? propname.capitalize() : propname); + } + + unique_resources_confirmation->popup_centered(); + } else { + unique_resources_confirmation->set_text(TTR("This object has no resources.")); + current_option = -1; + unique_resources_confirmation->popup_centered(); + } + } else { + editor_data->apply_changes_in_editors(); + + if (current) { + List<PropertyInfo> props; + current->get_property_list(&props); + Map<RES, RES> duplicates; + for (const PropertyInfo &prop_info : props) { + if (!(prop_info.usage & PROPERTY_USAGE_STORAGE)) { + continue; + } + + Variant v = current->get(prop_info.name); + if (v.is_ref()) { + REF ref = v; + if (ref.is_valid()) { + RES res = ref; + if (res.is_valid()) { + if (!duplicates.has(res)) { + duplicates[res] = res->duplicate(); + } + res = duplicates[res]; + + current->set(prop_info.name, res); + editor->get_inspector()->update_property(prop_info.name); + } } } } } - } - editor_data->get_undo_redo().clear_history(); + editor_data->get_undo_redo().clear_history(); - editor->get_editor_plugins_over()->edit(nullptr); - editor->get_editor_plugins_over()->edit(current); + editor->get_editor_plugins_over()->edit(nullptr); + editor->get_editor_plugins_over()->edit(current); + } } break; @@ -619,6 +672,29 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) { warning->hide(); warning->connect("pressed", callable_mp(this, &InspectorDock::_warning_pressed)); + unique_resources_confirmation = memnew(ConfirmationDialog); + add_child(unique_resources_confirmation); + + VBoxContainer *container = memnew(VBoxContainer); + unique_resources_confirmation->add_child(container); + + Label *top_label = memnew(Label); + top_label->set_text(TTR("The following resources will be duplicated and embedded within this resource/object.")); + container->add_child(top_label); + + unique_resources_list_tree = memnew(Tree); + unique_resources_list_tree->set_hide_root(true); + unique_resources_list_tree->set_columns(1); + unique_resources_list_tree->set_column_title(0, TTR("Property")); + unique_resources_list_tree->set_custom_minimum_size(Size2(0, 200 * EDSCALE)); + container->add_child(unique_resources_list_tree); + + Label *bottom_label = memnew(Label); + bottom_label->set_text(TTR("This cannot be undone. Are you sure?")); + container->add_child(bottom_label); + + unique_resources_confirmation->connect("confirmed", callable_mp(this, &InspectorDock::_menu_confirm_current)); + warning_dialog = memnew(AcceptDialog); editor->get_gui_base()->add_child(warning_dialog); diff --git a/editor/inspector_dock.h b/editor/inspector_dock.h index 6615845b66..5bf6a34617 100644 --- a/editor/inspector_dock.h +++ b/editor/inspector_dock.h @@ -40,8 +40,6 @@ #include "scene/gui/box_container.h" #include "scene/gui/button.h" #include "scene/gui/control.h" -#include "scene/gui/label.h" -#include "scene/gui/popup_menu.h" class EditorNode; @@ -92,7 +90,13 @@ class InspectorDock : public VBoxContainer { Button *warning; AcceptDialog *warning_dialog; + int current_option = -1; + ConfirmationDialog *unique_resources_confirmation; + Tree *unique_resources_list_tree; + void _menu_option(int p_option); + void _menu_confirm_current(); + void _menu_option_confirm(int p_option, bool p_confirmed); void _new_resource(); void _load_resource(const String &p_type = ""); diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp index 94966d4fe6..30945826bb 100644 --- a/editor/plugins/material_editor_plugin.cpp +++ b/editor/plugins/material_editor_plugin.cpp @@ -278,6 +278,8 @@ Ref<Resource> StandardMaterial3DConversionPlugin::convert(const Ref<Resource> &p } smat->set_render_priority(mat->get_render_priority()); + smat->set_local_to_scene(mat->is_local_to_scene()); + smat->set_name(mat->get_name()); return smat; } @@ -315,6 +317,8 @@ Ref<Resource> ParticlesMaterialConversionPlugin::convert(const Ref<Resource> &p_ } smat->set_render_priority(mat->get_render_priority()); + smat->set_local_to_scene(mat->is_local_to_scene()); + smat->set_name(mat->get_name()); return smat; } @@ -352,6 +356,8 @@ Ref<Resource> CanvasItemMaterialConversionPlugin::convert(const Ref<Resource> &p } smat->set_render_priority(mat->get_render_priority()); + smat->set_local_to_scene(mat->is_local_to_scene()); + smat->set_name(mat->get_name()); return smat; } @@ -389,6 +395,8 @@ Ref<Resource> ProceduralSkyMaterialConversionPlugin::convert(const Ref<Resource> } smat->set_render_priority(mat->get_render_priority()); + smat->set_local_to_scene(mat->is_local_to_scene()); + smat->set_name(mat->get_name()); return smat; } @@ -426,6 +434,8 @@ Ref<Resource> PanoramaSkyMaterialConversionPlugin::convert(const Ref<Resource> & } smat->set_render_priority(mat->get_render_priority()); + smat->set_local_to_scene(mat->is_local_to_scene()); + smat->set_name(mat->get_name()); return smat; } @@ -463,5 +473,7 @@ Ref<Resource> PhysicalSkyMaterialConversionPlugin::convert(const Ref<Resource> & } smat->set_render_priority(mat->get_render_priority()); + smat->set_local_to_scene(mat->is_local_to_scene()); + smat->set_name(mat->get_name()); return smat; } diff --git a/editor/plugins/node_3d_editor_gizmos.cpp b/editor/plugins/node_3d_editor_gizmos.cpp index e61571edff..c2ba987cd7 100644 --- a/editor/plugins/node_3d_editor_gizmos.cpp +++ b/editor/plugins/node_3d_editor_gizmos.cpp @@ -53,7 +53,7 @@ #include "scene/3d/position_3d.h" #include "scene/3d/ray_cast_3d.h" #include "scene/3d/reflection_probe.h" -#include "scene/3d/soft_body_3d.h" +#include "scene/3d/soft_dynamic_body_3d.h" #include "scene/3d/spring_arm_3d.h" #include "scene/3d/sprite_3d.h" #include "scene/3d/vehicle_body_3d.h" @@ -1481,8 +1481,6 @@ void Light3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { } } -////// - //// player gizmo AudioStreamPlayer3DGizmoPlugin::AudioStreamPlayer3DGizmoPlugin() { Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/stream_player_3d", Color(0.4, 0.8, 1)); @@ -1621,6 +1619,29 @@ void AudioStreamPlayer3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { ////// +Listener3DGizmoPlugin::Listener3DGizmoPlugin() { + create_icon_material("listener_3d_icon", Node3DEditor::get_singleton()->get_theme_icon("GizmoListener3D", "EditorIcons")); +} + +bool Listener3DGizmoPlugin::has_gizmo(Node3D *p_spatial) { + return Object::cast_to<Listener3D>(p_spatial) != nullptr; +} + +String Listener3DGizmoPlugin::get_gizmo_name() const { + return "Listener3D"; +} + +int Listener3DGizmoPlugin::get_priority() const { + return -1; +} + +void Listener3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { + const Ref<Material> icon = get_material("listener_3d_icon", p_gizmo); + p_gizmo->add_unscaled_billboard(icon, 0.05); +} + +////// + Camera3DGizmoPlugin::Camera3DGizmoPlugin() { Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/camera", Color(0.8, 0.4, 0.8)); @@ -1866,7 +1887,7 @@ MeshInstance3DGizmoPlugin::MeshInstance3DGizmoPlugin() { } bool MeshInstance3DGizmoPlugin::has_gizmo(Node3D *p_spatial) { - return Object::cast_to<MeshInstance3D>(p_spatial) != nullptr && Object::cast_to<SoftBody3D>(p_spatial) == nullptr; + return Object::cast_to<MeshInstance3D>(p_spatial) != nullptr && Object::cast_to<SoftDynamicBody3D>(p_spatial) == nullptr; } String MeshInstance3DGizmoPlugin::get_gizmo_name() const { @@ -2489,30 +2510,30 @@ void VehicleWheel3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { /////////// -SoftBody3DGizmoPlugin::SoftBody3DGizmoPlugin() { +SoftDynamicBody3DGizmoPlugin::SoftDynamicBody3DGizmoPlugin() { Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1)); create_material("shape_material", gizmo_color); create_handle_material("handles"); } -bool SoftBody3DGizmoPlugin::has_gizmo(Node3D *p_spatial) { - return Object::cast_to<SoftBody3D>(p_spatial) != nullptr; +bool SoftDynamicBody3DGizmoPlugin::has_gizmo(Node3D *p_spatial) { + return Object::cast_to<SoftDynamicBody3D>(p_spatial) != nullptr; } -String SoftBody3DGizmoPlugin::get_gizmo_name() const { - return "SoftBody3D"; +String SoftDynamicBody3DGizmoPlugin::get_gizmo_name() const { + return "SoftDynamicBody3D"; } -int SoftBody3DGizmoPlugin::get_priority() const { +int SoftDynamicBody3DGizmoPlugin::get_priority() const { return -1; } -bool SoftBody3DGizmoPlugin::is_selectable_when_hidden() const { +bool SoftDynamicBody3DGizmoPlugin::is_selectable_when_hidden() const { return true; } -void SoftBody3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { - SoftBody3D *soft_body = Object::cast_to<SoftBody3D>(p_gizmo->get_spatial_node()); +void SoftDynamicBody3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { + SoftDynamicBody3D *soft_body = Object::cast_to<SoftDynamicBody3D>(p_gizmo->get_spatial_node()); p_gizmo->clear(); @@ -2548,22 +2569,22 @@ void SoftBody3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { p_gizmo->add_collision_triangles(tm); } -String SoftBody3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_id) const { - return "SoftBody3D pin point"; +String SoftDynamicBody3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_id) const { + return "SoftDynamicBody3D pin point"; } -Variant SoftBody3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id) const { - SoftBody3D *soft_body = Object::cast_to<SoftBody3D>(p_gizmo->get_spatial_node()); +Variant SoftDynamicBody3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id) const { + SoftDynamicBody3D *soft_body = Object::cast_to<SoftDynamicBody3D>(p_gizmo->get_spatial_node()); return Variant(soft_body->is_point_pinned(p_id)); } -void SoftBody3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, const Variant &p_restore, bool p_cancel) { - SoftBody3D *soft_body = Object::cast_to<SoftBody3D>(p_gizmo->get_spatial_node()); +void SoftDynamicBody3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, const Variant &p_restore, bool p_cancel) { + SoftDynamicBody3D *soft_body = Object::cast_to<SoftDynamicBody3D>(p_gizmo->get_spatial_node()); soft_body->pin_point_toggle(p_id); } -bool SoftBody3DGizmoPlugin::is_handle_highlighted(const EditorNode3DGizmo *p_gizmo, int p_id) const { - SoftBody3D *soft_body = Object::cast_to<SoftBody3D>(p_gizmo->get_spatial_node()); +bool SoftDynamicBody3DGizmoPlugin::is_handle_highlighted(const EditorNode3DGizmo *p_gizmo, int p_id) const { + SoftDynamicBody3D *soft_body = Object::cast_to<SoftDynamicBody3D>(p_gizmo->get_spatial_node()); return soft_body->is_point_pinned(p_id); } diff --git a/editor/plugins/node_3d_editor_gizmos.h b/editor/plugins/node_3d_editor_gizmos.h index 415ed5da5c..67f54562b1 100644 --- a/editor/plugins/node_3d_editor_gizmos.h +++ b/editor/plugins/node_3d_editor_gizmos.h @@ -249,6 +249,19 @@ public: AudioStreamPlayer3DGizmoPlugin(); }; +class Listener3DGizmoPlugin : public EditorNode3DGizmoPlugin { + GDCLASS(Listener3DGizmoPlugin, EditorNode3DGizmoPlugin); + +public: + bool has_gizmo(Node3D *p_spatial) override; + String get_gizmo_name() const override; + int get_priority() const override; + + void redraw(EditorNode3DGizmo *p_gizmo) override; + + Listener3DGizmoPlugin(); +}; + class Camera3DGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(Camera3DGizmoPlugin, EditorNode3DGizmoPlugin); @@ -379,8 +392,8 @@ public: VehicleWheel3DGizmoPlugin(); }; -class SoftBody3DGizmoPlugin : public EditorNode3DGizmoPlugin { - GDCLASS(SoftBody3DGizmoPlugin, EditorNode3DGizmoPlugin); +class SoftDynamicBody3DGizmoPlugin : public EditorNode3DGizmoPlugin { + GDCLASS(SoftDynamicBody3DGizmoPlugin, EditorNode3DGizmoPlugin); public: bool has_gizmo(Node3D *p_spatial) override; @@ -394,7 +407,7 @@ public: void commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, const Variant &p_restore, bool p_cancel = false) override; bool is_handle_highlighted(const EditorNode3DGizmo *p_gizmo, int p_id) const override; - SoftBody3DGizmoPlugin(); + SoftDynamicBody3DGizmoPlugin(); }; class VisibleOnScreenNotifier3DGizmoPlugin : public EditorNode3DGizmoPlugin { diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index be5d756444..1b725d5d3a 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -6863,9 +6863,10 @@ void Node3DEditor::_register_all_gizmos() { add_gizmo_plugin(Ref<Camera3DGizmoPlugin>(memnew(Camera3DGizmoPlugin))); add_gizmo_plugin(Ref<Light3DGizmoPlugin>(memnew(Light3DGizmoPlugin))); add_gizmo_plugin(Ref<AudioStreamPlayer3DGizmoPlugin>(memnew(AudioStreamPlayer3DGizmoPlugin))); + add_gizmo_plugin(Ref<Listener3DGizmoPlugin>(memnew(Listener3DGizmoPlugin))); add_gizmo_plugin(Ref<MeshInstance3DGizmoPlugin>(memnew(MeshInstance3DGizmoPlugin))); add_gizmo_plugin(Ref<OccluderInstance3DGizmoPlugin>(memnew(OccluderInstance3DGizmoPlugin))); - add_gizmo_plugin(Ref<SoftBody3DGizmoPlugin>(memnew(SoftBody3DGizmoPlugin))); + add_gizmo_plugin(Ref<SoftDynamicBody3DGizmoPlugin>(memnew(SoftDynamicBody3DGizmoPlugin))); add_gizmo_plugin(Ref<Sprite3DGizmoPlugin>(memnew(Sprite3DGizmoPlugin))); add_gizmo_plugin(Ref<Skeleton3DGizmoPlugin>(memnew(Skeleton3DGizmoPlugin))); add_gizmo_plugin(Ref<Position3DGizmoPlugin>(memnew(Position3DGizmoPlugin))); |