diff options
Diffstat (limited to 'editor')
64 files changed, 833 insertions, 423 deletions
diff --git a/editor/SCsub b/editor/SCsub index 315865ad32..bf88ebb1b5 100644 --- a/editor/SCsub +++ b/editor/SCsub @@ -395,8 +395,8 @@ def _make_doc_data_class_path(to_path): g.write("{NULL,NULL}\n") g.write("};\n") -if (env["tools"] == "yes"): +if env['tools']: # Register exporters reg_exporters_inc = '#include "register_exporters.h"\n' reg_exporters = 'void register_exporters() {\n' diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index b74bd3ab43..bdd297b56c 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -64,6 +64,8 @@ void EditorAudioBus::_notification(int p_what) { if (has_focus()) { draw_style_box(get_stylebox("focus", "Button"), Rect2(Vector2(), get_size())); + } else if (is_master) { + draw_style_box(get_stylebox("disabled", "Button"), Rect2(Vector2(), get_size())); } } @@ -123,7 +125,7 @@ void EditorAudioBus::_notification(int p_what) { void EditorAudioBus::update_send() { send->clear(); - if (get_index() == 0) { + if (is_master) { send->set_disabled(true); send->set_text(TTR("Speakers")); } else { @@ -154,7 +156,7 @@ void EditorAudioBus::update_bus() { slider->set_value(AudioServer::get_singleton()->get_bus_volume_db(index)); track_name->set_text(AudioServer::get_singleton()->get_bus_name(index)); - if (get_index() == 0) + if (is_master) track_name->set_editable(false); solo->set_pressed(AudioServer::get_singleton()->is_bus_solo(index)); @@ -237,6 +239,8 @@ void EditorAudioBus::_name_changed(const String &p_new_name) { ur->commit_action(); updating_bus = false; + + track_name->release_focus(); } void EditorAudioBus::_volume_db_changed(float p_db) { @@ -619,10 +623,11 @@ void EditorAudioBus::_bind_methods() { ADD_SIGNAL(MethodInfo("dropped")); } -EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses) { +EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) { buses = p_buses; updating_bus = false; + is_master = p_is_master; set_tooltip(TTR("Audio Bus, Drag and Drop to rearrange.")); @@ -630,24 +635,15 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses) { add_child(vb); set_v_size_flags(SIZE_EXPAND_FILL); + set_custom_minimum_size(Size2(100, 0) * EDSCALE); - HBoxContainer *head = memnew(HBoxContainer); track_name = memnew(LineEdit); - head->add_child(track_name); track_name->connect("text_entered", this, "_name_changed"); track_name->connect("focus_exited", this, "_name_focus_exit"); - track_name->set_h_size_flags(SIZE_EXPAND_FILL); - - bus_options = memnew(MenuButton); - bus_options->set_h_size_flags(SIZE_SHRINK_END); - bus_options->set_tooltip(TTR("Bus options")); - head->add_child(bus_options); - - vb->add_child(head); + vb->add_child(track_name); HBoxContainer *hbc = memnew(HBoxContainer); vb->add_child(hbc); - hbc->add_spacer(); solo = memnew(ToolButton); solo->set_toggle_mode(true); solo->set_tooltip(TTR("Solo")); @@ -668,6 +664,23 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses) { hbc->add_child(bypass); hbc->add_spacer(); + bus_options = memnew(MenuButton); + bus_options->set_h_size_flags(SIZE_SHRINK_END); + bus_options->set_anchor(MARGIN_RIGHT, 0.0); + bus_options->set_tooltip(TTR("Bus options")); + hbc->add_child(bus_options); + + Ref<StyleBoxEmpty> sbempty = memnew(StyleBoxEmpty); + for (int i = 0; i < hbc->get_child_count(); i++) { + Control *child = Object::cast_to<Control>(hbc->get_child(i)); + child->add_style_override("normal", sbempty); + child->add_style_override("hover", sbempty); + child->add_style_override("focus", sbempty); + child->add_style_override("pressed", sbempty); + } + + vb->add_child(memnew(HSeparator)); + HBoxContainer *hb = memnew(HBoxContainer); vb->add_child(hb); slider = memnew(VSlider); @@ -699,8 +712,6 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses) { scale = memnew(TextureRect); hb->add_child(scale); - //add_child(hb); - effects = memnew(Tree); effects->set_hide_root(true); effects->set_custom_minimum_size(Size2(0, 100) * EDSCALE); @@ -744,7 +755,8 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses) { bus_popup = bus_options->get_popup(); bus_popup->add_item(TTR("Duplicate")); - bus_popup->add_item(TTR("Delete")); + if (!is_master) + bus_popup->add_item(TTR("Delete")); bus_popup->add_item(TTR("Reset Volume")); bus_popup->connect("index_pressed", this, "_bus_popup_pressed"); @@ -787,10 +799,8 @@ void EditorAudioBuses::_update_buses() { for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) { - EditorAudioBus *audio_bus = memnew(EditorAudioBus(this)); - if (i == 0) { - audio_bus->set_self_modulate(Color(1, 0.9, 0.9)); - } + bool is_master = i == 0 ? true : false; + EditorAudioBus *audio_bus = memnew(EditorAudioBus(this, is_master)); bus_hb->add_child(audio_bus); audio_bus->connect("delete_request", this, "_delete_bus", varray(audio_bus), CONNECT_DEFERRED); audio_bus->connect("duplicate_request", this, "_duplicate_bus", varray(), CONNECT_DEFERRED); diff --git a/editor/editor_audio_buses.h b/editor/editor_audio_buses.h index dba1b73295..995def468c 100644 --- a/editor/editor_audio_buses.h +++ b/editor/editor_audio_buses.h @@ -84,6 +84,8 @@ class EditorAudioBus : public PanelContainer { bool updating_bus; + bool is_master; + void _gui_input(const Ref<InputEvent> &p_event); void _bus_popup_pressed(int p_option); @@ -120,7 +122,7 @@ public: void update_bus(); void update_send(); - EditorAudioBus(EditorAudioBuses *p_buses = NULL); + EditorAudioBus(EditorAudioBuses *p_buses = NULL, bool p_is_master = false); }; class EditorAudioBusDrop : public Panel { diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index 4caf2641fc..db12998dd2 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -273,6 +273,8 @@ void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags) } Error EditorExportPlatform::_save_pack_file(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total) { + if (p_path.ends_with(".so") || p_path.ends_with(".dylib") || p_path.ends_with(".dll")) + return OK; PackData *pd = (PackData *)p_userdata; diff --git a/editor/editor_fonts.cpp b/editor/editor_fonts.cpp index 6e5726a16d..110b2a6a8c 100644 --- a/editor/editor_fonts.cpp +++ b/editor/editor_fonts.cpp @@ -158,6 +158,16 @@ void editor_register_fonts(Ref<Theme> p_theme) { p_theme->set_font("doc_source", "EditorFonts", df_doc_code); + Ref<DynamicFont> df_output_code; + df_output_code.instance(); + df_output_code->set_size(int(EDITOR_DEF("run/output/font_size", 13)) * EDSCALE); + df_output_code->set_spacing(DynamicFont::SPACING_TOP, -EDSCALE); + df_output_code->set_spacing(DynamicFont::SPACING_BOTTOM, -EDSCALE); + df_output_code->set_font_data(dfmono); + MAKE_FALLBACKS(df_output_code); + + p_theme->set_font("output_source", "EditorFonts", df_output_code); + //replace default theme Ref<Texture> di; Ref<StyleBox> ds; diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp index e47abd24be..46f8baa4c5 100644 --- a/editor/editor_log.cpp +++ b/editor/editor_log.cpp @@ -31,6 +31,7 @@ #include "editor_node.h" #include "scene/gui/center_container.h" +#include "scene/resources/dynamic_font.h" #include "version.h" void EditorLog::_error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, ErrorHandlerType p_type) { @@ -51,7 +52,6 @@ void EditorLog::_error_handler(void *p_self, const char *p_func, const char *p_f self->emit_signal("show_request"); */ - err_str = " " + err_str; self->add_message(err_str, true); } @@ -60,6 +60,13 @@ void EditorLog::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE) { //button->set_icon(get_icon("Console","EditorIcons")); + log->add_font_override("normal_font", get_font("output_source", "EditorFonts")); + } else if (p_what == NOTIFICATION_THEME_CHANGED) { + Ref<DynamicFont> df_output_code = get_font("output_source", "EditorFonts"); + if (df_output_code.is_valid()) { + df_output_code->set_size(int(EDITOR_DEF("run/output/font_size", 13)) * EDSCALE); + log->add_font_override("normal_font", get_font("output_source", "EditorFonts")); + } } /*if (p_what==NOTIFICATION_DRAW) { @@ -85,15 +92,13 @@ void EditorLog::clear() { void EditorLog::add_message(const String &p_msg, bool p_error) { - Ref<Font> doc_code_font = get_font("doc_source", "EditorFonts"); - log->push_font(doc_code_font); - log->add_newline(); if (p_error) { log->push_color(get_color("error_color", "Editor")); Ref<Texture> icon = get_icon("Error", "EditorIcons"); log->add_image(icon); + log->add_text(" "); //button->set_icon(icon); } else { //button->set_icon(Ref<Texture>()); @@ -104,8 +109,6 @@ void EditorLog::add_message(const String &p_msg, bool p_error) { if (p_error) log->pop(); - - log->pop(); // pop font; } /* diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index ecede8e937..dbee190d7e 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -3247,6 +3247,7 @@ void EditorNode::register_editor_types() { ClassDB::register_virtual_class<ScriptEditor>(); ClassDB::register_virtual_class<EditorInterface>(); ClassDB::register_class<EditorExportPlugin>(); + ClassDB::register_class<EditorResourceConversionPlugin>(); // FIXME: Is this stuff obsolete, or should it be ported to new APIs? //ClassDB::register_class<EditorScenePostImport>(); @@ -4431,6 +4432,27 @@ void EditorNode::open_export_template_manager() { export_template_manager->popup_manager(); } +void EditorNode::add_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin) { + resource_conversion_plugins.push_back(p_plugin); +} + +void EditorNode::remove_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin) { + resource_conversion_plugins.erase(p_plugin); +} + +Vector<Ref<EditorResourceConversionPlugin> > EditorNode::find_resource_conversion_plugin(const Ref<Resource> &p_for_resource) { + + Vector<Ref<EditorResourceConversionPlugin> > ret; + + for (int i = 0; i < resource_conversion_plugins.size(); i++) { + if (resource_conversion_plugins[i].is_valid() && resource_conversion_plugins[i]->handles(p_for_resource)) { + ret.push_back(resource_conversion_plugins[i]); + } + } + + return ret; +} + void EditorNode::_bind_methods() { ClassDB::bind_method("_menu_option", &EditorNode::_menu_option); @@ -5497,6 +5519,11 @@ EditorNode::EditorNode() { resource_preview->add_preview_generator(Ref<EditorMeshPreviewPlugin>(memnew(EditorMeshPreviewPlugin))); resource_preview->add_preview_generator(Ref<EditorBitmapPreviewPlugin>(memnew(EditorBitmapPreviewPlugin))); + { + Ref<SpatialMaterialConversionPlugin> spatial_mat_convert; + spatial_mat_convert.instance(); + resource_conversion_plugins.push_back(spatial_mat_convert); + } circle_step_msec = OS::get_singleton()->get_ticks_msec(); circle_step_frame = Engine::get_singleton()->get_frames_drawn(); circle_step = 0; diff --git a/editor/editor_node.h b/editor/editor_node.h index e7853a27ba..0d1c6787cd 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -608,6 +608,8 @@ private: void _license_tree_selected(); + Vector<Ref<EditorResourceConversionPlugin> > resource_conversion_plugins; + protected: void _notification(int p_what); static void _bind_methods(); @@ -776,6 +778,10 @@ public: ~EditorNode(); void get_singleton(const char *arg1, bool arg2); + void add_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin); + void remove_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin); + Vector<Ref<EditorResourceConversionPlugin> > find_resource_conversion_plugin(const Ref<Resource> &p_for_resource); + static void add_init_callback(EditorNodeInitCallback p_callback) { _init_callbacks.push_back(p_callback); } static void add_build_callback(EditorBuildCallback p_callback); }; diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 628a2e957d..1b1306e303 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -131,6 +131,11 @@ bool EditorSettings::_get(const StringName &p_name, Variant &r_ret) const { return true; } +void EditorSettings::_initial_set(const StringName &p_name, const Variant &p_value) { + set(p_name, p_value); + props[p_name].initial = p_value; +} + struct _EVCSort { String name; @@ -214,6 +219,8 @@ Variant _EDITOR_DEF(const String &p_var, const Variant &p_default) { if (EditorSettings::get_singleton()->has(p_var)) return EditorSettings::get_singleton()->get(p_var); EditorSettings::get_singleton()->set(p_var, p_default); + EditorSettings::get_singleton()->set_initial_value(p_var, p_default); + return p_default; } @@ -546,235 +553,235 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { best = "en"; } - set("interface/editor_language", best); + _initial_set("interface/editor_language", best); hints["interface/editor_language"] = PropertyInfo(Variant::STRING, "interface/editor_language", PROPERTY_HINT_ENUM, lang_hint, PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); } - set("interface/hidpi_mode", 0); + _initial_set("interface/hidpi_mode", 0); hints["interface/hidpi_mode"] = PropertyInfo(Variant::INT, "interface/hidpi_mode", PROPERTY_HINT_ENUM, "Auto,VeryLoDPI,LoDPI,MidDPI,HiDPI", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); - set("interface/show_script_in_scene_tabs", false); - set("interface/font_size", 14); + _initial_set("interface/show_script_in_scene_tabs", false); + _initial_set("interface/font_size", 14); hints["interface/font_size"] = PropertyInfo(Variant::INT, "interface/font_size", PROPERTY_HINT_RANGE, "10,40,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); - set("interface/source_font_size", 14); + _initial_set("interface/source_font_size", 14); hints["interface/source_font_size"] = PropertyInfo(Variant::INT, "interface/source_font_size", PROPERTY_HINT_RANGE, "8,96,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); - set("interface/custom_font", ""); - hints["interface/custom_font"] = PropertyInfo(Variant::STRING, "interface/custom_font", PROPERTY_HINT_GLOBAL_FILE, "*.font", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); - set("interface/dim_editor_on_dialog_popup", true); - set("interface/dim_amount", 0.6f); + _initial_set("interface/custom_font", ""); + hints["interface/custom_font"] = PropertyInfo(Variant::STRING, "interface/custom_font", PROPERTY_HINT_GLOBAL_FILE, "*.font,*.tres,*.res", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); + _initial_set("interface/dim_editor_on_dialog_popup", true); + _initial_set("interface/dim_amount", 0.6f); hints["interface/dim_amount"] = PropertyInfo(Variant::REAL, "interface/dim_amount", PROPERTY_HINT_RANGE, "0,1,0.01", PROPERTY_USAGE_DEFAULT); - set("interface/dim_transition_time", 0.08f); + _initial_set("interface/dim_transition_time", 0.08f); hints["interface/dim_transition_time"] = PropertyInfo(Variant::REAL, "interface/dim_transition_time", PROPERTY_HINT_RANGE, "0,1,0.001", PROPERTY_USAGE_DEFAULT); - set("interface/separate_distraction_mode", false); + _initial_set("interface/separate_distraction_mode", false); - set("interface/save_each_scene_on_quit", true); // Regression - set("interface/quit_confirmation", true); + _initial_set("interface/save_each_scene_on_quit", true); // Regression + _initial_set("interface/quit_confirmation", true); - set("interface/theme/preset", 0); + _initial_set("interface/theme/preset", 0); hints["interface/theme/preset"] = PropertyInfo(Variant::INT, "interface/theme/preset", PROPERTY_HINT_ENUM, "Default,Grey,Godot 2,Arc,Light,Custom", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); - set("interface/theme/icon_and_font_color", 0); + _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 | PROPERTY_USAGE_RESTART_IF_CHANGED); - set("interface/theme/base_color", Color::html("#323b4f")); + _initial_set("interface/theme/base_color", Color::html("#323b4f")); hints["interface/theme/accent_color"] = PropertyInfo(Variant::COLOR, "interface/theme/accent_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); - set("interface/theme/accent_color", Color::html("#699ce8")); + _initial_set("interface/theme/accent_color", Color::html("#699ce8")); hints["interface/theme/base_color"] = PropertyInfo(Variant::COLOR, "interface/theme/base_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); - set("interface/theme/contrast", 0.25); + _initial_set("interface/theme/contrast", 0.25); hints["interface/theme/contrast"] = PropertyInfo(Variant::REAL, "interface/theme/contrast", PROPERTY_HINT_RANGE, "0.01, 1, 0.01"); - set("interface/theme/highlight_tabs", false); - set("interface/theme/border_size", 1); - set("interface/theme/use_graph_node_headers", false); + _initial_set("interface/theme/highlight_tabs", false); + _initial_set("interface/theme/border_size", 1); + _initial_set("interface/theme/use_graph_node_headers", false); hints["interface/theme/border_size"] = PropertyInfo(Variant::INT, "interface/theme/border_size", PROPERTY_HINT_RANGE, "0,2,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); - set("interface/theme/additional_spacing", 0); + _initial_set("interface/theme/additional_spacing", 0); hints["interface/theme/additional_spacing"] = PropertyInfo(Variant::REAL, "interface/theme/additional_spacing", PROPERTY_HINT_RANGE, "0,5,0.1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); - set("interface/theme/custom_theme", ""); + _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); - set("interface/scene_tabs/show_extension", false); - set("interface/scene_tabs/show_thumbnail_on_hover", true); - set("interface/scene_tabs/resize_if_many_tabs", true); - set("interface/scene_tabs/minimum_width", 50); + _initial_set("interface/scene_tabs/show_extension", false); + _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); - set("filesystem/directories/autoscan_project_path", ""); + _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); - 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)); + _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); - set("filesystem/directories/default_project_export_path", ""); + _initial_set("filesystem/directories/default_project_export_path", ""); hints["global/default_project_export_path"] = PropertyInfo(Variant::STRING, "global/default_project_export_path", PROPERTY_HINT_GLOBAL_DIR); - set("interface/show_script_in_scene_tabs", false); + _initial_set("interface/show_script_in_scene_tabs", false); - set("text_editor/theme/color_theme", "Adaptive"); + _initial_set("text_editor/theme/color_theme", "Adaptive"); hints["text_editor/theme/color_theme"] = PropertyInfo(Variant::STRING, "text_editor/theme/color_theme", PROPERTY_HINT_ENUM, "Adaptive,Default"); - set("text_editor/theme/line_spacing", 4); + _initial_set("text_editor/theme/line_spacing", 4); _load_default_text_editor_theme(); - set("text_editor/highlighting/syntax_highlighting", true); + _initial_set("text_editor/highlighting/syntax_highlighting", true); - set("text_editor/highlighting/highlight_all_occurrences", true); - set("text_editor/cursor/scroll_past_end_of_file", false); + _initial_set("text_editor/highlighting/highlight_all_occurrences", true); + _initial_set("text_editor/cursor/scroll_past_end_of_file", false); - set("text_editor/indent/type", 0); + _initial_set("text_editor/indent/type", 0); hints["text_editor/indent/type"] = PropertyInfo(Variant::INT, "text_editor/indent/type", PROPERTY_HINT_ENUM, "Tabs,Spaces"); - set("text_editor/indent/size", 4); + _initial_set("text_editor/indent/size", 4); hints["text_editor/indent/size"] = PropertyInfo(Variant::INT, "text_editor/indent/size", PROPERTY_HINT_RANGE, "1, 64, 1"); // size of 0 crashes. - set("text_editor/indent/auto_indent", true); - set("text_editor/indent/convert_indent_on_save", false); - set("text_editor/indent/draw_tabs", true); - - set("text_editor/line_numbers/show_line_numbers", true); - set("text_editor/line_numbers/line_numbers_zero_padded", false); - set("text_editor/line_numbers/show_breakpoint_gutter", true); - set("text_editor/line_numbers/show_line_length_guideline", false); - set("text_editor/line_numbers/line_length_guideline_column", 80); + _initial_set("text_editor/indent/auto_indent", true); + _initial_set("text_editor/indent/convert_indent_on_save", false); + _initial_set("text_editor/indent/draw_tabs", true); + + _initial_set("text_editor/line_numbers/show_line_numbers", true); + _initial_set("text_editor/line_numbers/line_numbers_zero_padded", false); + _initial_set("text_editor/line_numbers/show_breakpoint_gutter", true); + _initial_set("text_editor/line_numbers/show_line_length_guideline", false); + _initial_set("text_editor/line_numbers/line_length_guideline_column", 80); hints["text_editor/line_numbers/line_length_guideline_column"] = PropertyInfo(Variant::INT, "text_editor/line_numbers/line_length_guideline_column", PROPERTY_HINT_RANGE, "20, 160, 10"); - set("text_editor/open_scripts/smooth_scrolling", true); - set("text_editor/open_scripts/v_scroll_speed", 80); - set("text_editor/open_scripts/show_members_overview", true); + _initial_set("text_editor/open_scripts/smooth_scrolling", true); + _initial_set("text_editor/open_scripts/v_scroll_speed", 80); + _initial_set("text_editor/open_scripts/show_members_overview", true); - set("text_editor/files/trim_trailing_whitespace_on_save", false); - set("text_editor/completion/idle_parse_delay", 2); - set("text_editor/tools/create_signal_callbacks", true); - set("text_editor/files/autosave_interval_secs", 0); + _initial_set("text_editor/files/trim_trailing_whitespace_on_save", false); + _initial_set("text_editor/completion/idle_parse_delay", 2); + _initial_set("text_editor/tools/create_signal_callbacks", true); + _initial_set("text_editor/files/autosave_interval_secs", 0); - set("text_editor/cursor/block_caret", false); - set("text_editor/cursor/caret_blink", false); - set("text_editor/cursor/caret_blink_speed", 0.65); + _initial_set("text_editor/cursor/block_caret", false); + _initial_set("text_editor/cursor/caret_blink", false); + _initial_set("text_editor/cursor/caret_blink_speed", 0.65); hints["text_editor/cursor/caret_blink_speed"] = PropertyInfo(Variant::REAL, "text_editor/cursor/caret_blink_speed", PROPERTY_HINT_RANGE, "0.1, 10, 0.1"); - set("text_editor/theme/font", ""); - hints["text_editor/theme/font"] = PropertyInfo(Variant::STRING, "text_editor/theme/font", PROPERTY_HINT_GLOBAL_FILE, "*.font"); - set("text_editor/completion/auto_brace_complete", false); - set("text_editor/files/restore_scripts_on_load", true); - set("text_editor/completion/complete_file_paths", true); - set("text_editor/files/maximum_recent_files", 20); + _initial_set("text_editor/theme/font", ""); + hints["text_editor/theme/font"] = PropertyInfo(Variant::STRING, "text_editor/theme/font", PROPERTY_HINT_GLOBAL_FILE, "*.font,*.tres,*.res"); + _initial_set("text_editor/completion/auto_brace_complete", false); + _initial_set("text_editor/files/restore_scripts_on_load", true); + _initial_set("text_editor/completion/complete_file_paths", true); + _initial_set("text_editor/files/maximum_recent_files", 20); hints["text_editor/files/maximum_recent_files"] = PropertyInfo(Variant::INT, "text_editor/files/maximum_recent_files", PROPERTY_HINT_RANGE, "1, 200, 0"); - set("docks/scene_tree/start_create_dialog_fully_expanded", false); - set("docks/scene_tree/draw_relationship_lines", false); - set("docks/scene_tree/relationship_line_color", Color::html("464646")); + _initial_set("docks/scene_tree/start_create_dialog_fully_expanded", false); + _initial_set("docks/scene_tree/draw_relationship_lines", false); + _initial_set("docks/scene_tree/relationship_line_color", Color::html("464646")); - set("editors/grid_map/pick_distance", 5000.0); + _initial_set("editors/grid_map/pick_distance", 5000.0); - set("editors/3d/grid_color", Color(1, 1, 1, 0.2)); + _initial_set("editors/3d/grid_color", Color(1, 1, 1, 0.2)); hints["editors/3d/grid_color"] = PropertyInfo(Variant::COLOR, "editors/3d/grid_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); - set("editors/3d/default_fov", 55.0); - set("editors/3d/default_z_near", 0.1); - set("editors/3d/default_z_far", 500.0); + _initial_set("editors/3d/default_fov", 55.0); + _initial_set("editors/3d/default_z_near", 0.1); + _initial_set("editors/3d/default_z_far", 500.0); // navigation - set("editors/3d/navigation/navigation_scheme", 0); + _initial_set("editors/3d/navigation/navigation_scheme", 0); hints["editors/3d/navigation/navigation_scheme"] = PropertyInfo(Variant::INT, "editors/3d/navigation/navigation_scheme", PROPERTY_HINT_ENUM, "Godot,Maya,Modo"); - set("editors/3d/navigation/zoom_style", 0); + _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"); - set("editors/3d/navigation/emulate_3_button_mouse", false); - set("editors/3d/navigation/orbit_modifier", 0); + _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"); - set("editors/3d/navigation/pan_modifier", 1); + _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"); - set("editors/3d/navigation/zoom_modifier", 4); + _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"); - // set("editors/3d/navigation/emulate_numpad", false); not used at the moment - set("editors/3d/navigation/warped_mouse_panning", true); + // _initial_set("editors/3d/navigation/emulate_numpad", false); not used at the moment + _initial_set("editors/3d/navigation/warped_mouse_panning", true); // navigation feel - set("editors/3d/navigation_feel/orbit_sensitivity", 0.4); + _initial_set("editors/3d/navigation_feel/orbit_sensitivity", 0.4); hints["editors/3d/navigation_feel/orbit_sensitivity"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/orbit_sensitivity", PROPERTY_HINT_RANGE, "0.0, 2, 0.01"); - set("editors/3d/navigation_feel/orbit_inertia", 0.15); + _initial_set("editors/3d/navigation_feel/orbit_inertia", 0.15); hints["editors/3d/navigation_feel/orbit_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/orbit_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); - set("editors/3d/navigation_feel/translation_inertia", 0.15); + _initial_set("editors/3d/navigation_feel/translation_inertia", 0.15); hints["editors/3d/navigation_feel/translation_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/translation_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); - set("editors/3d/navigation_feel/zoom_inertia", 0.1); + _initial_set("editors/3d/navigation_feel/zoom_inertia", 0.075); hints["editors/3d/navigation_feel/zoom_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/zoom_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); - set("editors/3d/navigation_feel/manipulation_orbit_inertia", 0.1); + _initial_set("editors/3d/navigation_feel/manipulation_orbit_inertia", 0.075); hints["editors/3d/navigation_feel/manipulation_orbit_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/manipulation_orbit_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); - set("editors/3d/navigation_feel/manipulation_translation_inertia", 0.1); + _initial_set("editors/3d/navigation_feel/manipulation_translation_inertia", 0.075); hints["editors/3d/navigation_feel/manipulation_translation_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/manipulation_translation_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); // freelook - set("editors/3d/freelook/freelook_inertia", 0.1); + _initial_set("editors/3d/freelook/freelook_inertia", 0.1); hints["editors/3d/freelook/freelook_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/freelook/freelook_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01"); - set("editors/3d/freelook/freelook_base_speed", 0.1); + _initial_set("editors/3d/freelook/freelook_base_speed", 0.1); hints["editors/3d/freelook/freelook_base_speed"] = PropertyInfo(Variant::REAL, "editors/3d/freelook/freelook_base_speed", PROPERTY_HINT_RANGE, "0.0, 10, 0.01"); - set("editors/3d/freelook/freelook_activation_modifier", 0); + _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"); - set("editors/3d/freelook/freelook_modifier_speed_factor", 3.0); + _initial_set("editors/3d/freelook/freelook_modifier_speed_factor", 3.0); hints["editors/3d/freelook/freelook_modifier_speed_factor"] = PropertyInfo(Variant::REAL, "editors/3d/freelook/freelook_modifier_speed_factor", PROPERTY_HINT_RANGE, "0.0, 10.0, 0.1"); - set("editors/2d/bone_width", 5); - set("editors/2d/bone_color1", Color(1.0, 1.0, 1.0, 0.9)); - set("editors/2d/bone_color2", Color(0.75, 0.75, 0.75, 0.9)); - set("editors/2d/bone_selected_color", Color(0.9, 0.45, 0.45, 0.9)); - set("editors/2d/bone_ik_color", Color(0.9, 0.9, 0.45, 0.9)); - set("editors/2d/keep_margins_when_changing_anchors", false); - set("editors/2d/warped_mouse_panning", true); - set("editors/2d/scroll_to_pan", false); - set("editors/2d/pan_speed", 20); + _initial_set("editors/2d/bone_width", 5); + _initial_set("editors/2d/bone_color1", Color(1.0, 1.0, 1.0, 0.9)); + _initial_set("editors/2d/bone_color2", Color(0.75, 0.75, 0.75, 0.9)); + _initial_set("editors/2d/bone_selected_color", Color(0.9, 0.45, 0.45, 0.9)); + _initial_set("editors/2d/bone_ik_color", Color(0.9, 0.9, 0.45, 0.9)); + _initial_set("editors/2d/keep_margins_when_changing_anchors", false); + _initial_set("editors/2d/warped_mouse_panning", true); + _initial_set("editors/2d/scroll_to_pan", false); + _initial_set("editors/2d/pan_speed", 20); - set("editors/poly_editor/point_grab_radius", 8); - set("editors/poly_editor/show_previous_outline", true); + _initial_set("editors/poly_editor/point_grab_radius", 8); + _initial_set("editors/poly_editor/show_previous_outline", true); - set("run/window_placement/rect", 1); + _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"); String screen_hints = TTR("Default (Same as Editor)"); for (int i = 0; i < OS::get_singleton()->get_screen_count(); i++) { screen_hints += ",Monitor " + itos(i + 1); } - set("run/window_placement/rect_custom_position", Vector2()); - set("run/window_placement/screen", 0); + _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); - set("filesystem/on_save/compress_binary_resources", true); - set("filesystem/on_save/save_modified_external_resources", true); + _initial_set("filesystem/on_save/compress_binary_resources", true); + _initial_set("filesystem/on_save/save_modified_external_resources", true); - set("text_editor/tools/create_signal_callbacks", true); + _initial_set("text_editor/tools/create_signal_callbacks", true); - set("filesystem/file_dialog/show_hidden_files", false); - set("filesystem/file_dialog/display_mode", 0); + _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"); - set("filesystem/file_dialog/thumbnail_size", 64); + _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"); - set("docks/filesystem/display_mode", 0); + _initial_set("docks/filesystem/display_mode", 0); hints["docks/filesystem/display_mode"] = PropertyInfo(Variant::INT, "docks/filesystem/display_mode", PROPERTY_HINT_ENUM, "Thumbnails,List"); - set("docks/filesystem/thumbnail_size", 64); + _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"); - set("docks/filesystem/display_mode", 0); + _initial_set("docks/filesystem/display_mode", 0); hints["docks/filesystem/display_mode"] = PropertyInfo(Variant::INT, "docks/filesystem/display_mode", PROPERTY_HINT_ENUM, "Thumbnails,List"); - set("docks/filesystem/always_show_folders", true); + _initial_set("docks/filesystem/always_show_folders", true); - set("editors/animation/autorename_animation_tracks", true); - set("editors/animation/confirm_insert_track", true); + _initial_set("editors/animation/autorename_animation_tracks", true); + _initial_set("editors/animation/confirm_insert_track", true); - set("docks/property_editor/texture_preview_width", 48); - set("docks/property_editor/auto_refresh_interval", 0.3); - set("text_editor/help/doc_path", ""); - set("text_editor/help/show_help_index", true); + _initial_set("docks/property_editor/texture_preview_width", 48); + _initial_set("docks/property_editor/auto_refresh_interval", 0.3); + _initial_set("text_editor/help/doc_path", ""); + _initial_set("text_editor/help/show_help_index", true); - set("filesystem/import/ask_save_before_reimport", false); + _initial_set("filesystem/import/ask_save_before_reimport", false); - set("filesystem/import/pvrtc_texture_tool", ""); + _initial_set("filesystem/import/pvrtc_texture_tool", ""); #ifdef WINDOWS_ENABLED hints["filesystem/import/pvrtc_texture_tool"] = PropertyInfo(Variant::STRING, "filesystem/import/pvrtc_texture_tool", PROPERTY_HINT_GLOBAL_FILE, "*.exe"); #else hints["filesystem/import/pvrtc_texture_tool"] = PropertyInfo(Variant::STRING, "filesystem/import/pvrtc_texture_tool", PROPERTY_HINT_GLOBAL_FILE, ""); #endif - set("filesystem/import/pvrtc_fast_conversion", false); + _initial_set("filesystem/import/pvrtc_fast_conversion", false); - set("run/auto_save/save_before_running", true); - set("run/output/always_clear_output_on_play", true); - set("run/output/always_open_output_on_play", true); - set("run/output/always_close_output_on_stop", false); - set("filesystem/resources/save_compressed_resources", true); - set("filesystem/resources/auto_reload_modified_images", true); + _initial_set("run/auto_save/save_before_running", true); + _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); + _initial_set("filesystem/resources/save_compressed_resources", true); + _initial_set("filesystem/resources/auto_reload_modified_images", true); - set("filesystem/import/automatic_reimport_on_sources_changed", true); + _initial_set("filesystem/import/automatic_reimport_on_sources_changed", true); if (p_extra_config.is_valid()) { @@ -804,35 +811,35 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { } void EditorSettings::_load_default_text_editor_theme() { - set("text_editor/highlighting/background_color", Color::html("3b000000")); - set("text_editor/highlighting/completion_background_color", Color::html("2C2A32")); - set("text_editor/highlighting/completion_selected_color", Color::html("434244")); - set("text_editor/highlighting/completion_existing_color", Color::html("21dfdfdf")); - set("text_editor/highlighting/completion_scroll_color", Color::html("ffffff")); - set("text_editor/highlighting/completion_font_color", Color::html("aaaaaa")); - set("text_editor/highlighting/caret_color", Color::html("aaaaaa")); - set("text_editor/highlighting/caret_background_color", Color::html("000000")); - set("text_editor/highlighting/line_number_color", Color::html("66aaaaaa")); - set("text_editor/highlighting/text_color", Color::html("aaaaaa")); - set("text_editor/highlighting/text_selected_color", Color::html("000000")); - set("text_editor/highlighting/keyword_color", Color::html("ffffb3")); - set("text_editor/highlighting/base_type_color", Color::html("a4ffd4")); - set("text_editor/highlighting/engine_type_color", Color::html("83d3ff")); - set("text_editor/highlighting/function_color", Color::html("66a2ce")); - set("text_editor/highlighting/member_variable_color", Color::html("e64e59")); - set("text_editor/highlighting/comment_color", Color::html("676767")); - set("text_editor/highlighting/string_color", Color::html("ef6ebe")); - set("text_editor/highlighting/number_color", Color::html("EB9532")); - set("text_editor/highlighting/symbol_color", Color::html("badfff")); - set("text_editor/highlighting/selection_color", Color::html("6ca9c2")); - set("text_editor/highlighting/brace_mismatch_color", Color(1, 0.2, 0.2)); - set("text_editor/highlighting/current_line_color", Color(0.3, 0.5, 0.8, 0.15)); - set("text_editor/highlighting/line_length_guideline_color", Color(0.3, 0.5, 0.8, 0.1)); - set("text_editor/highlighting/mark_color", Color(1.0, 0.4, 0.4, 0.4)); - set("text_editor/highlighting/breakpoint_color", Color(0.8, 0.8, 0.4, 0.2)); - set("text_editor/highlighting/word_highlighted_color", Color(0.8, 0.9, 0.9, 0.15)); - set("text_editor/highlighting/search_result_color", Color(0.05, 0.25, 0.05, 1)); - set("text_editor/highlighting/search_result_border_color", Color(0.1, 0.45, 0.1, 1)); + _initial_set("text_editor/highlighting/background_color", Color::html("3b000000")); + _initial_set("text_editor/highlighting/completion_background_color", Color::html("2C2A32")); + _initial_set("text_editor/highlighting/completion_selected_color", Color::html("434244")); + _initial_set("text_editor/highlighting/completion_existing_color", Color::html("21dfdfdf")); + _initial_set("text_editor/highlighting/completion_scroll_color", Color::html("ffffff")); + _initial_set("text_editor/highlighting/completion_font_color", Color::html("aaaaaa")); + _initial_set("text_editor/highlighting/caret_color", Color::html("aaaaaa")); + _initial_set("text_editor/highlighting/caret_background_color", Color::html("000000")); + _initial_set("text_editor/highlighting/line_number_color", Color::html("66aaaaaa")); + _initial_set("text_editor/highlighting/text_color", Color::html("aaaaaa")); + _initial_set("text_editor/highlighting/text_selected_color", Color::html("000000")); + _initial_set("text_editor/highlighting/keyword_color", Color::html("ffffb3")); + _initial_set("text_editor/highlighting/base_type_color", Color::html("a4ffd4")); + _initial_set("text_editor/highlighting/engine_type_color", Color::html("83d3ff")); + _initial_set("text_editor/highlighting/function_color", Color::html("66a2ce")); + _initial_set("text_editor/highlighting/member_variable_color", Color::html("e64e59")); + _initial_set("text_editor/highlighting/comment_color", Color::html("676767")); + _initial_set("text_editor/highlighting/string_color", Color::html("ef6ebe")); + _initial_set("text_editor/highlighting/number_color", Color::html("EB9532")); + _initial_set("text_editor/highlighting/symbol_color", Color::html("badfff")); + _initial_set("text_editor/highlighting/selection_color", Color::html("6ca9c2")); + _initial_set("text_editor/highlighting/brace_mismatch_color", Color(1, 0.2, 0.2)); + _initial_set("text_editor/highlighting/current_line_color", Color(0.3, 0.5, 0.8, 0.15)); + _initial_set("text_editor/highlighting/line_length_guideline_color", Color(0.3, 0.5, 0.8, 0.1)); + _initial_set("text_editor/highlighting/mark_color", Color(1.0, 0.4, 0.4, 0.4)); + _initial_set("text_editor/highlighting/breakpoint_color", Color(0.8, 0.8, 0.4, 0.2)); + _initial_set("text_editor/highlighting/word_highlighted_color", Color(0.8, 0.9, 0.9, 0.15)); + _initial_set("text_editor/highlighting/search_result_color", Color(0.05, 0.25, 0.05, 1)); + _initial_set("text_editor/highlighting/search_result_border_color", Color(0.1, 0.45, 0.1, 1)); } void EditorSettings::notify_changes() { @@ -1037,7 +1044,7 @@ bool EditorSettings::save_text_editor_theme_as(String p_file) { String theme_name = p_file.substr(0, p_file.length() - 4).get_file(); if (p_file.get_base_dir() == get_settings_path() + "/text_editor_themes") { - set("text_editor/theme/color_theme", theme_name); + _initial_set("text_editor/theme/color_theme", theme_name); load_text_editor_theme(); } return true; @@ -1161,6 +1168,28 @@ void EditorSettings::set_project_metadata(const String &p_section, const String cf->save(path); } +bool EditorSettings::property_can_revert(const String &p_name) { + + if (!props.has(p_name)) + return false; + + return props[p_name].initial != props[p_name].variant; +} + +Variant EditorSettings::property_get_revert(const String &p_name) { + + if (!props.has(p_name)) + return Variant(); + + return props[p_name].initial; +} + +void EditorSettings::set_initial_value(const StringName &p_name, const Variant &p_value) { + + ERR_FAIL_COND(!props.has(p_name)); + props[p_name].initial = p_value; +} + void EditorSettings::_bind_methods() { ClassDB::bind_method(D_METHOD("erase", "property"), &EditorSettings::erase); @@ -1175,6 +1204,11 @@ void EditorSettings::_bind_methods() { ClassDB::bind_method(D_METHOD("set_recent_dirs", "dirs"), &EditorSettings::set_recent_dirs); ClassDB::bind_method(D_METHOD("get_recent_dirs"), &EditorSettings::get_recent_dirs); + ClassDB::bind_method(D_METHOD("property_can_revert", "name"), &EditorSettings::property_can_revert); + ClassDB::bind_method(D_METHOD("property_get_revert", "name"), &EditorSettings::property_get_revert); + + ClassDB::bind_method(D_METHOD("set_initial_value", "name", "value"), &EditorSettings::set_initial_value); + ADD_SIGNAL(MethodInfo("settings_changed")); } diff --git a/editor/editor_settings.h b/editor/editor_settings.h index 177ec4760d..6a814c41a5 100644 --- a/editor/editor_settings.h +++ b/editor/editor_settings.h @@ -65,6 +65,7 @@ private: struct VariantContainer { int order; Variant variant; + Variant initial; bool hide_from_editor; bool save; VariantContainer() { @@ -88,6 +89,8 @@ private: bool _get(const StringName &p_name, Variant &r_ret) const; void _get_property_list(List<PropertyInfo> *p_list) const; + void _initial_set(const StringName &p_name, const Variant &p_value); + static Ref<EditorSettings> singleton; String config_file_path; @@ -171,6 +174,11 @@ public: Variant get_project_metadata(const String &p_section, const String &p_key, Variant p_default); void set_project_metadata(const String &p_section, const String &p_key, Variant p_data); + bool property_can_revert(const String &p_name); + Variant property_get_revert(const String &p_name); + + void set_initial_value(const StringName &p_name, const Variant &p_value); + EditorSettings(); ~EditorSettings(); }; diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 791b3ee92c..ca337551eb 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -168,6 +168,11 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool dark_theme = tr exceptions.push_back("GuiCloseCustomizable"); exceptions.push_back("GuiGraphNodePort"); exceptions.push_back("GuiResizer"); + exceptions.push_back("ZoomMore"); + exceptions.push_back("ZoomLess"); + exceptions.push_back("ZoomReset"); + exceptions.push_back("LockViewport"); + exceptions.push_back("GroupViewport"); clock_t begin_time = clock(); @@ -528,7 +533,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_icon("unchecked", "PopupMenu", theme->get_icon("GuiUnchecked", "EditorIcons")); theme->set_icon("radio_checked", "PopupMenu", theme->get_icon("GuiChecked", "EditorIcons")); theme->set_icon("radio_unchecked", "PopupMenu", theme->get_icon("GuiUnchecked", "EditorIcons")); + theme->set_icon("submenu", "PopupMenu", theme->get_icon("ArrowRight", "EditorIcons")); theme->set_constant("vseparation", "PopupMenu", (extra_spacing + default_margin_size) * EDSCALE); + // Tree & ItemList background Ref<StyleBoxFlat> style_tree_bg = style_default->duplicate(); style_tree_bg->set_bg_color(dark_color_1); @@ -548,6 +555,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("custom_button_font_highlight", "Tree", font_color_hl); theme->set_color("font_color", "Tree", font_color); theme->set_color("font_color_selected", "Tree", font_color); + theme->set_color("title_button_color", "Tree", font_color); + theme->set_color("guide_color", "Tree", Color(mono_color.r, mono_color.g, mono_color.b, 0.05)); + theme->set_color("drop_position_color", "Tree", accent_color); theme->set_constant("vseparation", "Tree", (extra_spacing + default_margin_size) * EDSCALE); Ref<StyleBoxFlat> style_tree_btn = style_default->duplicate(); @@ -792,7 +802,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { style_tooltip->set_bg_color(Color(mono_color.r, mono_color.g, mono_color.b, 0.9)); style_tooltip->set_border_width_all(border_width); style_tooltip->set_border_color_all(mono_color); - theme->set_color("font_color", "TooltipPanel", font_color); + theme->set_color("font_color", "TooltipLabel", font_color.inverted()); + theme->set_color("font_color_shadow", "TooltipLabel", mono_color.inverted() * Color(1, 1, 1, 0.1)); theme->set_stylebox("panel", "TooltipPanel", style_tooltip); // PopupPanel diff --git a/editor/icons/icon_GUI_dropdown.svg b/editor/icons/icon_GUI_dropdown.svg index 22db0fa1a7..4aa800b470 100644 --- a/editor/icons/icon_GUI_dropdown.svg +++ b/editor/icons/icon_GUI_dropdown.svg @@ -1,7 +1,5 @@ <svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1038.4)" fill="#fff" fill-opacity=".58824" stroke-linejoin="round" stroke-opacity=".39216" stroke-width="2"> -<circle cx="7.5" cy="1040.9" r="1.5"/> -<circle cx="7.5" cy="1045.9" r="1.5"/> -<circle cx="7.5" cy="1050.9" r="1.5"/> +<g transform="translate(0 -1038.4)"> +<path d="m4 1045.4 3 3 3-3" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".58824" stroke-width="2"/> </g> </svg> diff --git a/editor/icons/icon_GUI_mini_tab_menu.svg b/editor/icons/icon_GUI_mini_tab_menu.svg index c54eb26115..8aeb85277c 100644 --- a/editor/icons/icon_GUI_mini_tab_menu.svg +++ b/editor/icons/icon_GUI_mini_tab_menu.svg @@ -1,7 +1,5 @@ <svg width="6" height="16" version="1.1" viewBox="0 0 6 16" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1036.4)" fill="#fff" fill-opacity=".39216"> -<circle cx="3" cy="1038.4" r="2"/> -<circle cx="3" cy="1044.4" r="2"/> -<circle cx="3" cy="1050.4" r="2"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m3 0a2 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 -2zm0 6a2 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 -2zm0 6a2 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" fill-opacity=".39216"/> </g> </svg> diff --git a/editor/icons/icon_GUI_tab_menu.svg b/editor/icons/icon_GUI_tab_menu.svg index 3324adf98b..9284e7488b 100644 --- a/editor/icons/icon_GUI_tab_menu.svg +++ b/editor/icons/icon_GUI_tab_menu.svg @@ -1,7 +1,5 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1036.4)" fill="#fff" fill-opacity=".39216"> -<circle cx="8" cy="1038.4" r="2"/> -<circle cx="8" cy="1044.4" r="2"/> -<circle cx="8" cy="1050.4" r="2"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m8 0a2 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 -2zm0 6a2 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 -2zm0 6a2 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" fill-opacity=".39216"/> </g> </svg> diff --git a/editor/icons/icon_audio_bus_bypass.svg b/editor/icons/icon_audio_bus_bypass.svg index 75c1caf7f1..f85c9d17b5 100644 --- a/editor/icons/icon_audio_bus_bypass.svg +++ b/editor/icons/icon_audio_bus_bypass.svg @@ -1,5 +1,5 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -1036.4)"> -<path transform="translate(0 1036.4)" d="m6.9707 2c-0.25474 0.01-0.49715 0.11122-0.67773 0.29102l-2.707 2.707h-1.5859c-0.55226 1e-4 -0.99994 0.4477-1 1v4c5.52e-5 0.5523 0.44774 0.9999 1 1h1.5859l2.707 2.707c0.63002 0.6296 1.7067 0.18367 1.707-0.70703v-10c-9.424e-4 -0.5631-0.46642-1.0144-1.0293-0.99805zm3.0293 5v1 1h4v-1-1h-4z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> +<path transform="translate(0 1036.4)" d="m5 3c-0.55226 5.52e-5 -0.99994 0.44774-1 1v8c5.52e-5 0.55226 0.44774 0.99994 1 1h4c1.0702 0 2.0645-0.5732 2.5996-1.5 0.5351-0.9268 0.5351-2.0732 0-3-0.40058-0.69381-1.058-1.1892-1.8125-1.3945 0.33452-0.84425 0.27204-1.8062-0.18945-2.6055-0.5351-0.9268-1.5275-1.5-2.5977-1.5zm1 2h1c0.35887 0 0.6858 0.1892 0.86523 0.5s0.17943 0.6892 0 1-0.50637 0.5-0.86523 0.5h-1zm0 4h1 2c0.35887 0 0.68775 0.1892 0.86719 0.5 0.17943 0.3108 0.17943 0.6892 0 1-0.17944 0.3108-0.50832 0.5-0.86719 0.5h-3z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> </g> </svg> diff --git a/editor/icons/icon_audio_bus_mute.svg b/editor/icons/icon_audio_bus_mute.svg index a7d085d535..cacca295eb 100644 --- a/editor/icons/icon_audio_bus_mute.svg +++ b/editor/icons/icon_audio_bus_mute.svg @@ -1,5 +1,5 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -1036.4)"> -<path transform="translate(0 1036.4)" d="m6.9707 2c-0.25474 0.01-0.49715 0.11122-0.67773 0.29102l-2.707 2.707h-1.5859c-0.55226 1e-4 -0.99994 0.4477-1 1v4c5.52e-5 0.5523 0.44774 0.9999 1 1h1.5859l2.707 2.707c0.63002 0.6296 1.7067 0.18367 1.707-0.70703v-10c-9.424e-4 -0.5631-0.46642-1.0144-1.0293-0.99805zm4.0195 2.9902a1.0001 1.0001 0 0 0 -0.69726 1.7168l1.293 1.293-1.293 1.293a1.0001 1.0001 0 1 0 1.4141 1.4141l1.293-1.293 1.293 1.293a1.0001 1.0001 0 1 0 1.4141 -1.4141l-1.293-1.293 1.293-1.293a1.0001 1.0001 0 0 0 -0.72656 -1.7148 1.0001 1.0001 0 0 0 -0.6875 0.30078l-1.293 1.293-1.293-1.293a1.0001 1.0001 0 0 0 -0.7168 -0.30273z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> +<path d="m4 1048.4v-8l4 5 4-5v8" fill="none" stroke="#e0e0e0" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> </g> </svg> diff --git a/editor/icons/icon_audio_bus_solo.svg b/editor/icons/icon_audio_bus_solo.svg index e84c1cca25..25e26d6038 100644 --- a/editor/icons/icon_audio_bus_solo.svg +++ b/editor/icons/icon_audio_bus_solo.svg @@ -1,5 +1,5 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -1036.4)"> -<path transform="translate(0 1036.4)" d="m6.9707 2c-0.25474 0.01-0.49715 0.11122-0.67773 0.29102l-2.707 2.707h-1.5859c-0.55226 1e-4 -0.99994 0.4477-1 1v4c5.52e-5 0.5523 0.44774 0.9999 1 1h1.5859l2.707 2.707c0.63002 0.6296 1.7067 0.18367 1.707-0.70703v-10c-9.424e-4 -0.5631-0.46642-1.0144-1.0293-0.99805zm8.0293 2a3 3 0 0 0 -3 3v2a1 1 0 0 1 -1 1h-1v2h1a3 3 0 0 0 3 -3v-2a1 1 0 0 1 1 -1h1v-2h-1z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> +<path transform="translate(0 1036.4)" d="m7 3a1 1 0 0 0 -0.12695 0.0078125c-1.0208 0.043703-1.957 0.60248-2.4707 1.4922-0.5351 0.9268-0.5351 2.0732 0 3 0.5351 0.9268 1.5275 1.5 2.5977 1.5h2c0.35887 0 0.6858 0.1892 0.86523 0.5 0.17943 0.3108 0.17943 0.6892 0 1-0.17943 0.3108-0.50637 0.5-0.86523 0.5h-3a1 1 0 0 0 -1 1 1 1 0 0 0 1 1h3c1.0702 0 2.0626-0.5732 2.5977-1.5s0.5351-2.0732 0-3-1.5275-1.5-2.5977-1.5h-2c-0.35887 0-0.6858-0.1892-0.86523-0.5s-0.17943-0.6892 0-1 0.50637-0.5 0.86523-0.5h3a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1h-3z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> </g> </svg> diff --git a/editor/icons/icon_connect.svg b/editor/icons/icon_connect.svg index 43ec84646c..97859370b7 100644 --- a/editor/icons/icon_connect.svg +++ b/editor/icons/icon_connect.svg @@ -1,7 +1,5 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -1036.4)"> -<circle cx="4" cy="1048.4" r="2" fill="#e0e0e0"/> -<path d="m4 1043.4a5 5 0 0 1 5 5" fill="none" stroke="#e0e0e0" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> -<path d="m4 1039.4a9 9 0 0 1 9 9" fill="none" stroke="#e0e0e0" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> +<path transform="translate(0 1036.4)" d="m4 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1c4.4301 0 8 3.5699 8 8a1 1 0 0 0 1 1 1 1 0 0 0 1 -1c0-5.511-4.489-10-10-10zm0 4a1 1 0 0 0 -1 1 1 1 0 0 0 1 1c2.221 0 4 1.779 4 4a1 1 0 0 0 1 1 1 1 0 0 0 1 -1c0-3.3018-2.6981-6-6-6zm0 4a2 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"/> </g> </svg> diff --git a/editor/icons/icon_editor_3d_handle.svg b/editor/icons/icon_editor_3d_handle.svg index 189baf3dad..cd28f8d22e 100644 --- a/editor/icons/icon_editor_3d_handle.svg +++ b/editor/icons/icon_editor_3d_handle.svg @@ -1,5 +1,6 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -1036.4)"> +<circle cx="8" cy="1044.4" r="8" fill-opacity=".29412"/> <circle cx="8" cy="1044.4" r="7" fill="#fff"/> <circle cx="8" cy="1044.4" r="5" fill="#ff8484"/> </g> diff --git a/editor/icons/icon_editor_control_anchor.svg b/editor/icons/icon_editor_control_anchor.svg index eeee2c182f..5e75f9bdf5 100644 --- a/editor/icons/icon_editor_control_anchor.svg +++ b/editor/icons/icon_editor_control_anchor.svg @@ -1,8 +1,8 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -1036.4)"> -<path transform="translate(0 1036.4)" d="m8.832 6.1445a4 4 0 0 1 -2.6914 2.6855l9.8594 7.1699-7.168-9.8555z" fill="#a5efac" fill-rule="evenodd"/> +<path transform="translate(0 1036.4)" d="m5 0a5 5 0 0 0 -5 5 5 5 0 0 0 5 5 5 5 0 0 0 1.0566 -0.11914l9.9434 6.1191-6.1172-9.9395a5 5 0 0 0 0.11719 -1.0605 5 5 0 0 0 -5 -5z" fill-opacity=".39216" style="paint-order:fill markers stroke"/> +<path transform="translate(0 1036.4)" d="m5 1a4 4 0 0 0 -4 4 4 4 0 0 0 4 4 4 4 0 0 0 1.1406 -0.16992l9.8594 7.1699-7.168-9.8555a4 4 0 0 0 0.16797 -1.1445 4 4 0 0 0 -4 -4z" fill="#a5efac" fill-rule="evenodd"/> <ellipse cx="3" cy="1039.4" r="2" fill="#6e6e6e"/> -<ellipse cx="4" cy="1040.4" rx="4" ry="4" fill="#a5efac" style="paint-order:fill markers stroke"/> <circle cx="5" cy="1041.4" r="0" fill="#a5efac" style="paint-order:fill markers stroke"/> </g> </svg> diff --git a/editor/icons/icon_editor_handle.svg b/editor/icons/icon_editor_handle.svg index 7e58aaa803..05f3e2f2cc 100644 --- a/editor/icons/icon_editor_handle.svg +++ b/editor/icons/icon_editor_handle.svg @@ -1,6 +1,7 @@ -<svg width="8" height="8" version="1.1" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1044.4)"> -<ellipse cx="4" cy="1048.4" rx="4" ry="4" fill="#fff"/> -<ellipse cx="4" cy="1048.4" rx="2.8572" ry="2.8571" fill="#ff8484"/> +<svg width="10" height="10" version="1.1" viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -1042.4)"> +<ellipse cx="5" cy="1047.4" rx="5" ry="5" fill-opacity=".29412"/> +<ellipse cx="5" cy="1047.4" rx="4" ry="4" fill="#fff"/> +<ellipse cx="5" cy="1047.4" rx="3" ry="3" fill="#ff8484"/> </g> </svg> diff --git a/editor/icons/icon_editor_pivot.svg b/editor/icons/icon_editor_pivot.svg index d59d2d804d..8b8d07c7de 100644 --- a/editor/icons/icon_editor_pivot.svg +++ b/editor/icons/icon_editor_pivot.svg @@ -1,6 +1,6 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -1036.4)"> <path transform="translate(0 1036.4)" d="m6 0v6h-6v4h6v6h4v-6h6v-4h-6v-6h-4zm1 7h2v2h-2v-2z" fill="#fff" fill-opacity=".70588"/> -<path transform="translate(0 1036.4)" d="m7 1v5h2v-5h-2zm-6 6v2h5v-2h-5zm9 0v2h5v-2h-5zm-3 3v5h2v-5h-2z" fill="#ff8484" fill-opacity=".58824"/> +<path transform="translate(0 1036.4)" d="m7 1v5h2v-5h-2zm-6 6v2h5v-2h-5zm9 0v2h5v-2h-5zm-3 3v5h2v-5h-2z" fill="#ff8484"/> </g> </svg> diff --git a/editor/icons/icon_gizmo_camera.svg b/editor/icons/icon_gizmo_camera.svg index f6e5f885e7..cb80c16598 100644 --- a/editor/icons/icon_gizmo_camera.svg +++ b/editor/icons/icon_gizmo_camera.svg @@ -1,5 +1,6 @@ <svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -924.36)"> +<path transform="translate(0 924.36)" 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"/> <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/icon_gizmo_directional_light.svg b/editor/icons/icon_gizmo_directional_light.svg index f7fa732501..1b125b44de 100644 --- a/editor/icons/icon_gizmo_directional_light.svg +++ b/editor/icons/icon_gizmo_directional_light.svg @@ -1,5 +1,6 @@ <svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -924.36)"> +<path transform="translate(0 924.36)" d="m64 4c-4.432 0-8 3.568-8 8v16c0 4.432 3.568 8 8 8s8-3.568 8-8v-16c0-4.432-3.568-8-8-8zm-36.77 15.223c-2.045 0-4.0893 0.78461-5.6562 2.3516-3.1339 3.1339-3.1339 8.1786 0 11.312l11.312 11.314c3.1339 3.1339 8.1806 3.1339 11.314 0s3.1339-8.1806 0-11.314l-11.314-11.312c-1.5669-1.5669-3.6113-2.3516-5.6562-2.3516zm73.539 0c-2.045 0-4.0893 0.78461-5.6562 2.3516l-11.314 11.312c-3.1339 3.1339-3.1339 8.1806 0 11.314s8.1806 3.1339 11.314 0l11.312-11.314c3.1339-3.1339 3.1339-8.1786 0-11.312-1.567-1.5669-3.6113-2.3516-5.6562-2.3516zm-36.77 20.777a24 24 0 0 0 -24 24 24 24 0 0 0 24 24 24 24 0 0 0 24 -24 24 24 0 0 0 -24 -24zm-52 16c-4.432 0-8 3.568-8 8s3.568 8 8 8h16c4.432 0 8-3.568 8-8s-3.568-8-8-8h-16zm88 0c-4.432 0-8 3.568-8 8s3.568 8 8 8h16c4.432 0 8-3.568 8-8s-3.568-8-8-8h-16zm-61.455 25.449c-2.045 0-4.0913 0.78266-5.6582 2.3496l-11.312 11.314c-3.1339 3.1339-3.1339 8.1786 0 11.312 3.1339 3.1339 8.1786 3.1339 11.312 0l11.314-11.312c3.1339-3.1339 3.1339-8.1806 0-11.314-1.5669-1.5669-3.6113-2.3496-5.6562-2.3496zm50.91 0c-2.045 0-4.0893 0.78266-5.6562 2.3496-3.1339 3.1339-3.1339 8.1806 0 11.314l11.314 11.312c3.1339 3.1339 8.1786 3.1339 11.312 0s3.1339-8.1786 0-11.312l-11.312-11.314c-1.5669-1.5669-3.6132-2.3496-5.6582-2.3496zm-25.455 10.551c-4.432 0-8 3.568-8 8v16c0 4.432 3.568 8 8 8s8-3.568 8-8v-16c0-4.432-3.568-8-8-8z" fill-opacity=".29412" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".98824" stroke-width="2"/> <path transform="translate(0 924.36)" d="m64 8c-2.216 0-4 1.784-4 4v16c0 2.216 1.784 4 4 4s4-1.784 4-4v-16c0-2.216-1.784-4-4-4zm-36.77 15.227c-1.0225 0-2.0447 0.39231-2.8281 1.1758-1.5669 1.5669-1.5669 4.0893 0 5.6562l11.312 11.314c1.5669 1.5669 4.0913 1.5669 5.6582 0s1.5669-4.0913 0-5.6582l-11.314-11.312c-0.78348-0.78348-1.8056-1.1758-2.8281-1.1758zm73.539 0c-1.0225 0-2.0446 0.39231-2.8281 1.1758l-11.314 11.312c-1.5669 1.5669-1.5669 4.0913 0 5.6582s4.0913 1.5669 5.6582 0l11.313-11.314c1.5669-1.5669 1.5669-4.0893 0-5.6562-0.78348-0.78348-1.8056-1.1758-2.8281-1.1758zm-36.77 20.773c-11.046 1e-5 -20 8.9543-20 20 7e-6 11.046 8.9543 20 20 20s20-8.9543 20-20c-8e-6 -11.046-8.9543-20-20-20zm-52 16c-2.216 0-4 1.784-4 4s1.784 4 4 4h16c2.216 0 4-1.784 4-4s-1.784-4-4-4h-16zm88 0c-2.216 0-4 1.784-4 4s1.784 4 4 4h16c2.216 0 4-1.784 4-4s-1.784-4-4-4h-16zm-61.455 25.453c-1.0225 0-2.0466 0.39035-2.8301 1.1738l-11.312 11.314c-1.5669 1.5669-1.5669 4.0893 0 5.6563 1.5669 1.5669 4.0893 1.5669 5.6562 0l11.314-11.313c1.5669-1.5669 1.5669-4.0913 0-5.6582-0.78347-0.78347-1.8056-1.1738-2.8281-1.1738zm50.91 0c-1.0225 0-2.0447 0.39035-2.8281 1.1738-1.5669 1.5669-1.5669 4.0913 0 5.6582l11.314 11.313c1.5669 1.5669 4.0893 1.5669 5.6563 0 1.5669-1.567 1.5669-4.0893 0-5.6563l-11.313-11.314c-0.78347-0.78347-1.8076-1.1738-2.8301-1.1738zm-25.455 10.547c-2.216 0-4 1.784-4 4v16c0 2.216 1.784 4 4 4s4-1.784 4-4v-16c0-2.216-1.784-4-4-4z" fill="#f7f5cf"/> </g> </svg> diff --git a/editor/icons/icon_gizmo_g_i_probe.svg b/editor/icons/icon_gizmo_g_i_probe.svg index 7d3adf4196..815da4d5c3 100644 --- a/editor/icons/icon_gizmo_g_i_probe.svg +++ b/editor/icons/icon_gizmo_g_i_probe.svg @@ -1,5 +1,6 @@ <svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -924.36)"> -<path transform="translate(0 924.36)" d="m12 8a4.0004 4.0004 0 0 0 -4 4v104a4.0004 4.0004 0 0 0 4 4h60v-8h-56v-96h96v8h8v-12a4.0004 4.0004 0 0 0 -4 -4h-104zm27.715 17.951c-1.2324 0.086154-2.3996 0.76492-3.0664 1.9199l-0.14844 0.25781c-1.0669 1.848-0.43784 4.1948 1.4102 5.2617l10.648 6.1484c1.848 1.0669 4.1948 0.43784 5.2617-1.4102l0.14844-0.25781c1.0669-1.848 0.43784-4.1948-1.4102-5.2617l-10.648-6.1484c-0.693-0.4001-1.4558-0.56146-2.1953-0.50977zm52.285 2.0488a32 32 0 0 0 -32 32 32 32 0 0 0 16 27.668v8.332c0 4.432 3.568 8 8 8h16c4.432 0 8-3.568 8-8v-8.3223a32 32 0 0 0 16 -27.678 32 32 0 0 0 -32 -32zm0 12a20 20 0 0 1 20 20 20 20 0 0 1 -20 20 20 20 0 0 1 -20 -20 20 20 0 0 1 20 -20zm-60.148 16c-2.1339 0-3.8516 1.7177-3.8516 3.8516v0.29688c0 2.1339 1.7177 3.8516 3.8516 3.8516h12.297c2.1339 0 3.8516-1.7177 3.8516-3.8516v-0.29688c0-2.1339-1.7177-3.8516-3.8516-3.8516h-12.297zm18.902 23.951c-0.73947-0.051693-1.5023 0.10966-2.1953 0.50977l-10.648 6.1484c-1.848 1.0669-2.4771 3.4137-1.4102 5.2617l0.14844 0.25781c1.0669 1.848 3.4137 2.4771 5.2617 1.4102l10.648-6.1484c1.848-1.0669 2.4771-3.4137 1.4102-5.2617l-0.14844-0.25781c-0.66684-1.155-1.834-1.8338-3.0664-1.9199zm33.246 32.049v8h16v-8h-16z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> +<path transform="translate(0 924.36)" d="m12 4c-4.4183 9.5e-6 -8 3.5817-8 8v104c9.5e-6 4.4183 3.5817 8 8 8h64v-16h-56v-88h88v7.7676a36 36 0 0 0 -16 -3.7676 36 36 0 0 0 -36 36 36 36 0 0 0 16 29.9v8.0996c0 4.8544 3.4253 8.8788 8 9.8008v16.199h24v-16.199c4.5747-0.92197 8-4.9464 8-9.8008v-8.0879a36 36 0 0 0 16 -29.912 36 36 0 0 0 -19.523 -32h15.523v-16c-1e-5 -4.4183-3.5817-8-8-8h-104zm28.25 17.996c-2.8358-0.076599-5.6171 1.3651-7.1406 4.0039-2.216 3.8382-0.90854 8.7117 2.9297 10.928l10.393 6c3.8382 2.216 8.7117 0.91049 10.928-2.9277s0.91049-8.7117-2.9277-10.928l-10.393-6c-1.1994-0.6925-2.5-1.0414-3.7891-1.0762zm51.75 22.004a16 16 0 0 1 16 16 16 16 0 0 1 -16 16 16 16 0 0 1 -16 -16 16 16 0 0 1 16 -16zm-60 8c-4.432 0-8 3.568-8 8s3.568 8 8 8h12c4.432 0 8-3.568 8-8s-3.568-8-8-8h-12zm18.221 23.996c-1.289 0.034818-2.5896 0.38367-3.7891 1.0762l-10.393 6c-3.8382 2.216-5.1457 7.0895-2.9297 10.928s7.0915 5.1437 10.93 2.9277l10.393-6c3.8382-2.216 5.1437-7.0895 2.9277-10.928-1.5235-2.6388-4.3028-4.0805-7.1387-4.0039z" fill-opacity=".29412"/> +<path transform="translate(0 924.36)" d="m12 8a4.0004 4.0004 0 0 0 -4 4v104a4.0004 4.0004 0 0 0 4 4h60v-8h-56v-96h96v8h8v-12a4.0004 4.0004 0 0 0 -4 -4zm27.715 17.951c-1.2324 0.08615-2.3996 0.76492-3.0664 1.9199l-0.14844 0.25781c-1.0669 1.848-0.43784 4.1948 1.4102 5.2617l10.648 6.1484c1.848 1.0669 4.1948 0.43784 5.2617-1.4102l0.14844-0.25781c1.0669-1.848 0.43784-4.1948-1.4102-5.2617l-10.648-6.1484c-0.693-0.4001-1.4558-0.56146-2.1953-0.50977zm52.285 2.0488a32 32 0 0 0 -32 32 32 32 0 0 0 16 27.668v8.332c0 4.432 3.568 8 8 8h16c4.432 0 8-3.568 8-8v-8.3223a32 32 0 0 0 16 -27.678 32 32 0 0 0 -32 -32zm0 12a20 20 0 0 1 20 20 20 20 0 0 1 -20 20 20 20 0 0 1 -20 -20 20 20 0 0 1 20 -20zm-60.148 16c-2.1339 0-3.8516 1.7177-3.8516 3.8516v0.29688c0 2.1339 1.7177 3.8516 3.8516 3.8516h12.297c2.1339 0 3.8516-1.7177 3.8516-3.8516v-0.29688c0-2.1339-1.7177-3.8516-3.8516-3.8516zm18.902 23.951c-0.73947-0.05169-1.5023 0.10966-2.1953 0.50977l-10.648 6.1484c-1.848 1.0669-2.4771 3.4137-1.4102 5.2617l0.14844 0.25781c1.0669 1.848 3.4137 2.4771 5.2617 1.4102l10.648-6.1484c1.848-1.0669 2.4771-3.4137 1.4102-5.2617l-0.14844-0.25781c-0.66684-1.155-1.834-1.8338-3.0664-1.9199zm33.246 32.049v8h16v-8z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> </g> </svg> diff --git a/editor/icons/icon_gizmo_light.svg b/editor/icons/icon_gizmo_light.svg index c411d13dc7..0db2749e91 100644 --- a/editor/icons/icon_gizmo_light.svg +++ b/editor/icons/icon_gizmo_light.svg @@ -1,5 +1,6 @@ <svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -924.36)"> +<path transform="translate(0 924.36)" d="m64 2a44 44 0 0 0 -44 44 44 44 0 0 0 24 39.189v5.8105 5 3c0 5.0515 3.3756 9.2769 8 10.578v16.422h24v-16.422c4.6244-1.3012 8-5.5266 8-10.578v-3-5-5.8574a44 44 0 0 0 24 -39.143 44 44 0 0 0 -44 -44zm0 20a24 24 0 0 1 24 24 24 24 0 0 1 -24 24 24 24 0 0 1 -24 -24 24 24 0 0 1 24 -24z" fill-opacity=".29412" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".98824" stroke-width="2.2"/> <path transform="translate(0 924.36)" d="m64 6a40 40 0 0 0 -40 40 40 40 0 0 0 24 36.607v15.393a8 8 0 0 0 8 8h16a8 8 0 0 0 8 -8v-15.363a40 40 0 0 0 24 -36.637 40 40 0 0 0 -40 -40zm0 12a28 28 0 0 1 28 28 28 28 0 0 1 -28 28 28 28 0 0 1 -28 -28 28 28 0 0 1 28 -28zm-8 96v8h16v-8h-16z" fill="#f7f5cf"/> </g> </svg> diff --git a/editor/icons/icon_gizmo_listener.svg b/editor/icons/icon_gizmo_listener.svg index adb6aebaec..9b74469b67 100644 --- a/editor/icons/icon_gizmo_listener.svg +++ b/editor/icons/icon_gizmo_listener.svg @@ -1,6 +1,7 @@ <svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -924.36)"> <g transform="matrix(2 0 0 2 -16 -1040.4)"> +<path d="m32 984.36c-12.126 2e-5 -22 9.8729-22 21.999 1.1e-4 1.1045 0.89548 1.9999 2 2h8c1.1045-1e-4 1.9999-0.8955 2-2 2.23e-4 -5.546 4.4536-9.999 10-9.999 5.5464 1e-5 9.9998 4.453 10 9.999 0 6.5873-1.6032 8.0251-3.8408 9.8897-1.0295 0.8579-2.3133 1.6111-3.7969 2.6826-0.72285 0.522-1.6649 1.2341-2.5488 2.3496-0.98288 1.2402-1.8135 2.99-1.8135 5.0781 0 2.3898-0.31658 3.686-0.61035 4.3194-0.29378 0.6333-0.4706 0.73-0.97754 1.0341-0.54947 0.3297-2.5162 0.6446-4.4121 0.6446-0.0065 3e-4 -0.01302 6e-4 -0.01953 1e-3h-3.9805c-1.1045 1e-4 -1.9999 0.8954-2 2v8c1.1e-4 1.1045 0.89548 1.9999 2 2h4c0.0072-3e-4 0.01432-5e-4 0.02148-1e-3 1.9052 1e-3 6.3098 0.1982 10.566-2.3555 4.0103-2.4061 6.6628-7.2724 7.1738-13.592 0.81224-0.548 2.3445-1.497 4.0791-2.9424 4.0025-3.3353 8.1592-9.5405 8.1592-19.108-9.5e-5 -12.126-9.8735-21.999-22-21.999zm31.807 4.002c-0.38259-0.0177-0.76221 0.0749-1.0938 0.2666l-6.9531 4.0156c-0.95754 0.55332-1.2843 1.7787-0.72949 2.7354 1.9364 3.3365 2.9609 7.1229 2.9717 10.98-0.0072 3.8597-1.0296 7.6487-2.9648 10.988-0.55452 0.9572-0.22681 2.1827 0.73144 2.7353l6.9453 4.0069c0.95656 0.5517 2.1792 0.2238 2.7314-0.7325 6.0717-10.516 6.0717-23.482 0-33.998-0.3406-0.59005-0.95812-0.96615-1.6387-0.99805z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill-opacity=".29412" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> <path transform="matrix(.5 0 0 .5 8 982.36)" d="m48 8a40 39.998 0 0 0 -40 39.998h16a24 23.999 0 0 1 24 -23.998 24 23.999 0 0 1 24 23.998c0 13.999-4.33 18.859-9.1211 22.852-2.3955 1.9962-5.0363 3.5302-7.8125 5.5352-1.3881 1.0024-2.8661 2.126-4.3047 3.9414-1.4385 1.8152-2.7617 4.6719-2.7617 7.6719 0 10.221-2.5383 12.59-5.1172 14.137-2.5789 1.5472-6.8828 1.8594-10.883 1.8594v0.00195h-8v16h8v-0.00195c4 0 11.696 0.31158 19.117-4.1406 7.0602-4.236 12.198-13.279 12.695-26 0.1835-0.1636 0.14883-0.15489 0.62109-0.49609 1.7238-1.245 5.083-3.2112 8.6875-6.2148 7.209-6.0072 14.879-17.145 14.879-35.145a40 39.998 0 0 0 -40 -39.998zm63.426 8l-13.906 8.0312a48 47.998 0 0 1 6.4844 23.967 48 47.998 0 0 1 -6.4688 23.984l13.891 8.0137a64 63.997 0 0 0 0 -63.996z" fill="#f7f5cf"/> </g> </g> diff --git a/editor/icons/icon_gizmo_particles.svg b/editor/icons/icon_gizmo_particles.svg index 05fc84619e..0989c1acad 100644 --- a/editor/icons/icon_gizmo_particles.svg +++ b/editor/icons/icon_gizmo_particles.svg @@ -1,5 +1,6 @@ <svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -924.36)"> +<path d="m63.998 928.36c-18.429 5e-3 -34.029 13.88-38.557 32.926-12.4 3.0077-21.427 14.08-21.441 27.07v4e-3c0 15.417 12.583 28 28 28h64c15.417 0 28-12.583 28-28v-4e-3c-0.0152-13-9.0549-24.076-21.467-27.074-4.5265-19.033-20.112-32.903-38.529-32.922zm32.002 88c-6.58 0-12 5.42-12 12s5.42 12 12 12c6.58 0 12-5.42 12-12s-5.42-12-12-12zm-64 0c-6.58 0-12 5.42-12 12s5.42 12 12 12 12-5.42 12-12-5.42-12-12-12zm32 8c-6.58 0-12 5.42-12 12s5.42 12 12 12 12-5.42 12-12-5.42-12-12-12z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill-opacity=".29412" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> <path transform="translate(0 924.36)" d="m64 8a36 40 0 0 0 -35.311 32.256 24 24 0 0 0 -20.689 23.744 24 24 0 0 0 24 24h64a24 24 0 0 0 24 -24 24 24 0 0 0 -20.715 -23.746 36 40 0 0 0 -35.285 -32.254zm-32 88a8 8 0 0 0 -8 8 8 8 0 0 0 8 8 8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8zm64 0a8 8 0 0 0 -8 8 8 8 0 0 0 8 8 8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8zm-32 8a8 8 0 0 0 -8 8 8 8 0 0 0 8 8 8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8z" fill="#f7f5cf"/> </g> </svg> diff --git a/editor/icons/icon_gizmo_reflection_probe.svg b/editor/icons/icon_gizmo_reflection_probe.svg index 6d80e73b8c..bcfd6e53f9 100644 --- a/editor/icons/icon_gizmo_reflection_probe.svg +++ b/editor/icons/icon_gizmo_reflection_probe.svg @@ -1,5 +1,6 @@ <svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -924.36)"> -<path transform="translate(0 924.36)" d="m12 8a4.0004 4.0004 0 0 0 -4 4v24h8v-20h96v8h8v-12a4.0004 4.0004 0 0 0 -4 -4h-104zm76 28a4 4 0 0 0 -4 4 4 4 0 0 0 4 4h18.732l-42.957 50.119-44.947-44.947-5.6562 5.6582 48 48a4.0004 4.0004 0 0 0 5.8652 -0.22656l44.963-52.457v17.854a4 4 0 0 0 4 4 4 4 0 0 0 4 -4v-28a4.0004 4.0004 0 0 0 -4 -4h-28zm-80 52v28a4.0004 4.0004 0 0 0 4 4h104a4.0004 4.0004 0 0 0 4 -4v-28h-8v24h-96v-24h-8z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> +<g transform="translate(0 -924.36)" shape-rendering="auto"> +<path d="m12 928.36c-4.3705 4.4e-4 -7.9996 3.6295-8 8v28h16v-20h88v8h16v-16c-4.4e-4 -4.3705-3.6295-7.9996-8-8zm76 28c-4.3709 0-8 3.6291-8 8s3.6291 8 8 8h10.035l-34.486 40.236-44.721-44.723-11.312 11.316 50.828 50.828c3.2536 3.2513 8.7374 3.0394 11.73-0.4531l37.926-44.244v7.0391c0 4.3709 3.6291 8 8 8s8-3.6291 8-8v-28c-4.4e-4 -4.3705-3.6295-7.9996-8-8zm-84 52v32c4.37e-4 4.3705 3.6295 7.9996 8 8h104c4.3705-4e-4 7.9996-3.6295 8-8v-32h-16v24h-88v-24z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill-opacity=".29412" image-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> +<path d="m12 932.36c-2.209 2.2e-4 -3.9998 1.791-4 4v24h8v-20h96v8h8v-12c-2.2e-4 -2.209-1.791-3.9998-4-4zm76 28c-2.2091 0-4 1.7909-4 4s1.7909 4 4 4h18.732l-42.957 50.119-44.947-44.947-5.6562 5.6582 48 48c1.648 1.6468 4.3491 1.5425 5.8652-0.2266l44.963-52.457v17.854c0 2.2091 1.7909 4 4 4s4-1.7909 4-4v-28c-2.2e-4 -2.209-1.791-3.9998-4-4zm-80 52v28c2.209e-4 2.2091 1.791 3.9998 4 4h104c2.209-2e-4 3.9998-1.7909 4-4v-28h-8v24h-96v-24z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" image-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> </g> </svg> diff --git a/editor/icons/icon_gizmo_spatial_sample_player.svg b/editor/icons/icon_gizmo_spatial_sample_player.svg index 7dbb4744be..aa69248503 100644 --- a/editor/icons/icon_gizmo_spatial_sample_player.svg +++ b/editor/icons/icon_gizmo_spatial_sample_player.svg @@ -1,5 +1,6 @@ <svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -924.36)"> -<path transform="translate(0 924.36)" d="m63.883 12.004c-1.0195 0.0295-1.9892 0.4473-2.7109 1.168l-30.828 30.83h-14.344c-2.209 2.21e-4 -3.9998 1.791-4 4v32c2.21e-4 2.209 1.791 3.9998 4 4h14.344l30.828 30.828c2.52 2.5182 6.8267 0.73442 6.8281-2.8281v-96.002c-0.0015-2.2541-1.8641-4.0619-4.1172-3.9961zm48.117 3.9961a4 4 0 0 0 -4 4v88a4 4 0 0 0 4 4 4 4 0 0 0 4 -4v-88a4 4 0 0 0 -4 -4zm-24 24a4 4 0 0 0 -4 4v40a4 4 0 0 0 4 4 4 4 0 0 0 4 -4v-40a4 4 0 0 0 -4 -4z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> +<g transform="translate(0 -924.36)" fill-rule="evenodd" shape-rendering="auto"> +<path d="m63.766 932.37c-2.0369 0.0594-3.9779 0.89602-5.4199 2.3359l-2e-3 2e-3 -29.656 29.658h-12.688c-4.3705 4.4e-4 -7.9996 3.6295-8 8v32c4.372e-4 4.3705 3.6295 7.9995 8 8h12.688l29.656 29.656c2.4 2.3983 5.9795 2.8662 8.7168 1.7324 2.7373-1.1337 4.9381-3.9958 4.9395-7.3886v-96.004c-3e-3 -4.4555-3.779-8.1211-8.2324-7.9922zm48.234 3.9941c-4.3709 0-8 3.6291-8 8v88c0 4.3709 3.6291 8 8 8s8-3.6291 8-8v-88c0-4.3709-3.6291-8-8-8zm-24 24c-4.3709 0-8 3.6291-8 8v40c0 4.3709 3.6291 8 8 8s8-3.6291 8-8v-40c0-4.3709-3.6291-8-8-8z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill-opacity=".29412" image-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> +<path transform="translate(0 924.36)" d="m63.883 12.004c-1.0195 0.0295-1.9892 0.4473-2.7109 1.168l-30.828 30.83h-14.344c-2.209 2.21e-4 -3.9998 1.791-4 4v32c2.21e-4 2.209 1.791 3.9998 4 4h14.344l30.828 30.828c2.52 2.5182 6.8267 0.73442 6.8281-2.8281v-96.002c-0.0015-2.2541-1.8641-4.0619-4.1172-3.9961zm48.117 3.9961a4 4 0 0 0 -4 4v88a4 4 0 0 0 4 4 4 4 0 0 0 4 -4v-88a4 4 0 0 0 -4 -4zm-24 24a4 4 0 0 0 -4 4v40a4 4 0 0 0 4 4 4 4 0 0 0 4 -4v-40a4 4 0 0 0 -4 -4z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" image-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> </g> </svg> diff --git a/editor/icons/icon_gizmo_spatial_stream_player.svg b/editor/icons/icon_gizmo_spatial_stream_player.svg index 2cf3966364..1470d3bfba 100644 --- a/editor/icons/icon_gizmo_spatial_stream_player.svg +++ b/editor/icons/icon_gizmo_spatial_stream_player.svg @@ -1,5 +1,6 @@ <svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -924.36)"> -<path d="m99.766 934.36a8.0008 8.0011 0 0 0 -1.9609 0.296l-56 16a8.0008 8.0011 0 0 0 -5.8047 7.6964v48.119a18 18.001 0 0 0 -2 -0.116 18 18.001 0 0 0 -18 18.001 18 18.001 0 0 0 18 18.001 18 18.001 0 0 0 17.875 -16.001h0.125v-2-59.963l40-11.43v37.517a18 18.001 0 0 0 -2 -0.124 18 18.001 0 0 0 -18 18.001 18 18.001 0 0 0 18 18 18 18.001 0 0 0 17.875 -16h0.125v-2-66.003a8.0008 8.0011 0 0 0 -8.2344 -7.9924z" color="#000000" color-rendering="auto" fill="#f7f5cf" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/> +<g transform="translate(0 -924.36)" shape-rendering="auto"> +<path transform="translate(0 924.36)" d="m99.645 6.0059c-0.9956 0.029687-1.9837 0.18322-2.9414 0.45703l-56 16c-5.1336 1.4668-8.7021 6.198-8.7031 11.537v44.203c-11.16 1.0331-20 10.379-20 21.797 1.1e-5 12.103 9.8971 22 22 22 12.103-1e-5 22-9.8971 22-22v-56.947l32-9.1426v28.293c-11.16 1.0331-20 10.379-20 21.797 1.1e-5 12.103 9.8971 22 22 22 12.103-1e-5 22-9.8971 22-22v-66c-0.00104-6.7137-5.6428-12.192-12.354-11.994z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill-opacity=".29412" image-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> +<path transform="translate(0 924.36)" d="m99.764 10.004a8.0008 8.0008 0 0 0 -1.9609 0.30469l-56 16a8.0008 8.0008 0 0 0 -5.8027 7.6914v48.121a18 18 0 0 0 -2 -0.12109 18 18 0 0 0 -18 18 18 18 0 0 0 18 18 18 18 0 0 0 18 -18v-59.965l40-11.428v37.514a18 18 0 0 0 -2 -0.12109 18 18 0 0 0 -18 18 18 18 0 0 0 18 18 18 18 0 0 0 18 -18v-66a8.0008 8.0008 0 0 0 -8.2363 -7.9961z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" image-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> </g> </svg> diff --git a/editor/icons/icon_gizmo_spot_light.svg b/editor/icons/icon_gizmo_spot_light.svg index 9b4ddadd17..1881b6b60a 100644 --- a/editor/icons/icon_gizmo_spot_light.svg +++ b/editor/icons/icon_gizmo_spot_light.svg @@ -1,5 +1,6 @@ <svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -924.36)"> +<path transform="translate(0 924.36)" d="m52 4c-6.5788 0-12 5.4212-12 12v26.625c-12.263 7.2822-19.978 19.75-20 33.369l-0.005859 4.0059h28.578c1.7994 6.8632 8.0265 12 15.428 12s13.628-5.1368 15.428-12h28.576l-0.00391-4.0039c-0.01526-13.625-7.7323-26.099-20-33.385v-26.611c0-6.5788-5.4212-12-12-12zm-11.689 78.016c-1.536-0.10738-3.1419 0.23676-4.5586 1.0547l-10.393 6c-3.7786 2.1816-5.1117 7.1503-2.9297 10.93 2.1816 3.7786 7.1503 5.1117 10.93 2.9297l10.393-6c3.7796-2.1822 5.1087-7.1521 2.9277-10.93-1.3629-2.3605-3.8057-3.8052-6.3691-3.9844zm47.379 0c-2.5634 0.1792-5.0063 1.6238-6.3691 3.9844-2.181 3.7776-0.85187 8.7475 2.9277 10.93l10.393 6c3.7794 2.182 8.7481 0.8489 10.93-2.9297 2.182-3.7794 0.84891-8.7481-2.9297-10.93l-10.393-6c-1.4167-0.81792-3.0225-1.1621-4.5586-1.0547zm-23.689 13.984c-4.3628 0-8 3.6372-8 8v12c0 4.3628 3.6372 8 8 8s8-3.6372 8-8v-12c0-4.3628-3.6372-8-8-8z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill-opacity=".29412" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> <path transform="translate(0 924.36)" d="m52 8c-4.432 0-8 3.568-8 8v12 16.875a40 36 0 0 0 -20 31.125h28a12 12 0 0 0 12 12 12 12 0 0 0 12 -12h28a40 36 0 0 0 -20 -31.141v-20.859-8c0-4.432-3.568-8-8-8h-24zm-11.969 78.006c-0.76793-0.053681-1.5596 0.1138-2.2793 0.5293l-10.393 6c-1.9191 1.108-2.5728 3.5457-1.4648 5.4648s3.5457 2.5728 5.4648 1.4648l10.393-6c1.9191-1.108 2.5709-3.5457 1.4629-5.4648-0.6925-1.1994-1.9037-1.9047-3.1836-1.9941zm47.938 0c-1.2799 0.08947-2.4911 0.7947-3.1836 1.9941-1.108 1.9191-0.45622 4.3568 1.4629 5.4648l10.393 6c1.9191 1.108 4.3568 0.45427 5.4648-1.4648s0.45427-4.3568-1.4648-5.4648l-10.393-6c-0.71967-0.4155-1.5114-0.58298-2.2793-0.5293zm-23.969 13.994c-2.216 0-4 1.784-4 4v12c0 2.216 1.784 4 4 4s4-1.784 4-4v-12c0-2.216-1.784-4-4-4z" fill="#f7f5cf" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.1082"/> </g> </svg> diff --git a/editor/icons/icon_group_viewport.svg b/editor/icons/icon_group_viewport.svg new file mode 100644 index 0000000000..350fb4103f --- /dev/null +++ b/editor/icons/icon_group_viewport.svg @@ -0,0 +1,7 @@ +<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m0 0v4h4v-4h-4zm6 0v6h-6v10h10v-6h6v-10h-10zm4 4h2v2h-2v-2zm2 8v4h4v-4h-4z" fill-opacity=".39216" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".98824" stroke-width=".5"/> +<path transform="translate(0 1036.4)" d="m7 1v6h-6v8h8v-6h6v-8zm2 2h4v4h-4z" fill="#e0e0e0"/> +<path transform="translate(0 1036.4)" d="m1 1v2c0 2.34e-5 0.446 0 1 0s1 2.34e-5 1 0v-2c0-2.341e-5 -0.446 0-1 0s-1-2.341e-5 -1 0zm12 0v2c0 2.34e-5 0.446 0 1 0s1 2.34e-5 1 0v-2c0-2.341e-5 -0.446 0-1 0s-1-2.341e-5 -1 0zm-12 12v2c0 2.3e-5 0.446 0 1 0s1 2.3e-5 1 0v-2c0-2.3e-5 -0.446 0-1 0s-1-2.3e-5 -1 0zm12 0v2c0 2.3e-5 0.446 0 1 0s1 2.3e-5 1 0v-2c0-2.3e-5 -0.446 0-1 0s-1-2.3e-5 -1 0z" fill="#fff"/> +</g> +</svg> diff --git a/editor/icons/icon_key.svg b/editor/icons/icon_key.svg index 041b820e00..cc152b58a5 100644 --- a/editor/icons/icon_key.svg +++ b/editor/icons/icon_key.svg @@ -1,7 +1,5 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1036.4)" fill="#e0e0e0" fill-opacity=".99608"> -<path transform="translate(0 1036.4)" d="m11 4a4 4 0 0 0 -4 4 4 4 0 0 0 4 4 4 4 0 0 0 4 -4 4 4 0 0 0 -4 -4zm0 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"/> -<rect x="1" y="1043.4" width="8" height="2"/> -<rect x="2" y="1045.4" width="3" height="2"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m11 4a4 4 0 0 0 -3.8691 3h-6.1309v2h1v2h3v-2h2.1328a4 4 0 0 0 3.8672 3 4 4 0 0 0 4 -4 4 4 0 0 0 -4 -4zm0 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"/> </g> </svg> diff --git a/editor/icons/icon_key_move_disabled.svg b/editor/icons/icon_key_move_disabled.svg deleted file mode 100644 index 05c158dc3c..0000000000 --- a/editor/icons/icon_key_move_disabled.svg +++ /dev/null @@ -1,4 +0,0 @@ -<svg width="16" height="16" style="isolation:isolate" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<path d="m7.984 1.002c-0.259 4e-3 -0.507 0.108-0.691 0.291l-2 2 1.414 1.414 1.293-1.293 1.293 1.293 1.414-1.414-2-2c-0.191-0.191-0.452-0.296-0.722-0.291h-1e-3zm-4.691 4.291l-2 2c-0.39 0.391-0.39 1.024 0 1.414l2 2 1.414-1.414-1.293-1.293 1.293-1.293-1.414-1.414zm9.414 0l-1.414 1.414 1.293 1.293-1.293 1.293 1.414 1.414 2-2c0.39-0.39 0.39-1.023 0-1.414l-2-2zm-6 6l-1.414 1.414 2 2c0.391 0.391 1.024 0.391 1.414 0l2-2-1.414-1.414-1.293 1.293-1.293-1.293z" fill="#e0e0e0" fill-opacity=".5" fill-rule="evenodd"/> -<path d="m5.168 7.595l2.427-2.427c0.224-0.224 0.586-0.224 0.81 0l2.427 2.427c0.224 0.224 0.224 0.586 0 0.81l-2.427 2.427c-0.224 0.224-0.586 0.224-0.81 0l-2.427-2.427c-0.224-0.224-0.224-0.586 0-0.81z" fill="#84c2ff" fill-opacity=".5"/> -</svg> diff --git a/editor/icons/icon_key_move_enabled.svg b/editor/icons/icon_key_move_enabled.svg index 2d455f2d81..203b697ad2 100644 --- a/editor/icons/icon_key_move_enabled.svg +++ b/editor/icons/icon_key_move_enabled.svg @@ -1,4 +1,5 @@ -<svg width="16" height="16" style="isolation:isolate" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<path d="m7.984 1.002c-0.259 4e-3 -0.507 0.108-0.691 0.291l-2 2 1.414 1.414 1.293-1.293 1.293 1.293 1.414-1.414-2-2c-0.191-0.191-0.452-0.296-0.722-0.291h-1e-3zm-4.691 4.291l-2 2c-0.39 0.391-0.39 1.024 0 1.414l2 2 1.414-1.414-1.293-1.293 1.293-1.293-1.414-1.414zm9.414 0l-1.414 1.414 1.293 1.293-1.293 1.293 1.414 1.414 2-2c0.39-0.39 0.39-1.023 0-1.414l-2-2zm-6 6l-1.414 1.414 2 2c0.391 0.391 1.024 0.391 1.414 0l2-2-1.414-1.414-1.293 1.293-1.293-1.293z" fill="#e0e0e0" fill-opacity=".99608" fill-rule="evenodd"/> -<path d="m5.168 7.595l2.427-2.427c0.224-0.224 0.586-0.224 0.81 0l2.427 2.427c0.224 0.224 0.224 0.586 0 0.81l-2.427 2.427c-0.224 0.224-0.586 0.224-0.81 0l-2.427-2.427c-0.224-0.224-0.224-0.586 0-0.81z" fill="#84C2FF"/> +<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m8 1c-0.195 0-0.38964 0.07519-0.53906 0.22461l-3.2363 3.2363c-0.29884 0.29884-0.29884 0.77929 0 1.0781l3.2363 3.2363c0.29884 0.29884 0.77929 0.29884 1.0781 0l3.2363-3.2363c0.29884-0.29884 0.29884-0.77929 0-1.0781l-3.2363-3.2363c-0.14942-0.14942-0.34406-0.22461-0.53906-0.22461zm-7 7v5c0 1.6569 1.3471 3.114 3 3h1v-2h-1c-0.55228-1e-5 -0.99999-0.44772-1-1v-5h-2zm7 2c-1.645 0-3 1.355-3 3s1.355 3 3 3 3-1.355 3-3-1.355-3-3-3zm3 3c0 1.6569 1.3431 3 3 3h1v-2h-1c-0.55228-1e-5 -0.99999-0.44772-1-1 1e-5 -0.55228 0.44772-0.99999 1-1h1v-2h-1c-1.6569 0-3 1.3431-3 3zm-3-1c0.56413 0 1 0.4359 1 1 0 0.5642-0.43587 1-1 1s-1-0.4358-1-1c0-0.5641 0.43587-1 1-1z" fill="#e0e0e0" fill-opacity=".99608"/> +</g> </svg> diff --git a/editor/icons/icon_key_rotate_disabled.svg b/editor/icons/icon_key_rotate_disabled.svg deleted file mode 100644 index 6394bfd82d..0000000000 --- a/editor/icons/icon_key_rotate_disabled.svg +++ /dev/null @@ -1,4 +0,0 @@ -<svg width="16" height="16" style="isolation:isolate" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<path d="m8.088 1.001c-0.102-1e-3 -0.203 0-0.305 2e-3 -0.233 8e-3 -0.466 0.027-0.697 0.057-2.973 0.392-5.366 2.633-5.951 5.574-0.46 2.319 0.281 4.712 1.97 6.365h-1.105v2h4c0.308 1e-3 0.599-0.141 0.788-0.384 0.19-0.243 0.257-0.559 0.183-0.858l-1-4-1.942 0.487 0.281 1.121c-0.84-0.92-1.308-2.12-1.31-3.366 0-2.761 2.239-5 5-5 1.326 0 2.598 0.527 3.536 1.465 0.937 0.938 1.464 2.209 1.464 3.535-1e-3 1.326-0.529 2.597-1.467 3.534l1.416 1.416c2.12-2.121 2.654-5.356 1.328-8.045-1.165-2.362-3.556-3.869-6.189-3.903z" fill="#e0e0e0" fill-opacity=".5"/> -<path d="m5.168 7.595l2.427-2.427c0.224-0.224 0.586-0.224 0.81 0l2.427 2.427c0.224 0.224 0.224 0.586 0 0.81l-2.427 2.427c-0.224 0.224-0.586 0.224-0.81 0l-2.427-2.427c-0.224-0.224-0.224-0.586 0-0.81z" fill="#84c2ff" fill-opacity=".5"/> -</svg> diff --git a/editor/icons/icon_key_rotate_enabled.svg b/editor/icons/icon_key_rotate_enabled.svg index 1dcb12c8ab..0f975631b2 100644 --- a/editor/icons/icon_key_rotate_enabled.svg +++ b/editor/icons/icon_key_rotate_enabled.svg @@ -1,4 +1,5 @@ -<svg width="16" height="16" style="isolation:isolate" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<path d="m8.088 1.001c-0.102-1e-3 -0.203 0-0.305 2e-3 -0.233 8e-3 -0.466 0.027-0.697 0.057-2.973 0.392-5.366 2.633-5.951 5.574-0.46 2.319 0.281 4.712 1.97 6.365h-1.105v2h4c0.308 1e-3 0.599-0.141 0.788-0.384 0.19-0.243 0.257-0.559 0.183-0.858l-1-4-1.942 0.487 0.281 1.121c-0.84-0.92-1.308-2.12-1.31-3.366 0-2.761 2.239-5 5-5 1.326 0 2.598 0.527 3.536 1.465 0.937 0.938 1.464 2.209 1.464 3.535-1e-3 1.326-0.529 2.597-1.467 3.534l1.416 1.416c2.12-2.121 2.654-5.356 1.328-8.045-1.165-2.362-3.556-3.869-6.189-3.903z" fill="#e0e0e0" fill-opacity=".99608"/> -<path d="m5.168 7.595l2.427-2.427c0.224-0.224 0.586-0.224 0.81 0l2.427 2.427c0.224 0.224 0.224 0.586 0 0.81l-2.427 2.427c-0.224 0.224-0.586 0.224-0.81 0l-2.427-2.427c-0.224-0.224-0.224-0.586 0-0.81z" fill="#84C2FF"/> +<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m8 1c-0.195 0-0.38964 0.07519-0.53906 0.22461l-3.2363 3.2363c-0.29884 0.29884-0.29884 0.77929 0 1.0781l3.2363 3.2363c0.29884 0.29884 0.77929 0.29884 1.0781 0l3.2363-3.2363c0.29884-0.29884 0.29884-0.77929 0-1.0781l-3.2363-3.2363c-0.14942-0.14942-0.34406-0.22461-0.53906-0.22461zm3 7v5c0 1.6569 1.3431 3 3 3h1v-2h-1c-0.55228 0-0.99999-0.4477-1-1v-1h2v-2h-2v-2h-2zm0 5c0-1.645-1.355-3-3-3s-3 1.355-3 3 1.355 3 3 3 3-1.355 3-3zm-7-3c-1.6569 0-3 1.3431-3 3v3h2v-3c9.6e-6 -0.5523 0.44772-1 1-1h1v-2h-1zm4 2c0.56413 0 1 0.4359 1 1 0 0.5642-0.43587 1-1 1s-1-0.4358-1-1c0-0.5641 0.43587-1 1-1z" fill="#e0e0e0" fill-opacity=".99608"/> +</g> </svg> diff --git a/editor/icons/icon_key_scale_disabled.svg b/editor/icons/icon_key_scale_disabled.svg deleted file mode 100644 index 9601e4925b..0000000000 --- a/editor/icons/icon_key_scale_disabled.svg +++ /dev/null @@ -1,4 +0,0 @@ -<svg width="16" height="16" style="isolation:isolate" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<path d="m9 1c-0.552 0-1 0.448-1 1s0.448 1 1 1h2.586l-1.293 1.293 1.414 1.414 1.293-1.293v2.586c0 0.552 0.448 1 1 1s1-0.448 1-1v-5c0-0.552-0.448-1-1-1h-5zm-7 7c-0.552 0-1 0.448-1 1v5c0 0.552 0.448 1 1 1h5c0.552 0 1-0.448 1-1s-0.448-1-1-1h-2.586l1.293-1.293-1.414-1.414-1.293 1.293v-2.586c0-0.552-0.448-1-1-1z" fill="#e0e0e0" fill-opacity=".5" fill-rule="evenodd"/> -<path d="m5.168 7.595l2.427-2.427c0.224-0.224 0.586-0.224 0.81 0l2.427 2.427c0.224 0.224 0.224 0.586 0 0.81l-2.427 2.427c-0.224 0.224-0.586 0.224-0.81 0l-2.427-2.427c-0.224-0.224-0.224-0.586 0-0.81z" fill="#84c2ff" fill-opacity=".5"/> -</svg> diff --git a/editor/icons/icon_key_scale_enabled.svg b/editor/icons/icon_key_scale_enabled.svg index f00f3db35f..eaa12fdf0e 100644 --- a/editor/icons/icon_key_scale_enabled.svg +++ b/editor/icons/icon_key_scale_enabled.svg @@ -1,4 +1,5 @@ -<svg width="16" height="16" style="isolation:isolate" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<path d="m9 1c-0.552 0-1 0.448-1 1s0.448 1 1 1h2.586l-1.293 1.293 1.414 1.414 1.293-1.293v2.586c0 0.552 0.448 1 1 1s1-0.448 1-1v-5c0-0.552-0.448-1-1-1h-5zm-7 7c-0.552 0-1 0.448-1 1v5c0 0.552 0.448 1 1 1h5c0.552 0 1-0.448 1-1s-0.448-1-1-1h-2.586l1.293-1.293-1.414-1.414-1.293 1.293v-2.586c0-0.552-0.448-1-1-1z" fill="#e0e0e0" fill-opacity=".99608" fill-rule="evenodd"/> -<path d="m5.168 7.595l2.427-2.427c0.224-0.224 0.586-0.224 0.81 0l2.427 2.427c0.224 0.224 0.224 0.586 0 0.81l-2.427 2.427c-0.224 0.224-0.586 0.224-0.81 0l-2.427-2.427c-0.224-0.224-0.224-0.586 0-0.81z" fill="#84C2FF"/> +<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m8 1c-0.195 0-0.38964 0.07519-0.53906 0.22461l-3.2363 3.2363c-0.29884 0.29884-0.29884 0.77929 0 1.0781l3.2363 3.2363c0.29884 0.29884 0.77929 0.29884 1.0781 0l3.2363-3.2363c0.29884-0.29884 0.29884-0.77929 0-1.0781l-3.2363-3.2363c-0.14942-0.14942-0.34406-0.22461-0.53906-0.22461zm3 7v5c0 1.6569 1.3431 3 3 3h1v-2h-1c-0.55228-1e-5 -0.99999-0.44772-1-1v-5h-2zm-8 2c-0.71466-1e-4 -1.3751 0.3811-1.7324 1-0.35727 0.6188-0.35727 1.3812 0 2 0.35733 0.6189 1.0178 1.0001 1.7324 1h-2v2h2c0.71466 1e-4 1.3751-0.3811 1.7324-1 0.35727-0.6188 0.35727-1.3812 0-2-0.35733-0.6189-1.0178-1.0001-1.7324-1h2v-2h-2zm6 0c-1.6569 0-3 1.3431-3 3s1.3431 3 3 3h1v-2h-1c-0.55228-1e-5 -0.99999-0.44772-1-1 9.6e-6 -0.55228 0.44772-0.99999 1-1h1v-2h-1z" fill="#e0e0e0" fill-opacity=".99608"/> +</g> </svg> diff --git a/editor/icons/icon_lock.svg b/editor/icons/icon_lock.svg index b0b0125648..1202f1d86f 100644 --- a/editor/icons/icon_lock.svg +++ b/editor/icons/icon_lock.svg @@ -1,8 +1,5 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1036.4)" fill="#e0e0e0"> -<path transform="translate(0 1036.4)" d="m2 8v7h12v-7h-12zm5 2h2v3h-2v-3z"/> -<path transform="translate(0 1036.4)" d="m8 1a5 5 0 0 0 -5 5h2a3 3 0 0 1 3 -3 3 3 0 0 1 3 3h2a5 5 0 0 0 -5 -5z"/> -<rect x="3" y="1042.4" width="2" height="2"/> -<rect x="11" y="1042.4" width="2" height="2"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m8 1a5 5 0 0 0 -5 5v2h-1v7h12v-7h-1v-2a5 5 0 0 0 -5 -5zm0 2a3 3 0 0 1 3 3v2h-6v-2a3 3 0 0 1 3 -3zm-1 7h2v3h-2v-3z" fill="#e0e0e0"/> </g> </svg> diff --git a/editor/icons/icon_lock_viewport.svg b/editor/icons/icon_lock_viewport.svg new file mode 100644 index 0000000000..54dc9f6b82 --- /dev/null +++ b/editor/icons/icon_lock_viewport.svg @@ -0,0 +1,6 @@ +<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m8 0a6 6 0 0 0 -6 6v1h-1v9h14v-9h-1v-1a6 6 0 0 0 -6 -6zm0 4c1.1046 0 2 0.89543 2 2v1h-4v-1c0-1.1046 0.89543-2 2-2z" fill-opacity=".39216" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".98824" stroke-width="4"/> +<path transform="translate(0 1036.4)" d="m8 1a5 5 0 0 0 -5 5v2h-1v7h12v-7h-1v-2a5 5 0 0 0 -5 -5zm0 2a3 3 0 0 1 3 3v2h-6v-2a3 3 0 0 1 3 -3zm-1 7h2v3h-2v-3z" fill="#e0e0e0"/> +</g> +</svg> diff --git a/editor/icons/icon_matrix.svg b/editor/icons/icon_matrix.svg deleted file mode 100644 index ff5b1b0808..0000000000 --- a/editor/icons/icon_matrix.svg +++ /dev/null @@ -1,5 +0,0 @@ -<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1038.4)"> -<path transform="translate(0 1038.4)" d="m1 1v1 11h1 2v-1h-2v-10h2v-1h-2-1zm9 0v1h2v10h-2v1h3v-1-11h-3zm-7 2v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-6 3v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-6 3v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2z" fill="#ea686c"/> -</g> -</svg> diff --git a/editor/icons/icon_snap.svg b/editor/icons/icon_snap.svg index 83e7b47fab..0e535b11ce 100644 --- a/editor/icons/icon_snap.svg +++ b/editor/icons/icon_snap.svg @@ -1,6 +1,6 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -1036.4)"> -<path transform="translate(0 1036.4)" d="m3 3v2h2v-2h-2zm6 0v2h2v-2h-2zm-6 6v2h2v-2h-2zm4 4v2h2v-2h-2zm6 0v2h2v-2h-2z" fill="#f3f3f3"/> +<path transform="translate(0 1036.4)" d="m3 3v2h2v-2h-2zm6 0v2h2v-2h-2zm-6 6v2h2v-2h-2zm4 4v2h2v-2h-2zm6 0v2h2v-2h-2z" fill="#e0e0e0"/> <path transform="translate(0 1036.4)" d="m11 7a4 4 0 0 0 -4 4v2h2v-2a2 2 0 0 1 2 -2 2 2 0 0 1 2 2v2h2v-2a4 4 0 0 0 -4 -4z" fill="#fff" fill-opacity=".68627"/> </g> </svg> diff --git a/editor/icons/icon_snap_grid.svg b/editor/icons/icon_snap_grid.svg index 1cb9140f1f..7124bd918e 100644 --- a/editor/icons/icon_snap_grid.svg +++ b/editor/icons/icon_snap_grid.svg @@ -1,6 +1,6 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -1036.4)"> -<path transform="translate(0 1036.4)" d="m3 0v3h-3v2h3v4h-3v2h3v3h2v-9h9v-2h-3v-3h-2v3h-4v-3zm4 13v2h2v-2zm6 0v2h2v-2z" fill="#f3f3f3"/> +<path transform="translate(0 1036.4)" d="m3 0v3h-3v2h3v4h-3v2h3v3h2v-9h9v-2h-3v-3h-2v3h-4v-3zm4 13v2h2v-2zm6 0v2h2v-2z" fill="#e0e0e0"/> <path transform="translate(0 1036.4)" d="m11 7a4 4 0 0 0 -4 4v2h2v-2a2 2 0 0 1 2 -2 2 2 0 0 1 2 2v2h2v-2a4 4 0 0 0 -4 -4z" fill="#fff" fill-opacity=".68627"/> </g> </svg> diff --git a/editor/icons/icon_status_error.svg b/editor/icons/icon_status_error.svg new file mode 100644 index 0000000000..4da9471835 --- /dev/null +++ b/editor/icons/icon_status_error.svg @@ -0,0 +1,7 @@ +<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -1036.4)"> +<g transform="translate(0 -1.6949e-5)"> +<path transform="translate(0 1036.4)" d="m8 1c-3.866 0-7 3.134-7 7 0 3.866 3.134 7 7 7 3.866 0 7-3.134 7-7 0-3.866-3.134-7-7-7zm-2.8281 2.7578l2.8281 2.8281 2.8281-2.8281 1.4141 1.4141-2.8281 2.8281 2.8281 2.8281-1.4141 1.4141-2.8281-2.8281-2.8281 2.8281-1.4141-1.4141 2.8281-2.8281-2.8281-2.8281 1.4141-1.4141z" fill="#ff5d5d"/> +</g> +</g> +</svg> diff --git a/editor/icons/icon_status_success.svg b/editor/icons/icon_status_success.svg new file mode 100644 index 0000000000..6a6e2d6d30 --- /dev/null +++ b/editor/icons/icon_status_success.svg @@ -0,0 +1,7 @@ +<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -1036.4)"> +<g transform="translate(0 -1.6949e-5)"> +<path transform="translate(0 1036.4)" d="m8 1c-3.866 0-7 3.134-7 7 0 3.866 3.134 7 7 7 3.866 0 7-3.134 7-7 0-3.866-3.134-7-7-7zm3.293 3.877 1.4141 1.4141-5.707 5.709-3.707-3.709 1.4141-1.4141 2.293 2.293z" fill="#45ff8b"/> +</g> +</g> +</svg> diff --git a/editor/icons/icon_status_warning.svg b/editor/icons/icon_status_warning.svg new file mode 100644 index 0000000000..f92021379d --- /dev/null +++ b/editor/icons/icon_status_warning.svg @@ -0,0 +1,7 @@ +<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -1036.4)"> +<g transform="translate(0 -1.6949e-5)"> +<path transform="translate(0 1036.4)" 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 -7zm-1 2h2v7h-2v-7zm0 8h2v2h-2v-2z" fill="#ffdd65"/> +</g> +</g> +</svg> diff --git a/editor/icons/icon_unlock.svg b/editor/icons/icon_unlock.svg index 10ea82cbcf..591b3d0102 100644 --- a/editor/icons/icon_unlock.svg +++ b/editor/icons/icon_unlock.svg @@ -1,7 +1,5 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1036.4)" fill="#e0e0e0"> -<path transform="translate(0 1036.4)" d="m2 8v7h12v-7h-12zm5 2h2v3h-2v-3z"/> -<path transform="translate(0 1036.4)" d="m8 1c-0.87738 0.001545-1.7389 0.23394-2.498 0.67383l1 1.7324c0.45506-0.26449 0.97171-0.40459 1.498-0.40625 1.6569 0 3 1.3431 3 3h2c0-2.7614-2.2386-5-5-5z"/> -<rect x="11" y="1042.4" width="2" height="2"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m8 1c-0.87738 0.001545-1.7389 0.23394-2.498 0.67383l1 1.7324c0.45506-0.26449 0.97171-0.40459 1.498-0.40625 1.6569 0 3 1.3431 3 3v2h-9v7h12v-7h-1v-2c0-2.7614-2.2386-5-5-5zm-1 9h2v3h-2v-3z" fill="#e0e0e0"/> </g> </svg> diff --git a/editor/icons/icon_zoom_less.svg b/editor/icons/icon_zoom_less.svg index c78262841c..aebadf443f 100644 --- a/editor/icons/icon_zoom_less.svg +++ b/editor/icons/icon_zoom_less.svg @@ -1,5 +1,6 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1036.4)"> -<path transform="translate(0 1036.4)" 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 -7zm-4 6h8v2h-8v-2z" fill="#e0e0e0" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> +<g transform="translate(0 -1036.4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> +<circle cx="8" cy="1044.4" r="8" fill-opacity=".39216" stroke-opacity=".98824"/> +<path transform="translate(0 1036.4)" 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 -7zm-4 6h8v2h-8v-2z" fill="#e0e0e0"/> </g> </svg> diff --git a/editor/icons/icon_zoom_more.svg b/editor/icons/icon_zoom_more.svg index 55323cf96e..be1e13d145 100644 --- a/editor/icons/icon_zoom_more.svg +++ b/editor/icons/icon_zoom_more.svg @@ -1,5 +1,6 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1036.4)"> -<path transform="translate(0 1036.4)" 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 -7zm-1 3h2v3h3v2h-3v3h-2v-3h-3v-2h3v-3z" fill="#e0e0e0" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> +<g transform="translate(0 -1036.4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> +<circle cx="8" cy="1044.4" r="8" fill-opacity=".39216" stroke-opacity=".98824"/> +<path transform="translate(0 1036.4)" 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 -7zm-1 3h2v3h3v2h-3v3h-2v-3h-3v-2h3v-3z" fill="#e0e0e0"/> </g> </svg> diff --git a/editor/icons/icon_zoom_reset.svg b/editor/icons/icon_zoom_reset.svg index 3ba2a149c8..aa5ad03727 100644 --- a/editor/icons/icon_zoom_reset.svg +++ b/editor/icons/icon_zoom_reset.svg @@ -1,5 +1,6 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1036.4)"> -<path transform="translate(0 1036.4)" 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 -7zm-0.029297 3.002a1.0001 1.0001 0 0 1 1.0293 0.99805v7h-2v-5.1309l-1.4453 0.96289-1.1094-1.6641 3-2a1.0001 1.0001 0 0 1 0.52539 -0.16602z" fill="#e0e0e0" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> +<g transform="translate(0 -1036.4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> +<circle cx="8" cy="1044.4" r="8" fill-opacity=".39216" stroke-opacity=".98824"/> +<path transform="translate(0 1036.4)" 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 -7zm-0.029297 3.002a1.0001 1.0001 0 0 1 1.0293 0.99805v7h-2v-5.1309l-1.4453 0.96289-1.1094-1.6641 3-2a1.0001 1.0001 0 0 1 0.52539 -0.16602z" fill="#e0e0e0"/> </g> </svg> diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index f84dfa08dd..b6b112b905 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -2595,12 +2595,12 @@ void CanvasItemEditor::_draw_locks_and_groups(Node *p_node, const Transform2D &p } if (ci) { - Ref<Texture> lock = get_icon("Lock", "EditorIcons"); + Ref<Texture> lock = get_icon("LockViewport", "EditorIcons"); if (p_node->has_meta("_edit_lock_")) { lock->draw(viewport_ci, transform_ci.xform(Point2(0, 0))); } - Ref<Texture> group = get_icon("Group", "EditorIcons"); + Ref<Texture> group = get_icon("GroupViewport", "EditorIcons"); if (ci->has_meta("_edit_group_")) { Vector2 ofs = transform_ci.xform(Point2(0, 0)); if (ci->has_meta("_edit_lock_")) @@ -3823,7 +3823,6 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { snap_config_menu = memnew(MenuButton); hb->add_child(snap_config_menu); - snap_config_menu->get_popup()->connect("id_pressed", this, "_popup_callback"); snap_config_menu->set_h_size_flags(SIZE_SHRINK_END); snap_config_menu->set_tooltip(TTR("Snapping options")); @@ -3877,7 +3876,6 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { p = skeleton_menu->get_popup(); p->set_hide_on_checkable_item_selection(false); - p->connect("id_pressed", this, "_popup_callback"); p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_make_bones", TTR("Make Bones"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_B), SKELETON_MAKE_BONES); p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_clear_bones", TTR("Clear Bones")), SKELETON_CLEAR_BONES); p->add_separator(); diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp index c8d25808dd..b96e10e81a 100644 --- a/editor/plugins/material_editor_plugin.cpp +++ b/editor/plugins/material_editor_plugin.cpp @@ -30,9 +30,11 @@ // FIXME: Disabled as (according to reduz) users were complaining that it gets in the way // Waiting for PropertyEditor rewrite (planned for 3.1) to be refactored. -#if 0 + #include "material_editor_plugin.h" +#if 0 + #include "scene/main/viewport.h" void MaterialEditor::_gui_input(InputEvent p_event) { @@ -416,3 +418,41 @@ MaterialEditorPlugin::~MaterialEditorPlugin() } #endif + +String SpatialMaterialConversionPlugin::converts_to() const { + + return "ShaderMaterial"; +} +bool SpatialMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const { + + Ref<SpatialMaterial> mat = p_resource; + return mat.is_valid(); +} +Ref<Resource> SpatialMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) { + + Ref<SpatialMaterial> mat = p_resource; + ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>()); + + Ref<ShaderMaterial> smat; + smat.instance(); + + Ref<Shader> shader; + shader.instance(); + + String code = VS::get_singleton()->shader_get_code(mat->get_shader_rid()); + + shader->set_code(code); + + smat->set_shader(shader); + + List<PropertyInfo> params; + VS::get_singleton()->shader_get_param_list(mat->get_shader_rid(), ¶ms); + + for (List<PropertyInfo>::Element *E = params.front(); E; E = E->next()) { + Variant value = VS::get_singleton()->material_get_param(mat->get_rid(), E->get().name); + smat->set_shader_param(E->get().name, value); + } + + smat->set_render_priority(mat->get_render_priority()); + return smat; +} diff --git a/editor/plugins/material_editor_plugin.h b/editor/plugins/material_editor_plugin.h index 10d7997a52..af9602f944 100644 --- a/editor/plugins/material_editor_plugin.h +++ b/editor/plugins/material_editor_plugin.h @@ -30,6 +30,7 @@ #ifndef MATERIAL_EDITOR_PLUGIN_H #define MATERIAL_EDITOR_PLUGIN_H +#include "editor/property_editor.h" // FIXME: Disabled as (according to reduz) users were complaining that it gets in the way // Waiting for PropertyEditor rewrite (planned for 3.1) to be refactored. #if 0 @@ -101,4 +102,13 @@ public: }; #endif + +class SpatialMaterialConversionPlugin : public EditorResourceConversionPlugin { + GDCLASS(SpatialMaterialConversionPlugin, EditorResourceConversionPlugin) +public: + virtual String converts_to() const; + virtual bool handles(const Ref<Resource> &p_resource) const; + virtual Ref<Resource> convert(const Ref<Resource> &p_resource); +}; + #endif // MATERIAL_EDITOR_PLUGIN_H diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 7534037f3e..2a6e3b4f0a 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -70,20 +70,17 @@ #define MAX_FOV 179 void SpatialEditorViewport::_update_camera(float p_interp_delta) { - if (orthogonal) { - //camera->set_orthogonal(size.width*cursor.distance,get_znear(),get_zfar()); - camera->set_orthogonal(2 * cursor.distance, 0.1, 8192); - } else - camera->set_perspective(get_fov(), get_znear(), get_zfar()); + + bool is_orthogonal = camera->get_projection() == Camera::PROJECTION_ORTHOGONAL; //when not being manipulated, move softly - float free_orbit_inertia = EDITOR_DEF("editors/3d/navigation_feel/orbit_inertia", 0.15); - float free_translation_inertia = EDITOR_DEF("editors/3d/navigation_feel/translation_inertia", 0.15); + float free_orbit_inertia = EDITOR_GET("editors/3d/navigation_feel/orbit_inertia"); + float free_translation_inertia = EDITOR_GET("editors/3d/navigation_feel/translation_inertia"); //when being manipulated, move more quickly - float manip_orbit_inertia = EDITOR_DEF("editors/3d/navigation_feel/manipulation_orbit_inertia", 0.1); - float manip_translation_inertia = EDITOR_DEF("editors/3d/navigation_feel/manipulation_translation_inertia", 0.1); + float manip_orbit_inertia = EDITOR_GET("editors/3d/navigation_feel/manipulation_orbit_inertia"); + float manip_translation_inertia = EDITOR_GET("editors/3d/navigation_feel/manipulation_translation_inertia"); - float zoom_inertia = EDITOR_DEF("editors/3d/navigation_feel/zoom_inertia", 0.1); + float zoom_inertia = EDITOR_GET("editors/3d/navigation_feel/zoom_inertia"); //determine if being manipulated bool manipulated = (Input::get_singleton()->get_mouse_button_mask() & (2 | 4)) || Input::get_singleton()->is_key_pressed(KEY_SHIFT) || Input::get_singleton()->is_key_pressed(KEY_ALT) || Input::get_singleton()->is_key_pressed(KEY_CONTROL); @@ -104,21 +101,30 @@ void SpatialEditorViewport::_update_camera(float p_interp_delta) { camera_cursor = cursor; } - float tolerance = 0.0001; + float tolerance = 0.001; bool equal = true; - if (Math::abs(old_camera_cursor.x_rot - camera_cursor.x_rot) > tolerance || Math::abs(old_camera_cursor.y_rot - camera_cursor.y_rot) > tolerance) + if (Math::abs(old_camera_cursor.x_rot - camera_cursor.x_rot) > tolerance || Math::abs(old_camera_cursor.y_rot - camera_cursor.y_rot) > tolerance) { equal = false; + } - if (equal && old_camera_cursor.pos.distance_squared_to(camera_cursor.pos) > tolerance * tolerance) + if (equal && old_camera_cursor.pos.distance_squared_to(camera_cursor.pos) > tolerance * tolerance) { equal = false; + } - if (equal && Math::abs(old_camera_cursor.distance - camera_cursor.distance) > tolerance) + if (equal && Math::abs(old_camera_cursor.distance - camera_cursor.distance) > tolerance) { equal = false; + } - if (!equal || p_interp_delta == 0 || is_freelook_active()) { + if (!equal || p_interp_delta == 0 || is_freelook_active() || is_orthogonal != orthogonal) { camera->set_global_transform(to_camera_transform(camera_cursor)); update_transform_gizmo_view(); + + if (orthogonal) { + //camera->set_orthogonal(size.width*cursor.distance,get_znear(),get_zfar()); + camera->set_orthogonal(2 * cursor.distance, 0.1, 8192); + } else + camera->set_perspective(get_fov(), get_znear(), get_zfar()); } } diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index b85ffd6c67..2f2ed7bdf0 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -39,6 +39,14 @@ void TileMapEditor::_notification(int p_what) { switch (p_what) { + case NOTIFICATION_PROCESS: { + + if (bucket_queue.size() && canvas_item_editor) { + canvas_item_editor->update(); + } + + } break; + case NOTIFICATION_ENTER_TREE: { transp->set_icon(get_icon("Transpose", "EditorIcons")); @@ -351,6 +359,10 @@ PoolVector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool era return PoolVector<Vector2>(); } + if (id == prev_id) { + return PoolVector<Vector2>(); + } + Rect2i r = node->get_item_rect(); r.position = r.position / node->get_cell_size(); r.size = r.size / node->get_cell_size(); @@ -378,20 +390,26 @@ PoolVector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool era bucket_cache = PoolVector<Vector2>(); bucket_cache_tile = prev_id; bucket_cache_rect = r; - } else { - return bucket_cache; + bucket_queue.clear(); } } PoolVector<Vector2> points; + int count = 0; + int limit = 0; + + if (preview) { + limit = 1024; + } else { + bucket_queue.clear(); + } - List<Point2i> queue; - queue.push_back(p_start); + bucket_queue.push_back(p_start); - while (queue.size()) { + while (bucket_queue.size()) { - Point2i n = queue.front()->get(); - queue.pop_front(); + Point2i n = bucket_queue.front()->get(); + bucket_queue.pop_front(); if (!r.has_point(n)) continue; @@ -409,10 +427,15 @@ PoolVector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool era points.push_back(n); } - queue.push_back(n + Point2i(0, 1)); - queue.push_back(n + Point2i(0, -1)); - queue.push_back(n + Point2i(1, 0)); - queue.push_back(n + Point2i(-1, 0)); + bucket_queue.push_back(Point2i(n.x, n.y + 1)); + bucket_queue.push_back(Point2i(n.x, n.y - 1)); + bucket_queue.push_back(Point2i(n.x + 1, n.y)); + bucket_queue.push_back(Point2i(n.x - 1, n.y)); + count++; + } + + if (limit > 0 && count >= limit) { + break; } } @@ -1644,6 +1667,7 @@ TileMapEditorPlugin::TileMapEditorPlugin(EditorNode *p_node) { tile_map_editor = memnew(TileMapEditor(p_node)); add_control_to_container(CONTAINER_CANVAS_EDITOR_SIDE, tile_map_editor); tile_map_editor->hide(); + tile_map_editor->set_process(true); } TileMapEditorPlugin::~TileMapEditorPlugin() { diff --git a/editor/plugins/tile_map_editor_plugin.h b/editor/plugins/tile_map_editor_plugin.h index de9b9e8e0d..c8f29dfb7b 100644 --- a/editor/plugins/tile_map_editor_plugin.h +++ b/editor/plugins/tile_map_editor_plugin.h @@ -113,6 +113,7 @@ class TileMapEditor : public VBoxContainer { Rect2i bucket_cache_rect; int bucket_cache_tile; PoolVector<Vector2> bucket_cache; + List<Point2i> bucket_queue; struct CellOp { int idx; diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 04392b0d3c..c679b44342 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -51,9 +51,9 @@ #include "version.h" #include "version_hash.gen.h" -class NewProjectDialog : public ConfirmationDialog { +class ProjectDialog : public ConfirmationDialog { - GDCLASS(NewProjectDialog, ConfirmationDialog); + GDCLASS(ProjectDialog, ConfirmationDialog); public: enum Mode { @@ -64,20 +64,56 @@ public: }; private: + enum MessageType { + MESSAGE_ERROR, + MESSAGE_WARNING, + MESSAGE_SUCCESS + }; + Mode mode; Button *browse; - Label *pp, *pn; - Label *error; + Button *create_dir; + Container *name_container; + Container *path_container; + Label *msg; LineEdit *project_path; LineEdit *project_name; + ToolButton *status_btn; FileDialog *fdialog; String zip_path; String zip_title; AcceptDialog *dialog_error; + String fav_dir; + + String created_folder_path; + + void set_message(const String &p_msg, MessageType p_type = MESSAGE_SUCCESS) { + msg->set_text(p_msg); + if (p_msg == "") { + status_btn->set_icon(get_icon("StatusSuccess", "EditorIcons")); + return; + } + msg->hide(); + switch (p_type) { + case MESSAGE_ERROR: + msg->add_color_override("font_color", get_color("error_color", "Editor")); + status_btn->set_icon(get_icon("StatusError", "EditorIcons")); + msg->show(); + break; + case MESSAGE_WARNING: + msg->add_color_override("font_color", get_color("warning_color", "Editor")); + status_btn->set_icon(get_icon("StatusWarning", "EditorIcons")); + break; + case MESSAGE_SUCCESS: + msg->add_color_override("font_color", get_color("success_color", "Editor")); + status_btn->set_icon(get_icon("StatusSuccess", "EditorIcons")); + break; + } + } String _test_path() { - error->set_text(""); + set_message(" "); get_ok()->set_disabled(true); DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); String valid_path; @@ -88,7 +124,7 @@ private: } if (valid_path == "") { - error->set_text(TTR("Invalid project path, the path must exist!")); + set_message(TTR("The path does not exists."), MESSAGE_ERROR); memdelete(d); return ""; } @@ -97,16 +133,35 @@ private: if (valid_path != "" && !d->file_exists("project.godot")) { - error->set_text(TTR("Invalid project path, project.godot must exist.")); + set_message(TTR("Please choose a 'project.godot' file."), MESSAGE_ERROR); memdelete(d); return ""; } + } else if (mode == MODE_NEW) { + + // check if the specified folder is empty, even though this is not an error, it is good to check here + d->list_dir_begin(); + bool is_empty = true; + String n = d->get_next(); + while (n != String()) { + if (!n.begins_with(".")) { // i dont know if this is enough to guarantee an empty dir + is_empty = false; + break; + } + n = d->get_next(); + } + d->list_dir_end(); + + if (!is_empty) { + set_message(TTR("Your project will be created in a non empty folder (you might want to create a new folder)."), MESSAGE_WARNING); + } + } else { if (d->file_exists("project.godot")) { - error->set_text(TTR("Invalid project path, project.godot must not exist.")); + set_message(TTR("Please choose a folder that does not contain a 'project.godot' file."), MESSAGE_ERROR); memdelete(d); return ""; } @@ -122,16 +177,23 @@ private: String sp = _test_path(); if (sp != "") { - sp = sp.replace("\\", "/"); - int lidx = sp.find_last("/"); + // set the project name to the select folder name + if (project_name->get_text() == "") { + sp = sp.replace("\\", "/"); + int lidx = sp.find_last("/"); - if (lidx != -1) { - sp = sp.substr(lidx + 1, sp.length()); + if (lidx != -1) { + sp = sp.substr(lidx + 1, sp.length()); + } + if (sp == "" && mode == MODE_IMPORT) + sp = TTR("Imported Project"); + + project_name->set_text(sp); } - if (sp == "" && mode == MODE_IMPORT) - sp = TTR("Imported Project"); + } - project_name->set_text(sp); + if (created_folder_path != "" && created_folder_path != p_path) { + _remove_created_folder(); } } @@ -140,13 +202,17 @@ private: String p = p_path; if (mode == MODE_IMPORT) { if (p.ends_with("project.godot")) { - p = p.get_base_dir(); + get_ok()->set_disabled(false); + } else { + set_message(TTR("Please choose a 'project.godot' file."), MESSAGE_ERROR); + get_ok()->set_disabled(true); + return; } } String sp = p.simplify_path(); project_path->set_text(sp); - _path_text_changed(sp); + set_message(TTR(" ")); // just so it does not disappear get_ok()->call_deferred("grab_focus"); } @@ -155,12 +221,13 @@ private: String p = p_path; String sp = p.simplify_path(); project_path->set_text(sp); - _path_text_changed(sp); get_ok()->call_deferred("grab_focus"); } void _browse_path() { + fdialog->set_current_dir(project_path->get_text()); + if (mode == MODE_IMPORT) { fdialog->set_mode(FileDialog::MODE_OPEN_FILE); @@ -172,34 +239,46 @@ private: fdialog->popup_centered_ratio(); } - void _text_changed(const String &p_text) { - _test_path(); - error->set_text(""); - if (p_text == "") { + void _create_folder() { - error->set_text(TTR("Name cannot be empty")); - get_ok()->set_disabled(true); + if (project_name->get_text() == "" || created_folder_path != "") { return; } - get_ok()->set_disabled(false); + + DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); + if (d->change_dir(project_path->get_text()) == OK) { + if (!d->dir_exists(project_name->get_text())) { + if (d->make_dir(project_name->get_text()) == OK) { + d->change_dir(project_name->get_text()); + project_path->set_text(d->get_current_dir()); + created_folder_path = d->get_current_dir(); + create_dir->set_disabled(true); + } + } + } + memdelete(d); } - void _name_changed(const String &p_text) { + void _text_changed(const String &p_text) { + + if (mode != MODE_NEW) + return; + + _test_path(); + + if (p_text == "") + set_message(TTR("It would be a good idea to name your project."), MESSAGE_WARNING); } void ok_pressed() { - String dir = _test_path(); - if (dir == "") { - error->set_text(TTR("Invalid project path (changed anything?).")); - return; - } + String dir = project_path->get_text(); if (mode == MODE_RENAME) { String dir = _test_path(); if (dir == "") { - error->set_text(TTR("Invalid project path (changed anything?).")); + set_message(TTR("Invalid project path (changed anything?)."), MESSAGE_ERROR); return; } @@ -207,13 +286,13 @@ private: current->add_singleton(ProjectSettings::Singleton("Current")); if (current->setup(dir, "")) { - error->set_text(TTR("Couldn't get project.godot in project path.")); + set_message(TTR("Couldn't get project.godot in project path."), MESSAGE_ERROR); } else { ProjectSettings::CustomMap edited_settings; edited_settings["application/config/name"] = project_name->get_text(); if (current->save_custom(dir.plus_file("/project.godot"), edited_settings, Vector<String>(), true)) { - error->set_text(TTR("Couldn't edit project.godot in project path.")); + set_message(TTR("Couldn't edit project.godot in project path."), MESSAGE_ERROR); } } @@ -232,13 +311,13 @@ private: initial_settings["rendering/environment/default_environment"] = "res://default_env.tres"; if (ProjectSettings::get_singleton()->save_custom(dir.plus_file("/project.godot"), initial_settings, Vector<String>(), false)) { - error->set_text(TTR("Couldn't create project.godot in project path.")); + set_message(TTR("Couldn't create project.godot in project path."), MESSAGE_ERROR); } else { ResourceSaver::save(dir.plus_file("/icon.png"), get_icon("DefaultProjectIcon", "EditorIcons")); FileAccess *f = FileAccess::open(dir.plus_file("/default_env.tres"), FileAccess::WRITE); if (!f) { - error->set_text(TTR("Couldn't create project.godot in project path.")); + set_message(TTR("Couldn't create project.godot in project path."), MESSAGE_ERROR); } else { f->store_line("[gd_resource type=\"Environment\" load_steps=2 format=2]"); f->store_line("[sub_resource type=\"ProceduralSky\" id=1]"); @@ -356,14 +435,40 @@ private: } } + void _remove_created_folder() { + + if (created_folder_path != "") { + DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); + d->remove(created_folder_path); + memdelete(d); + + create_dir->set_disabled(false); + created_folder_path = ""; + } + } + + void _toggle_message() { + msg->set_visible(!msg->is_visible()); + } + + void cancel_pressed() { + + _remove_created_folder(); + + project_path->clear(); + project_name->clear(); + } + protected: static void _bind_methods() { - ClassDB::bind_method("_browse_path", &NewProjectDialog::_browse_path); - ClassDB::bind_method("_text_changed", &NewProjectDialog::_text_changed); - ClassDB::bind_method("_path_text_changed", &NewProjectDialog::_path_text_changed); - ClassDB::bind_method("_path_selected", &NewProjectDialog::_path_selected); - ClassDB::bind_method("_file_selected", &NewProjectDialog::_file_selected); + ClassDB::bind_method("_browse_path", &ProjectDialog::_browse_path); + ClassDB::bind_method("_create_folder", &ProjectDialog::_create_folder); + ClassDB::bind_method("_text_changed", &ProjectDialog::_text_changed); + ClassDB::bind_method("_path_text_changed", &ProjectDialog::_path_text_changed); + ClassDB::bind_method("_path_selected", &ProjectDialog::_path_selected); + ClassDB::bind_method("_file_selected", &ProjectDialog::_file_selected); + ClassDB::bind_method("_toggle_message", &ProjectDialog::_toggle_message); ADD_SIGNAL(MethodInfo("project_created")); ADD_SIGNAL(MethodInfo("project_renamed")); } @@ -390,129 +495,129 @@ public: if (mode == MODE_RENAME) { project_path->set_editable(false); - browse->set_disabled(true); + browse->hide(); set_title(TTR("Rename Project")); get_ok()->set_text(TTR("Rename")); - pp->set_text(TTR("Project Path:")); - pn->set_text(TTR("Project Name:")); - pn->show(); - project_name->show(); + name_container->show(); - String dir = _test_path(); - if (dir == "") { - error->set_text(TTR("Invalid project path (changed anything?).")); - return; - } ProjectSettings *current = memnew(ProjectSettings); current->add_singleton(ProjectSettings::Singleton("Current")); - if (current->setup(dir, "")) { - error->set_text(TTR("Couldn't get project.godot in project path.")); - } else { - if (current->has("application/config/name")) { - String appname = current->get("application/config/name"); - project_name->set_text(appname); - } + if (current->setup(project_path->get_text(), "")) { + set_message(TTR("Couldn't get project.godot in the project path."), MESSAGE_ERROR); + } else if (current->has("application/config/name")) { + project_name->set_text(current->get("application/config/name")); } - - popup_centered(Size2(500, 125) * EDSCALE); project_name->grab_focus(); + create_dir->hide(); + status_btn->hide(); + } else { - project_path->clear(); - project_name->clear(); + fav_dir = EditorSettings::get_singleton()->get("filesystem/directories/default_project_path"); + if (fav_dir != "") { + project_path->set_text(fav_dir); + fdialog->set_current_dir(fav_dir); + } else { + DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); + project_path->set_text(d->get_current_dir()); + fdialog->set_current_dir(d->get_current_dir()); + memdelete(d); + } + project_name->set_text(TTR("New Game Project")); + project_path->set_editable(true); browse->set_disabled(false); + browse->show(); + create_dir->show(); + status_btn->show(); if (mode == MODE_IMPORT) { set_title(TTR("Import Existing Project")); get_ok()->set_text(TTR("Import")); - pp->set_text(TTR("Project Path (Must Exist):")); - pn->set_text(TTR("Project Name:")); - pn->hide(); - project_name->hide(); - - popup_centered(Size2(500, 125) * EDSCALE); + name_container->hide(); + project_path->grab_focus(); } else if (mode == MODE_NEW) { set_title(TTR("Create New Project")); get_ok()->set_text(TTR("Create")); - pp->set_text(TTR("Project Path:")); - pn->set_text(TTR("Project Name:")); - pn->show(); - project_name->show(); + name_container->show(); + project_name->grab_focus(); - popup_centered(Size2(500, 145) * EDSCALE); } else if (mode == MODE_INSTALL) { set_title(TTR("Install Project:") + " " + zip_title); get_ok()->set_text(TTR("Install")); - pp->set_text(TTR("Project Path:")); - pn->hide(); - project_name->hide(); - - popup_centered(Size2(500, 125) * EDSCALE); + name_container->hide(); + project_path->grab_focus(); } - project_path->grab_focus(); _test_path(); } + + popup_centered(Size2(500, 125) * EDSCALE); } - NewProjectDialog() { + ProjectDialog() { VBoxContainer *vb = memnew(VBoxContainer); add_child(vb); - //set_child_rect(vb); + + name_container = memnew(VBoxContainer); + vb->add_child(name_container); Label *l = memnew(Label); + l->set_text(TTR("Project Name:")); + name_container->add_child(l); + + HBoxContainer *pnhb = memnew(HBoxContainer); + name_container->add_child(pnhb); + + project_name = memnew(LineEdit); + project_name->set_h_size_flags(SIZE_EXPAND_FILL); + pnhb->add_child(project_name); + + create_dir = memnew(Button); + pnhb->add_child(create_dir); + create_dir->set_text(TTR("Create folder")); + create_dir->connect("pressed", this, "_create_folder"); + + path_container = memnew(VBoxContainer); + vb->add_child(path_container); + + l = memnew(Label); l->set_text(TTR("Project Path:")); - vb->add_child(l); - pp = l; + path_container->add_child(l); - project_path = memnew(LineEdit); - MarginContainer *mc = memnew(MarginContainer); - vb->add_child(mc); HBoxContainer *pphb = memnew(HBoxContainer); - mc->add_child(pphb); - pphb->add_child(project_path); + path_container->add_child(pphb); + + project_path = memnew(LineEdit); project_path->set_h_size_flags(SIZE_EXPAND_FILL); + pphb->add_child(project_path); + + // status button + status_btn = memnew(ToolButton); + status_btn->connect("pressed", this, "_toggle_message"); + pphb->add_child(status_btn); browse = memnew(Button); - pphb->add_child(browse); browse->set_text(TTR("Browse")); browse->connect("pressed", this, "_browse_path"); + pphb->add_child(browse); - l = memnew(Label); - l->set_text(TTR("Project Name:")); - l->set_position(Point2(5, 50)); - vb->add_child(l); - pn = l; - - project_name = memnew(LineEdit); - mc = memnew(MarginContainer); - vb->add_child(mc); - mc->add_child(project_name); - project_name->set_text(TTR("New Game Project")); - - l = memnew(Label); - l->set_text(TTR("That's a BINGO!")); - vb->add_child(l); - error = l; - l->add_color_override("font_color", Color(1, 0.4, 0.3, 0.8)); - l->set_align(Label::ALIGN_CENTER); - - DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); - project_path->set_text(d->get_current_dir()); - memdelete(d); + msg = memnew(Label); + msg->set_text(TTR("That's a BINGO!")); + msg->set_align(Label::ALIGN_CENTER); + msg->hide(); + vb->add_child(msg); fdialog = memnew(FileDialog); - add_child(fdialog); fdialog->set_access(FileDialog::ACCESS_FILESYSTEM); - fdialog->set_current_dir(EditorSettings::get_singleton()->get("filesystem/directories/default_project_path")); + add_child(fdialog); project_name->connect("text_changed", this, "_text_changed"); project_path->connect("text_changed", this, "_path_text_changed"); fdialog->connect("dir_selected", this, "_path_selected"); @@ -564,7 +669,7 @@ void ProjectManager::_panel_draw(Node *p_hb) { hb->draw_line(Point2(0, hb->get_size().y + 1), Point2(hb->get_size().x - 10, hb->get_size().y + 1), get_color("guide_color", "Tree")); if (selected_list.has(hb->get_meta("name"))) { - hb->draw_style_box(gui_base->get_stylebox("selected", "Tree"), Rect2(Point2(), hb->get_size() - Size2(10, 0))); + hb->draw_style_box(gui_base->get_stylebox("selected", "Tree"), Rect2(Point2(), hb->get_size() - Size2(10, 0) * EDSCALE)); } } @@ -1168,13 +1273,13 @@ void ProjectManager::_scan_projects() { void ProjectManager::_new_project() { - npdialog->set_mode(NewProjectDialog::MODE_NEW); + npdialog->set_mode(ProjectDialog::MODE_NEW); npdialog->show_dialog(); } void ProjectManager::_import_project() { - npdialog->set_mode(NewProjectDialog::MODE_IMPORT); + npdialog->set_mode(ProjectDialog::MODE_IMPORT); npdialog->show_dialog(); } @@ -1188,7 +1293,7 @@ void ProjectManager::_rename_project() { const String &selected = E->key(); String path = EditorSettings::get_singleton()->get("projects/" + selected); npdialog->set_project_path(path); - npdialog->set_mode(NewProjectDialog::MODE_RENAME); + npdialog->set_mode(ProjectDialog::MODE_RENAME); npdialog->show_dialog(); } } @@ -1224,7 +1329,7 @@ void ProjectManager::_exit_dialog() { void ProjectManager::_install_project(const String &p_zip_path, const String &p_title) { - npdialog->set_mode(NewProjectDialog::MODE_INSTALL); + npdialog->set_mode(ProjectDialog::MODE_INSTALL); npdialog->set_zip_path(p_zip_path); npdialog->set_zip_title(p_title); npdialog->show_dialog(); @@ -1511,7 +1616,7 @@ ProjectManager::ProjectManager() { OS::get_singleton()->set_low_processor_usage_mode(true); - npdialog = memnew(NewProjectDialog); + npdialog = memnew(ProjectDialog); gui_base->add_child(npdialog); npdialog->connect("project_renamed", this, "_on_project_renamed"); diff --git a/editor/project_manager.h b/editor/project_manager.h index 8a3e7c0457..bfae0b2297 100644 --- a/editor/project_manager.h +++ b/editor/project_manager.h @@ -37,7 +37,7 @@ #include "scene/gui/tool_button.h" #include "scene/gui/tree.h" -class NewProjectDialog; +class ProjectDialog; class ProjectListFilter; class ProjectManager : public Control { @@ -60,7 +60,7 @@ class ProjectManager : public Control { ConfirmationDialog *multi_scan_ask; AcceptDialog *run_error_diag; AcceptDialog *dialog_error; - NewProjectDialog *npdialog; + ProjectDialog *npdialog; ScrollContainer *scroll; VBoxContainer *scroll_childs; Map<String, String> selected_list; // name -> main_scene diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index f78892b2a0..ed90c8c4b2 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -53,6 +53,49 @@ #include "scene/resources/packed_scene.h" #include "scene/scene_string_names.h" +void EditorResourceConversionPlugin::_bind_methods() { + + MethodInfo mi; + mi.name = "_convert"; + mi.return_val.type = Variant::OBJECT; + mi.return_val.class_name = "Resource"; + mi.return_val.hint = PROPERTY_HINT_RESOURCE_TYPE; + mi.return_val.hint_string = "Resource"; + mi.arguments.push_back(mi.return_val); + mi.arguments[0].name = "resource"; + + BIND_VMETHOD(mi) + + mi.name = "_handles"; + mi.return_val = PropertyInfo(Variant::BOOL, ""); + + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_converts_to")); +} + +String EditorResourceConversionPlugin::converts_to() const { + + if (get_script_instance()) + return get_script_instance()->call("_converts_to"); + + return ""; +} + +bool EditorResourceConversionPlugin::handles(const Ref<Resource> &p_resource) const { + + if (get_script_instance()) + return get_script_instance()->call("_handles", p_resource); + + return false; +} + +Ref<Resource> EditorResourceConversionPlugin::convert(const Ref<Resource> &p_resource) { + + if (get_script_instance()) + return get_script_instance()->call("_convert", p_resource); + + return Ref<Resource>(); +} + void CustomPropertyEditor::_notification(int p_what) { if (p_what == NOTIFICATION_DRAW) { @@ -213,6 +256,20 @@ void CustomPropertyEditor::_menu_option(int p_which) { } break; default: { + if (p_which >= CONVERT_BASE_ID) { + + int to_type = p_which - CONVERT_BASE_ID; + + Vector<Ref<EditorResourceConversionPlugin> > conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(RES(v)); + + ERR_FAIL_INDEX(to_type, conversions.size()); + + Ref<Resource> new_res = conversions[to_type]->convert(v); + + v = new_res; + emit_signal("variant_changed"); + break; + } ERR_FAIL_COND(inheritors_array.empty()); String intype = inheritors_array[p_which - TYPE_BASE_ID]; @@ -903,6 +960,27 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: } } + if (!RES(v).is_null()) { + + Vector<Ref<EditorResourceConversionPlugin> > conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(RES(v)); + if (conversions.size()) { + menu->add_separator(); + } + for (int i = 0; i < conversions.size(); i++) { + String what = conversions[i]->converts_to(); + Ref<Texture> icon; + if (has_icon(what, "EditorIcons")) { + + icon = get_icon(what, "EditorIcons"); + } else { + + icon = get_icon(what, "Resource"); + } + + menu->add_icon_item(icon, vformat(TTR("Convert To %s"), what), CONVERT_BASE_ID + i); + } + } + menu->set_position(get_position()); menu->popup(); hide(); @@ -2880,7 +2958,7 @@ void PropertyEditor::update_tree() { item->set_metadata(1, p.name); if (draw_red) - item->set_custom_color(0, Color(0.8, 0.4, 0.20)); + item->set_custom_color(0, get_color("error_color", "Editor")); if (p.name == selected_property) { diff --git a/editor/property_editor.h b/editor/property_editor.h index bfd5ee401e..e69ca8bcd5 100644 --- a/editor/property_editor.h +++ b/editor/property_editor.h @@ -53,6 +53,19 @@ class PropertyValueEvaluator; class CreateDialog; class PropertySelector; +class EditorResourceConversionPlugin : public Reference { + + GDCLASS(EditorResourceConversionPlugin, Reference) + +protected: + static void _bind_methods(); + +public: + virtual String converts_to() const; + virtual bool handles(const Ref<Resource> &p_resource) const; + virtual Ref<Resource> convert(const Ref<Resource> &p_resource); +}; + class CustomPropertyEditor : public Popup { GDCLASS(CustomPropertyEditor, Popup); @@ -68,7 +81,8 @@ class CustomPropertyEditor : public Popup { OBJ_MENU_PASTE = 5, OBJ_MENU_NEW_SCRIPT = 6, OBJ_MENU_SHOW_IN_FILE_SYSTEM = 7, - TYPE_BASE_ID = 100 + TYPE_BASE_ID = 100, + CONVERT_BASE_ID = 1000 }; enum { diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp index dc2c4d8123..8d3eb5974e 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/script_editor_debugger.cpp @@ -1065,7 +1065,7 @@ void ScriptEditorDebugger::start() { int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port"); if (server->listen(remote_port) != OK) { - EditorNode::get_log()->add_message(String("** Error listening on port ") + itos(remote_port) + String(" **")); + EditorNode::get_log()->add_message(String("Error listening on port ") + itos(remote_port), true); return; } set_process(true); diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp index b7801a2004..c90626976d 100644 --- a/editor/settings_config_dialog.cpp +++ b/editor/settings_config_dialog.cpp @@ -334,6 +334,7 @@ EditorSettingsDialog::EditorSettingsDialog() { property_editor->get_property_editor()->set_use_filter(true); property_editor->register_search_box(search_box); property_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL); + property_editor->get_property_editor()->set_undo_redo(EditorNode::get_singleton()->get_undo_redo()); vbc->add_child(property_editor); property_editor->get_property_editor()->connect("property_edited", this, "_settings_property_edited"); |