diff options
Diffstat (limited to 'editor')
184 files changed, 4642 insertions, 3927 deletions
diff --git a/editor/SCsub b/editor/SCsub index 6b18eeae93..87153f3b2b 100644 --- a/editor/SCsub +++ b/editor/SCsub @@ -76,7 +76,7 @@ if env["tools"]: # Editor translations to_include = ( - "ar,bg,bn,ca,cs,de,el,eo,es_AR,es,fi,fr,gl,he,hu,id,it,ja,ko,ms,nb,nl,pl,pt_BR,pt,ro,ru,sk,sv,th,tr,uk,vi,zh_CN,zh_TW" + "ar,bg,bn,ca,cs,de,el,eo,es_AR,es,fi,fr,gl,he,hu,id,it,ja,ko,lv,ms,nb,nl,pl,pt_BR,pt,ro,ru,sk,sv,th,tr,uk,vi,zh_CN,zh_TW" ).split(",") tlist = [env.Dir("#editor/translations").abspath + "/" + f + ".po" for f in to_include] env.Depends("#editor/editor_translations.gen.h", tlist) @@ -87,7 +87,7 @@ if env["tools"]: ) # Documentation translations - to_include = "es,fr,ja,zh_CN".split(",") + to_include = "de,es,fr,ja,zh_CN".split(",") tlist = [env.Dir("#doc/translations").abspath + "/" + f + ".po" for f in to_include] env.Depends("#editor/doc_translations.gen.h", tlist) env.CommandNoCache( diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp index fc7e7389d5..519dd654ef 100644 --- a/editor/action_map_editor.cpp +++ b/editor/action_map_editor.cpp @@ -238,10 +238,16 @@ void InputEventConfigurationDialog::_listen_window_input(const Ref<InputEvent> & Ref<InputEventJoypadButton> joyb = p_event; Ref<InputEventJoypadMotion> joym = p_event; - int type = k.is_valid() ? INPUT_KEY : joyb.is_valid() ? INPUT_JOY_BUTTON : - joym.is_valid() ? INPUT_JOY_MOTION : - mb.is_valid() ? INPUT_MOUSE_BUTTON : - 0; + int type = 0; + if (k.is_valid()) { + type = INPUT_KEY; + } else if (joyb.is_valid()) { + type = INPUT_JOY_BUTTON; + } else if (joym.is_valid()) { + type = INPUT_JOY_MOTION; + } else if (mb.is_valid()) { + type = INPUT_MOUSE_BUTTON; + } if (!(allowed_input_types & type)) { return; diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index a85a4450a6..b15636f775 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -1377,8 +1377,20 @@ void AnimationTimelineEdit::_anim_length_changed(double p_new_len) { void AnimationTimelineEdit::_anim_loop_pressed() { undo_redo->create_action(TTR("Change Animation Loop")); - undo_redo->add_do_method(animation.ptr(), "set_loop", loop->is_pressed()); - undo_redo->add_undo_method(animation.ptr(), "set_loop", animation->has_loop()); + switch (animation->get_loop_mode()) { + case Animation::LoopMode::LOOP_NONE: { + undo_redo->add_do_method(animation.ptr(), "set_loop_mode", Animation::LoopMode::LOOP_LINEAR); + } break; + case Animation::LoopMode::LOOP_LINEAR: { + undo_redo->add_do_method(animation.ptr(), "set_loop_mode", Animation::LoopMode::LOOP_PINGPONG); + } break; + case Animation::LoopMode::LOOP_PINGPONG: { + undo_redo->add_do_method(animation.ptr(), "set_loop_mode", Animation::LoopMode::LOOP_NONE); + } break; + default: + break; + } + undo_redo->add_undo_method(animation.ptr(), "set_loop_mode", animation->get_loop_mode()); undo_redo->commit_action(); } @@ -1664,7 +1676,24 @@ void AnimationTimelineEdit::update_values() { length->set_tooltip(TTR("Animation length (seconds)")); time_icon->set_tooltip(TTR("Animation length (seconds)")); } - loop->set_pressed(animation->has_loop()); + + switch (animation->get_loop_mode()) { + case Animation::LoopMode::LOOP_NONE: { + loop->set_icon(get_theme_icon("Loop", "EditorIcons")); + loop->set_pressed(false); + } break; + case Animation::LoopMode::LOOP_LINEAR: { + loop->set_icon(get_theme_icon("Loop", "EditorIcons")); + loop->set_pressed(true); + } break; + case Animation::LoopMode::LOOP_PINGPONG: { + loop->set_icon(get_theme_icon("PingPongLoop", "EditorIcons")); + loop->set_pressed(true); + } break; + default: + break; + } + editing = false; } @@ -2110,25 +2139,25 @@ void AnimationTrackEdit::_notification(int p_what) { Ref<Texture2D> icon = wrap_icon[loop_wrap ? 1 : 0]; - loop_mode_rect.position.x = ofs; - loop_mode_rect.position.y = int(get_size().height - icon->get_height()) / 2; - loop_mode_rect.size = icon->get_size(); + loop_wrap_rect.position.x = ofs; + loop_wrap_rect.position.y = int(get_size().height - icon->get_height()) / 2; + loop_wrap_rect.size = icon->get_size(); if (!animation->track_is_compressed(track) && (animation->track_get_type(track) == Animation::TYPE_VALUE || animation->track_get_type(track) == Animation::TYPE_BLEND_SHAPE || animation->track_get_type(track) == Animation::TYPE_POSITION_3D || animation->track_get_type(track) == Animation::TYPE_SCALE_3D || animation->track_get_type(track) == Animation::TYPE_ROTATION_3D)) { - draw_texture(icon, loop_mode_rect.position); + draw_texture(icon, loop_wrap_rect.position); } - loop_mode_rect.position.y = 0; - loop_mode_rect.size.y = get_size().height; + loop_wrap_rect.position.y = 0; + loop_wrap_rect.size.y = get_size().height; ofs += icon->get_width() + hsep; - loop_mode_rect.size.x += hsep; + loop_wrap_rect.size.x += hsep; if (!animation->track_is_compressed(track) && (animation->track_get_type(track) == Animation::TYPE_VALUE || animation->track_get_type(track) == Animation::TYPE_BLEND_SHAPE || animation->track_get_type(track) == Animation::TYPE_POSITION_3D || animation->track_get_type(track) == Animation::TYPE_SCALE_3D || animation->track_get_type(track) == Animation::TYPE_ROTATION_3D)) { draw_texture(down_icon, Vector2(ofs, int(get_size().height - down_icon->get_height()) / 2)); - loop_mode_rect.size.x += down_icon->get_width(); + loop_wrap_rect.size.x += down_icon->get_width(); } else { - loop_mode_rect = Rect2(); + loop_wrap_rect = Rect2(); } ofs += down_icon->get_width(); @@ -2478,7 +2507,7 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const { return TTR("Interpolation Mode"); } - if (loop_mode_rect.has_point(p_pos)) { + if (loop_wrap_rect.has_point(p_pos)) { return TTR("Loop Wrap Mode (Interpolate end with beginning on loop)"); } @@ -2681,7 +2710,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) { accept_event(); } - if (loop_mode_rect.has_point(pos)) { + if (loop_wrap_rect.has_point(pos)) { if (!menu) { menu = memnew(PopupMenu); add_child(menu); @@ -2692,7 +2721,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) { menu->add_icon_item(get_theme_icon(SNAME("InterpWrapLoop"), SNAME("EditorIcons")), TTR("Wrap Loop Interp"), MENU_LOOP_WRAP); menu->set_as_minsize(); - Vector2 popup_pos = get_screen_position() + loop_mode_rect.position + Vector2(0, loop_mode_rect.size.height); + Vector2 popup_pos = get_screen_position() + loop_wrap_rect.position + Vector2(0, loop_wrap_rect.size.height); menu->set_position(popup_pos); menu->popup(); accept_event(); diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h index 05cf91de1d..2bdc1d4107 100644 --- a/editor/animation_track_editor.h +++ b/editor/animation_track_editor.h @@ -159,7 +159,7 @@ class AnimationTrackEdit : public Control { Rect2 update_mode_rect; Rect2 interp_mode_rect; - Rect2 loop_mode_rect; + Rect2 loop_wrap_rect; Rect2 remove_rect; Rect2 bezier_edit_rect; @@ -466,6 +466,7 @@ class AnimationTrackEditor : public VBoxContainer { Animation::TrackType track_type = Animation::TrackType::TYPE_ANIMATION; Animation::InterpolationType interp_type = Animation::InterpolationType::INTERPOLATION_CUBIC; Animation::UpdateMode update_mode = Animation::UpdateMode::UPDATE_CAPTURE; + Animation::LoopMode loop_mode = Animation::LoopMode::LOOP_LINEAR; bool loop_wrap = false; bool enabled = false; diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 7bf82fbd1b..1902ae66fb 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -1824,6 +1824,7 @@ CodeTextEditor::CodeTextEditor() { text_editor->set_draw_line_numbers(true); text_editor->set_highlight_matching_braces_enabled(true); text_editor->set_auto_indent_enabled(true); + text_editor->set_deselect_on_focus_loss_enabled(false); status_bar = memnew(HBoxContainer); add_child(status_bar); diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp index 188f5708aa..391839d639 100644 --- a/editor/debugger/editor_debugger_node.cpp +++ b/editor/debugger/editor_debugger_node.cpp @@ -265,15 +265,20 @@ void EditorDebuggerNode::_notification(int p_what) { if (error_count == 0 && warning_count == 0) { debugger_button->set_text(TTR("Debugger")); + debugger_button->remove_theme_color_override("font_color"); debugger_button->set_icon(Ref<Texture2D>()); } else { debugger_button->set_text(TTR("Debugger") + " (" + itos(error_count + warning_count) + ")"); if (error_count >= 1 && warning_count >= 1) { debugger_button->set_icon(get_theme_icon(SNAME("ErrorWarning"), SNAME("EditorIcons"))); + // Use error color to represent the highest level of severity reported. + debugger_button->add_theme_color_override("font_color", get_theme_color(SNAME("error_color"), SNAME("Editor"))); } else if (error_count >= 1) { debugger_button->set_icon(get_theme_icon(SNAME("Error"), SNAME("EditorIcons"))); + debugger_button->add_theme_color_override("font_color", get_theme_color(SNAME("error_color"), SNAME("Editor"))); } else { debugger_button->set_icon(get_theme_icon(SNAME("Warning"), SNAME("EditorIcons"))); + debugger_button->add_theme_color_override("font_color", get_theme_color(SNAME("warning_color"), SNAME("Editor"))); } } last_error_count = error_count; diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp index beead74c53..5ce57e936a 100644 --- a/editor/doc_tools.cpp +++ b/editor/doc_tools.cpp @@ -41,7 +41,7 @@ #include "scene/resources/theme.h" // Used for a hack preserving Mono properties on non-Mono builds. -#include "modules/modules_enabled.gen.h" +#include "modules/modules_enabled.gen.h" // For mono. void DocTools::merge_from(const DocTools &p_data) { for (KeyValue<String, DocData::ClassDoc> &E : class_list) { @@ -57,25 +57,21 @@ void DocTools::merge_from(const DocTools &p_data) { c.brief_description = cf.brief_description; c.tutorials = cf.tutorials; - for (int i = 0; i < c.methods.size(); i++) { - DocData::MethodDoc &m = c.methods.write[i]; + for (int i = 0; i < c.constructors.size(); i++) { + DocData::MethodDoc &m = c.constructors.write[i]; - for (int j = 0; j < cf.methods.size(); j++) { - if (cf.methods[j].name != m.name) { + for (int j = 0; j < cf.constructors.size(); j++) { + if (cf.constructors[j].name != m.name) { continue; } - const char *operator_prefix = "operator "; // Operators use a space at the end, making this prefix an invalid identifier (and differentiating from methods). - - if (cf.methods[j].name == c.name || cf.methods[j].name.begins_with(operator_prefix)) { - // Since constructors and operators can repeat, we need to check the type of + { + // Since constructors can repeat, we need to check the type of // the arguments so we make sure they are different. - - if (cf.methods[j].arguments.size() != m.arguments.size()) { + if (cf.constructors[j].arguments.size() != m.arguments.size()) { continue; } - - int arg_count = cf.methods[j].arguments.size(); + int arg_count = cf.constructors[j].arguments.size(); Vector<bool> arg_used; arg_used.resize(arg_count); for (int l = 0; l < arg_count; ++l) { @@ -85,7 +81,7 @@ void DocTools::merge_from(const DocTools &p_data) { // have to check one by one so we make sure we have an exact match for (int k = 0; k < arg_count; ++k) { for (int l = 0; l < arg_count; ++l) { - if (cf.methods[j].arguments[k].type == m.arguments[l].type && !arg_used[l]) { + if (cf.constructors[j].arguments[k].type == m.arguments[l].type && !arg_used[l]) { arg_used.write[l] = true; break; } @@ -102,6 +98,21 @@ void DocTools::merge_from(const DocTools &p_data) { } } + const DocData::MethodDoc &mf = cf.constructors[j]; + + m.description = mf.description; + break; + } + } + + for (int i = 0; i < c.methods.size(); i++) { + DocData::MethodDoc &m = c.methods.write[i]; + + for (int j = 0; j < cf.methods.size(); j++) { + if (cf.methods[j].name != m.name) { + continue; + } + const DocData::MethodDoc &mf = cf.methods[j]; m.description = mf.description; @@ -165,6 +176,54 @@ void DocTools::merge_from(const DocTools &p_data) { } } + for (int i = 0; i < c.operators.size(); i++) { + DocData::MethodDoc &m = c.operators.write[i]; + + for (int j = 0; j < cf.operators.size(); j++) { + if (cf.operators[j].name != m.name) { + continue; + } + + { + // Since operators can repeat, we need to check the type of + // the arguments so we make sure they are different. + if (cf.operators[j].arguments.size() != m.arguments.size()) { + continue; + } + int arg_count = cf.operators[j].arguments.size(); + Vector<bool> arg_used; + arg_used.resize(arg_count); + for (int l = 0; l < arg_count; ++l) { + arg_used.write[l] = false; + } + // also there is no guarantee that argument ordering will match, so we + // have to check one by one so we make sure we have an exact match + for (int k = 0; k < arg_count; ++k) { + for (int l = 0; l < arg_count; ++l) { + if (cf.operators[j].arguments[k].type == m.arguments[l].type && !arg_used[l]) { + arg_used.write[l] = true; + break; + } + } + } + bool not_the_same = false; + for (int l = 0; l < arg_count; ++l) { + if (!arg_used[l]) { // at least one of the arguments was different + not_the_same = true; + } + } + if (not_the_same) { + continue; + } + } + + const DocData::MethodDoc &mf = cf.operators[j]; + + m.description = mf.description; + break; + } + } + #ifndef MODULE_MONO_ENABLED // The Mono module defines some properties that we want to keep when // re-generating docs with a non-Mono build, to prevent pointless diffs @@ -650,11 +709,6 @@ void DocTools::generate(bool p_basic_types) { DocData::MethodDoc method; method.name = mi.name; - if (method.name == cname) { - method.qualifiers = "constructor"; - } else if (method.name.begins_with("operator")) { - method.qualifiers = "operator"; - } for (int j = 0; j < mi.arguments.size(); j++) { PropertyInfo arginfo = mi.arguments[j]; @@ -694,7 +748,13 @@ void DocTools::generate(bool p_basic_types) { method.qualifiers += "static"; } - c.methods.push_back(method); + if (method.name == cname) { + c.constructors.push_back(method); + } else if (method.name.begins_with("operator")) { + c.operators.push_back(method); + } else { + c.methods.push_back(method); + } } List<PropertyInfo> properties; @@ -916,7 +976,7 @@ static Error _parse_methods(Ref<XMLParser> &parser, Vector<DocData::MethodDoc> & methods.push_back(method); } else { - ERR_FAIL_V_MSG(ERR_FILE_CORRUPT, "Invalid tag in doc file: " + parser->get_node_name() + "."); + ERR_FAIL_V_MSG(ERR_FILE_CORRUPT, "Invalid tag in doc file: " + parser->get_node_name() + ", expected " + element + "."); } } else if (parser->get_node_type() == XMLParser::NODE_ELEMENT_END && parser->get_node_name() == section) { @@ -1044,10 +1104,15 @@ Error DocTools::_load(Ref<XMLParser> parser) { break; // End of <tutorials>. } } + } else if (name2 == "constructors") { + Error err2 = _parse_methods(parser, c.constructors); + ERR_FAIL_COND_V(err2, err2); } else if (name2 == "methods") { Error err2 = _parse_methods(parser, c.methods); ERR_FAIL_COND_V(err2, err2); - + } else if (name2 == "operators") { + Error err2 = _parse_methods(parser, c.operators); + ERR_FAIL_COND_V(err2, err2); } else if (name2 == "signals") { Error err2 = _parse_methods(parser, c.signals); ERR_FAIL_COND_V(err2, err2); @@ -1269,6 +1334,8 @@ Error DocTools::save_classes(const String &p_default_path, const Map<String, Str } _write_string(f, 1, "</tutorials>"); + _write_method_doc(f, "constructor", c.constructors); + _write_method_doc(f, "method", c.methods); if (!c.properties.is_empty()) { @@ -1344,6 +1411,8 @@ Error DocTools::save_classes(const String &p_default_path, const Map<String, Str _write_string(f, 1, "</theme_items>"); } + _write_method_doc(f, "operator", c.operators); + _write_string(f, 0, "</class>"); } diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp index c895e2c158..414264e697 100644 --- a/editor/editor_about.cpp +++ b/editor/editor_about.cpp @@ -155,7 +155,7 @@ EditorAbout::EditorAbout() { Label *about_text = memnew(Label); about_text->set_v_size_flags(Control::SIZE_SHRINK_CENTER); about_text->set_text(String::utf8("\xc2\xa9 2007-2021 Juan Linietsky, Ariel Manzur.\n\xc2\xa9 2014-2021 ") + - TTR("Godot Engine contributors") + "\n"); + TTR("Godot Engine contributors") + "\n"); version_info_vbc->add_child(about_text); hbc->add_child(version_info_vbc); diff --git a/editor/editor_builders.py b/editor/editor_builders.py index ff0daa86ff..67d4b8534f 100644 --- a/editor/editor_builders.py +++ b/editor/editor_builders.py @@ -26,7 +26,9 @@ def make_doc_header(target, source, env): decomp_size = len(buf) import zlib - buf = zlib.compress(buf) + # Use maximum zlib compression level to further reduce file size + # (at the cost of initial build times). + buf = zlib.compress(buf, zlib.Z_BEST_COMPRESSION) g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n") g.write("#ifndef _DOC_DATA_RAW_H\n") @@ -92,7 +94,9 @@ def make_translations_header(target, source, env, category): with open(sorted_paths[i], "rb") as f: buf = f.read() decomp_size = len(buf) - buf = zlib.compress(buf) + # Use maximum zlib compression level to further reduce file size + # (at the cost of initial build times). + buf = zlib.compress(buf, zlib.Z_BEST_COMPRESSION) name = os.path.splitext(os.path.basename(sorted_paths[i]))[0] g.write("static const unsigned char _{}_translation_{}_compressed[] = {{\n".format(category, name)) diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index 2010ee01db..d1dfc61c19 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -1491,13 +1491,16 @@ void EditorExport::add_export_preset(const Ref<EditorExportPreset> &p_preset, in } String EditorExportPlatform::test_etc2() const { + // String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name"); + // bool etc_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc"); + // bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2"); String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name"); bool etc_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc"); bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2"); - if (driver == "GLES2" && !etc_supported) { - return TTR("Target platform requires 'ETC' texture compression for GLES2. Enable 'Import Etc' in Project Settings."); - } else if (driver == "Vulkan" && !etc2_supported) { + if (driver == "opengl3" && !etc_supported) { + return TTR("Target platform requires 'ETC' texture compression for OpenGL. Enable 'Import Etc' in Project Settings."); + } else if (driver == "vulkan" && !etc2_supported) { // FIXME: Review if this is true for Vulkan. return TTR("Target platform requires 'ETC2' texture compression for Vulkan. Enable 'Import Etc 2' in Project Settings."); } @@ -1508,10 +1511,13 @@ String EditorExportPlatform::test_etc2_or_pvrtc() const { String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name"); bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2"); bool pvrtc_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_pvrtc"); + // String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name"); + // bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2"); + // bool pvrtc_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_pvrtc"); - if (driver == "GLES2" && !pvrtc_supported) { - return TTR("Target platform requires 'PVRTC' texture compression for GLES2. Enable 'Import Pvrtc' in Project Settings."); - } else if (driver == "Vulkan" && !etc2_supported && !pvrtc_supported) { + if (driver == "opengl3" && !pvrtc_supported) { + return TTR("Target platform requires 'PVRTC' texture compression for OpenGL. Enable 'Import Pvrtc' in Project Settings."); + } else if (driver == "vulkan" && !etc2_supported && !pvrtc_supported) { // FIXME: Review if this is true for Vulkan. return TTR("Target platform requires 'ETC2' or 'PVRTC' texture compression for Vulkan. Enable 'Import Etc 2' or 'Import Pvrtc' in Project Settings."); } diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index c049db8ef6..43486a09a1 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -330,6 +330,153 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) { return OK; } +void EditorHelp::_update_method_list(const Vector<DocData::MethodDoc> p_methods, bool &r_method_descrpitons) { + Ref<Font> doc_code_font = get_theme_font(SNAME("doc_source"), SNAME("EditorFonts")); + class_desc->pop(); + class_desc->pop(); + + class_desc->add_newline(); + class_desc->push_font(doc_code_font); + class_desc->push_indent(1); + class_desc->push_table(2); + class_desc->set_table_column_expand(1, true); + + bool any_previous = false; + for (int pass = 0; pass < 2; pass++) { + Vector<DocData::MethodDoc> m; + + for (int i = 0; i < p_methods.size(); i++) { + const String &q = p_methods[i].qualifiers; + if ((pass == 0 && q.find("virtual") != -1) || (pass == 1 && q.find("virtual") == -1)) { + m.push_back(p_methods[i]); + } + } + + if (any_previous && !m.is_empty()) { + class_desc->push_cell(); + class_desc->pop(); //cell + class_desc->push_cell(); + class_desc->pop(); //cell + } + + String group_prefix; + for (int i = 0; i < m.size(); i++) { + const String new_prefix = m[i].name.substr(0, 3); + bool is_new_group = false; + + if (i < m.size() - 1 && new_prefix == m[i + 1].name.substr(0, 3) && new_prefix != group_prefix) { + is_new_group = i > 0; + group_prefix = new_prefix; + } else if (group_prefix != "" && new_prefix != group_prefix) { + is_new_group = true; + group_prefix = ""; + } + + if (is_new_group && pass == 1) { + class_desc->push_cell(); + class_desc->pop(); //cell + class_desc->push_cell(); + class_desc->pop(); //cell + } + + if (m[i].description != "" || m[i].errors_returned.size() > 0) { + r_method_descrpitons = true; + } + + _add_method(m[i], true); + } + + any_previous = !m.is_empty(); + } + + class_desc->pop(); //table + class_desc->pop(); + class_desc->pop(); // font + class_desc->add_newline(); + class_desc->add_newline(); +} + +void EditorHelp::_update_method_descriptions(const DocData::ClassDoc p_classdoc, const Vector<DocData::MethodDoc> p_methods, const String &p_method_type) { + Ref<Font> doc_font = get_theme_font(SNAME("doc"), SNAME("EditorFonts")); + Ref<Font> doc_bold_font = get_theme_font(SNAME("doc_bold"), SNAME("EditorFonts")); + Ref<Font> doc_code_font = get_theme_font(SNAME("doc_source"), SNAME("EditorFonts")); + String link_color_text = title_color.to_html(false); + class_desc->pop(); + class_desc->pop(); + + class_desc->add_newline(); + class_desc->add_newline(); + + for (int pass = 0; pass < 2; pass++) { + Vector<DocData::MethodDoc> methods_filtered; + + for (int i = 0; i < p_methods.size(); i++) { + const String &q = p_methods[i].qualifiers; + if ((pass == 0 && q.find("virtual") != -1) || (pass == 1 && q.find("virtual") == -1)) { + methods_filtered.push_back(p_methods[i]); + } + } + + for (int i = 0; i < methods_filtered.size(); i++) { + class_desc->push_font(doc_code_font); + _add_method(methods_filtered[i], false); + class_desc->pop(); + + class_desc->add_newline(); + class_desc->add_newline(); + + class_desc->push_color(text_color); + class_desc->push_font(doc_font); + class_desc->push_indent(1); + if (methods_filtered[i].errors_returned.size()) { + class_desc->append_text(TTR("Error codes returned:")); + class_desc->add_newline(); + class_desc->push_list(0, RichTextLabel::LIST_DOTS, false); + for (int j = 0; j < methods_filtered[i].errors_returned.size(); j++) { + if (j > 0) { + class_desc->add_newline(); + } + int val = methods_filtered[i].errors_returned[j]; + String text = itos(val); + for (int k = 0; k < CoreConstants::get_global_constant_count(); k++) { + if (CoreConstants::get_global_constant_value(k) == val && CoreConstants::get_global_constant_enum(k) == SNAME("Error")) { + text = CoreConstants::get_global_constant_name(k); + break; + } + } + + class_desc->push_bold(); + class_desc->append_text(text); + class_desc->pop(); + } + class_desc->pop(); + class_desc->add_newline(); + class_desc->add_newline(); + } + if (!methods_filtered[i].description.strip_edges().is_empty()) { + _add_text(DTR(methods_filtered[i].description)); + } else { + class_desc->add_image(get_theme_icon(SNAME("Error"), SNAME("EditorIcons"))); + class_desc->add_text(" "); + class_desc->push_color(comment_color); + if (p_classdoc.is_script_doc) { + class_desc->append_text(TTR("There is currently no description for this " + p_method_type + ".")); + } else { + class_desc->append_text(TTR("There is currently no description for this " + p_method_type + ". Please help us by [color=$color][url=$url]contributing one[/url][/color]!").replace("$url", CONTRIBUTE_URL).replace("$color", link_color_text)); + } + class_desc->pop(); + } + + class_desc->pop(); + class_desc->pop(); + class_desc->pop(); + class_desc->add_newline(); + class_desc->add_newline(); + class_desc->add_newline(); + } + } +} + void EditorHelp::_update_doc() { if (!doc->class_list.has(edited_class)) { return; @@ -622,7 +769,9 @@ void EditorHelp::_update_doc() { } // Methods overview - bool method_descr = false; + bool constructor_descriptions = false; + bool method_descriptions = false; + bool operator_descriptions = false; bool sort_methods = EditorSettings::get_singleton()->get("text_editor/help/sort_functions_alphabetically"); Vector<DocData::MethodDoc> methods; @@ -640,81 +789,43 @@ void EditorHelp::_update_doc() { methods.push_back(cd.methods[i]); } - if (methods.size()) { + if (!cd.constructors.is_empty()) { if (sort_methods) { - methods.sort(); + cd.constructors.sort(); } + section_line.push_back(Pair<String, int>(TTR("Constructors"), class_desc->get_line_count() - 2)); + class_desc->push_color(title_color); + class_desc->push_font(doc_title_font); + class_desc->add_text(TTR("Constructors")); + _update_method_list(cd.constructors, constructor_descriptions); + } + + if (!methods.is_empty()) { + if (sort_methods) { + methods.sort(); + } section_line.push_back(Pair<String, int>(TTR("Methods"), class_desc->get_line_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Methods")); - class_desc->pop(); - class_desc->pop(); - - class_desc->add_newline(); - class_desc->push_font(doc_code_font); - class_desc->push_indent(1); - class_desc->push_table(2); - class_desc->set_table_column_expand(1, true); - - bool any_previous = false; - for (int pass = 0; pass < 2; pass++) { - Vector<DocData::MethodDoc> m; - - for (int i = 0; i < methods.size(); i++) { - const String &q = methods[i].qualifiers; - if ((pass == 0 && q.find("virtual") != -1) || (pass == 1 && q.find("virtual") == -1)) { - m.push_back(methods[i]); - } - } - - if (any_previous && !m.is_empty()) { - class_desc->push_cell(); - class_desc->pop(); //cell - class_desc->push_cell(); - class_desc->pop(); //cell - } - - String group_prefix; - for (int i = 0; i < m.size(); i++) { - const String new_prefix = m[i].name.substr(0, 3); - bool is_new_group = false; - - if (i < m.size() - 1 && new_prefix == m[i + 1].name.substr(0, 3) && new_prefix != group_prefix) { - is_new_group = i > 0; - group_prefix = new_prefix; - } else if (group_prefix != "" && new_prefix != group_prefix) { - is_new_group = true; - group_prefix = ""; - } - - if (is_new_group && pass == 1) { - class_desc->push_cell(); - class_desc->pop(); //cell - class_desc->push_cell(); - class_desc->pop(); //cell - } - - if (m[i].description != "" || m[i].errors_returned.size() > 0) { - method_descr = true; - } - - _add_method(m[i], true); - } + _update_method_list(methods, method_descriptions); + } - any_previous = !m.is_empty(); + if (!cd.operators.is_empty()) { + if (sort_methods) { + cd.operators.sort(); } - class_desc->pop(); //table - class_desc->pop(); - class_desc->pop(); // font - class_desc->add_newline(); - class_desc->add_newline(); + section_line.push_back(Pair<String, int>(TTR("Operators"), class_desc->get_line_count() - 2)); + class_desc->push_color(title_color); + class_desc->push_font(doc_title_font); + class_desc->add_text(TTR("Operators")); + _update_method_list(cd.operators, operator_descriptions); } // Theme properties - if (cd.theme_properties.size()) { + if (!cd.theme_properties.is_empty()) { section_line.push_back(Pair<String, int>(TTR("Theme Properties"), class_desc->get_line_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); @@ -775,7 +886,7 @@ void EditorHelp::_update_doc() { } // Signals - if (cd.signals.size()) { + if (!cd.signals.is_empty()) { if (sort_methods) { cd.signals.sort(); } @@ -844,7 +955,7 @@ void EditorHelp::_update_doc() { } // Constants and enums - if (cd.constants.size()) { + if (!cd.constants.is_empty()) { Map<String, Vector<DocData::ConstantDoc>> enums; Vector<DocData::ConstantDoc> constants; @@ -1195,86 +1306,31 @@ void EditorHelp::_update_doc() { } } + // Constructor descriptions + if (constructor_descriptions) { + section_line.push_back(Pair<String, int>(TTR("Constructor Descriptions"), class_desc->get_line_count() - 2)); + class_desc->push_color(title_color); + class_desc->push_font(doc_title_font); + class_desc->add_text(TTR("Constructor Descriptions")); + _update_method_descriptions(cd, cd.constructors, "constructor"); + } + // Method descriptions - if (method_descr) { + if (method_descriptions) { section_line.push_back(Pair<String, int>(TTR("Method Descriptions"), class_desc->get_line_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Method Descriptions")); - class_desc->pop(); - class_desc->pop(); - - class_desc->add_newline(); - class_desc->add_newline(); - - for (int pass = 0; pass < 2; pass++) { - Vector<DocData::MethodDoc> methods_filtered; - - for (int i = 0; i < methods.size(); i++) { - const String &q = methods[i].qualifiers; - if ((pass == 0 && q.find("virtual") != -1) || (pass == 1 && q.find("virtual") == -1)) { - methods_filtered.push_back(methods[i]); - } - } - - for (int i = 0; i < methods_filtered.size(); i++) { - class_desc->push_font(doc_code_font); - _add_method(methods_filtered[i], false); - class_desc->pop(); - - class_desc->add_newline(); - class_desc->add_newline(); - - class_desc->push_color(text_color); - class_desc->push_font(doc_font); - class_desc->push_indent(1); - if (methods_filtered[i].errors_returned.size()) { - class_desc->append_text(TTR("Error codes returned:")); - class_desc->add_newline(); - class_desc->push_list(0, RichTextLabel::LIST_DOTS, false); - for (int j = 0; j < methods_filtered[i].errors_returned.size(); j++) { - if (j > 0) { - class_desc->add_newline(); - } - int val = methods_filtered[i].errors_returned[j]; - String text = itos(val); - for (int k = 0; k < CoreConstants::get_global_constant_count(); k++) { - if (CoreConstants::get_global_constant_value(k) == val && CoreConstants::get_global_constant_enum(k) == SNAME("Error")) { - text = CoreConstants::get_global_constant_name(k); - break; - } - } - - class_desc->push_bold(); - class_desc->append_text(text); - class_desc->pop(); - } - class_desc->pop(); - class_desc->add_newline(); - class_desc->add_newline(); - } - if (!methods_filtered[i].description.strip_edges().is_empty()) { - _add_text(DTR(methods_filtered[i].description)); - } else { - class_desc->add_image(get_theme_icon(SNAME("Error"), SNAME("EditorIcons"))); - class_desc->add_text(" "); - class_desc->push_color(comment_color); - if (cd.is_script_doc) { - class_desc->append_text(TTR("There is currently no description for this method.")); - } else { - class_desc->append_text(TTR("There is currently no description for this method. Please help us by [color=$color][url=$url]contributing one[/url][/color]!").replace("$url", CONTRIBUTE_URL).replace("$color", link_color_text)); - } - class_desc->pop(); - } + _update_method_descriptions(cd, methods, "method"); + } - class_desc->pop(); - class_desc->pop(); - class_desc->pop(); - class_desc->add_newline(); - class_desc->add_newline(); - class_desc->add_newline(); - } - } + // Operator descriptions + if (operator_descriptions) { + section_line.push_back(Pair<String, int>(TTR("Operator Descriptions"), class_desc->get_line_count() - 2)); + class_desc->push_color(title_color); + class_desc->push_font(doc_title_font); + class_desc->add_text(TTR("Operator Descriptions")); + _update_method_descriptions(cd, cd.operators, "operator"); } scroll_locked = false; } @@ -1373,14 +1429,15 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) { bbcode = bbcode.replace("[/gdscript]", "[/codeblock]"); for (int pos = bbcode.find("[csharp]"); pos != -1; pos = bbcode.find("[csharp]")) { - if (bbcode.find("[/csharp]") == -1) { + int end_pos = bbcode.find("[/csharp]"); + if (end_pos == -1) { WARN_PRINT("Unclosed [csharp] block or parse fail in code (search for tag errors)"); break; } - bbcode.erase(pos, bbcode.find("[/csharp]") + 9 - pos); + bbcode = bbcode.left(pos) + bbcode.substr(end_pos + 9); // 9 is length of "[/csharp]". while (bbcode[pos] == '\n') { - bbcode.erase(pos, 1); + bbcode = bbcode.left(pos) + bbcode.substr(pos + 1); } } break; @@ -1389,14 +1446,15 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) { bbcode = bbcode.replace("[/csharp]", "[/codeblock]"); for (int pos = bbcode.find("[gdscript]"); pos != -1; pos = bbcode.find("[gdscript]")) { - if (bbcode.find("[/gdscript]") == -1) { + int end_pos = bbcode.find("[/gdscript]"); + if (end_pos == -1) { WARN_PRINT("Unclosed [gdscript] block or parse fail in code (search for tag errors)"); break; } - bbcode.erase(pos, bbcode.find("[/gdscript]") + 11 - pos); + bbcode = bbcode.left(pos) + bbcode.substr(end_pos + 11); // 11 is length of "[/gdscript]". while (bbcode[pos] == '\n') { - bbcode.erase(pos, 1); + bbcode = bbcode.left(pos) + bbcode.substr(pos + 1); } } break; diff --git a/editor/editor_help.h b/editor/editor_help.h index 46605b6763..c0f3f66505 100644 --- a/editor/editor_help.h +++ b/editor/editor_help.h @@ -152,6 +152,8 @@ class EditorHelp : public VBoxContainer { Error _goto_desc(const String &p_class, int p_vscr = -1); //void _update_history_buttons(); + void _update_method_list(const Vector<DocData::MethodDoc> p_methods, bool &r_method_descrpitons); + void _update_method_descriptions(const DocData::ClassDoc p_classdoc, const Vector<DocData::MethodDoc> p_methods, const String &p_method_type); void _update_doc(); void _request_help(const String &p_string); diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp index e56b10720d..8504745b03 100644 --- a/editor/editor_help_search.cpp +++ b/editor/editor_help_search.cpp @@ -226,7 +226,9 @@ EditorHelpSearch::EditorHelpSearch() { filter_combo->add_item(TTR("Display All"), SEARCH_ALL); filter_combo->add_separator(); filter_combo->add_item(TTR("Classes Only"), SEARCH_CLASSES); + filter_combo->add_item(TTR("Constructors Only"), SEARCH_CONSTRUCTORS); filter_combo->add_item(TTR("Methods Only"), SEARCH_METHODS); + filter_combo->add_item(TTR("Operators Only"), SEARCH_OPERATORS); filter_combo->add_item(TTR("Signals Only"), SEARCH_SIGNALS); filter_combo->add_item(TTR("Constants Only"), SEARCH_CONSTANTS); filter_combo->add_item(TTR("Properties Only"), SEARCH_PROPERTIES); @@ -334,6 +336,17 @@ bool EditorHelpSearch::Runner::_phase_match_classes() { // Match members if the term is long enough. if (term.length() > 1) { + if (search_flags & SEARCH_CONSTRUCTORS) { + for (int i = 0; i < class_doc.constructors.size(); i++) { + String method_name = (search_flags & SEARCH_CASE_SENSITIVE) ? class_doc.constructors[i].name : class_doc.constructors[i].name.to_lower(); + if (method_name.find(term) > -1 || + (term.begins_with(".") && method_name.begins_with(term.substr(1))) || + (term.ends_with("(") && method_name.ends_with(term.left(term.length() - 1).strip_edges())) || + (term.begins_with(".") && term.ends_with("(") && method_name == term.substr(1, term.length() - 2).strip_edges())) { + match.constructors.push_back(const_cast<DocData::MethodDoc *>(&class_doc.constructors[i])); + } + } + } if (search_flags & SEARCH_METHODS) { for (int i = 0; i < class_doc.methods.size(); i++) { String method_name = (search_flags & SEARCH_CASE_SENSITIVE) ? class_doc.methods[i].name : class_doc.methods[i].name.to_lower(); @@ -345,6 +358,17 @@ bool EditorHelpSearch::Runner::_phase_match_classes() { } } } + if (search_flags & SEARCH_OPERATORS) { + for (int i = 0; i < class_doc.operators.size(); i++) { + String method_name = (search_flags & SEARCH_CASE_SENSITIVE) ? class_doc.operators[i].name : class_doc.operators[i].name.to_lower(); + if (method_name.find(term) > -1 || + (term.begins_with(".") && method_name.begins_with(term.substr(1))) || + (term.ends_with("(") && method_name.ends_with(term.left(term.length() - 1).strip_edges())) || + (term.begins_with(".") && term.ends_with("(") && method_name == term.substr(1, term.length() - 2).strip_edges())) { + match.operators.push_back(const_cast<DocData::MethodDoc *>(&class_doc.operators[i])); + } + } + } if (search_flags & SEARCH_SIGNALS) { for (int i = 0; i < class_doc.signals.size(); i++) { if (_match_string(term, class_doc.signals[i].name)) { diff --git a/editor/editor_help_search.h b/editor/editor_help_search.h index bc57c0e3c6..7285f76c01 100644 --- a/editor/editor_help_search.h +++ b/editor/editor_help_search.h @@ -43,12 +43,14 @@ class EditorHelpSearch : public ConfirmationDialog { enum SearchFlags { SEARCH_CLASSES = 1 << 0, - SEARCH_METHODS = 1 << 1, - SEARCH_SIGNALS = 1 << 2, - SEARCH_CONSTANTS = 1 << 3, - SEARCH_PROPERTIES = 1 << 4, - SEARCH_THEME_ITEMS = 1 << 5, - SEARCH_ALL = SEARCH_CLASSES | SEARCH_METHODS | SEARCH_SIGNALS | SEARCH_CONSTANTS | SEARCH_PROPERTIES | SEARCH_THEME_ITEMS, + SEARCH_CONSTRUCTORS = 1 << 1, + SEARCH_METHODS = 1 << 2, + SEARCH_OPERATORS = 1 << 3, + SEARCH_SIGNALS = 1 << 4, + SEARCH_CONSTANTS = 1 << 5, + SEARCH_PROPERTIES = 1 << 6, + SEARCH_THEME_ITEMS = 1 << 7, + SEARCH_ALL = SEARCH_CLASSES | SEARCH_CONSTRUCTORS | SEARCH_METHODS | SEARCH_OPERATORS | SEARCH_SIGNALS | SEARCH_CONSTANTS | SEARCH_PROPERTIES | SEARCH_THEME_ITEMS, SEARCH_CASE_SENSITIVE = 1 << 29, SEARCH_SHOW_HIERARCHY = 1 << 30 }; @@ -99,7 +101,9 @@ class EditorHelpSearch::Runner : public RefCounted { struct ClassMatch { DocData::ClassDoc *doc; bool name = false; + Vector<DocData::MethodDoc *> constructors; Vector<DocData::MethodDoc *> methods; + Vector<DocData::MethodDoc *> operators; Vector<DocData::MethodDoc *> signals; Vector<DocData::ConstantDoc *> constants; Vector<DocData::PropertyDoc *> properties; diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 0bfcd2383f..46cc9336be 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -39,6 +39,7 @@ #include "editor_scale.h" #include "editor_settings.h" #include "multi_node_edit.h" +#include "scene/property_utils.h" #include "scene/resources/packed_scene.h" Size2 EditorProperty::get_minimum_size() const { @@ -305,6 +306,20 @@ void EditorProperty::_notification(int p_what) { revert_rect = Rect2(); } + if (!pin_hidden && pinned) { + Ref<Texture2D> pinned_icon = get_theme_icon(SNAME("Pin"), SNAME("EditorIcons")); + int margin_w = get_theme_constant(SNAME("hseparator"), SNAME("Tree")) * 2; + int total_icon_w = margin_w + pinned_icon->get_width(); + int text_w = font->get_string_size(label, font_size, rtl ? HALIGN_RIGHT : HALIGN_LEFT, text_limit - total_icon_w).x; + int y = (size.height - pinned_icon->get_height()) / 2; + if (rtl) { + draw_texture(pinned_icon, Vector2(size.width - ofs - text_w - total_icon_w, y), color); + } else { + draw_texture(pinned_icon, Vector2(ofs + text_w + margin_w, y), color); + } + text_limit -= total_icon_w; + } + int v_ofs = (size.height - font->get_height(font_size)) / 2; if (rtl) { draw_string(font, Point2(size.width - ofs - text_limit, v_ofs + font->get_ascent(font_size)), label, HALIGN_RIGHT, text_limit, font_size, color); @@ -398,177 +413,12 @@ bool EditorProperty::is_read_only() const { return read_only; } -bool EditorPropertyRevert::may_node_be_in_instance(Node *p_node) { - Node *edited_scene = EditorNode::get_singleton()->get_edited_scene(); - - bool might_be = false; - Node *node = p_node; - - while (node) { - if (node == edited_scene) { - if (node->get_scene_inherited_state().is_valid()) { - might_be = true; - break; - } - might_be = false; - break; - } - if (node->get_scene_instance_state().is_valid()) { - might_be = true; - break; - } - node = node->get_owner(); - } - - return might_be; // or might not be -} - -bool EditorPropertyRevert::get_instantiated_node_original_property(Node *p_node, const StringName &p_prop, Variant &value, bool p_check_class_default) { - Node *node = p_node; - Node *orig = node; - - Node *edited_scene = EditorNode::get_singleton()->get_edited_scene(); - - bool found = false; - - while (node) { - Ref<SceneState> ss; - - if (node == edited_scene) { - ss = node->get_scene_inherited_state(); - - } else { - ss = node->get_scene_instance_state(); - } - - if (ss.is_valid()) { - NodePath np = node->get_path_to(orig); - int node_idx = ss->find_node_by_path(np); - if (node_idx >= 0) { - bool lfound = false; - Variant lvar; - lvar = ss->get_property_value(node_idx, p_prop, lfound); - if (lfound) { - found = true; - value = lvar; - } - } - } - if (node == edited_scene) { - //just in case - break; - } - node = node->get_owner(); - } - - if (p_check_class_default && !found && p_node) { - //if not found, try default class value - Variant attempt = ClassDB::class_get_default_property_value(p_node->get_class_name(), p_prop); - if (attempt.get_type() != Variant::NIL) { - found = true; - value = attempt; - } - } - - return found; -} - -bool EditorPropertyRevert::is_node_property_different(Node *p_node, const Variant &p_current, const Variant &p_orig) { - // this is a pretty difficult function, because a property may not be saved but may have - // the flag to not save if one or if zero - - //make sure there is an actual state - { - Node *node = p_node; - if (!node) { - return false; - } - - Node *edited_scene = EditorNode::get_singleton()->get_edited_scene(); - bool found_state = false; - - while (node) { - Ref<SceneState> ss; - - if (node == edited_scene) { - ss = node->get_scene_inherited_state(); - - } else { - ss = node->get_scene_instance_state(); - } - - if (ss.is_valid()) { - found_state = true; - break; - } - if (node == edited_scene) { - //just in case - break; - } - node = node->get_owner(); - } - - if (!found_state) { - return false; //pointless to check if we are not comparing against anything. - } - } - - return is_property_value_different(p_current, p_orig); -} - -bool EditorPropertyRevert::is_property_value_different(const Variant &p_a, const Variant &p_b) { - if (p_a.get_type() == Variant::FLOAT && p_b.get_type() == Variant::FLOAT) { - //this must be done because, as some scenes save as text, there might be a tiny difference in floats due to numerical error - return !Math::is_equal_approx((float)p_a, (float)p_b); - } else { - return p_a != p_b; - } -} - Variant EditorPropertyRevert::get_property_revert_value(Object *p_object, const StringName &p_property) { - // If the object implements property_can_revert, rely on that completely - // (i.e. don't then try to revert to default value - the property_get_revert implementation - // can do that if so desired) if (p_object->has_method("property_can_revert") && p_object->call("property_can_revert", p_property)) { return p_object->call("property_get_revert", p_property); } - Ref<Script> scr = p_object->get_script(); - Node *node = Object::cast_to<Node>(p_object); - if (node && EditorPropertyRevert::may_node_be_in_instance(node)) { - //if this node is an instance or inherits, but it has a script attached which is unrelated - //to the one set for the parent and also has a default value for the property, consider that - //has precedence over the value from the parent, because that is an explicit source of defaults - //closer in the tree to the current node - bool ignore_parent = false; - if (scr.is_valid()) { - Variant sorig; - if (EditorPropertyRevert::get_instantiated_node_original_property(node, "script", sorig) && !scr->inherits_script(sorig)) { - Variant dummy; - if (scr->get_property_default_value(p_property, dummy)) { - ignore_parent = true; - } - } - } - - if (!ignore_parent) { - //check for difference including instantiation - Variant vorig; - if (EditorPropertyRevert::get_instantiated_node_original_property(node, p_property, vorig, false)) { - return vorig; - } - } - } - - if (scr.is_valid()) { - Variant orig_value; - if (scr->get_property_default_value(p_property, orig_value)) { - return orig_value; - } - } - - //report default class value instead - return ClassDB::class_get_default_property_value(p_object->get_class_name(), p_property); + return PropertyUtils::get_property_default_value(p_object, p_property); } bool EditorPropertyRevert::can_property_revert(Object *p_object, const StringName &p_property) { @@ -577,18 +427,25 @@ bool EditorPropertyRevert::can_property_revert(Object *p_object, const StringNam return false; } Variant current_value = p_object->get(p_property); - return EditorPropertyRevert::is_property_value_different(current_value, revert_value); + return PropertyUtils::is_property_value_different(current_value, revert_value); } -void EditorProperty::update_reload_status() { +void EditorProperty::update_revert_and_pin_status() { if (property == StringName()) { return; //no property, so nothing to do } - bool has_reload = EditorPropertyRevert::can_property_revert(object, property); + bool new_pinned = false; + if (can_pin) { + Node *node = Object::cast_to<Node>(object); + CRASH_COND(!node); + new_pinned = node->is_property_pinned(property); + } + bool new_can_revert = EditorPropertyRevert::can_property_revert(object, property) && !is_read_only(); - if (has_reload != can_revert) { - can_revert = has_reload; + if (new_can_revert != can_revert || new_pinned != pinned) { + can_revert = new_can_revert; + pinned = new_pinned; update(); } } @@ -791,7 +648,7 @@ void EditorProperty::gui_input(const Ref<InputEvent> &p_event) { emit_signal(SNAME("property_checked"), property, checked); } } else if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_RIGHT) { - _ensure_popup(); + _update_popup(); menu->set_position(get_screen_position() + get_local_mouse_position()); menu->set_size(Vector2(1, 1)); menu->popup(); @@ -914,6 +771,56 @@ float EditorProperty::get_name_split_ratio() const { void EditorProperty::set_object_and_property(Object *p_object, const StringName &p_property) { object = p_object; property = p_property; + _update_pin_flags(); +} + +static bool _is_value_potential_override(Node *p_node, const String &p_property) { + // Consider a value is potentially overriding another if either of the following is true: + // a) The node is foreign (inheriting or an instance), so the original value may come from another scene. + // b) The node belongs to the scene, but the original value comes from somewhere but the builtin class (i.e., a script). + Node *edited_scene = EditorNode::get_singleton()->get_edited_scene(); + Vector<SceneState::PackState> states_stack = PropertyUtils::get_node_states_stack(p_node, edited_scene); + if (states_stack.size()) { + return true; + } else { + bool is_class_default = false; + PropertyUtils::get_property_default_value(p_node, p_property, &states_stack, false, nullptr, &is_class_default); + return !is_class_default; + } +} + +void EditorProperty::_update_pin_flags() { + can_pin = false; + pin_hidden = true; + if (read_only) { + return; + } + if (Node *node = Object::cast_to<Node>(object)) { + // Avoid errors down the road by ignoring nodes which are not part of a scene + if (!node->get_owner()) { + bool is_scene_root = false; + for (int i = 0; i < EditorNode::get_singleton()->get_editor_data().get_edited_scene_count(); ++i) { + if (EditorNode::get_singleton()->get_editor_data().get_edited_scene_root(i) == node) { + is_scene_root = true; + break; + } + } + if (!is_scene_root) { + return; + } + } + if (!_is_value_potential_override(node, property)) { + return; + } + pin_hidden = false; + { + Set<StringName> storable_properties; + node->get_storable_properties(storable_properties); + if (storable_properties.has(node->get_property_store_alias(property))) { + can_pin = true; + } + } + } } Control *EditorProperty::make_custom_tooltip(const String &p_text) const { @@ -955,6 +862,10 @@ void EditorProperty::menu_option(int p_option) { case MENU_COPY_PROPERTY_PATH: { DisplayServer::get_singleton()->clipboard_set(property); } break; + case MENU_PIN_VALUE: { + emit_signal(SNAME("property_pinned"), property, !pinned); + update(); + } break; } } @@ -1003,12 +914,14 @@ void EditorProperty::_bind_methods() { ADD_SIGNAL(MethodInfo("property_keyed", PropertyInfo(Variant::STRING_NAME, "property"))); ADD_SIGNAL(MethodInfo("property_deleted", PropertyInfo(Variant::STRING_NAME, "property"))); ADD_SIGNAL(MethodInfo("property_keyed_with_value", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT))); - ADD_SIGNAL(MethodInfo("property_checked", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::STRING, "bool"))); + ADD_SIGNAL(MethodInfo("property_checked", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::BOOL, "checked"))); + ADD_SIGNAL(MethodInfo("property_pinned", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::BOOL, "pinned"))); ADD_SIGNAL(MethodInfo("resource_selected", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource"))); ADD_SIGNAL(MethodInfo("object_id_selected", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::INT, "id"))); ADD_SIGNAL(MethodInfo("selected", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::INT, "focusable_idx"))); GDVIRTUAL_BIND(_update_property) + ClassDB::bind_method(D_METHOD("_update_revert_and_pin_status"), &EditorProperty::update_revert_and_pin_status); } EditorProperty::EditorProperty() { @@ -1027,6 +940,9 @@ EditorProperty::EditorProperty() { revert_hover = false; check_hover = false; can_revert = false; + can_pin = false; + pin_hidden = false; + pinned = false; use_folding = false; property_usage = 0; selected = false; @@ -1038,17 +954,29 @@ EditorProperty::EditorProperty() { set_process_unhandled_key_input(true); } -void EditorProperty::_ensure_popup() { +void EditorProperty::_update_popup() { if (menu) { - return; + menu->clear(); + } else { + menu = memnew(PopupMenu); + add_child(menu); + menu->connect("id_pressed", callable_mp(this, &EditorProperty::menu_option)); } - menu = memnew(PopupMenu); menu->add_shortcut(ED_GET_SHORTCUT("property_editor/copy_property"), MENU_COPY_PROPERTY); menu->add_shortcut(ED_GET_SHORTCUT("property_editor/paste_property"), MENU_PASTE_PROPERTY); menu->add_shortcut(ED_GET_SHORTCUT("property_editor/copy_property_path"), MENU_COPY_PROPERTY_PATH); - menu->connect("id_pressed", callable_mp(this, &EditorProperty::menu_option)); menu->set_item_disabled(MENU_PASTE_PROPERTY, is_read_only()); - add_child(menu); + if (!pin_hidden) { + menu->add_separator(); + if (can_pin) { + menu->add_check_item(TTR("Pin value"), MENU_PIN_VALUE); + menu->set_item_checked(menu->get_item_index(MENU_PIN_VALUE), pinned); + menu->set_item_tooltip(menu->get_item_index(MENU_PIN_VALUE), TTR("Pinning a value forces it to be saved even if it's equal to the default.")); + } else { + menu->add_check_item(vformat(TTR("Pin value [Disabled because '%s' is editor-only]"), property), MENU_PIN_VALUE); + menu->set_item_disabled(menu->get_item_index(MENU_PIN_VALUE), true); + } + } } //////////////////////////////////////////////// @@ -1086,11 +1014,15 @@ bool EditorInspectorPlugin::can_handle(Object *p_object) { } void EditorInspectorPlugin::parse_begin(Object *p_object) { - GDVIRTUAL_CALL(_parse_begin); + GDVIRTUAL_CALL(_parse_begin, p_object); +} + +void EditorInspectorPlugin::parse_category(Object *p_object, const String &p_category) { + GDVIRTUAL_CALL(_parse_category, p_object, p_category); } -void EditorInspectorPlugin::parse_category(Object *p_object, const String &p_parse_category) { - GDVIRTUAL_CALL(_parse_category, p_object, p_parse_category); +void EditorInspectorPlugin::parse_group(Object *p_object, const String &p_group) { + GDVIRTUAL_CALL(_parse_group, p_object, p_group); } bool EditorInspectorPlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) { @@ -1101,8 +1033,8 @@ bool EditorInspectorPlugin::parse_property(Object *p_object, const Variant::Type return false; } -void EditorInspectorPlugin::parse_end() { - GDVIRTUAL_CALL(_parse_end); +void EditorInspectorPlugin::parse_end(Object *p_object) { + GDVIRTUAL_CALL(_parse_end, p_object); } void EditorInspectorPlugin::_bind_methods() { @@ -1111,10 +1043,11 @@ void EditorInspectorPlugin::_bind_methods() { ClassDB::bind_method(D_METHOD("add_property_editor_for_multiple_properties", "label", "properties", "editor"), &EditorInspectorPlugin::add_property_editor_for_multiple_properties); GDVIRTUAL_BIND(_can_handle, "object") - GDVIRTUAL_BIND(_parse_begin) + GDVIRTUAL_BIND(_parse_begin, "object") GDVIRTUAL_BIND(_parse_category, "object", "category") + GDVIRTUAL_BIND(_parse_group, "object", "group") GDVIRTUAL_BIND(_parse_property, "object", "type", "name", "hint_type", "hint_string", "usage_flags", "wide"); - GDVIRTUAL_BIND(_parse_end) + GDVIRTUAL_BIND(_parse_end, "object") } //////////////////////////////////////////////// @@ -2296,6 +2229,7 @@ void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, Ref<Edit ep->connect("property_deleted", callable_mp(this, &EditorInspector::_property_deleted), varray(), CONNECT_DEFERRED); ep->connect("property_keyed_with_value", callable_mp(this, &EditorInspector::_property_keyed_with_value)); ep->connect("property_checked", callable_mp(this, &EditorInspector::_property_checked)); + ep->connect("property_pinned", callable_mp(this, &EditorInspector::_property_pinned)); ep->connect("selected", callable_mp(this, &EditorInspector::_property_selected)); ep->connect("multiple_properties_changed", callable_mp(this, &EditorInspector::_multiple_properties_changed)); ep->connect("resource_selected", callable_mp(this, &EditorInspector::_resource_selected), varray(), CONNECT_DEFERRED); @@ -2324,7 +2258,8 @@ void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, Ref<Edit ep->set_read_only(read_only); ep->update_property(); - ep->update_reload_status(); + ep->_update_pin_flags(); + ep->update_revert_and_pin_status(); ep->set_deletable(deletable_properties); ep->update_cache(); } @@ -2698,6 +2633,12 @@ void EditorInspector::update_tree() { c.a /= level; section->setup(acc_path, component, object, c, use_folding); + // Add editors at the start of a group. + for (Ref<EditorInspectorPlugin> &ped : valid_plugins) { + ped->parse_group(object, path); + _parse_added_editors(section->get_vbox(), ped); + } + vbox_per_path[root_vbox][acc_path] = section->get_vbox(); } @@ -2877,6 +2818,7 @@ void EditorInspector::update_tree() { ep->connect("property_deleted", callable_mp(this, &EditorInspector::_property_deleted), varray(), CONNECT_DEFERRED); ep->connect("property_keyed_with_value", callable_mp(this, &EditorInspector::_property_keyed_with_value)); ep->connect("property_checked", callable_mp(this, &EditorInspector::_property_checked)); + ep->connect("property_pinned", callable_mp(this, &EditorInspector::_property_pinned)); ep->connect("selected", callable_mp(this, &EditorInspector::_property_selected)); ep->connect("multiple_properties_changed", callable_mp(this, &EditorInspector::_multiple_properties_changed)); ep->connect("resource_selected", callable_mp(this, &EditorInspector::_resource_selected), varray(), CONNECT_DEFERRED); @@ -2887,7 +2829,8 @@ void EditorInspector::update_tree() { ep->set_tooltip(property_prefix + p.name); } ep->update_property(); - ep->update_reload_status(); + ep->_update_pin_flags(); + ep->update_revert_and_pin_status(); ep->update_cache(); if (current_selected && ep->property == current_selected) { @@ -2905,7 +2848,7 @@ void EditorInspector::update_tree() { // Get the lists of to add at the end. for (Ref<EditorInspectorPlugin> &ped : valid_plugins) { - ped->parse_end(); + ped->parse_end(object); _parse_added_editors(main_vbox, ped); } } @@ -2917,7 +2860,7 @@ void EditorInspector::update_property(const String &p_prop) { for (EditorProperty *E : editor_property_map[p_prop]) { E->update_property(); - E->update_reload_status(); + E->update_revert_and_pin_status(); E->update_cache(); } } @@ -3204,7 +3147,7 @@ void EditorInspector::_edit_set(const String &p_name, const Variant &p_value, bo if (editor_property_map.has(p_name)) { for (EditorProperty *E : editor_property_map[p_name]) { - E->update_reload_status(); + E->update_revert_and_pin_status(); } } } @@ -3303,7 +3246,7 @@ void EditorInspector::_property_checked(const String &p_path, bool p_checked) { if (editor_property_map.has(p_path)) { for (EditorProperty *E : editor_property_map[p_path]) { E->update_property(); - E->update_reload_status(); + E->update_revert_and_pin_status(); E->update_cache(); } } @@ -3313,6 +3256,35 @@ void EditorInspector::_property_checked(const String &p_path, bool p_checked) { } } +void EditorInspector::_property_pinned(const String &p_path, bool p_pinned) { + if (!object) { + return; + } + + Node *node = Object::cast_to<Node>(object); + ERR_FAIL_COND(!node); + + if (undo_redo) { + undo_redo->create_action(vformat(p_pinned ? TTR("Pinned %s") : TTR("Unpinned %s"), p_path)); + undo_redo->add_do_method(node, "_set_property_pinned", p_path, p_pinned); + undo_redo->add_undo_method(node, "_set_property_pinned", p_path, !p_pinned); + if (editor_property_map.has(p_path)) { + for (List<EditorProperty *>::Element *E = editor_property_map[p_path].front(); E; E = E->next()) { + undo_redo->add_do_method(E->get(), "_update_revert_and_pin_status"); + undo_redo->add_undo_method(E->get(), "_update_revert_and_pin_status"); + } + } + undo_redo->commit_action(); + } else { + node->set_property_pinned(p_path, p_pinned); + if (editor_property_map.has(p_path)) { + for (List<EditorProperty *>::Element *E = editor_property_map[p_path].front(); E; E = E->next()) { + E->get()->update_revert_and_pin_status(); + } + } + } +} + void EditorInspector::_property_selected(const String &p_path, int p_focusable) { property_selected = p_path; property_focusable = p_focusable; @@ -3383,7 +3355,7 @@ void EditorInspector::_notification(int p_what) { for (EditorProperty *E : F.value) { if (!E->is_cache_valid()) { E->update_property(); - E->update_reload_status(); + E->update_revert_and_pin_status(); E->update_cache(); } } @@ -3405,7 +3377,7 @@ void EditorInspector::_notification(int p_what) { if (editor_property_map.has(prop)) { for (EditorProperty *E : editor_property_map[prop]) { E->update_property(); - E->update_reload_status(); + E->update_revert_and_pin_status(); E->update_cache(); } } @@ -3498,7 +3470,7 @@ void EditorInspector::_update_script_class_properties(const Object &p_object, Li String path = s->get_path(); String name = EditorNode::get_editor_data().script_class_get_name(path); if (name.is_empty()) { - if (!path.is_empty() && path.find("::") == -1) { + if (!s->is_built_in()) { name = path.get_file(); } else { name = TTR("Built-in script"); diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h index 124ea31302..f2dfe32f82 100644 --- a/editor/editor_inspector.h +++ b/editor/editor_inspector.h @@ -43,7 +43,6 @@ class UndoRedo; class EditorPropertyRevert { public: - static bool may_node_be_in_instance(Node *p_node); static bool get_instantiated_node_original_property(Node *p_node, const StringName &p_prop, Variant &value, bool p_check_class_default = true); static bool is_node_property_different(Node *p_node, const Variant &p_current, const Variant &p_orig); static bool is_property_value_different(const Variant &p_a, const Variant &p_b); @@ -60,6 +59,7 @@ public: MENU_COPY_PROPERTY, MENU_PASTE_PROPERTY, MENU_COPY_PROPERTY_PATH, + MENU_PIN_VALUE, }; private: @@ -91,11 +91,14 @@ private: bool delete_hover = false; bool can_revert; + bool can_pin; + bool pin_hidden; + bool pinned; bool use_folding; bool draw_top_bg; - void _ensure_popup(); + void _update_popup(); void _focusable_focused(int p_index); bool selectable; @@ -114,6 +117,8 @@ private: Map<StringName, Variant> cache; GDVIRTUAL0(_update_property) + void _update_pin_flags(); + protected: void _notification(int p_what); static void _bind_methods(); @@ -138,7 +143,7 @@ public: StringName get_edited_property(); virtual void update_property(); - void update_reload_status(); + void update_revert_and_pin_status(); virtual bool use_keying_next() const; @@ -210,10 +215,11 @@ protected: static void _bind_methods(); GDVIRTUAL1RC(bool, _can_handle, Variant) - GDVIRTUAL0(_parse_begin) + GDVIRTUAL1(_parse_begin, Object *) GDVIRTUAL2(_parse_category, Object *, String) + GDVIRTUAL2(_parse_group, Object *, String) GDVIRTUAL7R(bool, _parse_property, Object *, int, String, int, String, int, bool) - GDVIRTUAL0(_parse_end) + GDVIRTUAL1(_parse_end, Object *) public: void add_custom_control(Control *control); @@ -222,9 +228,10 @@ public: virtual bool can_handle(Object *p_object); virtual void parse_begin(Object *p_object); - virtual void parse_category(Object *p_object, const String &p_parse_category); + virtual void parse_category(Object *p_object, const String &p_category); + virtual void parse_group(Object *p_object, const String &p_group); virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false); - virtual void parse_end(); + virtual void parse_end(Object *p_object); }; class EditorInspectorCategory : public Control { @@ -459,8 +466,8 @@ class EditorInspector : public ScrollContainer { void _property_keyed(const String &p_path, bool p_advance); void _property_keyed_with_value(const String &p_path, const Variant &p_value, bool p_advance); void _property_deleted(const String &p_path); - void _property_checked(const String &p_path, bool p_checked); + void _property_pinned(const String &p_path, bool p_pinned); void _resource_selected(const String &p_path, RES p_resource); void _property_selected(const String &p_path, int p_focusable); diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp index 251e1c2385..5f2f8e91c9 100644 --- a/editor/editor_log.cpp +++ b/editor/editor_log.cpp @@ -45,9 +45,9 @@ void EditorLog::_error_handler(void *p_self, const char *p_func, const char *p_f String err_str; if (p_errorexp && p_errorexp[0]) { - err_str = p_errorexp; + err_str = String::utf8(p_errorexp); } else { - err_str = String(p_file) + ":" + itos(p_line) + " - " + String(p_error); + err_str = String::utf8(p_file) + ":" + itos(p_line) + " - " + String::utf8(p_error); } if (p_editor_notify) { diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 891705da98..7d550d5c2f 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -144,7 +144,6 @@ #include "editor/plugins/gpu_particles_collision_sdf_editor_plugin.h" #include "editor/plugins/gradient_editor_plugin.h" #include "editor/plugins/input_event_editor_plugin.h" -#include "editor/plugins/item_list_editor_plugin.h" #include "editor/plugins/light_occluder_2d_editor_plugin.h" #include "editor/plugins/lightmap_gi_editor_plugin.h" #include "editor/plugins/line_2d_editor_plugin.h" @@ -175,6 +174,7 @@ #include "editor/plugins/sprite_frames_editor_plugin.h" #include "editor/plugins/style_box_editor_plugin.h" #include "editor/plugins/sub_viewport_preview_editor_plugin.h" +#include "editor/plugins/text_control_editor_plugin.h" #include "editor/plugins/text_editor.h" #include "editor/plugins/texture_3d_editor_plugin.h" #include "editor/plugins/texture_editor_plugin.h" @@ -562,9 +562,9 @@ void EditorNode::_notification(int p_what) { last_checked_version = editor_data.get_undo_redo().get_version(); } - // update the animation frame of the update spinner + // Update the animation frame of the update spinner. uint64_t frame = Engine::get_singleton()->get_frames_drawn(); - uint32_t tick = OS::get_singleton()->get_ticks_msec(); + uint64_t tick = OS::get_singleton()->get_ticks_msec(); if (frame != update_spinner_step_frame && (tick - update_spinner_step_msec) > (1000 / 8)) { update_spinner_step++; @@ -575,7 +575,7 @@ void EditorNode::_notification(int p_what) { update_spinner_step_msec = tick; update_spinner_step_frame = frame + 1; - // update the icon itself only when the spinner is visible + // Update the icon itself only when the spinner is visible. if (EditorSettings::get_singleton()->get("interface/editor/show_update_spinner")) { update_spinner->set_icon(gui_base->get_theme_icon("Progress" + itos(update_spinner_step + 1), SNAME("EditorIcons"))); } @@ -590,6 +590,11 @@ void EditorNode::_notification(int p_what) { settings_changed = false; emit_signal(SNAME("project_settings_changed")); } + + ResourceImporterTexture::get_singleton()->update_imports(); + + // if using a main thread only renderer, we need to update the resource previews + EditorResourcePreview::get_singleton()->update(); } break; case NOTIFICATION_ENTER_TREE: { @@ -1712,8 +1717,10 @@ void EditorNode::_save_scene(String p_file, int idx) { err = ResourceSaver::save(p_file, sdata, flg); - _save_external_resources(); + // This needs to be emitted before saving external resources. + emit_signal(SNAME("scene_saved"), p_file); + _save_external_resources(); editor_data.save_editor_external_data(); for (Ref<AnimatedValuesBackup> &E : anim_backups) { @@ -1787,7 +1794,7 @@ void EditorNode::_save_all_scenes() { } else { _save_scene_with_preview(scene->get_scene_file_path()); } - } else { + } else if (scene->get_scene_file_path() != "") { all_saved = false; } } @@ -2252,7 +2259,8 @@ void EditorNode::_edit_current() { if (main_plugin) { // special case if use of external editor is true - if (main_plugin->get_name() == "Script" && current_obj->get_class_name() != StringName("VisualScript") && (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor")) || overrides_external_editor(current_obj))) { + Resource *res = Object::cast_to<Resource>(current_obj); + if (main_plugin->get_name() == "Script" && current_obj->get_class_name() != StringName("VisualScript") && res && !res->is_built_in() && (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor")) || overrides_external_editor(current_obj))) { if (!changing_scene) { main_plugin->edit(current_obj); } @@ -2904,8 +2912,13 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { OS::get_singleton()->shell_open("https://godotengine.org/donate"); } break; - case SET_VIDEO_DRIVER_SAVE_AND_RESTART: { - ProjectSettings::get_singleton()->set("rendering/driver/driver_name", video_driver_request); + // case SET_VIDEO_DRIVER_SAVE_AND_RESTART: { + // ProjectSettings::get_singleton()->set("rendering/driver/driver_name", video_driver_request); + // save_all_scenes(); + // restart_editor(); + // } break; + case SET_RENDERING_DRIVER_SAVE_AND_RESTART: { + ProjectSettings::get_singleton()->set("rendering/driver/driver_name", rendering_driver_request); ProjectSettings::get_singleton()->save(); save_all_scenes(); @@ -3050,7 +3063,7 @@ void EditorNode::_discard_changes(const String &p_str) { args.push_back(exec.get_base_dir()); args.push_back("--project-manager"); - Error err = OS::get_singleton()->create_process(exec, args); + Error err = OS::get_singleton()->create_instance(args); ERR_FAIL_COND(err); } break; } @@ -3347,7 +3360,7 @@ void EditorNode::set_edited_scene(Node *p_scene) { if (p_scene) { if (p_scene->get_parent() != scene_root) { - scene_root->add_child(p_scene); + scene_root->add_child(p_scene, true); } } } @@ -3479,7 +3492,7 @@ void EditorNode::set_current_scene(int p_idx) { if (new_scene) { if (new_scene->get_parent() != scene_root) { - scene_root->add_child(new_scene); + scene_root->add_child(new_scene, true); } } @@ -3613,7 +3626,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b sdata->set_path(lpath, true); // take over path } - Node *new_scene = sdata->instantiate(PackedScene::GEN_EDIT_STATE_MAIN); + Node *new_scene = sdata->instantiate(p_set_inherited ? PackedScene::GEN_EDIT_STATE_MAIN_INHERITED : PackedScene::GEN_EDIT_STATE_MAIN); if (!new_scene) { sdata.unref(); @@ -4965,9 +4978,9 @@ void EditorNode::_scene_tab_closed(int p_tab, int option) { return; } - bool unsaved = (p_tab == editor_data.get_edited_scene()) ? - saved_version != editor_data.get_undo_redo().get_version() : - editor_data.get_scene_version(p_tab) != 0; + bool unsaved = (p_tab == editor_data.get_edited_scene()) + ? saved_version != editor_data.get_undo_redo().get_version() + : editor_data.get_scene_version(p_tab) != 0; if (unsaved) { save_confirmation->get_ok_button()->set_text(TTR("Save & Close")); save_confirmation->set_text(vformat(TTR("Save changes to '%s' before closing?"), scene->get_scene_file_path() != "" ? scene->get_scene_file_path() : "unsaved scene")); @@ -5411,8 +5424,7 @@ void EditorNode::_global_menu_new_window(const Variant &p_tag) { if (OS::get_singleton()->get_main_loop()) { List<String> args; args.push_back("-p"); - String exec = OS::get_singleton()->get_executable_path(); - OS::get_singleton()->create_process(exec, args); + OS::get_singleton()->create_instance(args); } } @@ -5586,17 +5598,16 @@ void EditorNode::_bottom_panel_raise_toggled(bool p_pressed) { top_split->set_visible(!p_pressed); } -void EditorNode::_update_video_driver_color() { - // TODO: Probably should de-hardcode this and add to editor settings. - if (video_driver->get_text() == "GLES2") { - video_driver->add_theme_color_override("font_color", Color::hex(0x5586a4ff)); - } else if (video_driver->get_text() == "Vulkan") { - video_driver->add_theme_color_override("font_color", theme_base->get_theme_color(SNAME("vulkan_color"), SNAME("Editor"))); +void EditorNode::_update_rendering_driver_color() { + if (rendering_driver->get_text() == "opengl3") { + rendering_driver->add_theme_color_override("font_color", Color::hex(0x5586a4ff)); + } else if (rendering_driver->get_text() == "vulkan") { + rendering_driver->add_theme_color_override("font_color", theme_base->get_theme_color("vulkan_color", "Editor")); } } -void EditorNode::_video_driver_selected(int p_which) { - String driver = video_driver->get_item_metadata(p_which); +void EditorNode::_rendering_driver_selected(int p_which) { + String driver = rendering_driver->get_item_metadata(p_which); String current = ""; // OS::get_singleton()->get_video_driver_name(OS::get_singleton()->get_current_video_driver()); @@ -5604,10 +5615,10 @@ void EditorNode::_video_driver_selected(int p_which) { return; } - video_driver_request = driver; + rendering_driver_request = driver; video_restart_dialog->popup_centered(); - video_driver->select(video_driver_current); - _update_video_driver_color(); + rendering_driver->select(rendering_driver_current); + _update_rendering_driver_color(); } void EditorNode::_resource_saved(RES p_resource, const String &p_path) { @@ -5703,6 +5714,7 @@ void EditorNode::_bind_methods() { ADD_SIGNAL(MethodInfo("request_help_search")); ADD_SIGNAL(MethodInfo("script_add_function_request", PropertyInfo(Variant::OBJECT, "obj"), PropertyInfo(Variant::STRING, "function"), PropertyInfo(Variant::PACKED_STRING_ARRAY, "args"))); ADD_SIGNAL(MethodInfo("resource_saved", PropertyInfo(Variant::OBJECT, "obj"))); + ADD_SIGNAL(MethodInfo("scene_saved", PropertyInfo(Variant::STRING, "path"))); ADD_SIGNAL(MethodInfo("project_settings_changed")); } @@ -6228,7 +6240,7 @@ EditorNode::EditorNode() { scene_tabs->set_drag_to_rearrange_enabled(true); scene_tabs->connect("tab_changed", callable_mp(this, &EditorNode::_scene_tab_changed)); scene_tabs->connect("tab_rmb_clicked", callable_mp(this, &EditorNode::_scene_tab_script_edited)); - scene_tabs->connect("tab_closed", callable_mp(this, &EditorNode::_scene_tab_closed), varray(SCENE_TAB_CLOSE)); + scene_tabs->connect("tab_close_pressed", callable_mp(this, &EditorNode::_scene_tab_closed), varray(SCENE_TAB_CLOSE)); scene_tabs->connect("tab_hovered", callable_mp(this, &EditorNode::_scene_tab_hovered)); scene_tabs->connect("mouse_exited", callable_mp(this, &EditorNode::_scene_tab_exit)); scene_tabs->connect("gui_input", callable_mp(this, &EditorNode::_scene_tab_input)); @@ -6611,40 +6623,50 @@ EditorNode::EditorNode() { HBoxContainer *right_menu_hb = memnew(HBoxContainer); menu_hb->add_child(right_menu_hb); - // Toggle for video driver - video_driver = memnew(OptionButton); - video_driver->set_focus_mode(Control::FOCUS_NONE); - video_driver->connect("item_selected", callable_mp(this, &EditorNode::_video_driver_selected)); - video_driver->add_theme_font_override("font", gui_base->get_theme_font(SNAME("bold"), SNAME("EditorFonts"))); - video_driver->add_theme_font_size_override("font_size", gui_base->get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts"))); - // TODO: Show again when OpenGL is ported. - video_driver->set_visible(false); - right_menu_hb->add_child(video_driver); - -#ifndef _MSC_VER -#warning needs to be reimplemented -#endif -#if 0 - String video_drivers = ProjectSettings::get_singleton()->get_custom_property_info()["rendering/driver/driver_name"].hint_string; - String current_video_driver = OS::get_singleton()->get_video_driver_name(OS::get_singleton()->get_current_video_driver()); - video_driver_current = 0; - for (int i = 0; i < video_drivers.get_slice_count(","); i++) { - String driver = video_drivers.get_slice(",", i); - video_driver->add_item(driver); - video_driver->set_item_metadata(i, driver); + rendering_driver = memnew(OptionButton); + + // Hide the renderer selection dropdown until OpenGL support is more mature. + // The renderer can still be changed in the project settings or using `--rendering-driver opengl3`. + rendering_driver->set_visible(false); + + rendering_driver->set_flat(true); + rendering_driver->set_focus_mode(Control::FOCUS_NONE); + rendering_driver->connect("item_selected", callable_mp(this, &EditorNode::_rendering_driver_selected)); + rendering_driver->add_theme_font_override("font", gui_base->get_theme_font("bold", "EditorFonts")); + rendering_driver->add_theme_font_size_override("font_size", gui_base->get_theme_font_size("bold_size", "EditorFonts")); + + right_menu_hb->add_child(rendering_driver); - if (current_video_driver == driver) { - video_driver->select(i); - video_driver_current = i; + // Only display the render drivers that are available for this display driver. + int display_driver_idx = OS::get_singleton()->get_display_driver_id(); + Vector<String> render_drivers = DisplayServer::get_create_function_rendering_drivers(display_driver_idx); + String current_rendering_driver = OS::get_singleton()->get_current_rendering_driver_name(); + + // As we are doing string comparisons, keep in standard case to prevent problems with capitals + // "vulkan" in particular uses lowercase "v" in the code, and uppercase in the UI. + current_rendering_driver = current_rendering_driver.to_lower(); + + for (int i = 0; i < render_drivers.size(); i++) { + String driver = render_drivers[i]; + + // Add the driver to the UI. + rendering_driver->add_item(driver); + rendering_driver->set_item_metadata(i, driver); + + // Lowercase for standard comparison. + driver = driver.to_lower(); + + if (current_rendering_driver == driver) { + rendering_driver->select(i); + rendering_driver_current = i; } } + _update_rendering_driver_color(); - _update_video_driver_color(); -#endif video_restart_dialog = memnew(ConfirmationDialog); video_restart_dialog->set_text(TTR("Changing the video driver requires restarting the editor.")); video_restart_dialog->get_ok_button()->set_text(TTR("Save & Restart")); - video_restart_dialog->connect("confirmed", callable_mp(this, &EditorNode::_menu_option), varray(SET_VIDEO_DRIVER_SAVE_AND_RESTART)); + video_restart_dialog->connect("confirmed", callable_mp(this, &EditorNode::_menu_option), varray(SET_RENDERING_DRIVER_SAVE_AND_RESTART)); gui_base->add_child(video_restart_dialog); progress_hb = memnew(BackgroundProgress); @@ -6960,7 +6982,6 @@ EditorNode::EditorNode() { add_editor_plugin(memnew(CPUParticles2DEditorPlugin(this))); add_editor_plugin(memnew(CPUParticles3DEditorPlugin(this))); add_editor_plugin(memnew(ResourcePreloaderEditorPlugin(this))); - add_editor_plugin(memnew(ItemListEditorPlugin(this))); add_editor_plugin(memnew(Polygon3DEditorPlugin(this))); add_editor_plugin(memnew(CollisionPolygon2DEditorPlugin(this))); add_editor_plugin(memnew(TilesEditorPlugin(this))); @@ -6993,6 +7014,7 @@ EditorNode::EditorNode() { add_editor_plugin(memnew(GPUParticlesCollisionSDFEditorPlugin(this))); add_editor_plugin(memnew(InputEventEditorPlugin(this))); add_editor_plugin(memnew(SubViewportPreviewEditorPlugin(this))); + add_editor_plugin(memnew(TextControlEditorPlugin(this))); for (int i = 0; i < EditorPlugins::get_plugin_count(); i++) { add_editor_plugin(EditorPlugins::create(i, this)); @@ -7017,6 +7039,10 @@ EditorNode::EditorNode() { spatial_mat_convert.instantiate(); resource_conversion_plugins.push_back(spatial_mat_convert); + Ref<ORMMaterial3DConversionPlugin> orm_mat_convert; + orm_mat_convert.instantiate(); + resource_conversion_plugins.push_back(orm_mat_convert); + Ref<CanvasItemMaterialConversionPlugin> canvas_item_mat_convert; canvas_item_mat_convert.instantiate(); resource_conversion_plugins.push_back(canvas_item_mat_convert); @@ -7037,6 +7063,10 @@ EditorNode::EditorNode() { physical_sky_mat_convert.instantiate(); resource_conversion_plugins.push_back(physical_sky_mat_convert); + Ref<FogMaterialConversionPlugin> fog_mat_convert; + fog_mat_convert.instantiate(); + resource_conversion_plugins.push_back(fog_mat_convert); + Ref<VisualShaderConversionPlugin> vshader_convert; vshader_convert.instantiate(); resource_conversion_plugins.push_back(vshader_convert); @@ -7115,8 +7145,6 @@ EditorNode::EditorNode() { _build_icon_type_cache(); - Node::set_human_readable_collision_renaming(true); - pick_main_scene = memnew(ConfirmationDialog); gui_base->add_child(pick_main_scene); pick_main_scene->get_ok_button()->set_text(TTR("Select")); diff --git a/editor/editor_node.h b/editor/editor_node.h index c64bcc0460..98aa4b697c 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -206,7 +206,7 @@ private: HELP_ABOUT, HELP_SUPPORT_GODOT_DEVELOPMENT, - SET_VIDEO_DRIVER_SAVE_AND_RESTART, + SET_RENDERING_DRIVER_SAVE_AND_RESTART, GLOBAL_NEW_WINDOW, GLOBAL_SCENE, @@ -222,14 +222,14 @@ private: Control *theme_base; Control *gui_base; VBoxContainer *main_vbox; - OptionButton *video_driver; + OptionButton *rendering_driver; ConfirmationDialog *video_restart_dialog; - int video_driver_current; - String video_driver_request; - void _video_driver_selected(int); - void _update_video_driver_color(); + int rendering_driver_current; + String rendering_driver_request; + void _rendering_driver_selected(int); + void _update_rendering_driver_color(); // Split containers @@ -407,7 +407,7 @@ private: bool waiting_for_sources_changed; - uint32_t update_spinner_step_msec; + uint64_t update_spinner_step_msec; uint64_t update_spinner_step_frame; int update_spinner_step; diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 6a36304ba4..a7b8e9c4d0 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -35,6 +35,9 @@ #include "editor_node.h" #include "editor_properties_array_dict.h" #include "editor_scale.h" +#include "scene/2d/gpu_particles_2d.h" +#include "scene/3d/fog_volume.h" +#include "scene/3d/gpu_particles_3d.h" #include "scene/main/window.h" #include "scene/resources/font.h" @@ -2821,8 +2824,8 @@ void EditorPropertyResource::_set_read_only(bool p_read_only) { resource_picker->set_editable(!p_read_only); }; -void EditorPropertyResource::_resource_selected(const RES &p_resource) { - if (use_sub_inspector) { +void EditorPropertyResource::_resource_selected(const RES &p_resource, bool p_edit) { + if (!p_edit && use_sub_inspector) { bool unfold = !get_edited_object()->editor_is_section_unfolded(get_edited_property()); get_edited_object()->editor_set_section_unfold(get_edited_property(), unfold); update_property(); @@ -2969,6 +2972,35 @@ void EditorPropertyResource::_update_property_bg() { update(); } +void EditorPropertyResource::_update_preferred_shader() { + Node *parent = get_parent(); + EditorProperty *parent_property = nullptr; + + while (parent && !parent_property) { + parent_property = Object::cast_to<EditorProperty>(parent); + parent = parent->get_parent(); + } + + if (parent_property) { + EditorShaderPicker *shader_picker = Object::cast_to<EditorShaderPicker>(resource_picker); + Object *object = parent_property->get_edited_object(); + const StringName &property = parent_property->get_edited_property(); + + // Set preferred shader based on edited parent type. + if ((Object::cast_to<GPUParticles2D>(object) || Object::cast_to<GPUParticles3D>(object)) && property == SNAME("process_material")) { + shader_picker->set_preferred_mode(Shader::MODE_PARTICLES); + } else if (Object::cast_to<FogVolume>(object)) { + shader_picker->set_preferred_mode(Shader::MODE_FOG); + } else if (Object::cast_to<CanvasItem>(object)) { + shader_picker->set_preferred_mode(Shader::MODE_CANVAS_ITEM); + } else if (Object::cast_to<Node3D>(object)) { + shader_picker->set_preferred_mode(Shader::MODE_SPATIAL); + } else if (Object::cast_to<Sky>(object)) { + shader_picker->set_preferred_mode(Shader::MODE_SKY); + } + } +} + void EditorPropertyResource::_viewport_selected(const NodePath &p_path) { Node *to_node = get_node(p_path); if (!Object::cast_to<Viewport>(to_node)) { @@ -3000,6 +3032,7 @@ void EditorPropertyResource::setup(Object *p_object, const String &p_path, const EditorShaderPicker *shader_picker = memnew(EditorShaderPicker); shader_picker->set_edited_material(Object::cast_to<ShaderMaterial>(p_object)); resource_picker = shader_picker; + connect(SNAME("ready"), callable_mp(this, &EditorPropertyResource::_update_preferred_shader)); } else { resource_picker = memnew(EditorResourcePicker); } @@ -3137,11 +3170,7 @@ EditorPropertyResource::EditorPropertyResource() { ////////////// DEFAULT PLUGIN ////////////////////// bool EditorInspectorDefaultPlugin::can_handle(Object *p_object) { - return true; //can handle everything -} - -void EditorInspectorDefaultPlugin::parse_begin(Object *p_object) { - //do none + return true; // Can handle everything. } bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) { @@ -3152,10 +3181,6 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, const Varian return false; } -void EditorInspectorDefaultPlugin::parse_end() { - //do none -} - struct EditorPropertyRangeHint { bool angle_in_degrees = false; bool greater = true; @@ -3237,11 +3262,11 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_ return editor; } else if (p_hint == PROPERTY_HINT_LAYERS_2D_PHYSICS || - p_hint == PROPERTY_HINT_LAYERS_2D_RENDER || - p_hint == PROPERTY_HINT_LAYERS_2D_NAVIGATION || - p_hint == PROPERTY_HINT_LAYERS_3D_PHYSICS || - p_hint == PROPERTY_HINT_LAYERS_3D_RENDER || - p_hint == PROPERTY_HINT_LAYERS_3D_NAVIGATION) { + p_hint == PROPERTY_HINT_LAYERS_2D_RENDER || + p_hint == PROPERTY_HINT_LAYERS_2D_NAVIGATION || + p_hint == PROPERTY_HINT_LAYERS_3D_PHYSICS || + p_hint == PROPERTY_HINT_LAYERS_3D_RENDER || + p_hint == PROPERTY_HINT_LAYERS_3D_NAVIGATION) { EditorPropertyLayers::LayerType lt = EditorPropertyLayers::LAYER_RENDER_2D; switch (p_hint) { case PROPERTY_HINT_LAYERS_2D_RENDER: @@ -3336,13 +3361,13 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_ } return editor; } else if (p_hint == PROPERTY_HINT_METHOD_OF_VARIANT_TYPE || - p_hint == PROPERTY_HINT_METHOD_OF_BASE_TYPE || - p_hint == PROPERTY_HINT_METHOD_OF_INSTANCE || - p_hint == PROPERTY_HINT_METHOD_OF_SCRIPT || - p_hint == PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE || - p_hint == PROPERTY_HINT_PROPERTY_OF_BASE_TYPE || - p_hint == PROPERTY_HINT_PROPERTY_OF_INSTANCE || - p_hint == PROPERTY_HINT_PROPERTY_OF_SCRIPT) { + p_hint == PROPERTY_HINT_METHOD_OF_BASE_TYPE || + p_hint == PROPERTY_HINT_METHOD_OF_INSTANCE || + p_hint == PROPERTY_HINT_METHOD_OF_SCRIPT || + p_hint == PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE || + p_hint == PROPERTY_HINT_PROPERTY_OF_BASE_TYPE || + p_hint == PROPERTY_HINT_PROPERTY_OF_INSTANCE || + p_hint == PROPERTY_HINT_PROPERTY_OF_SCRIPT) { EditorPropertyMember *editor = memnew(EditorPropertyMember); EditorPropertyMember::Type type = EditorPropertyMember::MEMBER_METHOD_OF_BASE_TYPE; diff --git a/editor/editor_properties.h b/editor/editor_properties.h index 9a687f1a72..42ef650adc 100644 --- a/editor/editor_properties.h +++ b/editor/editor_properties.h @@ -657,7 +657,7 @@ class EditorPropertyResource : public EditorProperty { bool updating_theme = false; bool opened_editor = false; - void _resource_selected(const RES &p_resource); + void _resource_selected(const RES &p_resource, bool p_edit); void _resource_changed(const RES &p_resource); void _viewport_selected(const NodePath &p_path); @@ -669,6 +669,7 @@ class EditorPropertyResource : public EditorProperty { void _open_editor_pressed(); void _fold_other_editors(Object *p_self); void _update_property_bg(); + void _update_preferred_shader(); protected: virtual void _set_read_only(bool p_read_only) override; @@ -695,9 +696,7 @@ class EditorInspectorDefaultPlugin : public EditorInspectorPlugin { public: virtual bool can_handle(Object *p_object) override; - virtual void parse_begin(Object *p_object) override; virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override; - virtual void parse_end() override; static EditorProperty *get_editor_for_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false); }; diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp index 9b5dc8851c..a3b6f6e59b 100644 --- a/editor/editor_properties_array_dict.cpp +++ b/editor/editor_properties_array_dict.cpp @@ -855,6 +855,7 @@ void EditorPropertyDictionary::update_property() { object->set_dict(dict); VBoxContainer *add_vbox = nullptr; + double default_float_step = EDITOR_GET("interface/inspector/default_float_step"); for (int i = 0; i < amount + 2; i++) { String prop_name; @@ -894,7 +895,7 @@ void EditorPropertyDictionary::update_property() { } break; case Variant::FLOAT: { EditorPropertyFloat *editor = memnew(EditorPropertyFloat); - editor->setup(-100000, 100000, 0.001, true, false, true, true); + editor->setup(-100000, 100000, default_float_step, true, false, true, true); prop = editor; } break; case Variant::STRING: { @@ -905,7 +906,7 @@ void EditorPropertyDictionary::update_property() { // Math types. case Variant::VECTOR2: { EditorPropertyVector2 *editor = memnew(EditorPropertyVector2); - editor->setup(-100000, 100000, 0.001, true); + editor->setup(-100000, 100000, default_float_step, true); prop = editor; } break; @@ -917,7 +918,7 @@ void EditorPropertyDictionary::update_property() { } break; case Variant::RECT2: { EditorPropertyRect2 *editor = memnew(EditorPropertyRect2); - editor->setup(-100000, 100000, 0.001, true); + editor->setup(-100000, 100000, default_float_step, true); prop = editor; } break; @@ -929,7 +930,7 @@ void EditorPropertyDictionary::update_property() { } break; case Variant::VECTOR3: { EditorPropertyVector3 *editor = memnew(EditorPropertyVector3); - editor->setup(-100000, 100000, 0.001, true); + editor->setup(-100000, 100000, default_float_step, true); prop = editor; } break; @@ -941,37 +942,37 @@ void EditorPropertyDictionary::update_property() { } break; case Variant::TRANSFORM2D: { EditorPropertyTransform2D *editor = memnew(EditorPropertyTransform2D); - editor->setup(-100000, 100000, 0.001, true); + editor->setup(-100000, 100000, default_float_step, true); prop = editor; } break; case Variant::PLANE: { EditorPropertyPlane *editor = memnew(EditorPropertyPlane); - editor->setup(-100000, 100000, 0.001, true); + editor->setup(-100000, 100000, default_float_step, true); prop = editor; } break; case Variant::QUATERNION: { EditorPropertyQuaternion *editor = memnew(EditorPropertyQuaternion); - editor->setup(-100000, 100000, 0.001, true); + editor->setup(-100000, 100000, default_float_step, true); prop = editor; } break; case Variant::AABB: { EditorPropertyAABB *editor = memnew(EditorPropertyAABB); - editor->setup(-100000, 100000, 0.001, true); + editor->setup(-100000, 100000, default_float_step, true); prop = editor; } break; case Variant::BASIS: { EditorPropertyBasis *editor = memnew(EditorPropertyBasis); - editor->setup(-100000, 100000, 0.001, true); + editor->setup(-100000, 100000, default_float_step, true); prop = editor; } break; case Variant::TRANSFORM3D: { EditorPropertyTransform3D *editor = memnew(EditorPropertyTransform3D); - editor->setup(-100000, 100000, 0.001, true); + editor->setup(-100000, 100000, default_float_step, true); prop = editor; } break; diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp index 9dbf69a779..4775ca418b 100644 --- a/editor/editor_resource_picker.cpp +++ b/editor/editor_resource_picker.cpp @@ -84,7 +84,7 @@ void EditorResourcePicker::_update_resource_preview(const String &p_path, const if (p_preview.is_valid()) { preview_rect->set_offset(SIDE_LEFT, assign_button->get_icon()->get_width() + assign_button->get_theme_stylebox(SNAME("normal"))->get_default_margin(SIDE_LEFT) + get_theme_constant(SNAME("hseparation"), SNAME("Button"))); - if (type == "GradientTexture") { + if (type == "GradientTexture1D") { preview_rect->set_stretch_mode(TextureRect::STRETCH_SCALE); assign_button->set_custom_minimum_size(Size2(1, 1)); } else { @@ -106,7 +106,7 @@ void EditorResourcePicker::_resource_selected() { return; } - emit_signal(SNAME("resource_selected"), edited_resource); + emit_signal(SNAME("resource_selected"), edited_resource, false); } void EditorResourcePicker::_file_selected(const String &p_path) { @@ -266,7 +266,7 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) { case OBJ_MENU_EDIT: { if (edited_resource.is_valid()) { - emit_signal(SNAME("resource_selected"), edited_resource); + emit_signal(SNAME("resource_selected"), edited_resource, true); } } break; @@ -690,7 +690,7 @@ void EditorResourcePicker::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editable"), "set_editable", "is_editable"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "toggle_mode"), "set_toggle_mode", "is_toggle_mode"); - ADD_SIGNAL(MethodInfo("resource_selected", PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource"))); + ADD_SIGNAL(MethodInfo("resource_selected", PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource"), PropertyInfo(Variant::BOOL, "edit"))); ADD_SIGNAL(MethodInfo("resource_changed", PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource"))); } @@ -934,7 +934,7 @@ bool EditorShaderPicker::handle_menu_selected(int p_which) { switch (p_which) { case OBJ_MENU_NEW_SHADER: { if (material.is_valid()) { - EditorNode::get_singleton()->get_scene_tree_dock()->open_shader_dialog(material); + EditorNode::get_singleton()->get_scene_tree_dock()->open_shader_dialog(material, preferred_mode); return true; } } break; @@ -952,5 +952,9 @@ ShaderMaterial *EditorShaderPicker::get_edited_material() const { return edited_material; } +void EditorShaderPicker::set_preferred_mode(int p_mode) { + preferred_mode = p_mode; +} + EditorShaderPicker::EditorShaderPicker() { } diff --git a/editor/editor_resource_picker.h b/editor/editor_resource_picker.h index d0dad0287b..f55c6f47f3 100644 --- a/editor/editor_resource_picker.h +++ b/editor/editor_resource_picker.h @@ -156,6 +156,7 @@ class EditorShaderPicker : public EditorResourcePicker { }; ShaderMaterial *edited_material = nullptr; + int preferred_mode = -1; public: virtual void set_create_options(Object *p_menu_node) override; @@ -163,6 +164,7 @@ public: void set_edited_material(ShaderMaterial *p_material); ShaderMaterial *get_edited_material() const; + void set_preferred_mode(int p_preferred_mode); EditorShaderPicker(); }; diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp index 8783fe4fc0..e9c0b40268 100644 --- a/editor/editor_resource_preview.cpp +++ b/editor/editor_resource_preview.cpp @@ -210,126 +210,130 @@ void EditorResourcePreview::_generate_preview(Ref<ImageTexture> &r_texture, Ref< } } -void EditorResourcePreview::_thread() { - exited.clear(); - while (!exit.is_set()) { - preview_sem.wait(); - preview_mutex.lock(); - - if (queue.size()) { - QueueItem item = queue.front()->get(); - queue.pop_front(); - - if (cache.has(item.path)) { - //already has it because someone loaded it, just let it know it's ready - String path = item.path; - if (item.resource.is_valid()) { - path += ":" + itos(cache[item.path].last_hash); //keep last hash (see description of what this is in condition below) - } - - _preview_ready(path, cache[item.path].preview, cache[item.path].small_preview, item.id, item.function, item.userdata); - - preview_mutex.unlock(); - } else { - preview_mutex.unlock(); +void EditorResourcePreview::_iterate() { + preview_mutex.lock(); + + if (queue.size()) { + QueueItem item = queue.front()->get(); + queue.pop_front(); + + if (cache.has(item.path)) { + //already has it because someone loaded it, just let it know it's ready + String path = item.path; + if (item.resource.is_valid()) { + path += ":" + itos(cache[item.path].last_hash); //keep last hash (see description of what this is in condition below) + } - Ref<ImageTexture> texture; - Ref<ImageTexture> small_texture; + _preview_ready(path, cache[item.path].preview, cache[item.path].small_preview, item.id, item.function, item.userdata); - int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size"); - thumbnail_size *= EDSCALE; + preview_mutex.unlock(); + } else { + preview_mutex.unlock(); - if (item.resource.is_valid()) { - _generate_preview(texture, small_texture, item, String()); + Ref<ImageTexture> texture; + Ref<ImageTexture> small_texture; - //adding hash to the end of path (should be ID:<objid>:<hash>) because of 5 argument limit to call_deferred - _preview_ready(item.path + ":" + itos(item.resource->hash_edited_version()), texture, small_texture, item.id, item.function, item.userdata); + int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size"); + thumbnail_size *= EDSCALE; - } else { - String temp_path = EditorPaths::get_singleton()->get_cache_dir(); - String cache_base = ProjectSettings::get_singleton()->globalize_path(item.path).md5_text(); - cache_base = temp_path.plus_file("resthumb-" + cache_base); + if (item.resource.is_valid()) { + _generate_preview(texture, small_texture, item, String()); - //does not have it, try to load a cached thumbnail + //adding hash to the end of path (should be ID:<objid>:<hash>) because of 5 argument limit to call_deferred + _preview_ready(item.path + ":" + itos(item.resource->hash_edited_version()), texture, small_texture, item.id, item.function, item.userdata); - String file = cache_base + ".txt"; - FileAccess *f = FileAccess::open(file, FileAccess::READ); - if (!f) { - // No cache found, generate - _generate_preview(texture, small_texture, item, cache_base); - } else { - uint64_t modtime = FileAccess::get_modified_time(item.path); - int tsize = f->get_line().to_int(); - bool has_small_texture = f->get_line().to_int(); - uint64_t last_modtime = f->get_line().to_int(); + } else { + String temp_path = EditorPaths::get_singleton()->get_cache_dir(); + String cache_base = ProjectSettings::get_singleton()->globalize_path(item.path).md5_text(); + cache_base = temp_path.plus_file("resthumb-" + cache_base); - bool cache_valid = true; + //does not have it, try to load a cached thumbnail - if (tsize != thumbnail_size) { + String file = cache_base + ".txt"; + FileAccess *f = FileAccess::open(file, FileAccess::READ); + if (!f) { + // No cache found, generate + _generate_preview(texture, small_texture, item, cache_base); + } else { + uint64_t modtime = FileAccess::get_modified_time(item.path); + int tsize = f->get_line().to_int(); + bool has_small_texture = f->get_line().to_int(); + uint64_t last_modtime = f->get_line().to_int(); + + bool cache_valid = true; + + if (tsize != thumbnail_size) { + cache_valid = false; + memdelete(f); + } else if (last_modtime != modtime) { + String last_md5 = f->get_line(); + String md5 = FileAccess::get_md5(item.path); + memdelete(f); + + if (last_md5 != md5) { cache_valid = false; - memdelete(f); - } else if (last_modtime != modtime) { - String last_md5 = f->get_line(); - String md5 = FileAccess::get_md5(item.path); - memdelete(f); - if (last_md5 != md5) { - cache_valid = false; + } else { + //update modified time + f = FileAccess::open(file, FileAccess::WRITE); + if (!f) { + // Not returning as this would leave the thread hanging and would require + // some proper cleanup/disabling of resource preview generation. + ERR_PRINT("Cannot create file '" + file + "'. Check user write permissions."); } else { - //update modified time - - f = FileAccess::open(file, FileAccess::WRITE); - if (!f) { - // Not returning as this would leave the thread hanging and would require - // some proper cleanup/disabling of resource preview generation. - ERR_PRINT("Cannot create file '" + file + "'. Check user write permissions."); - } else { - f->store_line(itos(thumbnail_size)); - f->store_line(itos(has_small_texture)); - f->store_line(itos(modtime)); - f->store_line(md5); - memdelete(f); - } + f->store_line(itos(thumbnail_size)); + f->store_line(itos(has_small_texture)); + f->store_line(itos(modtime)); + f->store_line(md5); + memdelete(f); } - } else { - memdelete(f); } + } else { + memdelete(f); + } - if (cache_valid) { - Ref<Image> img; - img.instantiate(); - Ref<Image> small_img; - small_img.instantiate(); + if (cache_valid) { + Ref<Image> img; + img.instantiate(); + Ref<Image> small_img; + small_img.instantiate(); - if (img->load(cache_base + ".png") != OK) { - cache_valid = false; - } else { - texture.instantiate(); - texture->create_from_image(img); - - if (has_small_texture) { - if (small_img->load(cache_base + "_small.png") != OK) { - cache_valid = false; - } else { - small_texture.instantiate(); - small_texture->create_from_image(small_img); - } + if (img->load(cache_base + ".png") != OK) { + cache_valid = false; + } else { + texture.instantiate(); + texture->create_from_image(img); + + if (has_small_texture) { + if (small_img->load(cache_base + "_small.png") != OK) { + cache_valid = false; + } else { + small_texture.instantiate(); + small_texture->create_from_image(small_img); } } } + } - if (!cache_valid) { - _generate_preview(texture, small_texture, item, cache_base); - } + if (!cache_valid) { + _generate_preview(texture, small_texture, item, cache_base); } - _preview_ready(item.path, texture, small_texture, item.id, item.function, item.userdata); } + _preview_ready(item.path, texture, small_texture, item.id, item.function, item.userdata); } - - } else { - preview_mutex.unlock(); } + + } else { + preview_mutex.unlock(); + } +} + +void EditorResourcePreview::_thread() { + exited.clear(); + while (!exit.is_set()) { + preview_sem.wait(); + _iterate(); } exited.set(); } @@ -429,8 +433,12 @@ void EditorResourcePreview::check_for_invalidation(const String &p_path) { } void EditorResourcePreview::start() { - ERR_FAIL_COND_MSG(thread.is_started(), "Thread already started."); - thread.start(_thread_func, this); + if (OS::get_singleton()->get_render_main_thread_mode() == OS::RENDER_ANY_THREAD) { + ERR_FAIL_COND_MSG(thread.is_started(), "Thread already started."); + thread.start(_thread_func, this); + } else { + _mainthread_only = true; + } } void EditorResourcePreview::stop() { @@ -453,3 +461,18 @@ EditorResourcePreview::EditorResourcePreview() { EditorResourcePreview::~EditorResourcePreview() { stop(); } + +void EditorResourcePreview::update() { + if (!_mainthread_only) { + return; + } + + if (!exit.is_set()) { + // no need to even lock the mutex if the size is zero + // there is no problem if queue.size() is wrong, even if + // there was a race condition. + if (queue.size()) { + _iterate(); + } + } +} diff --git a/editor/editor_resource_preview.h b/editor/editor_resource_preview.h index ea16c8fde0..9d1f269661 100644 --- a/editor/editor_resource_preview.h +++ b/editor/editor_resource_preview.h @@ -81,6 +81,11 @@ class EditorResourcePreview : public Node { SafeFlag exit; SafeFlag exited; + // when running from GLES, we want to run the previews + // in the main thread using an update, rather than create + // a separate thread + bool _mainthread_only = false; + struct Item { Ref<Texture2D> preview; Ref<Texture2D> small_preview; @@ -98,6 +103,7 @@ class EditorResourcePreview : public Node { static void _thread_func(void *ud); void _thread(); + void _iterate(); Vector<Ref<EditorResourcePreviewGenerator>> preview_generators; @@ -119,6 +125,9 @@ public: void start(); void stop(); + // for single threaded mode + void update(); + EditorResourcePreview(); ~EditorResourcePreview(); }; diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp index 8a7ec9aa82..d7daa0c750 100644 --- a/editor/editor_run.cpp +++ b/editor/editor_run.cpp @@ -236,7 +236,7 @@ Error EditorRun::run(const String &p_scene, const String &p_custom_args, const L int instances = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_instances", 1); for (int i = 0; i < instances; i++) { OS::ProcessID pid = 0; - Error err = OS::get_singleton()->create_process(exec, args, &pid); + Error err = OS::get_singleton()->create_instance(args, &pid); ERR_FAIL_COND_V(err, err); pids.push_back(pid); } diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 1da9213b89..739fc0e4f5 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -293,8 +293,8 @@ void EditorSettings::_get_property_list(List<PropertyInfo> *p_list) const { p_list->push_back(pi); } - p_list->push_back(PropertyInfo(Variant::ARRAY, "shortcuts", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); //do not edit - p_list->push_back(PropertyInfo(Variant::ARRAY, "builtin_action_overrides", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); + p_list->push_back(PropertyInfo(Variant::ARRAY, "shortcuts", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL)); //do not edit + p_list->push_back(PropertyInfo(Variant::ARRAY, "builtin_action_overrides", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL)); } void EditorSettings::_add_property_info_bind(const Dictionary &p_info) { diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp index ec90af1bcc..82b5ec5ca1 100644 --- a/editor/editor_spin_slider.cpp +++ b/editor/editor_spin_slider.cpp @@ -225,7 +225,8 @@ void EditorSpinSlider::_value_input_gui_input(const Ref<InputEvent> &p_event) { set_value(last_value + real_step); } - value_input->set_text(get_text_value()); + value_input_dirty = true; + set_process_internal(true); } break; case KEY_DOWN: { _evaluate_input_text(); @@ -238,7 +239,8 @@ void EditorSpinSlider::_value_input_gui_input(const Ref<InputEvent> &p_event) { set_value(last_value - real_step); } - value_input->set_text(get_text_value()); + value_input_dirty = true; + set_process_internal(true); } break; } } @@ -424,6 +426,14 @@ void EditorSpinSlider::_notification(int p_what) { _update_value_input_stylebox(); break; + case NOTIFICATION_INTERNAL_PROCESS: + if (value_input_dirty) { + value_input_dirty = false; + value_input->set_text(get_text_value()); + } + set_process_internal(false); + break; + case NOTIFICATION_DRAW: _draw_spin_slider(); break; diff --git a/editor/editor_spin_slider.h b/editor/editor_spin_slider.h index 7e10764491..68448b3240 100644 --- a/editor/editor_spin_slider.h +++ b/editor/editor_spin_slider.h @@ -66,6 +66,7 @@ class EditorSpinSlider : public Range { Popup *value_input_popup = nullptr; LineEdit *value_input = nullptr; bool value_input_just_closed = false; + bool value_input_dirty = false; void _grabber_gui_input(const Ref<InputEvent> &p_event); void _value_input_closed(); diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index fdcc0438ae..637394d136 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -36,7 +36,7 @@ #include "editor_scale.h" #include "editor_settings.h" -#include "modules/modules_enabled.gen.h" +#include "modules/modules_enabled.gen.h" // For svg. #ifdef MODULE_SVG_ENABLED #include "modules/svg/image_loader_svg.h" #endif @@ -384,6 +384,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { const Color font_color = mono_color.lerp(base_color, 0.25); const Color font_hover_color = mono_color.lerp(base_color, 0.125); + const Color font_focus_color = mono_color.lerp(base_color, 0.125); const Color font_disabled_color = Color(mono_color.r, mono_color.g, mono_color.b, 0.3); const Color font_readonly_color = Color(mono_color.r, mono_color.g, mono_color.b, 0.65); const Color selection_color = accent_color * Color(1, 1, 1, 0.4); @@ -392,6 +393,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { Color icon_hover_color = Color(1, 1, 1) * (dark_theme ? 1.15 : 1.45); icon_hover_color.a = 1.0; + Color icon_focus_color = icon_hover_color; // Make the pressed icon color overbright because icons are not completely white on a dark theme. // On a light theme, icons are dark, so we need to modulate them with an even brighter color. Color icon_pressed_color = accent_color * (dark_theme ? 1.15 : 3.5); @@ -625,6 +627,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("font_color", "MenuButton", font_color); theme->set_color("font_hover_color", "MenuButton", font_hover_color); + theme->set_color("font_focus_color", "MenuButton", font_focus_color); theme->set_stylebox("MenuHover", "EditorStyles", style_widget_hover); @@ -637,9 +640,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("font_color", "Button", font_color); theme->set_color("font_hover_color", "Button", font_hover_color); + theme->set_color("font_focus_color", "Button", font_focus_color); theme->set_color("font_pressed_color", "Button", accent_color); theme->set_color("font_disabled_color", "Button", font_disabled_color); theme->set_color("icon_hover_color", "Button", icon_hover_color); + theme->set_color("icon_focus_color", "Button", icon_focus_color); theme->set_color("icon_pressed_color", "Button", icon_pressed_color); // OptionButton @@ -657,9 +662,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("font_color", "OptionButton", font_color); theme->set_color("font_hover_color", "OptionButton", font_hover_color); + theme->set_color("font_focus_color", "OptionButton", font_focus_color); theme->set_color("font_pressed_color", "OptionButton", accent_color); theme->set_color("font_disabled_color", "OptionButton", font_disabled_color); theme->set_color("icon_hover_color", "OptionButton", icon_hover_color); + theme->set_color("icon_focus_color", "OptionButton", icon_focus_color); theme->set_icon("arrow", "OptionButton", theme->get_icon("GuiOptionArrow", "EditorIcons")); theme->set_constant("arrow_margin", "OptionButton", widget_default_margin.x - 2 * EDSCALE); theme->set_constant("modulate_arrow", "OptionButton", true); @@ -683,9 +690,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("font_color", "CheckButton", font_color); theme->set_color("font_hover_color", "CheckButton", font_hover_color); + theme->set_color("font_focus_color", "CheckButton", font_focus_color); theme->set_color("font_pressed_color", "CheckButton", accent_color); theme->set_color("font_disabled_color", "CheckButton", font_disabled_color); theme->set_color("icon_hover_color", "CheckButton", icon_hover_color); + theme->set_color("icon_focus_color", "CheckButton", icon_focus_color); theme->set_constant("hseparation", "CheckButton", 8 * EDSCALE); theme->set_constant("check_vadjust", "CheckButton", 0 * EDSCALE); @@ -712,9 +721,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("font_color", "CheckBox", font_color); theme->set_color("font_hover_color", "CheckBox", font_hover_color); + theme->set_color("font_focus_color", "CheckBox", font_focus_color); theme->set_color("font_pressed_color", "CheckBox", accent_color); theme->set_color("font_disabled_color", "CheckBox", font_disabled_color); theme->set_color("icon_hover_color", "CheckBox", icon_hover_color); + theme->set_color("icon_focus_color", "CheckBox", icon_focus_color); theme->set_constant("hseparation", "CheckBox", 8 * EDSCALE); theme->set_constant("check_vadjust", "CheckBox", 0 * EDSCALE); @@ -1196,7 +1207,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("font_shadow_color", "RichTextLabel", Color(0, 0, 0, 0)); theme->set_constant("shadow_offset_x", "RichTextLabel", 1 * EDSCALE); theme->set_constant("shadow_offset_y", "RichTextLabel", 1 * EDSCALE); - theme->set_constant("shadow_as_outline", "RichTextLabel", 0 * EDSCALE); + theme->set_constant("shadow_outline_size", "RichTextLabel", 1 * EDSCALE); theme->set_stylebox("focus", "RichTextLabel", make_empty_stylebox()); theme->set_stylebox("normal", "RichTextLabel", style_tree_bg); @@ -1212,13 +1223,14 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("font_shadow_color", "Label", Color(0, 0, 0, 0)); theme->set_constant("shadow_offset_x", "Label", 1 * EDSCALE); theme->set_constant("shadow_offset_y", "Label", 1 * EDSCALE); - theme->set_constant("shadow_as_outline", "Label", 0 * EDSCALE); + theme->set_constant("shadow_outline_size", "Label", 1 * EDSCALE); theme->set_constant("line_spacing", "Label", 3 * EDSCALE); // LinkButton theme->set_stylebox("focus", "LinkButton", style_empty); theme->set_color("font_color", "LinkButton", font_color); theme->set_color("font_hover_color", "LinkButton", font_hover_color); + theme->set_color("font_focus_color", "LinkButton", font_focus_color); theme->set_color("font_pressed_color", "LinkButton", accent_color); theme->set_color("font_disabled_color", "LinkButton", font_disabled_color); diff --git a/editor/editor_toaster.cpp b/editor/editor_toaster.cpp index 9de0ea40fe..0d9a546b8e 100644 --- a/editor/editor_toaster.cpp +++ b/editor/editor_toaster.cpp @@ -158,11 +158,11 @@ void EditorToaster::_error_handler(void *p_self, const char *p_func, const char if (p_editor_notify || (show_all_setting == 0 && in_dev) || show_all_setting == 1) { String err_str; if (p_errorexp && p_errorexp[0]) { - err_str = p_errorexp; + err_str = String::utf8(p_errorexp); } else { - err_str = String(p_error); + err_str = String::utf8(p_error); } - String tooltip_str = String(p_file) + ":" + itos(p_line); + String tooltip_str = String::utf8(p_file) + ":" + itos(p_line); if (!p_editor_notify) { if (p_type == ERR_HANDLER_WARNING) { @@ -172,10 +172,11 @@ void EditorToaster::_error_handler(void *p_self, const char *p_func, const char } } - if (p_type == ERR_HANDLER_WARNING) { - EditorToaster::get_singleton()->popup_str(err_str, SEVERITY_WARNING, tooltip_str); + Severity severity = (p_type == ERR_HANDLER_WARNING) ? SEVERITY_WARNING : SEVERITY_ERROR; + if (Thread::get_caller_id() != Thread::get_main_id()) { + EditorToaster::get_singleton()->call_deferred(SNAME("popup_str"), err_str, severity, tooltip_str); } else { - EditorToaster::get_singleton()->popup_str(err_str, SEVERITY_ERROR, tooltip_str); + EditorToaster::get_singleton()->popup_str(err_str, severity, tooltip_str); } } } diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index cdf0f6e391..f2a3aa3b44 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -1371,7 +1371,7 @@ void FileSystemDock::_make_dir_confirm() { EditorNode::get_singleton()->show_warning(TTR("No name provided.")); return; } else if (dir_name.find("/") != -1 || dir_name.find("\\") != -1 || dir_name.find(":") != -1 || dir_name.find("*") != -1 || - dir_name.find("|") != -1 || dir_name.find(">") != -1 || dir_name.ends_with(".") || dir_name.ends_with(" ")) { + dir_name.find("|") != -1 || dir_name.find(">") != -1 || dir_name.ends_with(".") || dir_name.ends_with(" ")) { EditorNode::get_singleton()->show_warning(TTR("Provided name contains invalid characters.")); return; } diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp index 283496c0f1..56356ff25b 100644 --- a/editor/find_in_files.cpp +++ b/editor/find_in_files.cpp @@ -47,13 +47,13 @@ const char *FindInFiles::SIGNAL_RESULT_FOUND = "result_found"; const char *FindInFiles::SIGNAL_FINISHED = "finished"; -// TODO Would be nice in Vector and Vectors +// TODO: Would be nice in Vector and Vectors. template <typename T> inline void pop_back(T &container) { container.resize(container.size() - 1); } -// TODO Copied from TextEdit private, would be nice to extract it in a single place +// TODO: Copied from TextEdit private, would be nice to extract it in a single place. static bool is_text_char(char32_t c) { return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_'; } @@ -125,7 +125,7 @@ void FindInFiles::start() { return; } - // Init search + // Init search. _current_dir = ""; PackedStringArray init_folder; init_folder.push_back(_root_dir); @@ -145,14 +145,14 @@ void FindInFiles::stop() { } void FindInFiles::_process() { - // This part can be moved to a thread if needed + // This part can be moved to a thread if needed. OS &os = *OS::get_singleton(); - float time_before = os.get_ticks_msec(); + uint64_t time_before = os.get_ticks_msec(); while (is_processing()) { _iterate(); - float elapsed = (os.get_ticks_msec() - time_before); - if (elapsed > 1000.0 / 120.0) { + uint64_t elapsed = (os.get_ticks_msec() - time_before); + if (elapsed > 8) { // Process again after waiting 8 ticks. break; } } @@ -160,12 +160,12 @@ void FindInFiles::_process() { void FindInFiles::_iterate() { if (_folders_stack.size() != 0) { - // Scan folders first so we can build a list of files and have progress info later + // Scan folders first so we can build a list of files and have progress info later. PackedStringArray &folders_to_scan = _folders_stack.write[_folders_stack.size() - 1]; if (folders_to_scan.size() != 0) { - // Scan one folder below + // Scan one folder below. String folder_name = folders_to_scan[folders_to_scan.size() - 1]; pop_back(folders_to_scan); @@ -178,19 +178,19 @@ void FindInFiles::_iterate() { _folders_stack.push_back(sub_dirs); } else { - // Go back one level + // Go back one level. pop_back(_folders_stack); _current_dir = _current_dir.get_base_dir(); if (_folders_stack.size() == 0) { - // All folders scanned + // All folders scanned. _initial_files_count = _files_to_scan.size(); } } } else if (_files_to_scan.size() != 0) { - // Then scan files + // Then scan files. String fpath = _files_to_scan[_files_to_scan.size() - 1]; pop_back(_files_to_scan); @@ -228,12 +228,12 @@ void FindInFiles::_scan_dir(String path, PackedStringArray &out_folders) { break; } - // If there is a .gdignore file in the directory, don't bother searching it + // If there is a .gdignore file in the directory, skip searching the directory. if (file == ".gdignore") { break; } - // Ignore special dirs (such as .git and project data directory) + // Ignore special directories (such as those beginning with . and the project data directory). String project_data_dir_name = ProjectSettings::get_singleton()->get_project_data_dir_name(); if (file.begins_with(".") || file == project_data_dir_name) { continue; @@ -264,7 +264,7 @@ void FindInFiles::_scan_file(String fpath) { int line_number = 0; while (!f->eof_reached()) { - // line number starts at 1 + // Line number starts at 1. ++line_number; int begin = 0; @@ -331,7 +331,7 @@ FindInFilesDialog::FindInFilesDialog() { _replace_text_line_edit->hide(); gc->add_child(_replace_text_line_edit); - gc->add_child(memnew(Control)); // Space to maintain the grid aligned. + gc->add_child(memnew(Control)); // Space to maintain the grid alignment. { HBoxContainer *hbc = memnew(HBoxContainer); @@ -421,7 +421,7 @@ void FindInFilesDialog::set_find_in_files_mode(FindInFilesMode p_mode) { _replace_text_line_edit->show(); } - // After hiding some child controls, let's recalculate proper Dialog size + // Recalculate the dialog size after hiding child controls. set_size(Size2(get_size().x, 0)); } @@ -448,7 +448,7 @@ String FindInFilesDialog::get_folder() const { } Set<String> FindInFilesDialog::get_filter() const { - // could check the _filters_preferences but it might not have been generated yet. + // Could check the _filters_preferences but it might not have been generated yet. Set<String> filters; for (int i = 0; i < _filters_container->get_child_count(); ++i) { CheckBox *cb = (CheckBox *)_filters_container->get_child(i); @@ -492,6 +492,7 @@ void FindInFilesDialog::custom_action(const String &p_action) { CheckBox *cb = (CheckBox *)_filters_container->get_child(i); _filters_preferences[cb->get_text()] = cb->is_pressed(); } + if (p_action == "find") { emit_signal(SNAME(SIGNAL_FIND_REQUESTED)); hide(); @@ -510,7 +511,7 @@ void FindInFilesDialog::_on_search_text_modified(String text) { } void FindInFilesDialog::_on_search_text_submitted(String text) { - // This allows to trigger a global search without leaving the keyboard + // This allows to trigger a global search without leaving the keyboard. if (!_find_button->is_disabled()) { if (_mode == SEARCH_MODE) { custom_action("find"); @@ -525,7 +526,7 @@ void FindInFilesDialog::_on_search_text_submitted(String text) { } void FindInFilesDialog::_on_replace_text_submitted(String text) { - // This allows to trigger a global search without leaving the keyboard + // This allows to trigger a global search without leaving the keyboard. if (!_replace_button->is_disabled()) { if (_mode == REPLACE_MODE) { custom_action("replace"); @@ -641,13 +642,12 @@ void FindInFilesPanel::set_with_replace(bool with_replace) { _replace_container->set_visible(with_replace); if (with_replace) { - // Results show checkboxes on their left so they can be opted out + // Results show checkboxes on their left so they can be opted out. _results_display->set_columns(2); _results_display->set_column_expand(0, false); _results_display->set_column_custom_minimum_width(0, 48 * EDSCALE); - } else { - // Results are single-cell items + // Results are single-cell items. _results_display->set_column_expand(0, true); _results_display->set_columns(1); } @@ -708,12 +708,12 @@ void FindInFilesPanel::_on_result_found(String fpath, int line_number, int begin file_item->set_text(0, fpath); file_item->set_metadata(0, fpath); - // The width of this column is restrained to checkboxes, but that doesn't make sense for the parent items, - // so we override their width so they can expand to full width + // The width of this column is restrained to checkboxes, + // but that doesn't make sense for the parent items, + // so we override their width so they can expand to full width. file_item->set_expand_right(0, true); _file_items[fpath] = file_item; - } else { file_item = E->value(); } @@ -725,7 +725,7 @@ void FindInFilesPanel::_on_result_found(String fpath, int line_number, int begin // Do this first because it resets properties of the cell... item->set_cell_mode(text_index, TreeItem::CELL_MODE_CUSTOM); - // Trim result item line + // Trim result item line. int old_text_size = text.size(); text = text.strip_edges(true, false); int chars_removed = old_text_size - text.size(); @@ -780,9 +780,8 @@ void FindInFilesPanel::_on_item_edited() { if (item->is_checked(0)) { item->set_custom_color(1, _results_display->get_theme_color(SNAME("font_color"))); - } else { - // Grey out + // Grey out. Color color = _results_display->get_theme_color(SNAME("font_color")); color.a /= 2.0; item->set_custom_color(1, color); @@ -857,19 +856,19 @@ void FindInFilesPanel::_on_replace_all_clicked() { } if (locations.size() != 0) { - // Results are sorted by file, so we can batch replaces + // Results are sorted by file, so we can batch replaces. apply_replaces_in_file(fpath, locations, replace_text); modified_files.push_back(fpath); } } - // Hide replace bar so we can't trigger the action twice without doing a new search + // Hide replace bar so we can't trigger the action twice without doing a new search. _replace_container->hide(); emit_signal(SNAME(SIGNAL_FILES_MODIFIED), modified_files); } -// Same as get_line, but preserves line ending characters +// Same as get_line, but preserves line ending characters. class ConservativeGetLine { public: String get_line(FileAccess *f) { @@ -941,7 +940,7 @@ void FindInFilesPanel::apply_replaces_in_file(String fpath, const Vector<Result> } line = line.left(repl_begin) + new_text + line.substr(repl_end); - // keep an offset in case there are successive replaces in the same line + // Keep an offset in case there are successive replaces in the same line. offset += new_text.length() - (repl_end - repl_begin); } @@ -951,7 +950,7 @@ void FindInFilesPanel::apply_replaces_in_file(String fpath, const Vector<Result> buffer += conservative.get_line(f); } - // Now the modified contents are in the buffer, rewrite the file with our changes + // Now the modified contents are in the buffer, rewrite the file with our changes. Error err = f->reopen(fpath, FileAccess::WRITE); ERR_FAIL_COND_MSG(err != OK, "Cannot create file in path '" + fpath + "'."); diff --git a/editor/icons/FogMaterial.svg b/editor/icons/FogMaterial.svg new file mode 100644 index 0000000000..5db7dea374 --- /dev/null +++ b/editor/icons/FogMaterial.svg @@ -0,0 +1 @@ +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m4.5 9.0000002c-.2761429-.0000014-.5000014.2238571-.5.5-.0000014.2761429.2238571.5000008.5.4999998l8-.0000002c.276143.0000012.500001-.2238569.5-.4999998.000001-.2761429-.223857-.5000014-.5-.5z" fill="#45d7ff"/><path d="m3.5 11c-.2761429-.000001-.5000014.223857-.5.5-.0000014.276143.2238571.500001.5.5h5c.2761429.000001.500001-.223857.5-.5.000001-.276143-.2238571-.500001-.5-.5z" fill="#8045ff"/><path d="m5.5 13c-.2761424 0-.5.223858-.5.5s.2238576.5.5.5h5c.276142 0 .5-.223858.5-.5s-.223858-.5-.5-.5z" fill="#ff4596"/><path d="m15 7h-13.936663c.2611574 1 1.436663 1 1.436663 1h11.5s1 0 1-1z" fill="#45ffa2"/><path d="m13.857422 5h-10.857422s-2 0-2 1.5c0 .216176.0100075.3416435.063337.5h13.936663c0-1-1.5-1-1.5-1s.23811-.4733054.357422-1z" fill="#80ff45"/><path d="m11.152344 3h1.847656c-.730134-.4197888-1.344054-.2676656-1.847656 0z" fill="#ff4545"/><path d="m9.7089844 3h-6.2714844c-.4375 1-.4375 2-.4375 2h10.857422c.149158-.6584498.108902-1.4444139-.857422-2h-1.847656c-.696054.3699541-1.152344 1-1.152344 1s-.161454-.5556722-.2910156-1z" fill="#ffe345"/><path d="m6.5 1c-1.75 0-2.625 1-3.0625 2h6.2714844c-.2591912-.8888889-.8754469-2-3.2089844-2z" fill="#ff4545"/><path d="m10.5 11c-.276143-.000001-.500001.223857-.5.5-.000001.276143.223857.500001.5.5h2.5c.276143.000001.500001-.223857.5-.5.000001-.276143-.223857-.500001-.5-.5z" fill="#8045ff"/></svg> diff --git a/editor/icons/FogVolume.svg b/editor/icons/FogVolume.svg new file mode 100644 index 0000000000..b0a18eb29d --- /dev/null +++ b/editor/icons/FogVolume.svg @@ -0,0 +1 @@ +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#fc7f7f"><g fill-opacity=".996078"><path d="m4.5 9.0000002c-.2761429-.0000014-.5000014.2238571-.5.5-.0000014.2761429.2238571.5000008.5.4999998l8-.0000002c.276143.0000012.500001-.2238569.5-.4999998.000001-.2761429-.223857-.5000014-.5-.5z"/><path d="m3.5 11c-.2761429-.000001-.5000014.223857-.5.5-.0000014.276143.2238571.500001.5.5h5c.2761429.000001.500001-.223857.5-.5.000001-.276143-.2238571-.500001-.5-.5z"/><path d="m5.5 13c-.2761424 0-.5.223858-.5.5s.2238576.5.5.5h5c.276142 0 .5-.223858.5-.5s-.223858-.5-.5-.5z"/></g><path d="m2.5 8s-1.5 0-1.5-1.5 2-1.5 2-1.5 0-4 3.5-4 3.5 3 3.5 3 1.260711-2 3-1 .5 3 .5 3 1.5 0 1.5 1-1 1-1 1z" fill-opacity=".99608"/><path d="m10.5 11c-.276143-.000001-.500001.223857-.5.5-.000001.276143.223857.500001.5.5h2.5c.276143.000001.500001-.223857.5-.5.000001-.276143-.223857-.500001-.5-.5z" fill-opacity=".996078"/></g></svg> diff --git a/editor/icons/GradientTexture.svg b/editor/icons/GradientTexture1D.svg index fa03e69805..fa03e69805 100644 --- a/editor/icons/GradientTexture.svg +++ b/editor/icons/GradientTexture1D.svg diff --git a/editor/icons/GradientTexture2D.svg b/editor/icons/GradientTexture2D.svg new file mode 100644 index 0000000000..ef40323b8c --- /dev/null +++ b/editor/icons/GradientTexture2D.svg @@ -0,0 +1 @@ +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g fill="#e0e0e0"> <path d="M 2,1 C 1.447715,1 1,1.4477153 1,2 v 12.000001 c 0,0.552285 0.447715,1 1,1 h 11.999999 c 0.552285,0 1,-0.447715 1,-1 V 2 c 0,-0.5522847 -0.447715,-1 -1,-1 z m 1,2.0000001 h 9.999999 V 11.000001 H 3 Z" fill-opacity="0.99608"/> <path d="m 5.5,3.5 v 1 h 1 v -1 z m 1,1 v 1 h 1 v -1 z m 1,0 h 1 v 1 h -1 v 1 h 1 v 1 h 1 v 1 h 1 v -1 h 1 v 1 h 1 v -1 -1 -1 -1 -1 h -1 -1 -1 -1 -1 z m 4,4 h -1 v 1 h 1 z m 0,1 v 1 h 1 v -1 z m -1,0 h -1 v 1 h 1 z m -1,0 v -1 h -1 v 1 z m -1,-1 v -1 h -1 v 1 z m -1,0 h -1 v 1 h 1 z m 0,-1 v -1 h -1 v 1 z m -1,-1 v -1 h -1 v 1 z" /> </g> </svg> diff --git a/editor/icons/InterpCubic.svg b/editor/icons/InterpCubic.svg index ad2ed51ee1..b542986ea6 100644 --- a/editor/icons/InterpCubic.svg +++ b/editor/icons/InterpCubic.svg @@ -1 +1 @@ -<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1050.4c3 0 3-4 6-4s3 4 6 4" fill="none" stroke="#e0e0e0" stroke-linecap="round" stroke-width="2" transform="translate(0 -1044.4)"/></svg> +<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1050.4c5 0 3-4 6-4s1 4 6 4" fill="none" stroke="#5fb2ff" stroke-linecap="round" stroke-width="2" transform="translate(0 -1044.4)"/></svg> diff --git a/editor/icons/InterpLinear.svg b/editor/icons/InterpLinear.svg index 241a82fc8f..966ddfdc31 100644 --- a/editor/icons/InterpLinear.svg +++ b/editor/icons/InterpLinear.svg @@ -1 +1 @@ -<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1050.4 6-4 6 4" fill="none" stroke="#e0e0e0" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" transform="translate(0 -1044.4)"/></svg> +<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1050.4 6-4 6 4" fill="none" stroke="#ffca5f" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" transform="translate(0 -1044.4)"/></svg> diff --git a/editor/icons/InterpWrapClamp.svg b/editor/icons/InterpWrapClamp.svg index 6ba8e78500..b589542019 100644 --- a/editor/icons/InterpWrapClamp.svg +++ b/editor/icons/InterpWrapClamp.svg @@ -1 +1 @@ -<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v6h2v-2.9863-3.0137zm2 3.0137a1.0001 1.0001 0 0 0 .29297.69336l2 2a1 1 0 0 0 1.4141 0 1 1 0 0 0 0-1.4141l-.29297-.29297h3.1719l-.29297.29297a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l2-2a1.0001 1.0001 0 0 0 .29297-.72266 1.0001 1.0001 0 0 0 -.29297-.69141l-2-2a1 1 0 0 0 -.7207-.29102 1 1 0 0 0 -.69336.29102 1 1 0 0 0 0 1.4141l.29297.29297h-3.1719l.29297-.29297a1 1 0 0 0 0-1.4141 1 1 0 0 0 -.7207-.29102 1 1 0 0 0 -.69336.29102l-2 2a1.0001 1.0001 0 0 0 -.29297.7207zm10-.029297v3.0156h2v-6h-2z" fill="#e0e0e0"/></svg> +<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v6h2v-2.9863-3.0137zm2 3.0137a1.0001 1.0001 0 0 0 .29297.69336l2 2a1 1 0 0 0 1.4141 0 1 1 0 0 0 0-1.4141l-.29297-.29297h3.1719l-.29297.29297a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l2-2a1.0001 1.0001 0 0 0 .29297-.72266 1.0001 1.0001 0 0 0 -.29297-.69141l-2-2a1 1 0 0 0 -.7207-.29102 1 1 0 0 0 -.69336.29102 1 1 0 0 0 0 1.4141l.29297.29297h-3.1719l.29297-.29297a1 1 0 0 0 0-1.4141 1 1 0 0 0 -.7207-.29102 1 1 0 0 0 -.69336.29102l-2 2a1.0001 1.0001 0 0 0 -.29297.7207zm10-.029297v3.0156h2v-6h-2z" fill="#fc7f7f"/></svg> diff --git a/editor/icons/InterpWrapLoop.svg b/editor/icons/InterpWrapLoop.svg index 57670f97ce..4faf7805f8 100644 --- a/editor/icons/InterpWrapLoop.svg +++ b/editor/icons/InterpWrapLoop.svg @@ -1 +1 @@ -<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m9 0-3 2 3 2v-1h3a1 1 0 0 1 1 1 1 1 0 0 1 -1 1v2a3 3 0 0 0 3-3 3 3 0 0 0 -3-3h-3zm-5 1a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h3v1l3-2-3-2v1h-3a1 1 0 0 1 -1-1 1 1 0 0 1 1-1z" fill="#e0e0e0"/></svg> +<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m9 0-3 2 3 2v-1h3a1 1 0 0 1 1 1 1 1 0 0 1 -1 1v2a3 3 0 0 0 3-3 3 3 0 0 0 -3-3h-3zm-5 1a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h3v1l3-2-3-2v1h-3a1 1 0 0 1 -1-1 1 1 0 0 1 1-1z" fill="#c38ef1"/></svg> diff --git a/editor/icons/OverbrightIndicator.svg b/editor/icons/OverbrightIndicator.svg index 70894361ce..f618980d51 100644 --- a/editor/icons/OverbrightIndicator.svg +++ b/editor/icons/OverbrightIndicator.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m0 0v10l10-10z" fill="#fff"/><path d="m0 12 12-12h-2l-10 10z" fill="#000003"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m.5.5v10l10-10z" fill="#fff" stroke="#000"/><path d="m0 12 12-12h-1.714286l-10.285714 10.285714z" fill="#000003" stroke-width="2"/></svg> diff --git a/editor/icons/PingPongLoop.svg b/editor/icons/PingPongLoop.svg new file mode 100644 index 0000000000..c44f889b49 --- /dev/null +++ b/editor/icons/PingPongLoop.svg @@ -0,0 +1 @@ +<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".9961"><path d="m10 7h-4v-2l-4 3 4 3v-2h4v2l4-3-4-3z"/><path d="m0 1v14h2v-7-7z"/><path d="m14 1v7 7h2v-14z"/></g></svg> diff --git a/editor/icons/ReverseGradient.svg b/editor/icons/ReverseGradient.svg new file mode 100644 index 0000000000..12f80d12dd --- /dev/null +++ b/editor/icons/ReverseGradient.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8"?><svg version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><linearGradient id="b" x1=".26458" x2="3.9688" y1=".79375" y2=".79375" gradientTransform="scale(3.7795)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"/><stop stop-color="#ccc" stop-opacity="0" offset="1"/></linearGradient><linearGradient id="a" x1=".26458" x2="3.9688" y1="3.4396" y2="3.4396" gradientTransform="matrix(3.7795 0 0 3.7795 -16 -1.1865e-7)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"/><stop stop-color="#ccc" stop-opacity="0" offset="1"/></linearGradient></defs><g><rect x="1" y="1" width="14" height="4" ry="1" fill="url(#b)"/><rect transform="scale(-1,1)" x="-15" y="11" width="14" height="4" ry="1" fill="url(#a)" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.7795"/><path d="m6 6 2 4 2-4z" fill="#ccc"/></g></svg> diff --git a/editor/icons/TrackCapture.svg b/editor/icons/TrackCapture.svg index aaa4a20e4a..b3d5f09eff 100644 --- a/editor/icons/TrackCapture.svg +++ b/editor/icons/TrackCapture.svg @@ -1 +1 @@ -<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0"><path d="m2.1665128.99764963c-.422625 0-.763672.34104737-.763672.76367187v4.5742187c0 .4226242.341047.7617192.763672.7617192h4.472656c.422625 0 .763672-.339095.763672-.7617192v-.9882812h-3.300781c-.1662 0-.298828-.3390943-.298828-.7617188v-1.2246094c0-.4226244.132628-.7636718.298828-.7636718h3.300781v-.8359375c0-.4226245-.341047-.76367187-.763672-.76367187z"/><path d="m9.1827441 4.7953408c.5166221-1.0415625 1.0955249-2.2117429 1.2864509-2.600401l.347137-.7066511.679654.00665.679654.00665.956945 2.3125c.526319 1.271875 1.007254 2.4334375 1.068744 2.5812497l.1118.26875h-.597215-.597214l-.332849-.6437497-.332849-.64375h-1.133826-1.133825l-.3786749.6561133-.3786747.6561134-.5922856.000137-.592285.000136zm3.1779349-.369483c.0042-.00346-.233487-.4884588-.528245-1.0777779l-.535922-1.0714891-.03691.0875c-.0203.048125-.183516.425-.362699.8375-.179182.4125-.355738.85125-.392346.975-.03661.12375-.07127.2390723-.07703.2562715-.0083.024853.188215.027989.957503.015278.532385-.0088.971429-.018823.975651-.022283z" stroke="#e0e0e0" stroke-width=".803"/></g></svg> +<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e1da5b"><path d="m2.1665128.99764963c-.422625 0-.763672.34104737-.763672.76367187v4.5742187c0 .4226242.341047.7617192.763672.7617192h4.472656c.422625 0 .763672-.339095.763672-.7617192v-.9882812h-3.300781c-.1662 0-.298828-.3390943-.298828-.7617188v-1.2246094c0-.4226244.132628-.7636718.298828-.7636718h3.300781v-.8359375c0-.4226245-.341047-.76367187-.763672-.76367187z"/><path d="m9.1827441 4.7953408c.5166221-1.0415625 1.0955249-2.2117429 1.2864509-2.600401l.347137-.7066511.679654.00665.679654.00665.956945 2.3125c.526319 1.271875 1.007254 2.4334375 1.068744 2.5812497l.1118.26875h-.597215-.597214l-.332849-.6437497-.332849-.64375h-1.133826-1.133825l-.3786749.6561133-.3786747.6561134-.5922856.000137-.592285.000136zm3.1779349-.369483c.0042-.00346-.233487-.4884588-.528245-1.0777779l-.535922-1.0714891-.03691.0875c-.0203.048125-.183516.425-.362699.8375-.179182.4125-.355738.85125-.392346.975-.03661.12375-.07127.2390723-.07703.2562715-.0083.024853.188215.027989.957503.015278.532385-.0088.971429-.018823.975651-.022283z" stroke="#e1da5b" stroke-width=".803"/></g></svg> diff --git a/editor/icons/TrackDiscrete.svg b/editor/icons/TrackDiscrete.svg index d1df4b1667..6498742233 100644 --- a/editor/icons/TrackDiscrete.svg +++ b/editor/icons/TrackDiscrete.svg @@ -1 +1 @@ -<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m14 1a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-6 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-6 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1z" fill="#e0e0e0"/></svg> +<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m14 1a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-6 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-6 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1z" fill="#b9ec41"/></svg> diff --git a/editor/icons/TrackTrigger.svg b/editor/icons/TrackTrigger.svg index 6e46a74121..c403fba59a 100644 --- a/editor/icons/TrackTrigger.svg +++ b/editor/icons/TrackTrigger.svg @@ -1 +1 @@ -<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v2h2v4h2v-4h2v-2zm13 0a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-3 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-3 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1z" fill="#e0e0e0"/></svg> +<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v2h2v4h2v-4h2v-2zm13 0a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-3 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-3 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1z" fill="#f68f45"/></svg> diff --git a/editor/import/collada.cpp b/editor/import/collada.cpp index 4cd9066350..19b4943e6d 100644 --- a/editor/import/collada.cpp +++ b/editor/import/collada.cpp @@ -541,7 +541,10 @@ void Collada::_parse_effect_material(XMLParser &parser, Effect &effect, String & COLLADA_PRINT("node name: " + parser.get_node_name()); - if (!parser.is_empty() && (parser.get_node_name() == "profile_COMMON" || parser.get_node_name() == "technique" || parser.get_node_name() == "extra")) { + if (!parser.is_empty() && + (parser.get_node_name() == "profile_COMMON" || + parser.get_node_name() == "technique" || + parser.get_node_name() == "extra")) { _parse_effect_material(parser, effect, id); // try again } else if (parser.get_node_name() == "newparam") { @@ -551,9 +554,9 @@ void Collada::_parse_effect_material(XMLParser &parser, Effect &effect, String & COLLADA_PRINT("param: " + name + " value:" + String(value)); } else if (parser.get_node_name() == "constant" || - parser.get_node_name() == "lambert" || - parser.get_node_name() == "phong" || - parser.get_node_name() == "blinn") { + parser.get_node_name() == "lambert" || + parser.get_node_name() == "phong" || + parser.get_node_name() == "blinn") { COLLADA_PRINT("shade model: " + parser.get_node_name()); while (parser.read() == OK) { if (parser.get_node_type() == XMLParser::NODE_ELEMENT) { @@ -627,10 +630,11 @@ void Collada::_parse_effect_material(XMLParser &parser, Effect &effect, String & } else if (what == "shininess") { effect.shininess = _parse_param(parser); } - } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && (parser.get_node_name() == "constant" || - parser.get_node_name() == "lambert" || - parser.get_node_name() == "phong" || - parser.get_node_name() == "blinn")) { + } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && + (parser.get_node_name() == "constant" || + parser.get_node_name() == "lambert" || + parser.get_node_name() == "phong" || + parser.get_node_name() == "blinn")) { break; } } @@ -681,10 +685,10 @@ void Collada::_parse_effect_material(XMLParser &parser, Effect &effect, String & parser.skip_section(); } } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && - (parser.get_node_name() == "effect" || - parser.get_node_name() == "profile_COMMON" || - parser.get_node_name() == "technique" || - parser.get_node_name() == "extra")) { + (parser.get_node_name() == "effect" || + parser.get_node_name() == "profile_COMMON" || + parser.get_node_name() == "technique" || + parser.get_node_name() == "extra")) { break; } } diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index ac8adedf2f..076c0cc62b 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -314,7 +314,7 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Node3D *p_parent) { xf = collada.fix_transform(xf) * p_node->post_transform; node->set_transform(xf); - p_parent->add_child(node); + p_parent->add_child(node, true); node->set_owner(scene); if (p_node->empty_draw_type != "") { @@ -1650,8 +1650,7 @@ void ColladaImport::create_animation(int p_clip, bool p_import_value_tracks) { Vector3 s = xform.basis.get_scale(); bool singular_matrix = Math::is_zero_approx(s.x) || Math::is_zero_approx(s.y) || Math::is_zero_approx(s.z); - Quaternion q = singular_matrix ? Quaternion() : - xform.basis.get_rotation_quaternion(); + Quaternion q = singular_matrix ? Quaternion() : xform.basis.get_rotation_quaternion(); Vector3 l = xform.origin; if (position_idx >= 0) { @@ -1805,7 +1804,7 @@ Node *EditorSceneFormatImporterCollada::import_scene(const String &p_path, uint3 ap->add_animation(name, state.animations[i]); } - state.scene->add_child(ap); + state.scene->add_child(ap, true); ap->set_owner(state.scene); } diff --git a/editor/import/editor_import_plugin.cpp b/editor/import/editor_import_plugin.cpp index d219f6e325..2c1d2149c6 100644 --- a/editor/import/editor_import_plugin.cpp +++ b/editor/import/editor_import_plugin.cpp @@ -57,6 +57,7 @@ void EditorImportPlugin::get_recognized_extensions(List<String> *p_extensions) c for (int i = 0; i < extensions.size(); i++) { p_extensions->push_back(extensions[i]); } + return; } ERR_FAIL_MSG("Unimplemented _get_recognized_extensions in add-on."); } @@ -139,6 +140,7 @@ void EditorImportPlugin::get_import_options(List<ResourceImporter::ImportOption> ImportOption option(PropertyInfo(default_value.get_type(), name, hint, hint_string, usage), default_value); r_options->push_back(option); } + return; } ERR_FAIL_MSG("Unimplemented _get_import_options in add-on."); diff --git a/editor/import/resource_importer_bmfont.cpp b/editor/import/resource_importer_bmfont.cpp index 2e7ef1402b..a64be54f2d 100644 --- a/editor/import/resource_importer_bmfont.cpp +++ b/editor/import/resource_importer_bmfont.cpp @@ -359,6 +359,8 @@ Error ResourceImporterBMFont::import(const String &p_source_file, const String & int height = 0; int ascent = 0; int outline = 0; + uint32_t st_flags = 0; + String font_name; bool packed = false; uint8_t ch[4] = { 0, 0, 0, 0 }; // RGBA @@ -382,13 +384,23 @@ Error ResourceImporterBMFont::import(const String &p_source_file, const String & base_size = f->get_16(); uint8_t flags = f->get_8(); ERR_FAIL_COND_V_MSG(flags & 0x02, ERR_CANT_CREATE, TTR("Non-unicode version of BMFont is not supported.")); + if (flags & (1 << 3)) { + st_flags |= TextServer::FONT_BOLD; + } + if (flags & (1 << 2)) { + st_flags |= TextServer::FONT_ITALIC; + } f->get_8(); // non-unicode charset, skip f->get_16(); // stretch_h, skip f->get_8(); // aa, skip f->get_32(); // padding, skip f->get_16(); // spacing, skip outline = f->get_8(); - // font name, skip + // font name + PackedByteArray name_data; + name_data.resize(block_size - 14); + f->get_buffer(name_data.ptrw(), block_size - 14); + font_name = String::utf8((const char *)name_data.ptr(), block_size - 14); font->set_fixed_size(base_size); } break; case 2: /* common */ { @@ -601,6 +613,19 @@ Error ResourceImporterBMFont::import(const String &p_source_file, const String & if (keys.has("outline")) { outline = keys["outline"].to_int(); } + if (keys.has("bold")) { + if (keys["bold"].to_int()) { + st_flags |= TextServer::FONT_BOLD; + } + } + if (keys.has("italic")) { + if (keys["italic"].to_int()) { + st_flags |= TextServer::FONT_ITALIC; + } + } + if (keys.has("face")) { + font_name = keys["face"]; + } ERR_FAIL_COND_V_MSG((!keys.has("unicode") || keys["unicode"].to_int() != 1), ERR_CANT_CREATE, TTR("Non-unicode version of BMFont is not supported.")); } else if (type == "common") { if (keys.has("lineHeight")) { @@ -778,6 +803,8 @@ Error ResourceImporterBMFont::import(const String &p_source_file, const String & } } + font->set_font_name(font_name); + font->set_font_style(st_flags); font->set_ascent(0, base_size, ascent); font->set_descent(0, base_size, height - ascent); diff --git a/editor/import/resource_importer_dynamicfont.cpp b/editor/import/resource_importer_dynamicfont.cpp index 8e01adbd56..a021275917 100644 --- a/editor/import/resource_importer_dynamicfont.cpp +++ b/editor/import/resource_importer_dynamicfont.cpp @@ -30,12 +30,12 @@ #include "resource_importer_dynamicfont.h" -#include "dynamicfont_import_settings.h" - #include "core/io/file_access.h" #include "core/io/resource_saver.h" +#include "dynamicfont_import_settings.h" #include "editor/editor_node.h" -#include "modules/modules_enabled.gen.h" + +#include "modules/modules_enabled.gen.h" // For freetype. String ResourceImporterDynamicFont::get_importer_name() const { return "font_data_dynamic"; diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp index 4f75faedcb..8eab27b533 100644 --- a/editor/import/resource_importer_obj.cpp +++ b/editor/import/resource_importer_obj.cpp @@ -405,11 +405,11 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_ current_material_library = l.replace("mtllib", "").strip_edges(); if (!material_map.has(current_material_library)) { Map<String, Ref<StandardMaterial3D>> lib; - Error err = _parse_material_library(current_material_library, lib, r_missing_deps); - if (err == ERR_CANT_OPEN) { - String dir = p_path.get_base_dir(); - err = _parse_material_library(dir.plus_file(current_material_library), lib, r_missing_deps); + String lib_path = current_material_library; + if (lib_path.is_relative_path()) { + lib_path = p_path.get_base_dir().plus_file(current_material_library); } + Error err = _parse_material_library(lib_path, lib, r_missing_deps); if (err == OK) { material_map[current_material_library] = lib; } @@ -448,7 +448,7 @@ Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, in ImporterMeshInstance3D *mi = memnew(ImporterMeshInstance3D); mi->set_mesh(mesh); mi->set_name(m->get_name()); - scene->add_child(mi); + scene->add_child(mi, true); mi->set_owner(scene); } diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index bebf05d481..9aaffe8abf 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -342,6 +342,7 @@ static String _fixstr(const String &p_what, const String &p_str) { static void _pre_gen_shape_list(Ref<ImporterMesh> &mesh, Vector<Ref<Shape3D>> &r_shape_list, bool p_convex) { ERR_FAIL_NULL_MSG(mesh, "Cannot generate shape list with null mesh value"); + ERR_FAIL_NULL_MSG(mesh->get_mesh(), "Cannot generate shape list with null mesh value"); if (!p_convex) { Ref<Shape3D> shape = mesh->create_trimesh_shape(); r_shape_list.push_back(shape); @@ -423,10 +424,10 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I String animname = E; const int loop_string_count = 3; - static const char *loop_strings[loop_string_count] = { "loops", "loop", "cycle" }; + static const char *loop_strings[loop_string_count] = { "loop_mode", "loop", "cycle" }; for (int i = 0; i < loop_string_count; i++) { if (_teststr(animname, loop_strings[i])) { - anim->set_loop(true); + anim->set_loop_mode(Animation::LoopMode::LOOP_LINEAR); animname = _fixstr(animname, loop_strings[i]); ap->rename_animation(E, animname); } @@ -501,7 +502,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I sphereShape->set_radius(1); colshape->set_shape(sphereShape); } - sb->add_child(colshape); + sb->add_child(colshape, true); colshape->set_owner(sb->get_owner()); } @@ -527,7 +528,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I rigid_body->set_transform(mi->get_transform()); p_node = rigid_body; mi->set_transform(Transform3D()); - rigid_body->add_child(mi); + rigid_body->add_child(mi, true); mi->set_owner(rigid_body->get_owner()); _add_shapes(rigid_body, shapes); @@ -565,7 +566,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I if (shapes.size()) { StaticBody3D *col = memnew(StaticBody3D); - mi->add_child(col); + mi->add_child(col, true); col->set_owner(mi->get_owner()); _add_shapes(col, shapes); @@ -613,7 +614,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I if (shapes.size()) { StaticBody3D *col = memnew(StaticBody3D); - p_node->add_child(col); + p_node->add_child(col, true); col->set_owner(p_node->get_owner()); _add_shapes(col, shapes); @@ -748,7 +749,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< switch (mesh_physics_mode) { case MESH_PHYSICS_MESH_AND_STATIC_COLLIDER: { StaticBody3D *col = memnew(StaticBody3D); - p_node->add_child(col); + p_node->add_child(col, true); col->set_owner(p_node->get_owner()); col->set_transform(get_collision_shapes_transform(node_settings)); base = col; @@ -760,7 +761,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< rigid_body->set_transform(mi->get_transform() * get_collision_shapes_transform(node_settings)); p_node = rigid_body; mi->set_transform(Transform3D()); - rigid_body->add_child(mi); + rigid_body->add_child(mi, true); mi->set_owner(rigid_body->get_owner()); base = rigid_body; } break; @@ -789,7 +790,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< for (const Ref<Shape3D> &E : shapes) { CollisionShape3D *cshape = memnew(CollisionShape3D); cshape->set_shape(E); - base->add_child(cshape); + base->add_child(cshape, true); cshape->set_owner(base->get_owner()); idx++; @@ -822,7 +823,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< memdelete(p_node); p_node = nmi; } else { - mi->add_child(nmi); + mi->add_child(nmi, true); nmi->set_owner(mi->get_owner()); } } @@ -867,7 +868,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< String name = node_settings["clip_" + itos(i + 1) + "/name"]; int from_frame = node_settings["clip_" + itos(i + 1) + "/start_frame"]; int end_frame = node_settings["clip_" + itos(i + 1) + "/end_frame"]; - bool loop = node_settings["clip_" + itos(i + 1) + "/loops"]; + Animation::LoopMode loop_mode = static_cast<Animation::LoopMode>((int)node_settings["clip_" + itos(i + 1) + "/loop_mode"]); bool save_to_file = node_settings["clip_" + itos(i + 1) + "/save_to_file/enabled"]; bool save_to_path = node_settings["clip_" + itos(i + 1) + "/save_to_file/path"]; bool save_to_file_keep_custom = node_settings["clip_" + itos(i + 1) + "/save_to_file/keep_custom_tracks"]; @@ -875,7 +876,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< animation_clips.push_back(name); animation_clips.push_back(from_frame / p_animation_fps); animation_clips.push_back(end_frame / p_animation_fps); - animation_clips.push_back(loop); + animation_clips.push_back(loop_mode); animation_clips.push_back(save_to_file); animation_clips.push_back(save_to_path); animation_clips.push_back(save_to_file_keep_custom); @@ -902,7 +903,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< } } - anim->set_loop(anim_settings["settings/loops"]); + anim->set_loop_mode(static_cast<Animation::LoopMode>((int)anim_settings["settings/loop_mode"])); bool save = anim_settings["save_to_file/enabled"]; String path = anim_settings["save_to_file/path"]; bool keep_custom = anim_settings["save_to_file/keep_custom_tracks"]; @@ -976,7 +977,7 @@ Ref<Animation> ResourceImporterScene::_save_animation_to_file(Ref<Animation> ani old_anim->copy_track(i, anim); } } - anim->set_loop(old_anim->has_loop()); + anim->set_loop_mode(old_anim->get_loop_mode()); } } @@ -1004,7 +1005,7 @@ void ResourceImporterScene::_create_clips(AnimationPlayer *anim, const Array &p_ String name = p_clips[i]; float from = p_clips[i + 1]; float to = p_clips[i + 2]; - bool loop = p_clips[i + 3]; + Animation::LoopMode loop_mode = static_cast<Animation::LoopMode>((int)p_clips[i + 3]); bool save_to_file = p_clips[i + 4]; String save_to_path = p_clips[i + 5]; bool keep_current = p_clips[i + 6]; @@ -1134,7 +1135,7 @@ void ResourceImporterScene::_create_clips(AnimationPlayer *anim, const Array &p_ } } - new_anim->set_loop(loop); + new_anim->set_loop_mode(loop_mode); new_anim->set_length(to - from); anim->add_animation(name, new_anim); @@ -1217,7 +1218,7 @@ void ResourceImporterScene::get_internal_import_options(InternalImportCategory p r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "use_external/path", PROPERTY_HINT_FILE, "*.material,*.res,*.tres"), "")); } break; case INTERNAL_IMPORT_CATEGORY_ANIMATION: { - r_options->push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::BOOL, "settings/loops"), false)); + r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "settings/loop_mode"), 0)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "save_to_file/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false)); r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "save_to_file/path", PROPERTY_HINT_SAVE_FILE, "*.res,*.tres"), "")); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "save_to_file/keep_custom_tracks"), "")); @@ -1239,7 +1240,7 @@ void ResourceImporterScene::get_internal_import_options(InternalImportCategory p r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "slice_" + itos(i + 1) + "/name"), "")); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slice_" + itos(i + 1) + "/start_frame"), 0)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slice_" + itos(i + 1) + "/end_frame"), 0)); - r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "slice_" + itos(i + 1) + "/loops"), false)); + r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slice_" + itos(i + 1) + "/loop_mode"), 0)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "slice_" + itos(i + 1) + "/save_to_file/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false)); r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "slice_" + itos(i + 1) + "/save_to_file/path", PROPERTY_HINT_SAVE_FILE, ".res,*.tres"), "")); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "slice_" + itos(i + 1) + "/save_to_file/keep_custom_tracks"), false)); @@ -1299,27 +1300,28 @@ bool ResourceImporterScene::get_internal_option_visibility(InternalImportCategor if (p_option == "primitive/position" || p_option == "primitive/rotation") { const ShapeType physics_shape = (ShapeType)p_options["physics/shape_type"].operator int(); return generate_physics && - physics_shape >= SHAPE_TYPE_BOX; + physics_shape >= SHAPE_TYPE_BOX; } if (p_option == "primitive/size") { const ShapeType physics_shape = (ShapeType)p_options["physics/shape_type"].operator int(); return generate_physics && - physics_shape == SHAPE_TYPE_BOX; + physics_shape == SHAPE_TYPE_BOX; } if (p_option == "primitive/radius") { const ShapeType physics_shape = (ShapeType)p_options["physics/shape_type"].operator int(); - return generate_physics && (physics_shape == SHAPE_TYPE_SPHERE || - physics_shape == SHAPE_TYPE_CYLINDER || - physics_shape == SHAPE_TYPE_CAPSULE); + return generate_physics && + (physics_shape == SHAPE_TYPE_SPHERE || + physics_shape == SHAPE_TYPE_CYLINDER || + physics_shape == SHAPE_TYPE_CAPSULE); } if (p_option == "primitive/height") { const ShapeType physics_shape = (ShapeType)p_options["physics/shape_type"].operator int(); return generate_physics && - (physics_shape == SHAPE_TYPE_CYLINDER || - physics_shape == SHAPE_TYPE_CAPSULE); + (physics_shape == SHAPE_TYPE_CYLINDER || + physics_shape == SHAPE_TYPE_CAPSULE); } } break; case INTERNAL_IMPORT_CATEGORY_MESH: { @@ -1426,10 +1428,10 @@ void ResourceImporterScene::get_import_options(List<ImportOption> *r_options, in r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "meshes/lightmap_texel_size", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 0.1)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "skins/use_named_skins"), true)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/import"), true)); - r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "animation/fps", PROPERTY_HINT_RANGE, "1,120,1"), 15)); + r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "animation/fps", PROPERTY_HINT_RANGE, "1,120,1"), 30)); r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "import_script/path", PROPERTY_HINT_FILE, script_ext_hint), "")); - r_options->push_back(ImportOption(PropertyInfo(Variant::DICTIONARY, "_subresources", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), Dictionary())); + r_options->push_back(ImportOption(PropertyInfo(Variant::DICTIONARY, "_subresources", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), Dictionary())); for (int i = 0; i < post_importer_plugins.size(); i++) { post_importer_plugins.write[i]->get_import_options(r_options); @@ -1460,7 +1462,7 @@ Node *ResourceImporterScene::import_scene_from_other_importer(EditorSceneFormatI for (const String &F : extensions) { if (F.to_lower() == ext) { - importer = E; + importer = E->get(); break; } } @@ -1490,7 +1492,7 @@ Ref<Animation> ResourceImporterScene::import_animation_from_other_importer(Edito for (const String &F : extensions) { if (F.to_lower() == ext) { - importer = E; + importer = E->get(); break; } } @@ -1678,7 +1680,7 @@ void ResourceImporterScene::_add_shapes(Node *p_node, const Vector<Ref<Shape3D>> for (const Ref<Shape3D> &E : p_shapes) { CollisionShape3D *cshape = memnew(CollisionShape3D); cshape->set_shape(E); - p_node->add_child(cshape); + p_node->add_child(cshape, true); cshape->set_owner(p_node->get_owner()); } diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp index 96a53b3257..e4553c625b 100644 --- a/editor/import/resource_importer_texture.cpp +++ b/editor/import/resource_importer_texture.cpp @@ -218,7 +218,8 @@ void ResourceImporterTexture::get_import_options(List<ImportOption> *r_options, void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image> &p_image, CompressMode p_compress_mode, Image::UsedChannels p_channels, Image::CompressMode p_compress_format, float p_lossy_quality) { switch (p_compress_mode) { case COMPRESS_LOSSLESS: { - bool lossless_force_png = ProjectSettings::get_singleton()->get("rendering/textures/lossless_compression/force_png"); + bool lossless_force_png = ProjectSettings::get_singleton()->get("rendering/textures/lossless_compression/force_png") || + !Image::_webp_mem_loader_func; // WebP module disabled. bool use_webp = !lossless_force_png && p_image->get_width() <= 16383 && p_image->get_height() <= 16383; // WebP has a size limit f->store_32(use_webp ? StreamTexture2D::DATA_FORMAT_WEBP : StreamTexture2D::DATA_FORMAT_PNG); f->store_16(p_image->get_width()); diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp index 2db1db9e51..877bdd50fb 100644 --- a/editor/import/resource_importer_wav.cpp +++ b/editor/import/resource_importer_wav.cpp @@ -252,13 +252,13 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s //loop point info! /** - * Consider exploring next document: - * http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Docs/RIFFNEW.pdf - * Especially on page: - * 16 - 17 - * Timestamp: - * 22:38 06.07.2017 GMT - **/ + * Consider exploring next document: + * http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Docs/RIFFNEW.pdf + * Especially on page: + * 16 - 17 + * Timestamp: + * 22:38 06.07.2017 GMT + **/ for (int i = 0; i < 10; i++) { file->get_32(); // i wish to know why should i do this... no doc! @@ -272,7 +272,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s if (loop_type == 0x00) { loop = AudioStreamSample::LOOP_FORWARD; } else if (loop_type == 0x01) { - loop = AudioStreamSample::LOOP_PING_PONG; + loop = AudioStreamSample::LOOP_PINGPONG; } else if (loop_type == 0x02) { loop = AudioStreamSample::LOOP_BACKWARD; } diff --git a/editor/import/scene_import_settings.cpp b/editor/import/scene_import_settings.cpp index 95a96f9e26..9b9320ad6d 100644 --- a/editor/import/scene_import_settings.cpp +++ b/editor/import/scene_import_settings.cpp @@ -327,7 +327,7 @@ void SceneImportSettings::_fill_scene(Node *p_node, TreeItem *p_parent_item) { MeshInstance3D *collider_view = memnew(MeshInstance3D); collider_view->set_name("collider_view"); collider_view->set_visible(false); - mesh_node->add_child(collider_view); + mesh_node->add_child(collider_view, true); collider_view->set_owner(mesh_node); Transform3D accum_xform; diff --git a/editor/plugin_config_dialog.cpp b/editor/plugin_config_dialog.cpp index 91ca1465df..c99b34e0c2 100644 --- a/editor/plugin_config_dialog.cpp +++ b/editor/plugin_config_dialog.cpp @@ -38,7 +38,7 @@ #include "editor/project_settings_editor.h" #include "scene/gui/grid_container.h" -#include "modules/modules_enabled.gen.h" +#include "modules/modules_enabled.gen.h" // For gdscript. #ifdef MODULE_GDSCRIPT_ENABLED #include "modules/gdscript/gdscript.h" #endif diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index ea025dad3e..65238446f9 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -41,6 +41,7 @@ #include "editor/plugins/canvas_item_editor_plugin.h" // For onion skinning. #include "editor/plugins/node_3d_editor_plugin.h" // For onion skinning. #include "scene/main/window.h" +#include "scene/resources/animation.h" #include "servers/rendering_server.h" void AnimationPlayerEditor::_node_removed(Node *p_node) { @@ -72,7 +73,7 @@ void AnimationPlayerEditor::_notification(int p_what) { if (player->has_animation(animname)) { Ref<Animation> anim = player->get_animation(animname); if (!anim.is_null()) { - frame->set_max(anim->get_length()); + frame->set_max((double)anim->get_length()); } } } @@ -289,7 +290,7 @@ void AnimationPlayerEditor::_animation_selected(int p_which) { track_editor->set_root(root); } } - frame->set_max(anim->get_length()); + frame->set_max((double)anim->get_length()); } else { track_editor->set_animation(Ref<Animation>()); @@ -1014,7 +1015,7 @@ void AnimationPlayerEditor::_seek_value_changed(float p_value, bool p_set, bool Ref<Animation> anim; anim = player->get_animation(current); - float pos = CLAMP(anim->get_length() * (p_value / frame->get_max()), 0, anim->get_length()); + float pos = CLAMP((double)anim->get_length() * (p_value / frame->get_max()), 0, (double)anim->get_length()); if (track_editor->is_snap_enabled()) { pos = Math::snapped(pos, _get_editor_step()); } @@ -1424,7 +1425,7 @@ void AnimationPlayerEditor::_prepare_onion_layers_2() { float pos = cpos + step_off * anim->get_step(); - bool valid = anim->has_loop() || (pos >= 0 && pos <= anim->get_length()); + bool valid = anim->get_loop_mode() != Animation::LoopMode::LOOP_NONE || (pos >= 0 && pos <= anim->get_length()); onion.captures_valid.write[cidx] = valid; if (valid) { player->seek(pos, true); diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 5544d9261e..061483decf 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -2264,9 +2264,9 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) { } } - if (b.is_valid() && b->is_pressed() && b->get_button_index() == MOUSE_BUTTON_RIGHT && b->is_ctrl_pressed()) { - add_node_menu->set_position(get_global_transform().xform(get_local_mouse_position())); + if (b.is_valid() && b->is_pressed() && b->get_button_index() == MOUSE_BUTTON_RIGHT) { add_node_menu->set_size(Vector2(1, 1)); + add_node_menu->set_position(get_screen_position() + b->get_position()); add_node_menu->popup(); node_create_position = transform.affine_inverse().xform((get_local_mouse_position())); return true; @@ -2983,18 +2983,16 @@ void CanvasItemEditor::_draw_ruler_tool() { const Vector2 end_to_begin = (end - begin); - real_t arc_1_start_angle = - end_to_begin.x < 0 ? - (end_to_begin.y < 0 ? 3.0 * Math_PI / 2.0 - vertical_angle_rad : Math_PI / 2.0) : - (end_to_begin.y < 0 ? 3.0 * Math_PI / 2.0 : Math_PI / 2.0 - vertical_angle_rad); + real_t arc_1_start_angle = end_to_begin.x < 0 + ? (end_to_begin.y < 0 ? 3.0 * Math_PI / 2.0 - vertical_angle_rad : Math_PI / 2.0) + : (end_to_begin.y < 0 ? 3.0 * Math_PI / 2.0 : Math_PI / 2.0 - vertical_angle_rad); real_t arc_1_end_angle = arc_1_start_angle + vertical_angle_rad; // Constrain arc to triangle height & max size real_t arc_1_radius = MIN(MIN(arc_radius_max_length_percent * ruler_length, ABS(end_to_begin.y)), arc_max_radius); - real_t arc_2_start_angle = - end_to_begin.x < 0 ? - (end_to_begin.y < 0 ? 0.0 : -horizontal_angle_rad) : - (end_to_begin.y < 0 ? Math_PI - horizontal_angle_rad : Math_PI); + real_t arc_2_start_angle = end_to_begin.x < 0 + ? (end_to_begin.y < 0 ? 0.0 : -horizontal_angle_rad) + : (end_to_begin.y < 0 ? Math_PI - horizontal_angle_rad : Math_PI); real_t arc_2_end_angle = arc_2_start_angle + horizontal_angle_rad; // Constrain arc to triangle width & max size real_t arc_2_radius = MIN(MIN(arc_radius_max_length_percent * ruler_length, ABS(end_to_begin.x)), arc_max_radius); @@ -5838,7 +5836,7 @@ void CanvasItemEditorViewport::_create_nodes(Node *parent, Node *child, String & Ref<Texture2D> texture = Ref<Texture2D>(Object::cast_to<Texture2D>(ResourceCache::get(path))); if (parent) { - editor_data->get_undo_redo().add_do_method(parent, "add_child", child); + editor_data->get_undo_redo().add_do_method(parent, "add_child", child, true); editor_data->get_undo_redo().add_do_method(child, "set_owner", editor->get_edited_scene()); editor_data->get_undo_redo().add_do_reference(child); editor_data->get_undo_redo().add_undo_method(parent, "remove_child", child); @@ -6194,14 +6192,14 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte label = memnew(Label); label->add_theme_color_override("font_shadow_color", Color(0, 0, 0, 1)); - label->add_theme_constant_override("shadow_as_outline", 1 * EDSCALE); + label->add_theme_constant_override("shadow_outline_size", 1 * EDSCALE); label->hide(); canvas_item_editor->get_controls_container()->add_child(label); label_desc = memnew(Label); label_desc->add_theme_color_override("font_color", Color(0.6f, 0.6f, 0.6f, 1)); label_desc->add_theme_color_override("font_shadow_color", Color(0.2f, 0.2f, 0.2f, 1)); - label_desc->add_theme_constant_override("shadow_as_outline", 1 * EDSCALE); + label_desc->add_theme_constant_override("shadow_outline_size", 1 * EDSCALE); label_desc->add_theme_constant_override("line_spacing", 0); label_desc->hide(); canvas_item_editor->get_controls_container()->add_child(label_desc); diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp index 4a22dc5b62..43eb6a7ce9 100644 --- a/editor/plugins/curve_editor_plugin.cpp +++ b/editor/plugins/curve_editor_plugin.cpp @@ -354,9 +354,9 @@ void CurveEditor::open_context_menu(Vector2 pos) { _context_menu->add_check_item(TTR("Linear"), CONTEXT_LINEAR); - bool is_linear = _selected_tangent == TANGENT_LEFT ? - _curve_ref->get_point_left_mode(_selected_point) == Curve::TANGENT_LINEAR : - _curve_ref->get_point_right_mode(_selected_point) == Curve::TANGENT_LINEAR; + bool is_linear = _selected_tangent == TANGENT_LEFT + ? _curve_ref->get_point_left_mode(_selected_point) == Curve::TANGENT_LINEAR + : _curve_ref->get_point_right_mode(_selected_point) == Curve::TANGENT_LINEAR; _context_menu->set_item_checked(_context_menu->get_item_index(CONTEXT_LINEAR), is_linear); diff --git a/editor/plugins/debugger_editor_plugin.cpp b/editor/plugins/debugger_editor_plugin.cpp index 1512e1817a..cc916aad8b 100644 --- a/editor/plugins/debugger_editor_plugin.cpp +++ b/editor/plugins/debugger_editor_plugin.cpp @@ -34,6 +34,7 @@ #include "editor/debugger/editor_debugger_node.h" #include "editor/debugger/editor_debugger_server.h" #include "editor/editor_node.h" +#include "editor/editor_scale.h" #include "editor/fileserver/editor_file_server.h" #include "scene/gui/menu_button.h" @@ -52,6 +53,8 @@ DebuggerEditorPlugin::DebuggerEditorPlugin(EditorNode *p_editor, MenuButton *p_d EditorDebuggerNode *debugger = memnew(EditorDebuggerNode); Button *db = EditorNode::get_singleton()->add_bottom_panel_item(TTR("Debugger"), debugger); + // Add separation for the warning/error icon that is displayed later. + db->add_theme_constant_override("hseparation", 6 * EDSCALE); debugger->set_tool_button(db); // Main editor debug menu. diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index 4cb2c0a76b..9702c7e734 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -297,12 +297,14 @@ EditorPackedScenePreviewPlugin::EditorPackedScenePreviewPlugin() { ////////////////////////////////////////////////////////////////// -void EditorMaterialPreviewPlugin::_preview_done(const Variant &p_udata) { - preview_done.set(); +void EditorMaterialPreviewPlugin::_generate_frame_started() { + RS::get_singleton()->viewport_set_update_mode(viewport, RS::VIEWPORT_UPDATE_ONCE); //once used for capture + + RS::get_singleton()->request_frame_drawn_callback(callable_mp(const_cast<EditorMaterialPreviewPlugin *>(this), &EditorMaterialPreviewPlugin::_preview_done)); } -void EditorMaterialPreviewPlugin::_bind_methods() { - ClassDB::bind_method("_preview_done", &EditorMaterialPreviewPlugin::_preview_done); +void EditorMaterialPreviewPlugin::_preview_done() { + preview_done.post(); } bool EditorMaterialPreviewPlugin::handles(const String &p_type) const { @@ -320,14 +322,9 @@ Ref<Texture2D> EditorMaterialPreviewPlugin::generate(const RES &p_from, const Si if (material->get_shader_mode() == Shader::MODE_SPATIAL) { RS::get_singleton()->mesh_surface_set_material(sphere, 0, material->get_rid()); - RS::get_singleton()->viewport_set_update_mode(viewport, RS::VIEWPORT_UPDATE_ONCE); //once used for capture + RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<EditorMaterialPreviewPlugin *>(this), &EditorMaterialPreviewPlugin::_generate_frame_started), Vector<Variant>(), Object::CONNECT_ONESHOT); - preview_done.clear(); - RS::get_singleton()->request_frame_drawn_callback(const_cast<EditorMaterialPreviewPlugin *>(this), "_preview_done", Variant()); - - while (!preview_done.is_set()) { - OS::get_singleton()->delay_usec(10); - } + preview_done.wait(); Ref<Image> img = RS::get_singleton()->texture_2d_get(viewport_texture); RS::get_singleton()->mesh_surface_set_material(sphere, 0, RID()); @@ -699,12 +696,14 @@ EditorAudioStreamPreviewPlugin::EditorAudioStreamPreviewPlugin() { /////////////////////////////////////////////////////////////////////////// -void EditorMeshPreviewPlugin::_preview_done(const Variant &p_udata) { - preview_done.set(); +void EditorMeshPreviewPlugin::_generate_frame_started() { + RS::get_singleton()->viewport_set_update_mode(viewport, RS::VIEWPORT_UPDATE_ONCE); //once used for capture + + RS::get_singleton()->request_frame_drawn_callback(callable_mp(const_cast<EditorMeshPreviewPlugin *>(this), &EditorMeshPreviewPlugin::_preview_done)); } -void EditorMeshPreviewPlugin::_bind_methods() { - ClassDB::bind_method("_preview_done", &EditorMeshPreviewPlugin::_preview_done); +void EditorMeshPreviewPlugin::_preview_done() { + preview_done.post(); } bool EditorMeshPreviewPlugin::handles(const String &p_type) const { @@ -735,14 +734,9 @@ Ref<Texture2D> EditorMeshPreviewPlugin::generate(const RES &p_from, const Size2 xform.origin.z -= rot_aabb.size.z * 2; RS::get_singleton()->instance_set_transform(mesh_instance, xform); - RS::get_singleton()->viewport_set_update_mode(viewport, RS::VIEWPORT_UPDATE_ONCE); //once used for capture + RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<EditorMeshPreviewPlugin *>(this), &EditorMeshPreviewPlugin::_generate_frame_started), Vector<Variant>(), Object::CONNECT_ONESHOT); - preview_done.clear(); - RS::get_singleton()->request_frame_drawn_callback(const_cast<EditorMeshPreviewPlugin *>(this), "_preview_done", Variant()); - - while (!preview_done.is_set()) { - OS::get_singleton()->delay_usec(10); - } + preview_done.wait(); Ref<Image> img = RS::get_singleton()->texture_2d_get(viewport_texture); ERR_FAIL_COND_V(img.is_null(), Ref<ImageTexture>()); @@ -814,12 +808,14 @@ EditorMeshPreviewPlugin::~EditorMeshPreviewPlugin() { /////////////////////////////////////////////////////////////////////////// -void EditorFontPreviewPlugin::_preview_done(const Variant &p_udata) { - preview_done.set(); +void EditorFontPreviewPlugin::_generate_frame_started() { + RS::get_singleton()->viewport_set_update_mode(viewport, RS::VIEWPORT_UPDATE_ONCE); //once used for capture + + RS::get_singleton()->request_frame_drawn_callback(callable_mp(const_cast<EditorFontPreviewPlugin *>(this), &EditorFontPreviewPlugin::_preview_done)); } -void EditorFontPreviewPlugin::_bind_methods() { - ClassDB::bind_method("_preview_done", &EditorFontPreviewPlugin::_preview_done); +void EditorFontPreviewPlugin::_preview_done() { + preview_done.post(); } bool EditorFontPreviewPlugin::handles(const String &p_type) const { @@ -857,13 +853,9 @@ Ref<Texture2D> EditorFontPreviewPlugin::generate_from_path(const String &p_path, font->draw_string(canvas_item, pos, sample, HALIGN_LEFT, -1.f, 50, Color(1, 1, 1)); - preview_done.clear(); - RS::get_singleton()->viewport_set_update_mode(viewport, RS::VIEWPORT_UPDATE_ONCE); //once used for capture - RS::get_singleton()->request_frame_drawn_callback(const_cast<EditorFontPreviewPlugin *>(this), "_preview_done", Variant()); + RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<EditorFontPreviewPlugin *>(this), &EditorFontPreviewPlugin::_generate_frame_started), Vector<Variant>(), Object::CONNECT_ONESHOT); - while (!preview_done.is_set()) { - OS::get_singleton()->delay_usec(10); - } + preview_done.wait(); RS::get_singleton()->canvas_item_clear(canvas_item); diff --git a/editor/plugins/editor_preview_plugins.h b/editor/plugins/editor_preview_plugins.h index 091feae5fb..bf52f5771d 100644 --- a/editor/plugins/editor_preview_plugins.h +++ b/editor/plugins/editor_preview_plugins.h @@ -92,12 +92,10 @@ class EditorMaterialPreviewPlugin : public EditorResourcePreviewGenerator { RID light2; RID light_instance2; RID camera; - mutable SafeFlag preview_done; + Semaphore preview_done; - void _preview_done(const Variant &p_udata); - -protected: - static void _bind_methods(); + void _generate_frame_started(); + void _preview_done(); public: virtual bool handles(const String &p_type) const override; @@ -136,12 +134,10 @@ class EditorMeshPreviewPlugin : public EditorResourcePreviewGenerator { RID light2; RID light_instance2; RID camera; - mutable SafeFlag preview_done; - - void _preview_done(const Variant &p_udata); + Semaphore preview_done; -protected: - static void _bind_methods(); + void _generate_frame_started(); + void _preview_done(); public: virtual bool handles(const String &p_type) const override; @@ -158,12 +154,10 @@ class EditorFontPreviewPlugin : public EditorResourcePreviewGenerator { RID viewport_texture; RID canvas; RID canvas_item; - mutable SafeFlag preview_done; + Semaphore preview_done; - void _preview_done(const Variant &p_udata); - -protected: - static void _bind_methods(); + void _generate_frame_started(); + void _preview_done(); public: virtual bool handles(const String &p_type) const override; @@ -177,12 +171,10 @@ public: class EditorTileMapPatternPreviewPlugin : public EditorResourcePreviewGenerator { GDCLASS(EditorTileMapPatternPreviewPlugin, EditorResourcePreviewGenerator); - mutable SafeFlag preview_done; - - void _preview_done(const Variant &p_udata); + Semaphore preview_done; -protected: - static void _bind_methods(); + void _generate_frame_started(); + void _preview_done(); public: virtual bool handles(const String &p_type) const override; diff --git a/editor/plugins/gradient_editor_plugin.cpp b/editor/plugins/gradient_editor_plugin.cpp index 355bdb69d8..da050abc02 100644 --- a/editor/plugins/gradient_editor_plugin.cpp +++ b/editor/plugins/gradient_editor_plugin.cpp @@ -46,6 +46,8 @@ void GradientEditor::_gradient_changed() { editing = true; Vector<Gradient::Point> points = gradient->get_points(); set_points(points); + set_interpolation_mode(gradient->get_interpolation_mode()); + update(); editing = false; } @@ -55,8 +57,10 @@ void GradientEditor::_ramp_changed() { undo_redo->create_action(TTR("Gradient Edited")); undo_redo->add_do_method(gradient.ptr(), "set_offsets", get_offsets()); undo_redo->add_do_method(gradient.ptr(), "set_colors", get_colors()); + undo_redo->add_do_method(gradient.ptr(), "set_interpolation_mode", get_interpolation_mode()); undo_redo->add_undo_method(gradient.ptr(), "set_offsets", gradient->get_offsets()); undo_redo->add_undo_method(gradient.ptr(), "set_colors", gradient->get_colors()); + undo_redo->add_undo_method(gradient.ptr(), "set_interpolation_mode", gradient->get_interpolation_mode()); undo_redo->commit_action(); editing = false; } @@ -69,6 +73,14 @@ void GradientEditor::set_gradient(const Ref<Gradient> &p_gradient) { connect("ramp_changed", callable_mp(this, &GradientEditor::_ramp_changed)); gradient->connect("changed", callable_mp(this, &GradientEditor::_gradient_changed)); set_points(gradient->get_points()); + set_interpolation_mode(gradient->get_interpolation_mode()); +} + +void GradientEditor::reverse_gradient() { + gradient->reverse(); + set_points(gradient->get_points()); + emit_signal(SNAME("ramp_changed")); + update(); } GradientEditor::GradientEditor() { @@ -77,6 +89,23 @@ GradientEditor::GradientEditor() { /////////////////////// +void GradientReverseButton::_notification(int p_what) { + if (p_what == NOTIFICATION_DRAW) { + Ref<Texture2D> icon = get_theme_icon(SNAME("ReverseGradient"), SNAME("EditorIcons")); + if (is_pressed()) { + draw_texture_rect(icon, Rect2(margin, margin, icon->get_width(), icon->get_height()), false, get_theme_color(SNAME("icon_pressed_color"), SNAME("Button"))); + } else { + draw_texture_rect(icon, Rect2(margin, margin, icon->get_width(), icon->get_height())); + } + } +} + +Size2 GradientReverseButton::get_minimum_size() const { + return (get_theme_icon(SNAME("ReverseGradient"), SNAME("EditorIcons"))->get_size() + Size2(margin * 2, margin * 2)); +} + +/////////////////////// + bool EditorInspectorPluginGradient::can_handle(Object *p_object) { return Object::cast_to<Gradient>(p_object) != nullptr; } @@ -85,9 +114,23 @@ void EditorInspectorPluginGradient::parse_begin(Object *p_object) { Gradient *gradient = Object::cast_to<Gradient>(p_object); Ref<Gradient> g(gradient); - GradientEditor *editor = memnew(GradientEditor); + editor = memnew(GradientEditor); editor->set_gradient(g); add_custom_control(editor); + + reverse_btn = memnew(GradientReverseButton); + + gradient_tools_hbox = memnew(HBoxContainer); + gradient_tools_hbox->add_child(reverse_btn); + + add_custom_control(gradient_tools_hbox); + + reverse_btn->connect("pressed", callable_mp(this, &EditorInspectorPluginGradient::_reverse_button_pressed)); + reverse_btn->set_tooltip(TTR("Reverse/mirror gradient.")); +} + +void EditorInspectorPluginGradient::_reverse_button_pressed() { + editor->reverse_gradient(); } GradientEditorPlugin::GradientEditorPlugin(EditorNode *p_node) { diff --git a/editor/plugins/gradient_editor_plugin.h b/editor/plugins/gradient_editor_plugin.h index bcbb86e422..95b7b466c9 100644 --- a/editor/plugins/gradient_editor_plugin.h +++ b/editor/plugins/gradient_editor_plugin.h @@ -50,12 +50,28 @@ protected: public: virtual Size2 get_minimum_size() const override; void set_gradient(const Ref<Gradient> &p_gradient); + void reverse_gradient(); GradientEditor(); }; +class GradientReverseButton : public BaseButton { + GDCLASS(GradientReverseButton, BaseButton); + + int margin = 2; + + void _notification(int p_what); + virtual Size2 get_minimum_size() const override; +}; + class EditorInspectorPluginGradient : public EditorInspectorPlugin { GDCLASS(EditorInspectorPluginGradient, EditorInspectorPlugin); + GradientEditor *editor; + HBoxContainer *gradient_tools_hbox; + GradientReverseButton *reverse_btn; + + void _reverse_button_pressed(); + public: virtual bool can_handle(Object *p_object) override; virtual void parse_begin(Object *p_object) override; diff --git a/editor/plugins/item_list_editor_plugin.cpp b/editor/plugins/item_list_editor_plugin.cpp deleted file mode 100644 index 16cafda899..0000000000 --- a/editor/plugins/item_list_editor_plugin.cpp +++ /dev/null @@ -1,410 +0,0 @@ -/*************************************************************************/ -/* item_list_editor_plugin.cpp */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -#include "item_list_editor_plugin.h" - -#include "core/io/resource_loader.h" -#include "editor/editor_scale.h" - -bool ItemListPlugin::_set(const StringName &p_name, const Variant &p_value) { - String name = p_name; - int idx = name.get_slice("/", 0).to_int(); - String what = name.get_slice("/", 1); - - if (what == "text") { - set_item_text(idx, p_value); - } else if (what == "icon") { - set_item_icon(idx, p_value); - } else if (what == "checkable") { - // This keeps compatibility to/from versions where this property was a boolean, before radio buttons - switch ((int)p_value) { - case 0: - case 1: - set_item_checkable(idx, p_value); - break; - case 2: - set_item_radio_checkable(idx, true); - break; - } - } else if (what == "checked") { - set_item_checked(idx, p_value); - } else if (what == "id") { - set_item_id(idx, p_value); - } else if (what == "enabled") { - set_item_enabled(idx, p_value); - } else if (what == "separator") { - set_item_separator(idx, p_value); - } else { - return false; - } - - return true; -} - -bool ItemListPlugin::_get(const StringName &p_name, Variant &r_ret) const { - String name = p_name; - int idx = name.get_slice("/", 0).to_int(); - String what = name.get_slice("/", 1); - - if (what == "text") { - r_ret = get_item_text(idx); - } else if (what == "icon") { - r_ret = get_item_icon(idx); - } else if (what == "checkable") { - // This keeps compatibility to/from versions where this property was a boolean, before radio buttons - if (!is_item_checkable(idx)) { - r_ret = 0; - } else { - r_ret = is_item_radio_checkable(idx) ? 2 : 1; - } - } else if (what == "checked") { - r_ret = is_item_checked(idx); - } else if (what == "id") { - r_ret = get_item_id(idx); - } else if (what == "enabled") { - r_ret = is_item_enabled(idx); - } else if (what == "separator") { - r_ret = is_item_separator(idx); - } else { - return false; - } - - return true; -} - -void ItemListPlugin::_get_property_list(List<PropertyInfo> *p_list) const { - for (int i = 0; i < get_item_count(); i++) { - String base = itos(i) + "/"; - - p_list->push_back(PropertyInfo(Variant::STRING, base + "text")); - p_list->push_back(PropertyInfo(Variant::OBJECT, base + "icon", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D")); - - int flags = get_flags(); - - if (flags & FLAG_CHECKABLE) { - p_list->push_back(PropertyInfo(Variant::INT, base + "checkable", PROPERTY_HINT_ENUM, "No,As checkbox,As radio button")); - p_list->push_back(PropertyInfo(Variant::BOOL, base + "checked")); - } - - if (flags & FLAG_ID) { - p_list->push_back(PropertyInfo(Variant::INT, base + "id", PROPERTY_HINT_RANGE, "-1,4096")); - } - - if (flags & FLAG_ENABLE) { - p_list->push_back(PropertyInfo(Variant::BOOL, base + "enabled")); - } - - if (flags & FLAG_SEPARATOR) { - p_list->push_back(PropertyInfo(Variant::BOOL, base + "separator")); - } - } -} - -/////////////////////////////////////////////////////////////// -///////////////////////// PLUGINS ///////////////////////////// -/////////////////////////////////////////////////////////////// - -void ItemListOptionButtonPlugin::set_object(Object *p_object) { - ob = Object::cast_to<OptionButton>(p_object); -} - -bool ItemListOptionButtonPlugin::handles(Object *p_object) const { - return p_object->is_class("OptionButton"); -} - -int ItemListOptionButtonPlugin::get_flags() const { - return FLAG_ICON | FLAG_ID | FLAG_ENABLE; -} - -void ItemListOptionButtonPlugin::add_item() { - ob->add_item(vformat(TTR("Item %d"), ob->get_item_count())); - notify_property_list_changed(); -} - -int ItemListOptionButtonPlugin::get_item_count() const { - return ob->get_item_count(); -} - -void ItemListOptionButtonPlugin::erase(int p_idx) { - ob->remove_item(p_idx); - notify_property_list_changed(); -} - -ItemListOptionButtonPlugin::ItemListOptionButtonPlugin() { - ob = nullptr; -} - -/////////////////////////////////////////////////////////////// - -void ItemListPopupMenuPlugin::set_object(Object *p_object) { - if (p_object->is_class("MenuButton")) { - pp = Object::cast_to<MenuButton>(p_object)->get_popup(); - } else { - pp = Object::cast_to<PopupMenu>(p_object); - } -} - -bool ItemListPopupMenuPlugin::handles(Object *p_object) const { - return p_object->is_class("PopupMenu") || p_object->is_class("MenuButton"); -} - -int ItemListPopupMenuPlugin::get_flags() const { - return FLAG_ICON | FLAG_CHECKABLE | FLAG_ID | FLAG_ENABLE | FLAG_SEPARATOR; -} - -void ItemListPopupMenuPlugin::add_item() { - pp->add_item(vformat(TTR("Item %d"), pp->get_item_count())); - notify_property_list_changed(); -} - -int ItemListPopupMenuPlugin::get_item_count() const { - return pp->get_item_count(); -} - -void ItemListPopupMenuPlugin::erase(int p_idx) { - pp->remove_item(p_idx); - notify_property_list_changed(); -} - -ItemListPopupMenuPlugin::ItemListPopupMenuPlugin() { - pp = nullptr; -} - -/////////////////////////////////////////////////////////////// - -void ItemListItemListPlugin::set_object(Object *p_object) { - pp = Object::cast_to<ItemList>(p_object); -} - -bool ItemListItemListPlugin::handles(Object *p_object) const { - return p_object->is_class("ItemList"); -} - -int ItemListItemListPlugin::get_flags() const { - return FLAG_ICON | FLAG_ENABLE; -} - -void ItemListItemListPlugin::add_item() { - pp->add_item(vformat(TTR("Item %d"), pp->get_item_count())); - notify_property_list_changed(); -} - -int ItemListItemListPlugin::get_item_count() const { - return pp->get_item_count(); -} - -void ItemListItemListPlugin::erase(int p_idx) { - pp->remove_item(p_idx); - notify_property_list_changed(); -} - -ItemListItemListPlugin::ItemListItemListPlugin() { - pp = nullptr; -} - -/////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////// - -void ItemListEditor::_node_removed(Node *p_node) { - if (p_node == item_list) { - item_list = nullptr; - hide(); - dialog->hide(); - } -} - -void ItemListEditor::_notification(int p_notification) { - if (p_notification == NOTIFICATION_ENTER_TREE || p_notification == NOTIFICATION_THEME_CHANGED) { - add_button->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons"))); - clear_button->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons"))); - del_button->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons"))); - } else if (p_notification == NOTIFICATION_READY) { - get_tree()->connect("node_removed", callable_mp(this, &ItemListEditor::_node_removed)); - } -} - -void ItemListEditor::_add_pressed() { - if (selected_idx == -1) { - return; - } - - item_plugins[selected_idx]->add_item(); -} - -void ItemListEditor::_clear_pressed() { - for (int i = item_plugins[selected_idx]->get_item_count() - 1; i >= 0; i--) { - item_plugins[selected_idx]->erase(i); - } -} - -void ItemListEditor::_delete_pressed() { - if (selected_idx == -1) { - return; - } - - String current_selected = (String)property_editor->get_selected_path(); - - if (current_selected == "") { - return; - } - - // FIXME: Currently relying on selecting a *property* to derive what item to delete - // e.g. you select "1/enabled" to delete item 1. - // This should be fixed so that you can delete by selecting the item section header, - // or a delete button on that header. - - int idx = current_selected.get_slice("/", 0).to_int(); - - item_plugins[selected_idx]->erase(idx); -} - -void ItemListEditor::_edit_items() { - dialog->popup_centered_clamped(Vector2(425, 1200) * EDSCALE, 0.8); -} - -void ItemListEditor::edit(Node *p_item_list) { - item_list = p_item_list; - - if (!item_list) { - selected_idx = -1; - property_editor->edit(nullptr); - return; - } - - for (int i = 0; i < item_plugins.size(); i++) { - if (item_plugins[i]->handles(p_item_list)) { - item_plugins[i]->set_object(p_item_list); - property_editor->edit(item_plugins[i]); - - toolbar_button->set_icon(EditorNode::get_singleton()->get_object_icon(item_list, "")); - - selected_idx = i; - return; - } - } - - selected_idx = -1; - property_editor->edit(nullptr); -} - -bool ItemListEditor::handles(Object *p_object) const { - for (int i = 0; i < item_plugins.size(); i++) { - if (item_plugins[i]->handles(p_object)) { - return true; - } - } - - return false; -} - -void ItemListEditor::_bind_methods() { -} - -ItemListEditor::ItemListEditor() { - selected_idx = -1; - item_list = nullptr; - - toolbar_button = memnew(Button); - toolbar_button->set_flat(true); - toolbar_button->set_text(TTR("Items")); - add_child(toolbar_button); - toolbar_button->connect("pressed", callable_mp(this, &ItemListEditor::_edit_items)); - - dialog = memnew(AcceptDialog); - dialog->set_title(TTR("Item List Editor")); - add_child(dialog); - - VBoxContainer *vbc = memnew(VBoxContainer); - dialog->add_child(vbc); - //dialog->set_child_rect(vbc); - - HBoxContainer *hbc = memnew(HBoxContainer); - hbc->set_h_size_flags(SIZE_EXPAND_FILL); - vbc->add_child(hbc); - - add_button = memnew(Button); - add_button->set_text(TTR("Add")); - hbc->add_child(add_button); - add_button->connect("pressed", callable_mp(this, &ItemListEditor::_add_pressed)); - - hbc->add_spacer(); - - clear_button = memnew(Button); - clear_button->set_text(TTR("Delete All")); - hbc->add_child(clear_button); - clear_button->connect("pressed", callable_mp(this, &ItemListEditor::_clear_pressed)); - - del_button = memnew(Button); - del_button->set_text(TTR("Delete")); - hbc->add_child(del_button); - del_button->connect("pressed", callable_mp(this, &ItemListEditor::_delete_pressed)); - - property_editor = memnew(EditorInspector); - vbc->add_child(property_editor); - property_editor->set_v_size_flags(SIZE_EXPAND_FILL); -} - -ItemListEditor::~ItemListEditor() { - for (int i = 0; i < item_plugins.size(); i++) { - memdelete(item_plugins[i]); - } -} - -void ItemListEditorPlugin::edit(Object *p_object) { - item_list_editor->edit(Object::cast_to<Node>(p_object)); -} - -bool ItemListEditorPlugin::handles(Object *p_object) const { - return item_list_editor->handles(p_object); -} - -void ItemListEditorPlugin::make_visible(bool p_visible) { - if (p_visible) { - item_list_editor->show(); - } else { - item_list_editor->hide(); - item_list_editor->edit(nullptr); - } -} - -ItemListEditorPlugin::ItemListEditorPlugin(EditorNode *p_node) { - editor = p_node; - item_list_editor = memnew(ItemListEditor); - CanvasItemEditor::get_singleton()->add_control_to_menu_panel(item_list_editor); - - item_list_editor->hide(); - item_list_editor->add_plugin(memnew(ItemListOptionButtonPlugin)); - item_list_editor->add_plugin(memnew(ItemListPopupMenuPlugin)); - item_list_editor->add_plugin(memnew(ItemListItemListPlugin)); -} - -ItemListEditorPlugin::~ItemListEditorPlugin() { -} diff --git a/editor/plugins/item_list_editor_plugin.h b/editor/plugins/item_list_editor_plugin.h deleted file mode 100644 index 8f61aef083..0000000000 --- a/editor/plugins/item_list_editor_plugin.h +++ /dev/null @@ -1,250 +0,0 @@ -/*************************************************************************/ -/* item_list_editor_plugin.h */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -#ifndef ITEM_LIST_EDITOR_PLUGIN_H -#define ITEM_LIST_EDITOR_PLUGIN_H - -#include "canvas_item_editor_plugin.h" -#include "editor/editor_inspector.h" -#include "editor/editor_node.h" -#include "editor/editor_plugin.h" -#include "scene/gui/menu_button.h" -#include "scene/gui/option_button.h" -#include "scene/gui/popup_menu.h" - -class ItemListPlugin : public Object { - GDCLASS(ItemListPlugin, Object); - -protected: - bool _set(const StringName &p_name, const Variant &p_value); - bool _get(const StringName &p_name, Variant &r_ret) const; - void _get_property_list(List<PropertyInfo> *p_list) const; - -public: - enum Flags { - FLAG_ICON = 1, - FLAG_CHECKABLE = 2, - FLAG_ID = 4, - FLAG_ENABLE = 8, - FLAG_SEPARATOR = 16 - }; - - virtual void set_object(Object *p_object) = 0; - virtual bool handles(Object *p_object) const = 0; - - virtual int get_flags() const = 0; - - virtual void set_item_text(int p_idx, const String &p_text) {} - virtual String get_item_text(int p_idx) const { return ""; }; - - virtual void set_item_icon(int p_idx, const Ref<Texture2D> &p_tex) {} - virtual Ref<Texture2D> get_item_icon(int p_idx) const { return Ref<Texture2D>(); }; - - virtual void set_item_checkable(int p_idx, bool p_check) {} - virtual void set_item_radio_checkable(int p_idx, bool p_check) {} - virtual bool is_item_checkable(int p_idx) const { return false; }; - virtual bool is_item_radio_checkable(int p_idx) const { return false; }; - - virtual void set_item_checked(int p_idx, bool p_checked) {} - virtual bool is_item_checked(int p_idx) const { return false; }; - - virtual void set_item_enabled(int p_idx, int p_enabled) {} - virtual bool is_item_enabled(int p_idx) const { return false; }; - - virtual void set_item_id(int p_idx, int p_id) {} - virtual int get_item_id(int p_idx) const { return -1; }; - - virtual void set_item_separator(int p_idx, bool p_separator) {} - virtual bool is_item_separator(int p_idx) const { return false; }; - - virtual void add_item() = 0; - virtual int get_item_count() const = 0; - virtual void erase(int p_idx) = 0; - - ItemListPlugin() {} -}; - -/////////////////////////////////////////////////////////////// - -class ItemListOptionButtonPlugin : public ItemListPlugin { - GDCLASS(ItemListOptionButtonPlugin, ItemListPlugin); - - OptionButton *ob; - -public: - virtual void set_object(Object *p_object) override; - virtual bool handles(Object *p_object) const override; - virtual int get_flags() const override; - - virtual void set_item_text(int p_idx, const String &p_text) override { ob->set_item_text(p_idx, p_text); } - virtual String get_item_text(int p_idx) const override { return ob->get_item_text(p_idx); } - - virtual void set_item_icon(int p_idx, const Ref<Texture2D> &p_tex) override { ob->set_item_icon(p_idx, p_tex); } - virtual Ref<Texture2D> get_item_icon(int p_idx) const override { return ob->get_item_icon(p_idx); } - - virtual void set_item_enabled(int p_idx, int p_enabled) override { ob->set_item_disabled(p_idx, !p_enabled); } - virtual bool is_item_enabled(int p_idx) const override { return !ob->is_item_disabled(p_idx); } - - virtual void set_item_id(int p_idx, int p_id) override { ob->set_item_id(p_idx, p_id); } - virtual int get_item_id(int p_idx) const override { return ob->get_item_id(p_idx); } - - virtual void add_item() override; - virtual int get_item_count() const override; - virtual void erase(int p_idx) override; - - ItemListOptionButtonPlugin(); -}; - -class ItemListPopupMenuPlugin : public ItemListPlugin { - GDCLASS(ItemListPopupMenuPlugin, ItemListPlugin); - - PopupMenu *pp; - -public: - virtual void set_object(Object *p_object) override; - virtual bool handles(Object *p_object) const override; - virtual int get_flags() const override; - - virtual void set_item_text(int p_idx, const String &p_text) override { pp->set_item_text(p_idx, p_text); } - virtual String get_item_text(int p_idx) const override { return pp->get_item_text(p_idx); } - - virtual void set_item_icon(int p_idx, const Ref<Texture2D> &p_tex) override { pp->set_item_icon(p_idx, p_tex); } - virtual Ref<Texture2D> get_item_icon(int p_idx) const override { return pp->get_item_icon(p_idx); } - - virtual void set_item_checkable(int p_idx, bool p_check) override { pp->set_item_as_checkable(p_idx, p_check); } - virtual void set_item_radio_checkable(int p_idx, bool p_check) override { pp->set_item_as_radio_checkable(p_idx, p_check); } - virtual bool is_item_checkable(int p_idx) const override { return pp->is_item_checkable(p_idx); } - virtual bool is_item_radio_checkable(int p_idx) const override { return pp->is_item_radio_checkable(p_idx); } - - virtual void set_item_checked(int p_idx, bool p_checked) override { pp->set_item_checked(p_idx, p_checked); } - virtual bool is_item_checked(int p_idx) const override { return pp->is_item_checked(p_idx); } - - virtual void set_item_enabled(int p_idx, int p_enabled) override { pp->set_item_disabled(p_idx, !p_enabled); } - virtual bool is_item_enabled(int p_idx) const override { return !pp->is_item_disabled(p_idx); } - - virtual void set_item_id(int p_idx, int p_id) override { pp->set_item_id(p_idx, p_id); } - virtual int get_item_id(int p_idx) const override { return pp->get_item_id(p_idx); } - - virtual void set_item_separator(int p_idx, bool p_separator) override { pp->set_item_as_separator(p_idx, p_separator); } - virtual bool is_item_separator(int p_idx) const override { return pp->is_item_separator(p_idx); } - - virtual void add_item() override; - virtual int get_item_count() const override; - virtual void erase(int p_idx) override; - - ItemListPopupMenuPlugin(); -}; - -/////////////////////////////////////////////////////////////// - -class ItemListItemListPlugin : public ItemListPlugin { - GDCLASS(ItemListItemListPlugin, ItemListPlugin); - - ItemList *pp; - -public: - virtual void set_object(Object *p_object) override; - virtual bool handles(Object *p_object) const override; - virtual int get_flags() const override; - - virtual void set_item_text(int p_idx, const String &p_text) override { pp->set_item_text(p_idx, p_text); } - virtual String get_item_text(int p_idx) const override { return pp->get_item_text(p_idx); } - - virtual void set_item_icon(int p_idx, const Ref<Texture2D> &p_tex) override { pp->set_item_icon(p_idx, p_tex); } - virtual Ref<Texture2D> get_item_icon(int p_idx) const override { return pp->get_item_icon(p_idx); } - - virtual void set_item_enabled(int p_idx, int p_enabled) override { pp->set_item_disabled(p_idx, !p_enabled); } - virtual bool is_item_enabled(int p_idx) const override { return !pp->is_item_disabled(p_idx); } - - virtual void add_item() override; - virtual int get_item_count() const override; - virtual void erase(int p_idx) override; - - ItemListItemListPlugin(); -}; - -/////////////////////////////////////////////////////////////// - -class ItemListEditor : public HBoxContainer { - GDCLASS(ItemListEditor, HBoxContainer); - - Node *item_list; - - Button *toolbar_button; - - AcceptDialog *dialog; - EditorInspector *property_editor; - Tree *tree; - Button *add_button; - Button *del_button; - Button *clear_button; - - int selected_idx; - - Vector<ItemListPlugin *> item_plugins; - - void _edit_items(); - - void _add_pressed(); - void _delete_pressed(); - void _clear_pressed(); - - void _node_removed(Node *p_node); - -protected: - void _notification(int p_notification); - static void _bind_methods(); - -public: - void edit(Node *p_item_list); - bool handles(Object *p_object) const; - void add_plugin(ItemListPlugin *p_plugin) { item_plugins.push_back(p_plugin); } - ItemListEditor(); - ~ItemListEditor(); -}; - -class ItemListEditorPlugin : public EditorPlugin { - GDCLASS(ItemListEditorPlugin, EditorPlugin); - - ItemListEditor *item_list_editor; - EditorNode *editor; - -public: - virtual String get_name() const override { return "ItemList"; } - bool has_main_screen() const override { return false; } - virtual void edit(Object *p_object) override; - virtual bool handles(Object *p_object) const override; - virtual void make_visible(bool p_visible) override; - - ItemListEditorPlugin(EditorNode *p_node); - ~ItemListEditorPlugin(); -}; - -#endif // ITEM_LIST_EDITOR_PLUGIN_H diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp index 30945826bb..140d2952dd 100644 --- a/editor/plugins/material_editor_plugin.cpp +++ b/editor/plugins/material_editor_plugin.cpp @@ -32,6 +32,7 @@ #include "editor/editor_scale.h" #include "scene/gui/subviewport_container.h" +#include "scene/resources/fog_material.h" #include "scene/resources/particles_material.h" #include "scene/resources/sky_material.h" @@ -283,6 +284,52 @@ Ref<Resource> StandardMaterial3DConversionPlugin::convert(const Ref<Resource> &p return smat; } +String ORMMaterial3DConversionPlugin::converts_to() const { + return "ShaderMaterial"; +} + +bool ORMMaterial3DConversionPlugin::handles(const Ref<Resource> &p_resource) const { + Ref<ORMMaterial3D> mat = p_resource; + return mat.is_valid(); +} + +Ref<Resource> ORMMaterial3DConversionPlugin::convert(const Ref<Resource> &p_resource) const { + Ref<ORMMaterial3D> mat = p_resource; + ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>()); + + Ref<ShaderMaterial> smat; + smat.instantiate(); + + Ref<Shader> shader; + shader.instantiate(); + + String code = RS::get_singleton()->shader_get_code(mat->get_shader_rid()); + + shader->set_code(code); + + smat->set_shader(shader); + + List<PropertyInfo> params; + RS::get_singleton()->shader_get_param_list(mat->get_shader_rid(), ¶ms); + + for (const PropertyInfo &E : params) { + // Texture parameter has to be treated specially since ORMMaterial3D saved it + // as RID but ShaderMaterial needs Texture itself + Ref<Texture2D> texture = mat->get_texture_by_name(E.name); + if (texture.is_valid()) { + smat->set_shader_param(E.name, texture); + } else { + Variant value = RS::get_singleton()->material_get_param(mat->get_rid(), E.name); + smat->set_shader_param(E.name, value); + } + } + + smat->set_render_priority(mat->get_render_priority()); + smat->set_local_to_scene(mat->is_local_to_scene()); + smat->set_name(mat->get_name()); + return smat; +} + String ParticlesMaterialConversionPlugin::converts_to() const { return "ShaderMaterial"; } @@ -477,3 +524,40 @@ Ref<Resource> PhysicalSkyMaterialConversionPlugin::convert(const Ref<Resource> & smat->set_name(mat->get_name()); return smat; } + +String FogMaterialConversionPlugin::converts_to() const { + return "ShaderMaterial"; +} + +bool FogMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const { + Ref<FogMaterial> mat = p_resource; + return mat.is_valid(); +} + +Ref<Resource> FogMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const { + Ref<FogMaterial> mat = p_resource; + ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>()); + + Ref<ShaderMaterial> smat; + smat.instantiate(); + + Ref<Shader> shader; + shader.instantiate(); + + String code = RS::get_singleton()->shader_get_code(mat->get_shader_rid()); + + shader->set_code(code); + + smat->set_shader(shader); + + List<PropertyInfo> params; + RS::get_singleton()->shader_get_param_list(mat->get_shader_rid(), ¶ms); + + for (const PropertyInfo &E : params) { + Variant value = RS::get_singleton()->material_get_param(mat->get_rid(), E.name); + smat->set_shader_param(E.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 a4532b58b3..62549843f7 100644 --- a/editor/plugins/material_editor_plugin.h +++ b/editor/plugins/material_editor_plugin.h @@ -107,6 +107,15 @@ public: virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const override; }; +class ORMMaterial3DConversionPlugin : public EditorResourceConversionPlugin { + GDCLASS(ORMMaterial3DConversionPlugin, EditorResourceConversionPlugin); + +public: + virtual String converts_to() const override; + virtual bool handles(const Ref<Resource> &p_resource) const override; + virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const override; +}; + class ParticlesMaterialConversionPlugin : public EditorResourceConversionPlugin { GDCLASS(ParticlesMaterialConversionPlugin, EditorResourceConversionPlugin); @@ -152,4 +161,13 @@ public: virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const override; }; +class FogMaterialConversionPlugin : public EditorResourceConversionPlugin { + GDCLASS(FogMaterialConversionPlugin, EditorResourceConversionPlugin); + +public: + virtual String converts_to() const override; + virtual bool handles(const Ref<Resource> &p_resource) const override; + virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const override; +}; + #endif // MATERIAL_EDITOR_PLUGIN_H diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp index 574d3ef27e..7a85c5167b 100644 --- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp +++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp @@ -79,7 +79,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) { Node *owner = node == get_tree()->get_edited_scene_root() ? node : node->get_owner(); ur->create_action(TTR("Create Static Trimesh Body")); - ur->add_do_method(node, "add_child", body); + ur->add_do_method(node, "add_child", body, true); ur->add_do_method(body, "set_owner", owner); ur->add_do_method(cshape, "set_owner", owner); ur->add_do_reference(body); @@ -113,7 +113,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) { Node *owner = instance == get_tree()->get_edited_scene_root() ? instance : instance->get_owner(); - ur->add_do_method(instance, "add_child", body); + ur->add_do_method(instance, "add_child", body, true); ur->add_do_method(body, "set_owner", owner); ur->add_do_method(cshape, "set_owner", owner); ur->add_do_reference(body); @@ -146,7 +146,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) { ur->create_action(TTR("Create Trimesh Static Shape")); - ur->add_do_method(node->get_parent(), "add_child", cshape); + ur->add_do_method(node->get_parent(), "add_child", cshape, true); ur->add_do_method(node->get_parent(), "move_child", cshape, node->get_index() + 1); ur->add_do_method(cshape, "set_owner", owner); ur->add_do_reference(cshape); @@ -185,7 +185,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) { Node *owner = node->get_owner(); - ur->add_do_method(node->get_parent(), "add_child", cshape); + ur->add_do_method(node->get_parent(), "add_child", cshape, true); ur->add_do_method(node->get_parent(), "move_child", cshape, node->get_index() + 1); ur->add_do_method(cshape, "set_owner", owner); ur->add_do_reference(cshape); @@ -247,7 +247,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) { UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); ur->create_action(TTR("Create Navigation Mesh")); - ur->add_do_method(node, "add_child", nmi); + ur->add_do_method(node, "add_child", nmi, true); ur->add_do_method(nmi, "set_owner", owner); ur->add_do_reference(nmi); @@ -426,7 +426,7 @@ void MeshInstance3DEditor::_create_outline_mesh() { ur->create_action(TTR("Create Outline")); - ur->add_do_method(node, "add_child", mi); + ur->add_do_method(node, "add_child", mi, true); ur->add_do_method(mi, "set_owner", owner); ur->add_do_reference(mi); diff --git a/editor/plugins/node_3d_editor_gizmos.cpp b/editor/plugins/node_3d_editor_gizmos.cpp index b28f3e134c..74fbef3caf 100644 --- a/editor/plugins/node_3d_editor_gizmos.cpp +++ b/editor/plugins/node_3d_editor_gizmos.cpp @@ -41,6 +41,7 @@ #include "scene/3d/collision_shape_3d.h" #include "scene/3d/cpu_particles_3d.h" #include "scene/3d/decal.h" +#include "scene/3d/fog_volume.h" #include "scene/3d/gpu_particles_3d.h" #include "scene/3d/gpu_particles_collision_3d.h" #include "scene/3d/joint_3d.h" @@ -3641,15 +3642,15 @@ void LightmapGIGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { const float c4 = 0.886227; const float c5 = 0.247708; Vector3 light = (c1 * sh_col[8] * (n.x * n.x - n.y * n.y) + - c3 * sh_col[6] * n.z * n.z + - c4 * sh_col[0] - - c5 * sh_col[6] + - 2.0 * c1 * sh_col[4] * n.x * n.y + - 2.0 * c1 * sh_col[7] * n.x * n.z + - 2.0 * c1 * sh_col[5] * n.y * n.z + - 2.0 * c2 * sh_col[3] * n.x + - 2.0 * c2 * sh_col[1] * n.y + - 2.0 * c2 * sh_col[2] * n.z); + c3 * sh_col[6] * n.z * n.z + + c4 * sh_col[0] - + c5 * sh_col[6] + + 2.0 * c1 * sh_col[4] * n.x * n.y + + 2.0 * c1 * sh_col[7] * n.x * n.z + + 2.0 * c1 * sh_col[5] * n.y * n.z + + 2.0 * c2 * sh_col[3] * n.x + + 2.0 * c2 * sh_col[1] * n.y + + 2.0 * c2 * sh_col[2] * n.z); colors.push_back(Color(light.x, light.y, light.z, 1)); } @@ -5272,3 +5273,119 @@ void Joint3DGizmoPlugin::CreateGeneric6DOFJointGizmo( #undef ADD_VTX } + +//// + +FogVolumeGizmoPlugin::FogVolumeGizmoPlugin() { + Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/fog_volume", Color(0.5, 0.7, 1)); + create_material("shape_material", gizmo_color); + gizmo_color.a = 0.15; + create_material("shape_material_internal", gizmo_color); + + create_handle_material("handles"); +} + +bool FogVolumeGizmoPlugin::has_gizmo(Node3D *p_spatial) { + return (Object::cast_to<FogVolume>(p_spatial) != nullptr); +} + +String FogVolumeGizmoPlugin::get_gizmo_name() const { + return "FogVolume"; +} + +int FogVolumeGizmoPlugin::get_priority() const { + return -1; +} + +String FogVolumeGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_id) const { + return "Extents"; +} + +Variant FogVolumeGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id) const { + return Vector3(p_gizmo->get_spatial_node()->call("get_extents")); +} + +void FogVolumeGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, Camera3D *p_camera, const Point2 &p_point) { + Node3D *sn = p_gizmo->get_spatial_node(); + + Transform3D gt = sn->get_global_transform(); + Transform3D gi = gt.affine_inverse(); + + Vector3 ray_from = p_camera->project_ray_origin(p_point); + Vector3 ray_dir = p_camera->project_ray_normal(p_point); + + Vector3 sg[2] = { gi.xform(ray_from), gi.xform(ray_from + ray_dir * 4096) }; + + Vector3 axis; + axis[p_id] = 1.0; + Vector3 ra, rb; + Geometry3D::get_closest_points_between_segments(Vector3(), axis * 4096, sg[0], sg[1], ra, rb); + float d = ra[p_id]; + if (Node3DEditor::get_singleton()->is_snap_enabled()) { + d = Math::snapped(d, Node3DEditor::get_singleton()->get_translate_snap()); + } + + if (d < 0.001) { + d = 0.001; + } + + Vector3 he = sn->call("get_extents"); + he[p_id] = d; + sn->call("set_extents", he); +} + +void FogVolumeGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, const Variant &p_restore, bool p_cancel) { + Node3D *sn = p_gizmo->get_spatial_node(); + + if (p_cancel) { + sn->call("set_extents", p_restore); + return; + } + + UndoRedo *ur = Node3DEditor::get_singleton()->get_undo_redo(); + ur->create_action(TTR("Change Fog Volume Extents")); + ur->add_do_method(sn, "set_extents", sn->call("get_extents")); + ur->add_undo_method(sn, "set_extents", p_restore); + ur->commit_action(); +} + +void FogVolumeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { + Node3D *cs = p_gizmo->get_spatial_node(); + + p_gizmo->clear(); + + if (RS::FogVolumeShape(int(p_gizmo->get_spatial_node()->call("get_shape"))) != RS::FOG_VOLUME_SHAPE_WORLD) { + const Ref<Material> material = + get_material("shape_material", p_gizmo); + const Ref<Material> material_internal = + get_material("shape_material_internal", p_gizmo); + + Ref<Material> handles_material = get_material("handles"); + + Vector<Vector3> lines; + AABB aabb; + aabb.position = -cs->call("get_extents").operator Vector3(); + aabb.size = aabb.position * -2; + + for (int i = 0; i < 12; i++) { + Vector3 a, b; + aabb.get_edge(i, a, b); + lines.push_back(a); + lines.push_back(b); + } + + Vector<Vector3> handles; + + for (int i = 0; i < 3; i++) { + Vector3 ax; + ax[i] = cs->call("get_extents").operator Vector3()[i]; + handles.push_back(ax); + } + + p_gizmo->add_lines(lines, material); + p_gizmo->add_collision_segments(lines); + p_gizmo->add_handles(handles, handles_material); + } +} + +///// diff --git a/editor/plugins/node_3d_editor_gizmos.h b/editor/plugins/node_3d_editor_gizmos.h index d1aca4d92e..56e4ad5518 100644 --- a/editor/plugins/node_3d_editor_gizmos.h +++ b/editor/plugins/node_3d_editor_gizmos.h @@ -669,4 +669,21 @@ public: Joint3DGizmoPlugin(); }; +class FogVolumeGizmoPlugin : public EditorNode3DGizmoPlugin { + GDCLASS(FogVolumeGizmoPlugin, EditorNode3DGizmoPlugin); + +public: + bool has_gizmo(Node3D *p_spatial) override; + String get_gizmo_name() const override; + int get_priority() const override; + void redraw(EditorNode3DGizmo *p_gizmo) override; + + String get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_id) const override; + Variant get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id) const override; + void set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, Camera3D *p_camera, const Point2 &p_point) override; + void commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, const Variant &p_restore, bool p_cancel = false) override; + + FogVolumeGizmoPlugin(); +}; + #endif // NODE_3D_EDITOR_GIZMOS_H diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index af58d8bbdc..5b1cbe6f00 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -489,7 +489,7 @@ ObjectID Node3DEditorViewport::_select_ray(const Point2 &p_pos) { RS::get_singleton()->sdfgi_set_debug_probe_select(pos, ray); } - Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_ray(pos, ray, get_tree()->get_root()->get_world_3d()->get_scenario()); + Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_ray(pos, pos + ray * camera->get_far(), get_tree()->get_root()->get_world_3d()->get_scenario()); Set<Ref<EditorNode3DGizmo>> found_gizmos; Node *edited_scene = get_tree()->get_edited_scene_root(); @@ -552,7 +552,7 @@ void Node3DEditorViewport::_find_items_at_pos(const Point2 &p_pos, Vector<_RayRe Vector3 ray = _get_ray(p_pos); Vector3 pos = _get_ray_pos(p_pos); - Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_ray(pos, ray, get_tree()->get_root()->get_world_3d()->get_scenario()); + Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_ray(pos, pos + ray * camera->get_far(), get_tree()->get_root()->get_world_3d()->get_scenario()); Set<Node3D *> found_nodes; for (int i = 0; i < instances.size(); i++) { @@ -1855,7 +1855,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { motion_snapped.snap(Vector3(snap, snap, snap)); // This might not be necessary anymore after issue #288 is solved (in 4.0?). set_message(TTR("Scaling: ") + "(" + String::num(motion_snapped.x, snap_step_decimals) + ", " + - String::num(motion_snapped.y, snap_step_decimals) + ", " + String::num(motion_snapped.z, snap_step_decimals) + ")"); + String::num(motion_snapped.y, snap_step_decimals) + ", " + String::num(motion_snapped.z, snap_step_decimals) + ")"); List<Node *> &selection = editor_selection->get_selected_node_list(); for (Node *E : selection) { @@ -1954,7 +1954,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { Vector3 motion_snapped = motion; motion_snapped.snap(Vector3(snap, snap, snap)); set_message(TTR("Translating: ") + "(" + String::num(motion_snapped.x, snap_step_decimals) + ", " + - String::num(motion_snapped.y, snap_step_decimals) + ", " + String::num(motion_snapped.z, snap_step_decimals) + ")"); + String::num(motion_snapped.y, snap_step_decimals) + ", " + String::num(motion_snapped.z, snap_step_decimals) + ")"); List<Node *> &selection = editor_selection->get_selected_node_list(); for (Node *E : selection) { @@ -2245,12 +2245,14 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { _menu_option(VIEW_RIGHT); } if (ED_IS_SHORTCUT("spatial_editor/orbit_view_down", p_event)) { - cursor.x_rot -= Math_PI / 12.0; + // Clamp rotation to roughly -90..90 degrees so the user can't look upside-down and end up disoriented. + cursor.x_rot = CLAMP(cursor.x_rot - Math_PI / 12.0, -1.57, 1.57); view_type = VIEW_TYPE_USER; _update_name(); } if (ED_IS_SHORTCUT("spatial_editor/orbit_view_up", p_event)) { - cursor.x_rot += Math_PI / 12.0; + // Clamp rotation to roughly -90..90 degrees so the user can't look upside-down and end up disoriented. + cursor.x_rot = CLAMP(cursor.x_rot + Math_PI / 12.0, -1.57, 1.57); view_type = VIEW_TYPE_USER; _update_name(); } @@ -2885,13 +2887,13 @@ void Node3DEditorViewport::_notification(int p_what) { // Color labels depending on performance level ("good" = green, "OK" = yellow, "bad" = red). // Middle point is at 15 ms. - cpu_time_label->set_text(vformat(TTR("CPU Time: %s ms"), rtos(cpu_time).pad_decimals(1))); + cpu_time_label->set_text(vformat(TTR("CPU Time: %s ms"), rtos(cpu_time).pad_decimals(2))); cpu_time_label->add_theme_color_override( "font_color", frame_time_gradient->get_color_at_offset( Math::range_lerp(cpu_time, 0, 30, 0, 1))); - gpu_time_label->set_text(vformat(TTR("GPU Time: %s ms"), rtos(gpu_time).pad_decimals(1))); + gpu_time_label->set_text(vformat(TTR("GPU Time: %s ms"), rtos(gpu_time).pad_decimals(2))); // Middle point is at 15 ms. gpu_time_label->add_theme_color_override( "font_color", @@ -3936,9 +3938,13 @@ Vector3 Node3DEditorViewport::_get_instance_position(const Point2 &p_pos) const Vector3 point = world_pos + world_ray * MAX_DISTANCE; PhysicsDirectSpaceState3D *ss = get_tree()->get_root()->get_world_3d()->get_direct_space_state(); - PhysicsDirectSpaceState3D::RayResult result; - if (ss->intersect_ray(world_pos, world_pos + world_ray * MAX_DISTANCE, result)) { + PhysicsDirectSpaceState3D::RayParameters ray_params; + ray_params.from = world_pos; + ray_params.to = world_pos + world_ray * MAX_DISTANCE; + + PhysicsDirectSpaceState3D::RayResult result; + if (ss->intersect_ray(ray_params, result)) { point = result.position; } @@ -4376,7 +4382,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, Edito const int wireframe_idx = view_menu->get_popup()->get_item_index(VIEW_DISPLAY_WIREFRAME); const int overdraw_idx = view_menu->get_popup()->get_item_index(VIEW_DISPLAY_OVERDRAW); const int shadeless_idx = view_menu->get_popup()->get_item_index(VIEW_DISPLAY_SHADELESS); - const String unsupported_tooltip = TTR("Not available when using the GLES2 renderer."); + const String unsupported_tooltip = TTR("Not available when using the OpenGL renderer."); view_menu->get_popup()->set_item_disabled(normal_idx, true); view_menu->get_popup()->set_item_tooltip(normal_idx, unsupported_tooltip); @@ -6566,7 +6572,12 @@ void Node3DEditor::snap_selected_nodes_to_floor() { Vector3 to = from - Vector3(0.0, max_snap_height, 0.0); Set<RID> excluded = _get_physics_bodies_rid(sp); - if (ss->intersect_ray(from, to, result, excluded)) { + PhysicsDirectSpaceState3D::RayParameters ray_params; + ray_params.from = from; + ray_params.to = to; + ray_params.exclude = excluded; + + if (ss->intersect_ray(ray_params, result)) { snapped_to_floor = true; } } @@ -6583,7 +6594,12 @@ void Node3DEditor::snap_selected_nodes_to_floor() { Vector3 to = from - Vector3(0.0, max_snap_height, 0.0); Set<RID> excluded = _get_physics_bodies_rid(sp); - if (ss->intersect_ray(from, to, result, excluded)) { + PhysicsDirectSpaceState3D::RayParameters ray_params; + ray_params.from = from; + ray_params.to = to; + ray_params.exclude = excluded; + + if (ss->intersect_ray(ray_params, result)) { Vector3 position_offset = d["position_offset"]; Transform3D new_transform = sp->get_global_transform(); @@ -6636,7 +6652,7 @@ void Node3DEditor::_add_sun_to_scene(bool p_already_added_environment) { Node *new_sun = preview_sun->duplicate(); undo_redo->create_action(TTR("Add Preview Sun to Scene")); - undo_redo->add_do_method(base, "add_child", new_sun); + undo_redo->add_do_method(base, "add_child", new_sun, true); // Move to the beginning of the scene tree since more "global" nodes // generally look better when placed at the top. undo_redo->add_do_method(base, "move_child", new_sun, 0); @@ -6666,7 +6682,7 @@ void Node3DEditor::_add_environment_to_scene(bool p_already_added_sun) { new_env->set_environment(preview_environment->get_environment()->duplicate(true)); undo_redo->create_action(TTR("Add Preview Environment to Scene")); - undo_redo->add_do_method(base, "add_child", new_env); + undo_redo->add_do_method(base, "add_child", new_env, true); // Move to the beginning of the scene tree since more "global" nodes // generally look better when placed at the top. undo_redo->add_do_method(base, "move_child", new_env, 0); @@ -7004,6 +7020,7 @@ void Node3DEditor::_register_all_gizmos() { add_gizmo_plugin(Ref<NavigationRegion3DGizmoPlugin>(memnew(NavigationRegion3DGizmoPlugin))); add_gizmo_plugin(Ref<Joint3DGizmoPlugin>(memnew(Joint3DGizmoPlugin))); add_gizmo_plugin(Ref<PhysicalBone3DGizmoPlugin>(memnew(PhysicalBone3DGizmoPlugin))); + add_gizmo_plugin(Ref<FogVolumeGizmoPlugin>(memnew(FogVolumeGizmoPlugin))); } void Node3DEditor::_bind_methods() { @@ -7131,7 +7148,7 @@ void Node3DEditor::_update_preview_environment() { } else { if (!preview_sun->get_parent()) { - add_child(preview_sun); + add_child(preview_sun, true); sun_state->hide(); sun_vb->show(); } diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h index e1318f52a8..8d647808ba 100644 --- a/editor/plugins/node_3d_editor_plugin.h +++ b/editor/plugins/node_3d_editor_plugin.h @@ -41,6 +41,7 @@ #include "scene/3d/world_environment.h" #include "scene/gui/panel_container.h" #include "scene/resources/environment.h" +#include "scene/resources/fog_material.h" #include "scene/resources/sky_material.h" class Node3DEditor; diff --git a/editor/plugins/ot_features_plugin.cpp b/editor/plugins/ot_features_plugin.cpp index fd42bce06e..c949621e28 100644 --- a/editor/plugins/ot_features_plugin.cpp +++ b/editor/plugins/ot_features_plugin.cpp @@ -185,12 +185,6 @@ bool EditorInspectorPluginOpenTypeFeatures::can_handle(Object *p_object) { return (Object::cast_to<Control>(p_object) != nullptr); } -void EditorInspectorPluginOpenTypeFeatures::parse_begin(Object *p_object) { -} - -void EditorInspectorPluginOpenTypeFeatures::parse_category(Object *p_object, const String &p_parse_category) { -} - bool EditorInspectorPluginOpenTypeFeatures::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) { if (p_path == "opentype_features/_new") { OpenTypeFeaturesAdd *editor = memnew(OpenTypeFeaturesAdd); diff --git a/editor/plugins/ot_features_plugin.h b/editor/plugins/ot_features_plugin.h index dbafa3bbf6..add491ed48 100644 --- a/editor/plugins/ot_features_plugin.h +++ b/editor/plugins/ot_features_plugin.h @@ -86,8 +86,6 @@ class EditorInspectorPluginOpenTypeFeatures : public EditorInspectorPlugin { public: virtual bool can_handle(Object *p_object) override; - virtual void parse_begin(Object *p_object) override; - virtual void parse_category(Object *p_object, const String &p_parse_category) override; virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override; }; diff --git a/editor/plugins/path_3d_editor_plugin.cpp b/editor/plugins/path_3d_editor_plugin.cpp index e2902feba1..f9a5f429d2 100644 --- a/editor/plugins/path_3d_editor_plugin.cpp +++ b/editor/plugins/path_3d_editor_plugin.cpp @@ -614,15 +614,6 @@ Path3DEditorPlugin::Path3DEditorPlugin(EditorNode *p_node) { menu->connect("id_pressed", callable_mp(this, &Path3DEditorPlugin::_handle_option_pressed)); curve_edit->set_pressed(true); - /* - collision_polygon_editor = memnew( PathEditor(p_node) ); - editor->get_main_control()->add_child(collision_polygon_editor); - collision_polygon_editor->set_margin(MARGIN_LEFT,200); - collision_polygon_editor->set_margin(MARGIN_RIGHT,230); - collision_polygon_editor->set_margin(MARGIN_TOP,0); - collision_polygon_editor->set_margin(MARGIN_BOTTOM,10); - collision_polygon_editor->hide(); - */ } Path3DEditorPlugin::~Path3DEditorPlugin() { diff --git a/editor/plugins/root_motion_editor_plugin.cpp b/editor/plugins/root_motion_editor_plugin.cpp index ed91f174d1..0f3c50a861 100644 --- a/editor/plugins/root_motion_editor_plugin.cpp +++ b/editor/plugins/root_motion_editor_plugin.cpp @@ -271,11 +271,7 @@ EditorPropertyRootMotion::EditorPropertyRootMotion() { ////////////////////////// bool EditorInspectorRootMotionPlugin::can_handle(Object *p_object) { - return true; //can handle everything -} - -void EditorInspectorRootMotionPlugin::parse_begin(Object *p_object) { - //do none + return true; // Can handle everything. } bool EditorInspectorRootMotionPlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) { @@ -288,9 +284,5 @@ bool EditorInspectorRootMotionPlugin::parse_property(Object *p_object, const Var return true; } - return false; //can be overridden, although it will most likely be last anyway -} - -void EditorInspectorRootMotionPlugin::parse_end() { - //do none + return false; } diff --git a/editor/plugins/root_motion_editor_plugin.h b/editor/plugins/root_motion_editor_plugin.h index 1484af62e8..c05975b6c3 100644 --- a/editor/plugins/root_motion_editor_plugin.h +++ b/editor/plugins/root_motion_editor_plugin.h @@ -64,9 +64,7 @@ class EditorInspectorRootMotionPlugin : public EditorInspectorPlugin { public: virtual bool can_handle(Object *p_object) override; - virtual void parse_begin(Object *p_object) override; virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override; - virtual void parse_end() override; }; #endif // ROOT_MOTION_EDITOR_PLUGIN_H diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 677a5f1f2c..dbd5b32e3c 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -227,12 +227,6 @@ void ScriptEditorBase::_bind_methods() { ADD_SIGNAL(MethodInfo("replace_in_files_requested", PropertyInfo(Variant::STRING, "text"))); } -static bool _is_built_in_script(Script *p_script) { - String path = p_script->get_path(); - - return path.find("::") != -1; -} - class EditorScriptCodeCompletionCache : public ScriptCodeCompletionCache { struct Cache { uint64_t time_loaded = 0; @@ -315,10 +309,7 @@ void ScriptEditorQuickOpen::_text_changed(const String &p_newtext) { void ScriptEditorQuickOpen::_sbox_input(const Ref<InputEvent> &p_ie) { Ref<InputEventKey> k = p_ie; - if (k.is_valid() && (k->get_keycode() == KEY_UP || - k->get_keycode() == KEY_DOWN || - k->get_keycode() == KEY_PAGEUP || - k->get_keycode() == KEY_PAGEDOWN)) { + if (k.is_valid() && (k->get_keycode() == KEY_UP || k->get_keycode() == KEY_DOWN || k->get_keycode() == KEY_PAGEUP || k->get_keycode() == KEY_PAGEDOWN)) { search_options->gui_input(k); search_box->accept_event(); } @@ -767,7 +758,7 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save, bool p_history_back) { if (p_save && file.is_valid()) { // Do not try to save internal scripts, but prompt to save in-memory // scripts which are not saved to disk yet (have empty path). - if (file->get_path().find("local://") == -1 && file->get_path().find("::") == -1) { + if (file->is_built_in()) { save_current_script(); } } @@ -913,7 +904,7 @@ void ScriptEditor::_resave_scripts(const String &p_str) { RES script = se->get_edited_resource(); - if (script->get_path() == "" || script->get_path().find("local://") != -1 || script->get_path().find("::") != -1) { + if (script->is_built_in()) { continue; //internal script, who cares } @@ -954,7 +945,7 @@ void ScriptEditor::_reload_scripts() { RES edited_res = se->get_edited_resource(); - if (edited_res->get_path() == "" || edited_res->get_path().find("local://") != -1 || edited_res->get_path().find("::") != -1) { + if (edited_res->is_built_in()) { continue; //internal script, who cares } @@ -998,10 +989,6 @@ void ScriptEditor::_res_saved_callback(const Ref<Resource> &p_res) { RES script = se->get_edited_resource(); - if (script->get_path() == "" || script->get_path().find("local://") != -1 || script->get_path().find("::") != -1) { - continue; //internal script, who cares - } - if (script == p_res) { se->tag_saved_version(); } @@ -1011,6 +998,31 @@ void ScriptEditor::_res_saved_callback(const Ref<Resource> &p_res) { _trigger_live_script_reload(); } +void ScriptEditor::_scene_saved_callback(const String &p_path) { + // If scene was saved, mark all built-in scripts from that scene as saved. + for (int i = 0; i < tab_container->get_child_count(); i++) { + ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i)); + if (!se) { + continue; + } + + RES edited_res = se->get_edited_resource(); + + if (!edited_res->is_built_in()) { + continue; // External script, who cares. + } + + if (edited_res->get_path().get_slice("::", 0) == p_path) { + se->tag_saved_version(); + } + + Ref<Script> scr = edited_res; + if (scr.is_valid() && scr->is_tool()) { + scr->reload(true); + } + } +} + void ScriptEditor::_trigger_live_script_reload() { if (!pending_auto_reload && auto_reload_running_scripts) { call_deferred(SNAME("_live_auto_reload_running_scripts")); @@ -1040,7 +1052,7 @@ bool ScriptEditor::_test_script_times_on_disk(RES p_for_script) { continue; } - if (edited_res->get_path() == "" || edited_res->get_path().find("local://") != -1 || edited_res->get_path().find("::") != -1) { + if (edited_res->is_built_in()) { continue; //internal script, who cares } @@ -1534,6 +1546,7 @@ void ScriptEditor::_notification(int p_what) { editor->connect("stop_pressed", callable_mp(this, &ScriptEditor::_editor_stop)); editor->connect("script_add_function_request", callable_mp(this, &ScriptEditor::_add_callback)); editor->connect("resource_saved", callable_mp(this, &ScriptEditor::_res_saved_callback)); + editor->connect("scene_saved", callable_mp(this, &ScriptEditor::_scene_saved_callback)); editor->get_filesystem_dock()->connect("files_moved", callable_mp(this, &ScriptEditor::_files_moved)); editor->get_filesystem_dock()->connect("file_removed", callable_mp(this, &ScriptEditor::_file_removed)); script_list->connect("item_selected", callable_mp(this, &ScriptEditor::_script_selected)); @@ -1627,8 +1640,8 @@ void ScriptEditor::close_builtin_scripts_from_scene(const String &p_scene) { continue; } - if (script->get_path().find("::") != -1 && script->get_path().begins_with(p_scene)) { //is an internal script and belongs to scene being closed - _close_tab(i); + if (script->is_built_in() && script->get_path().begins_with(p_scene)) { //is an internal script and belongs to scene being closed + _close_tab(i, false); i--; } } @@ -1935,20 +1948,7 @@ void ScriptEditor::_update_script_names() { // to update original path to previously edited resource. se->set_meta("_edit_res_path", path); } - bool built_in = !path.is_resource_file(); - String name; - - if (built_in) { - name = path.get_file(); - const String &resource_name = se->get_edited_resource()->get_name(); - if (resource_name != "") { - // If the built-in script has a custom resource name defined, - // display the built-in script name as follows: `ResourceName (scene_file.tscn)` - name = vformat("%s (%s)", resource_name, name.substr(0, name.find("::", 0))); - } - } else { - name = se->get_name(); - } + String name = se->get_name(); _ScriptEditorItemData sd; sd.icon = icon; @@ -2183,9 +2183,10 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra Ref<Script> script = p_resource; // Don't open dominant script if using an external editor. - const bool use_external_editor = + bool use_external_editor = EditorSettings::get_singleton()->get("text_editor/external/use_external_editor") || (script.is_valid() && script->get_language()->overrides_external_editor()); + use_external_editor = use_external_editor && !(script.is_valid() && script->is_built_in()); // Ignore external editor for built-in scripts. const bool open_dominant = EditorSettings::get_singleton()->get("text_editor/behavior/files/open_dominant_script_on_scene_change"); const bool should_open = (open_dominant && !use_external_editor) || !EditorNode::get_singleton()->is_changing_scene(); @@ -2411,7 +2412,17 @@ void ScriptEditor::save_current_script() { } } - editor->save_resource(resource); + if (resource->is_built_in()) { + // If built-in script, save the scene instead. + const String scene_path = resource->get_path().get_slice("::", 0); + if (!scene_path.is_empty()) { + Vector<String> scene_to_save; + scene_to_save.push_back(scene_path); + editor->save_scene_list(scene_to_save); + } + } else { + editor->save_resource(resource); + } if (script != nullptr) { const Vector<DocData::ClassDoc> &documentations = script->get_documentation(); @@ -2424,6 +2435,8 @@ void ScriptEditor::save_current_script() { } void ScriptEditor::save_all_scripts() { + Vector<String> scenes_to_save; + for (int i = 0; i < tab_container->get_child_count(); i++) { ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i)); if (!se) { @@ -2453,7 +2466,7 @@ void ScriptEditor::save_all_scripts() { se->apply_code(); } - if (edited_res->get_path() != "" && edited_res->get_path().find("local://") == -1 && edited_res->get_path().find("::") == -1) { + if (!edited_res->is_built_in()) { Ref<TextFile> text_file = edited_res; Ref<Script> script = edited_res; @@ -2482,9 +2495,19 @@ void ScriptEditor::save_all_scripts() { update_doc(doc.name); } } + } else { + // For built-in scripts, save their scenes instead. + const String scene_path = edited_res->get_path().get_slice("::", 0); + if (!scenes_to_save.has(scene_path)) { + scenes_to_save.push_back(scene_path); + } } } + if (!scenes_to_save.is_empty()) { + editor->save_scene_list(scenes_to_save); + } + _update_script_names(); EditorFileSystem::get_singleton()->update_script_classes(); } @@ -2573,7 +2596,7 @@ void ScriptEditor::_add_callback(Object *p_obj, const String &p_function, const script_list->select(script_list->find_metadata(i)); // Save the current script so the changes can be picked up by an external editor. - if (!_is_built_in_script(script.ptr())) { // But only if it's not built-in script. + if (!script.ptr()->is_built_in()) { // But only if it's not built-in script. save_current_script(); } @@ -3349,9 +3372,10 @@ Array ScriptEditor::_get_open_script_editors() const { void ScriptEditor::set_scene_root_script(Ref<Script> p_script) { // Don't open dominant script if using an external editor. - const bool use_external_editor = + bool use_external_editor = EditorSettings::get_singleton()->get("text_editor/external/use_external_editor") || (p_script.is_valid() && p_script->get_language()->overrides_external_editor()); + use_external_editor = use_external_editor && !(p_script.is_valid() && p_script->is_built_in()); // Ignore external editor for built-in scripts. const bool open_dominant = EditorSettings::get_singleton()->get("text_editor/behavior/files/open_dominant_script_on_scene_change"); if (open_dominant && !use_external_editor && p_script.is_valid()) { @@ -3441,6 +3465,9 @@ void ScriptEditor::_on_find_in_files_result_selected(String fpath, int line_numb shader_editor->make_visible(true); shader_editor->get_shader_editor()->goto_line_selection(line_number - 1, begin, end); return; + } else if (fpath.get_extension() == "tscn") { + editor->load_scene(fpath); + return; } else { Ref<Script> script = res; if (script.is_valid()) { @@ -3861,7 +3888,7 @@ void ScriptEditorPlugin::edit(Object *p_object) { Script *p_script = Object::cast_to<Script>(p_object); String res_path = p_script->get_path().get_slice("::", 0); - if (_is_built_in_script(p_script)) { + if (p_script->is_built_in()) { if (ResourceLoader::get_resource_type(res_path) == "PackedScene") { if (!EditorNode::get_singleton()->is_scene_open(res_path)) { EditorNode::get_singleton()->load_scene(res_path); diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index 2b0bdfd109..0adeca031e 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -365,6 +365,7 @@ class ScriptEditor : public PanelContainer { void _add_callback(Object *p_obj, const String &p_function, const PackedStringArray &p_args); void _res_saved_callback(const Ref<Resource> &p_res); + void _scene_saved_callback(const String &p_path); bool open_textfile_after_create = true; bool trim_trailing_whitespace_on_save; diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 2c02389db2..a5088a5246 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -375,18 +375,21 @@ void ScriptTextEditor::ensure_focus() { String ScriptTextEditor::get_name() { String name; - if (script->get_path().find("local://") == -1 && script->get_path().find("::") == -1) { - name = script->get_path().get_file(); - if (is_unsaved()) { - if (script->get_path().is_empty()) { - name = TTR("[unsaved]"); - } - name += "(*)"; + name = script->get_path().get_file(); + if (name.is_empty()) { + // This appears for newly created built-in scripts before saving the scene. + name = TTR("[unsaved]"); + } else if (script->is_built_in()) { + const String &script_name = script->get_name(); + if (script_name != "") { + // If the built-in script has a custom resource name defined, + // display the built-in script name as follows: `ResourceName (scene_file.tscn)` + name = vformat("%s (%s)", script_name, name.get_slice("::", 0)); } - } else if (script->get_name() != "") { - name = script->get_name(); - } else { - name = script->get_class() + "(" + itos(script->get_instance_id()) + ")"; + } + + if (is_unsaved()) { + name += "(*)"; } return name; @@ -658,7 +661,7 @@ void ScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_fo continue; } - if (script->get_path() == "" || script->get_path().find("local://") != -1 || script->get_path().find("::") != -1) { + if (script->is_built_in()) { continue; //internal script, who cares, though weird } @@ -1396,11 +1399,12 @@ Variant ScriptTextEditor::get_drag_data_fw(const Point2 &p_point, Control *p_fro bool ScriptTextEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const { Dictionary d = p_data; - if (d.has("type") && (String(d["type"]) == "resource" || - String(d["type"]) == "files" || - String(d["type"]) == "nodes" || - String(d["type"]) == "obj_property" || - String(d["type"]) == "files_and_dirs")) { + if (d.has("type") && + (String(d["type"]) == "resource" || + String(d["type"]) == "files" || + String(d["type"]) == "nodes" || + String(d["type"]) == "obj_property" || + String(d["type"]) == "files_and_dirs")) { return true; } @@ -1625,10 +1629,7 @@ void ScriptTextEditor::_color_changed(const Color &p_color) { } String line = code_editor->get_text_editor()->get_line(color_position.x); - int color_args_pos = line.find(color_args, color_position.y); - String line_with_replaced_args = line; - line_with_replaced_args.erase(color_args_pos, color_args.length()); - line_with_replaced_args = line_with_replaced_args.insert(color_args_pos, new_args); + String line_with_replaced_args = line.replace(color_args, new_args); color_args = new_args; code_editor->get_text_editor()->begin_complex_operation(); diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index a88e24c0d0..9d2b4c88c5 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -178,6 +178,10 @@ void ShaderTextEditor::_check_shader_mode() { mode = Shader::MODE_CANVAS_ITEM; } else if (type == "particles") { mode = Shader::MODE_PARTICLES; + } else if (type == "sky") { + mode = Shader::MODE_SKY; + } else if (type == "fog") { + mode = Shader::MODE_FOG; } else { mode = Shader::MODE_SPATIAL; } @@ -478,8 +482,7 @@ void ShaderEditor::_check_for_external_edit() { return; } - // internal shader. - if (shader->get_path() == "" || shader->get_path().find("local://") != -1 || shader->get_path().find("::") != -1) { + if (shader->is_built_in()) { return; } @@ -526,7 +529,7 @@ void ShaderEditor::save_external_data(const String &p_str) { } apply_shaders(); - if (shader->get_path() != "" && shader->get_path().find("local://") == -1 && shader->get_path().find("::") == -1) { + if (!shader->is_built_in()) { //external shader, save it ResourceSaver::save(shader->get_path(), shader); } diff --git a/editor/plugins/style_box_editor_plugin.cpp b/editor/plugins/style_box_editor_plugin.cpp index 91c5e96f08..1c7f319280 100644 --- a/editor/plugins/style_box_editor_plugin.cpp +++ b/editor/plugins/style_box_editor_plugin.cpp @@ -44,13 +44,6 @@ void EditorInspectorPluginStyleBox::parse_begin(Object *p_object) { add_custom_control(preview); } -bool EditorInspectorPluginStyleBox::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, bool p_wide) { - return false; //do not want -} - -void EditorInspectorPluginStyleBox::parse_end() { -} - void StyleBoxPreview::edit(const Ref<StyleBox> &p_stylebox) { if (stylebox.is_valid()) { stylebox->disconnect("changed", callable_mp(this, &StyleBoxPreview::_sb_changed)); diff --git a/editor/plugins/style_box_editor_plugin.h b/editor/plugins/style_box_editor_plugin.h index 8ca348bd80..d82e5ab05e 100644 --- a/editor/plugins/style_box_editor_plugin.h +++ b/editor/plugins/style_box_editor_plugin.h @@ -61,8 +61,6 @@ class EditorInspectorPluginStyleBox : public EditorInspectorPlugin { public: virtual bool can_handle(Object *p_object) override; virtual void parse_begin(Object *p_object) override; - virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override; - virtual void parse_end() override; }; class StyleBoxEditorPlugin : public EditorPlugin { diff --git a/editor/plugins/text_control_editor_plugin.cpp b/editor/plugins/text_control_editor_plugin.cpp new file mode 100644 index 0000000000..c878c83430 --- /dev/null +++ b/editor/plugins/text_control_editor_plugin.cpp @@ -0,0 +1,375 @@ +/*************************************************************************/ +/* text_control_editor_plugin.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + +#include "text_control_editor_plugin.h" + +#include "editor/editor_scale.h" + +void TextControlEditor::_notification(int p_notification) { + switch (p_notification) { + case NOTIFICATION_ENTER_TREE: { + if (!EditorFileSystem::get_singleton()->is_connected("filesystem_changed", callable_mp(this, &TextControlEditor::_reload_fonts))) { + EditorFileSystem::get_singleton()->connect("filesystem_changed", callable_mp(this, &TextControlEditor::_reload_fonts), make_binds("")); + } + [[fallthrough]]; + } + case NOTIFICATION_THEME_CHANGED: { + clear_formatting->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons"))); + } break; + case NOTIFICATION_EXIT_TREE: { + if (EditorFileSystem::get_singleton()->is_connected("filesystem_changed", callable_mp(this, &TextControlEditor::_reload_fonts))) { + EditorFileSystem::get_singleton()->disconnect("filesystem_changed", callable_mp(this, &TextControlEditor::_reload_fonts)); + } + } break; + default: + break; + } +} + +void TextControlEditor::_find_resources(EditorFileSystemDirectory *p_dir) { + for (int i = 0; i < p_dir->get_subdir_count(); i++) { + _find_resources(p_dir->get_subdir(i)); + } + + for (int i = 0; i < p_dir->get_file_count(); i++) { + if (p_dir->get_file_type(i) == "FontData") { + Ref<FontData> fd = ResourceLoader::load(p_dir->get_file_path(i)); + if (fd.is_valid()) { + String name = fd->get_font_name(); + String sty = fd->get_font_style_name(); + if (sty.is_empty()) { + sty = "Default"; + } + fonts[name][sty] = p_dir->get_file_path(i); + } + } + } +} + +void TextControlEditor::_reload_fonts(const String &p_path) { + fonts.clear(); + _find_resources(EditorFileSystem::get_singleton()->get_filesystem()); + _update_control(); +} + +void TextControlEditor::_update_fonts_menu() { + font_list->clear(); + font_list->add_item(TTR("[Theme Default]"), FONT_INFO_THEME_DEFAULT); + if (custom_font.is_valid()) { + font_list->add_item(TTR("[Custom Font]"), FONT_INFO_USER_CUSTOM); + } + + int id = FONT_INFO_ID; + for (Map<String, Map<String, String>>::Element *E = fonts.front(); E; E = E->next()) { + font_list->add_item(E->key(), id++); + } + + if (font_list->get_item_count() > 1) { + font_list->show(); + } else { + font_list->hide(); + } +} + +void TextControlEditor::_update_styles_menu() { + font_style_list->clear(); + if ((font_list->get_selected_id() >= FONT_INFO_ID)) { + const String &name = font_list->get_item_text(font_list->get_selected()); + for (Map<String, String>::Element *E = fonts[name].front(); E; E = E->next()) { + font_style_list->add_item(E->key()); + } + } else { + font_style_list->add_item("Default"); + } + + if (font_style_list->get_item_count() > 1) { + font_style_list->show(); + } else { + font_style_list->hide(); + } +} + +void TextControlEditor::_update_control() { + if (edited_control) { + // Get override names. + if (edited_control->is_class("RichTextLabel")) { + edited_color = "default_color"; + edited_font = "normal_font"; + edited_font_size = "normal_font_size"; + } else { + edited_color = "font_color"; + edited_font = "font"; + edited_font_size = "font_size"; + } + + // Get font override. + Ref<Font> font; + if (edited_control->has_theme_font_override(edited_font)) { + font = edited_control->get_theme_font(edited_font); + } + if (font.is_valid()) { + if (font->get_data_count() != 1) { + // Composite font, save it to "custom_font" to allow undoing font change. + custom_font = font; + _update_fonts_menu(); + font_list->select(FONT_INFO_USER_CUSTOM); + _update_styles_menu(); + font_style_list->select(0); + } else { + // Single face font, search for the font with matching name and style. + String name = font->get_data(0)->get_font_name(); + String style = font->get_data(0)->get_font_style_name(); + if (fonts.has(name) && fonts[name].has(style)) { + _update_fonts_menu(); + for (int i = 0; i < font_list->get_item_count(); i++) { + if (font_list->get_item_text(i) == name) { + font_list->select(i); + break; + } + } + _update_styles_menu(); + for (int i = 0; i < font_style_list->get_item_count(); i++) { + if (font_style_list->get_item_text(i) == style) { + font_style_list->select(i); + break; + } + } + } else { + // Unknown font, save it to "custom_font" to allow undoing font change. + custom_font = font; + _update_fonts_menu(); + font_list->select(FONT_INFO_USER_CUSTOM); + _update_styles_menu(); + font_style_list->select(0); + } + } + } else { + // No font override, select "Theme Default". + _update_fonts_menu(); + font_list->select(FONT_INFO_THEME_DEFAULT); + _update_styles_menu(); + font_style_list->select(0); + } + + // Get other theme overrides. + font_size_list->set_value(edited_control->get_theme_font_size(edited_font_size)); + outline_size_list->set_value(edited_control->get_theme_constant("outline_size")); + + font_color_picker->set_pick_color(edited_control->get_theme_color(edited_color)); + outline_color_picker->set_pick_color(edited_control->get_theme_color("font_outline_color")); + } +} + +void TextControlEditor::_font_selected(int p_id) { + _update_styles_menu(); + _set_font(); +} + +void TextControlEditor::_font_style_selected(int p_id) { + _set_font(); +} + +void TextControlEditor::_set_font() { + if (edited_control) { + if (font_list->get_selected_id() == FONT_INFO_THEME_DEFAULT) { + // Remove font override. + edited_control->remove_theme_font_override(edited_font); + return; + } else if (font_list->get_selected_id() == FONT_INFO_USER_CUSTOM) { + // Restore "custom_font". + edited_control->add_theme_font_override(edited_font, custom_font); + return; + } else { + // Load new font resource using selected name and style. + String name = font_list->get_item_text(font_list->get_selected()); + String sty = font_style_list->get_item_text(font_style_list->get_selected()); + if (sty.is_empty()) { + sty = "Default"; + } + if (fonts.has(name)) { + Ref<FontData> fd = ResourceLoader::load(fonts[name][sty]); + if (fd.is_valid()) { + Ref<Font> f; + f.instantiate(); + f->add_data(fd); + edited_control->add_theme_font_override(edited_font, f); + } + } + } + } +} + +void TextControlEditor::_font_size_selected(double p_size) { + if (edited_control) { + edited_control->add_theme_font_size_override(edited_font_size, p_size); + } +} + +void TextControlEditor::_outline_size_selected(double p_size) { + if (edited_control) { + edited_control->add_theme_constant_override("outline_size", p_size); + } +} + +void TextControlEditor::_font_color_changed(const Color &p_color) { + if (edited_control) { + edited_control->add_theme_color_override(edited_color, p_color); + } +} + +void TextControlEditor::_outline_color_changed(const Color &p_color) { + if (edited_control) { + edited_control->add_theme_color_override("font_outline_color", p_color); + } +} + +void TextControlEditor::_clear_formatting() { + if (edited_control) { + edited_control->begin_bulk_theme_override(); + edited_control->remove_theme_font_override(edited_font); + edited_control->remove_theme_font_size_override(edited_font_size); + edited_control->remove_theme_color_override(edited_color); + edited_control->remove_theme_color_override("font_outline_color"); + edited_control->remove_theme_constant_override("outline_size"); + edited_control->end_bulk_theme_override(); + _update_control(); + } +} + +void TextControlEditor::edit(Object *p_object) { + Control *ctrl = Object::cast_to<Control>(p_object); + if (!ctrl) { + edited_control = nullptr; + custom_font = Ref<Font>(); + } else { + edited_control = ctrl; + custom_font = Ref<Font>(); + _update_control(); + } +} + +bool TextControlEditor::handles(Object *p_object) const { + Control *ctrl = Object::cast_to<Control>(p_object); + if (!ctrl) { + return false; + } else { + bool valid = false; + ctrl->get("text", &valid); + return valid; + } +} + +TextControlEditor::TextControlEditor() { + add_child(memnew(VSeparator)); + + font_list = memnew(OptionButton); + font_list->set_flat(true); + font_list->set_tooltip(TTR("Font")); + add_child(font_list); + font_list->connect("item_selected", callable_mp(this, &TextControlEditor::_font_selected)); + + font_style_list = memnew(OptionButton); + font_style_list->set_flat(true); + font_style_list->set_tooltip(TTR("Font style")); + font_style_list->set_toggle_mode(true); + add_child(font_style_list); + font_style_list->connect("item_selected", callable_mp(this, &TextControlEditor::_font_style_selected)); + + font_size_list = memnew(SpinBox); + font_size_list->set_tooltip(TTR("Font Size")); + font_size_list->get_line_edit()->add_theme_constant_override("minimum_character_width", 2); + font_size_list->set_min(6); + font_size_list->set_step(1); + font_size_list->set_max(96); + font_size_list->get_line_edit()->set_flat(true); + add_child(font_size_list); + font_size_list->connect("value_changed", callable_mp(this, &TextControlEditor::_font_size_selected)); + + font_color_picker = memnew(ColorPickerButton); + font_color_picker->set_custom_minimum_size(Size2(20, 0) * EDSCALE); + font_color_picker->set_flat(true); + font_color_picker->set_tooltip(TTR("Text Color")); + add_child(font_color_picker); + font_color_picker->connect("color_changed", callable_mp(this, &TextControlEditor::_font_color_changed)); + + add_child(memnew(VSeparator)); + + outline_size_list = memnew(SpinBox); + outline_size_list->set_tooltip(TTR("Outline Size")); + outline_size_list->get_line_edit()->add_theme_constant_override("minimum_character_width", 2); + outline_size_list->set_min(0); + outline_size_list->set_step(1); + outline_size_list->set_max(96); + outline_size_list->get_line_edit()->set_flat(true); + add_child(outline_size_list); + outline_size_list->connect("value_changed", callable_mp(this, &TextControlEditor::_outline_size_selected)); + + outline_color_picker = memnew(ColorPickerButton); + outline_color_picker->set_custom_minimum_size(Size2(20, 0) * EDSCALE); + outline_color_picker->set_flat(true); + outline_color_picker->set_tooltip(TTR("Outline Color")); + add_child(outline_color_picker); + outline_color_picker->connect("color_changed", callable_mp(this, &TextControlEditor::_outline_color_changed)); + + add_child(memnew(VSeparator)); + + clear_formatting = memnew(Button); + clear_formatting->set_flat(true); + clear_formatting->set_tooltip(TTR("Clear Formatting")); + add_child(clear_formatting); + clear_formatting->connect("pressed", callable_mp(this, &TextControlEditor::_clear_formatting)); +} + +/*************************************************************************/ + +void TextControlEditorPlugin::edit(Object *p_object) { + text_ctl_editor->edit(p_object); +} + +bool TextControlEditorPlugin::handles(Object *p_object) const { + return text_ctl_editor->handles(p_object); +} + +void TextControlEditorPlugin::make_visible(bool p_visible) { + if (p_visible) { + text_ctl_editor->show(); + } else { + text_ctl_editor->hide(); + text_ctl_editor->edit(nullptr); + } +} + +TextControlEditorPlugin::TextControlEditorPlugin(EditorNode *p_node) { + editor = p_node; + text_ctl_editor = memnew(TextControlEditor); + CanvasItemEditor::get_singleton()->add_control_to_menu_panel(text_ctl_editor); + + text_ctl_editor->hide(); +} diff --git a/editor/plugins/text_control_editor_plugin.h b/editor/plugins/text_control_editor_plugin.h new file mode 100644 index 0000000000..7f4aa3754c --- /dev/null +++ b/editor/plugins/text_control_editor_plugin.h @@ -0,0 +1,119 @@ +/*************************************************************************/ +/* text_control_editor_plugin.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + +#ifndef TEXT_CONTROL_EDITOR_PLUGIN_H +#define TEXT_CONTROL_EDITOR_PLUGIN_H + +#include "canvas_item_editor_plugin.h" +#include "editor/editor_file_system.h" +#include "editor/editor_inspector.h" +#include "editor/editor_node.h" +#include "editor/editor_plugin.h" +#include "scene/gui/color_rect.h" +#include "scene/gui/menu_button.h" +#include "scene/gui/option_button.h" +#include "scene/gui/popup_menu.h" + +/*************************************************************************/ + +class TextControlEditor : public HBoxContainer { + GDCLASS(TextControlEditor, HBoxContainer); + + enum FontInfoID { + FONT_INFO_THEME_DEFAULT = 0, + FONT_INFO_USER_CUSTOM = 1, + FONT_INFO_ID = 100, + }; + + Map<String, Map<String, String>> fonts; + + OptionButton *font_list = nullptr; + SpinBox *font_size_list = nullptr; + OptionButton *font_style_list = nullptr; + ColorPickerButton *font_color_picker = nullptr; + SpinBox *outline_size_list = nullptr; + ColorPickerButton *outline_color_picker = nullptr; + Button *clear_formatting = nullptr; + + Control *edited_control = nullptr; + String edited_color; + String edited_font; + String edited_font_size; + Ref<Font> custom_font; + +protected: + void _notification(int p_notification); + static void _bind_methods(){}; + + void _find_resources(EditorFileSystemDirectory *p_dir); + void _reload_fonts(const String &p_path); + + void _update_fonts_menu(); + void _update_styles_menu(); + void _update_control(); + + void _font_selected(int p_id); + void _font_style_selected(int p_id); + void _set_font(); + + void _font_size_selected(double p_size); + void _outline_size_selected(double p_size); + + void _font_color_changed(const Color &p_color); + void _outline_color_changed(const Color &p_color); + + void _clear_formatting(); + +public: + void edit(Object *p_object); + bool handles(Object *p_object) const; + + TextControlEditor(); +}; + +/*************************************************************************/ + +class TextControlEditorPlugin : public EditorPlugin { + GDCLASS(TextControlEditorPlugin, EditorPlugin); + + TextControlEditor *text_ctl_editor; + EditorNode *editor; + +public: + virtual String get_name() const override { return "TextControlFontEditor"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; + + TextControlEditorPlugin(EditorNode *p_node); +}; + +#endif // TEXT_CONTROL_EDITOR_PLUGIN_H diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp index 1fc7eb98e0..8186c2c84c 100644 --- a/editor/plugins/text_editor.cpp +++ b/editor/plugins/text_editor.cpp @@ -65,18 +65,21 @@ void TextEditor::_load_theme_settings() { String TextEditor::get_name() { String name; - if (text_file->get_path().find("local://") == -1 && text_file->get_path().find("::") == -1) { - name = text_file->get_path().get_file(); - if (is_unsaved()) { - if (text_file->get_path().is_empty()) { - name = TTR("[unsaved]"); - } - name += "(*)"; + name = text_file->get_path().get_file(); + if (name.is_empty()) { + // This appears for newly created built-in text_files before saving the scene. + name = TTR("[unsaved]"); + } else if (text_file->is_built_in()) { + const String &text_file_name = text_file->get_name(); + if (text_file_name != "") { + // If the built-in text_file has a custom resource name defined, + // display the built-in text_file name as follows: `ResourceName (scene_file.tscn)` + name = vformat("%s (%s)", text_file_name, name.get_slice("::", 0)); } - } else if (text_file->get_name() != "") { - name = text_file->get_name(); - } else { - name = text_file->get_class() + "(" + itos(text_file->get_instance_id()) + ")"; + } + + if (is_unsaved()) { + name += "(*)"; } return name; diff --git a/editor/plugins/texture_3d_editor_plugin.cpp b/editor/plugins/texture_3d_editor_plugin.cpp index bd1923f4ab..b4e394a1c0 100644 --- a/editor/plugins/texture_3d_editor_plugin.cpp +++ b/editor/plugins/texture_3d_editor_plugin.cpp @@ -173,7 +173,7 @@ Texture3DEditor::Texture3DEditor() { info->set_v_grow_direction(GROW_DIRECTION_BEGIN); info->add_theme_color_override("font_color", Color(1, 1, 1, 1)); info->add_theme_color_override("font_shadow_color", Color(0, 0, 0, 0.5)); - info->add_theme_constant_override("shadow_as_outline", 1); + info->add_theme_constant_override("shadow_outline_size", 1); info->add_theme_constant_override("shadow_offset_x", 2); info->add_theme_constant_override("shadow_offset_y", 2); diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp index b9ec6bf5ab..e25b0270b4 100644 --- a/editor/plugins/texture_editor_plugin.cpp +++ b/editor/plugins/texture_editor_plugin.cpp @@ -101,7 +101,7 @@ TexturePreview::TexturePreview(Ref<Texture2D> p_texture, bool p_show_metadata) { metadata_label->add_theme_color_override("font_outline_color", Color::named("black")); metadata_label->add_theme_constant_override("outline_size", 2 * EDSCALE); - metadata_label->add_theme_constant_override("shadow_as_outline", 1); + metadata_label->add_theme_constant_override("shadow_outline_size", 1); metadata_label->set_h_size_flags(Control::SIZE_SHRINK_END); metadata_label->set_v_size_flags(Control::SIZE_SHRINK_END); diff --git a/editor/plugins/texture_layered_editor_plugin.cpp b/editor/plugins/texture_layered_editor_plugin.cpp index 424e018a47..ee62138d12 100644 --- a/editor/plugins/texture_layered_editor_plugin.cpp +++ b/editor/plugins/texture_layered_editor_plugin.cpp @@ -249,7 +249,7 @@ TextureLayeredEditor::TextureLayeredEditor() { info->set_v_grow_direction(GROW_DIRECTION_BEGIN); info->add_theme_color_override("font_color", Color(1, 1, 1, 1)); info->add_theme_color_override("font_shadow_color", Color(0, 0, 0, 0.5)); - info->add_theme_constant_override("shadow_as_outline", 1); + info->add_theme_constant_override("shadow_outline_size", 1); info->add_theme_constant_override("shadow_offset_x", 2); info->add_theme_constant_override("shadow_offset_y", 2); diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index 127219546d..b1ef85b4f4 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -2848,7 +2848,7 @@ void ThemeTypeEditor::_font_size_item_changed(float p_value, String p_item_name) edited_theme->set_font_size(p_item_name, edited_type, int(p_value)); } -void ThemeTypeEditor::_edit_resource_item(RES p_resource) { +void ThemeTypeEditor::_edit_resource_item(RES p_resource, bool p_edit) { EditorNode::get_singleton()->edit_resource(p_resource); } diff --git a/editor/plugins/theme_editor_plugin.h b/editor/plugins/theme_editor_plugin.h index b6becbb1c7..f5ad577aff 100644 --- a/editor/plugins/theme_editor_plugin.h +++ b/editor/plugins/theme_editor_plugin.h @@ -362,7 +362,7 @@ class ThemeTypeEditor : public MarginContainer { void _color_item_changed(Color p_value, String p_item_name); void _constant_item_changed(float p_value, String p_item_name); void _font_size_item_changed(float p_value, String p_item_name); - void _edit_resource_item(RES p_resource); + void _edit_resource_item(RES p_resource, bool p_edit); void _font_item_changed(Ref<Font> p_value, String p_item_name); void _icon_item_changed(Ref<Texture2D> p_value, String p_item_name); void _stylebox_item_changed(Ref<StyleBox> p_value, String p_item_name); diff --git a/editor/plugins/tiles/tile_map_editor.cpp b/editor/plugins/tiles/tile_map_editor.cpp index 5b7ec6c8db..39fbd86f77 100644 --- a/editor/plugins/tiles/tile_map_editor.cpp +++ b/editor/plugins/tiles/tile_map_editor.cpp @@ -99,7 +99,7 @@ void TileMapEditorTilesPlugin::_update_toolbar() { picker_button->show(); erase_button->show(); tools_settings_vsep_2->show(); - bucket_continuous_checkbox->show(); + bucket_contiguous_checkbox->show(); random_tile_checkbox->show(); scatter_label->show(); scatter_spinbox->show(); @@ -543,9 +543,9 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p switch (drag_type) { case DRAG_TYPE_PAINT: { - Map<Vector2i, TileMapCell> to_draw = _draw_line(drag_start_mouse_pos, drag_last_mouse_pos, mpos); + Map<Vector2i, TileMapCell> to_draw = _draw_line(drag_start_mouse_pos, drag_last_mouse_pos, mpos, drag_erasing); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { - if (!_is_erasing() && E.value.source_id == TileSet::INVALID_SOURCE) { + if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { continue; } Vector2i coords = E.key; @@ -560,9 +560,9 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p Vector<Vector2i> line = TileMapEditor::get_line(tile_map, tile_map->world_to_map(drag_last_mouse_pos), tile_map->world_to_map(mpos)); for (int i = 0; i < line.size(); i++) { if (!drag_modified.has(line[i])) { - Map<Vector2i, TileMapCell> to_draw = _draw_bucket_fill(line[i], bucket_continuous_checkbox->is_pressed()); + Map<Vector2i, TileMapCell> to_draw = _draw_bucket_fill(line[i], bucket_contiguous_checkbox->is_pressed(), drag_erasing); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { - if (!_is_erasing() && E.value.source_id == TileSet::INVALID_SOURCE) { + if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { continue; } Vector2i coords = E.key; @@ -592,11 +592,11 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p if (mb->get_button_index() == MOUSE_BUTTON_LEFT || mb->get_button_index() == MOUSE_BUTTON_RIGHT) { if (mb->is_pressed()) { - if (mb->get_button_index() == MOUSE_BUTTON_RIGHT) { - rmb_erasing = true; + // Pressed + if (erase_button->is_pressed() || mb->get_button_index() == MOUSE_BUTTON_RIGHT) { + drag_erasing = true; } - // Pressed if (drag_type == DRAG_TYPE_CLIPBOARD_PASTE) { // Do nothing. } else if (tool_buttons_group->get_pressed_button() == select_tool_button) { @@ -626,9 +626,9 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p drag_type = DRAG_TYPE_PAINT; drag_start_mouse_pos = mpos; drag_modified.clear(); - Map<Vector2i, TileMapCell> to_draw = _draw_line(drag_start_mouse_pos, mpos, mpos); + Map<Vector2i, TileMapCell> to_draw = _draw_line(drag_start_mouse_pos, mpos, mpos, drag_erasing); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { - if (!_is_erasing() && E.value.source_id == TileSet::INVALID_SOURCE) { + if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { continue; } Vector2i coords = E.key; @@ -653,9 +653,9 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p Vector<Vector2i> line = TileMapEditor::get_line(tile_map, tile_map->world_to_map(drag_last_mouse_pos), tile_map->world_to_map(mpos)); for (int i = 0; i < line.size(); i++) { if (!drag_modified.has(line[i])) { - Map<Vector2i, TileMapCell> to_draw = _draw_bucket_fill(line[i], bucket_continuous_checkbox->is_pressed()); + Map<Vector2i, TileMapCell> to_draw = _draw_bucket_fill(line[i], bucket_contiguous_checkbox->is_pressed(), drag_erasing); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { - if (!_is_erasing() && E.value.source_id == TileSet::INVALID_SOURCE) { + if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { continue; } Vector2i coords = E.key; @@ -674,9 +674,7 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p } else { // Released _stop_dragging(); - if (mb->get_button_index() == MOUSE_BUTTON_RIGHT) { - rmb_erasing = false; - } + drag_erasing = false; } CanvasItemEditor::get_singleton()->update_viewport(); @@ -730,7 +728,7 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over Rect2i drawn_grid_rect; if (drag_type == DRAG_TYPE_PICK) { - // Draw the area being picvked. + // Draw the area being picked. Rect2i rect = Rect2i(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(drag_last_mouse_pos) - tile_map->world_to_map(drag_start_mouse_pos)).abs(); rect.size += Vector2i(1, 1); for (int x = rect.position.x; x < rect.get_end().x; x++) { @@ -789,25 +787,25 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over bool expand_grid = false; if (tool_buttons_group->get_pressed_button() == paint_tool_button && drag_type == DRAG_TYPE_NONE) { // Preview for a single pattern. - preview = _draw_line(drag_last_mouse_pos, drag_last_mouse_pos, drag_last_mouse_pos); + preview = _draw_line(drag_last_mouse_pos, drag_last_mouse_pos, drag_last_mouse_pos, erase_button->is_pressed()); expand_grid = true; } else if (tool_buttons_group->get_pressed_button() == line_tool_button || drag_type == DRAG_TYPE_LINE) { if (drag_type == DRAG_TYPE_NONE) { // Preview for a single pattern. - preview = _draw_line(drag_last_mouse_pos, drag_last_mouse_pos, drag_last_mouse_pos); + preview = _draw_line(drag_last_mouse_pos, drag_last_mouse_pos, drag_last_mouse_pos, erase_button->is_pressed()); expand_grid = true; } else if (drag_type == DRAG_TYPE_LINE) { // Preview for a line pattern. - preview = _draw_line(drag_start_mouse_pos, drag_start_mouse_pos, drag_last_mouse_pos); + preview = _draw_line(drag_start_mouse_pos, drag_start_mouse_pos, drag_last_mouse_pos, drag_erasing); expand_grid = true; } } else if (drag_type == DRAG_TYPE_RECT) { // Preview for a rect pattern. - preview = _draw_rect(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(drag_last_mouse_pos)); + preview = _draw_rect(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(drag_last_mouse_pos), drag_erasing); expand_grid = true; } else if (tool_buttons_group->get_pressed_button() == bucket_tool_button && drag_type == DRAG_TYPE_NONE) { // Preview for a fill pattern. - preview = _draw_bucket_fill(tile_map->world_to_map(drag_last_mouse_pos), bucket_continuous_checkbox->is_pressed()); + preview = _draw_bucket_fill(tile_map->world_to_map(drag_last_mouse_pos), bucket_contiguous_checkbox->is_pressed(), erase_button->is_pressed()); } // Expand the grid if needed @@ -855,7 +853,7 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over Transform2D tile_xform; tile_xform.set_origin(tile_map->map_to_world(E.key)); tile_xform.set_scale(tile_set->get_tile_size()); - if (!_is_erasing() && random_tile_checkbox->is_pressed()) { + if (!(drag_erasing || erase_button->is_pressed()) && random_tile_checkbox->is_pressed()) { tile_set->draw_tile_shape(p_overlay, xform * tile_xform, Color(1.0, 1.0, 1.0, 0.5), true); } else { if (tile_set->has_source(E.value.source_id)) { @@ -966,7 +964,7 @@ TileMapCell TileMapEditorTilesPlugin::_pick_random_tile(Ref<TileMapPattern> p_pa return TileMapCell(); } -Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_line(Vector2 p_start_drag_mouse_pos, Vector2 p_from_mouse_pos, Vector2 p_to_mouse_pos) { +Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_line(Vector2 p_start_drag_mouse_pos, Vector2 p_from_mouse_pos, Vector2 p_to_mouse_pos, bool p_erase) { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { return Map<Vector2i, TileMapCell>(); @@ -981,12 +979,12 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_line(Vector2 p_start_ Ref<TileMapPattern> erase_pattern; erase_pattern.instantiate(); erase_pattern->set_cell(Vector2i(0, 0), TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE); - Ref<TileMapPattern> pattern = _is_erasing() ? erase_pattern : selection_pattern; + Ref<TileMapPattern> pattern = p_erase ? erase_pattern : selection_pattern; Map<Vector2i, TileMapCell> output; if (!pattern->is_empty()) { // Paint the tiles on the tile map. - if (!_is_erasing() && random_tile_checkbox->is_pressed()) { + if (!p_erase && random_tile_checkbox->is_pressed()) { // Paint a random tile. Vector<Vector2i> line = TileMapEditor::get_line(tile_map, tile_map->world_to_map(p_from_mouse_pos), tile_map->world_to_map(p_to_mouse_pos)); for (int i = 0; i < line.size(); i++) { @@ -1015,7 +1013,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_line(Vector2 p_start_ return output; } -Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_rect(Vector2i p_start_cell, Vector2i p_end_cell) { +Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase) { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { return Map<Vector2i, TileMapCell>(); @@ -1034,7 +1032,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_rect(Vector2i p_start Ref<TileMapPattern> erase_pattern; erase_pattern.instantiate(); erase_pattern->set_cell(Vector2i(0, 0), TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE); - Ref<TileMapPattern> pattern = _is_erasing() ? erase_pattern : selection_pattern; + Ref<TileMapPattern> pattern = p_erase ? erase_pattern : selection_pattern; Map<Vector2i, TileMapCell> err_output; ERR_FAIL_COND_V(pattern->is_empty(), err_output); @@ -1046,7 +1044,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_rect(Vector2i p_start Map<Vector2i, TileMapCell> output; if (!pattern->is_empty()) { - if (!_is_erasing() && random_tile_checkbox->is_pressed()) { + if (!p_erase && random_tile_checkbox->is_pressed()) { // Paint a random tile. for (int x = 0; x < rect.size.x; x++) { for (int y = 0; y < rect.size.y; y++) { @@ -1074,7 +1072,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_rect(Vector2i p_start return output; } -Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_bucket_fill(Vector2i p_coords, bool p_contiguous) { +Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase) { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { return Map<Vector2i, TileMapCell>(); @@ -1095,14 +1093,14 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_bucket_fill(Vector2i Ref<TileMapPattern> erase_pattern; erase_pattern.instantiate(); erase_pattern->set_cell(Vector2i(0, 0), TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE); - Ref<TileMapPattern> pattern = _is_erasing() ? erase_pattern : selection_pattern; + Ref<TileMapPattern> pattern = p_erase ? erase_pattern : selection_pattern; if (!pattern->is_empty()) { - TileMapCell source = tile_map->get_cell(tile_map_layer, p_coords); + TileMapCell source_cell = tile_map->get_cell(tile_map_layer, p_coords); // If we are filling empty tiles, compute the tilemap boundaries. Rect2i boundaries; - if (source.source_id == TileSet::INVALID_SOURCE) { + if (source_cell.source_id == TileSet::INVALID_SOURCE) { boundaries = tile_map->get_used_rect(); } @@ -1115,11 +1113,11 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_bucket_fill(Vector2i Vector2i coords = to_check.back()->get(); to_check.pop_back(); if (!already_checked.has(coords)) { - if (source.source_id == tile_map->get_cell_source_id(tile_map_layer, coords) && - source.get_atlas_coords() == tile_map->get_cell_atlas_coords(tile_map_layer, coords) && - source.alternative_tile == tile_map->get_cell_alternative_tile(tile_map_layer, coords) && - (source.source_id != TileSet::INVALID_SOURCE || boundaries.has_point(coords))) { - if (!_is_erasing() && random_tile_checkbox->is_pressed()) { + if (source_cell.source_id == tile_map->get_cell_source_id(tile_map_layer, coords) && + source_cell.get_atlas_coords() == tile_map->get_cell_atlas_coords(tile_map_layer, coords) && + source_cell.alternative_tile == tile_map->get_cell_alternative_tile(tile_map_layer, coords) && + (source_cell.source_id != TileSet::INVALID_SOURCE || boundaries.has_point(coords))) { + if (!p_erase && random_tile_checkbox->is_pressed()) { // Paint a random tile. output.insert(coords, _pick_random_tile(pattern)); } else { @@ -1146,7 +1144,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_bucket_fill(Vector2i } else { // Replace all tiles like the source. TypedArray<Vector2i> to_check; - if (source.source_id == TileSet::INVALID_SOURCE) { + if (source_cell.source_id == TileSet::INVALID_SOURCE) { Rect2i rect = tile_map->get_used_rect(); if (rect.has_no_area()) { rect = Rect2i(p_coords, Vector2i(1, 1)); @@ -1161,11 +1159,11 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_bucket_fill(Vector2i } for (int i = 0; i < to_check.size(); i++) { Vector2i coords = to_check[i]; - if (source.source_id == tile_map->get_cell_source_id(tile_map_layer, coords) && - source.get_atlas_coords() == tile_map->get_cell_atlas_coords(tile_map_layer, coords) && - source.alternative_tile == tile_map->get_cell_alternative_tile(tile_map_layer, coords) && - (source.source_id != TileSet::INVALID_SOURCE || boundaries.has_point(coords))) { - if (!_is_erasing() && random_tile_checkbox->is_pressed()) { + if (source_cell.source_id == tile_map->get_cell_source_id(tile_map_layer, coords) && + source_cell.get_atlas_coords() == tile_map->get_cell_atlas_coords(tile_map_layer, coords) && + source_cell.alternative_tile == tile_map->get_cell_alternative_tile(tile_map_layer, coords) && + (source_cell.source_id != TileSet::INVALID_SOURCE || boundaries.has_point(coords))) { + if (!p_erase && random_tile_checkbox->is_pressed()) { // Paint a random tile. output.insert(coords, _pick_random_tile(pattern)); } else { @@ -1338,10 +1336,10 @@ void TileMapEditorTilesPlugin::_stop_dragging() { undo_redo->commit_action(false); } break; case DRAG_TYPE_LINE: { - Map<Vector2i, TileMapCell> to_draw = _draw_line(drag_start_mouse_pos, drag_start_mouse_pos, mpos); + Map<Vector2i, TileMapCell> to_draw = _draw_line(drag_start_mouse_pos, drag_start_mouse_pos, mpos, drag_erasing); undo_redo->create_action(TTR("Paint tiles")); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { - if (!_is_erasing() && E.value.source_id == TileSet::INVALID_SOURCE) { + if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { continue; } undo_redo->add_do_method(tile_map, "set_cell", tile_map_layer, E.key, E.value.source_id, E.value.get_atlas_coords(), E.value.alternative_tile); @@ -1350,10 +1348,10 @@ void TileMapEditorTilesPlugin::_stop_dragging() { undo_redo->commit_action(); } break; case DRAG_TYPE_RECT: { - Map<Vector2i, TileMapCell> to_draw = _draw_rect(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(mpos)); + Map<Vector2i, TileMapCell> to_draw = _draw_rect(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(mpos), drag_erasing); undo_redo->create_action(TTR("Paint tiles")); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { - if (!_is_erasing() && E.value.source_id == TileSet::INVALID_SOURCE) { + if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { continue; } undo_redo->add_do_method(tile_map, "set_cell", tile_map_layer, E.key, E.value.source_id, E.value.get_atlas_coords(), E.value.alternative_tile); @@ -1473,10 +1471,6 @@ void TileMapEditorTilesPlugin::_fix_invalid_tiles_in_tile_map_selection() { } } -bool TileMapEditorTilesPlugin::_is_erasing() const { - return erase_button->is_pressed() || rmb_erasing; -} - void TileMapEditorTilesPlugin::_update_selection_pattern_from_tilemap_selection() { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { @@ -2053,10 +2047,11 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { tools_settings->add_child(tools_settings_vsep_2); // Continuous checkbox. - bucket_continuous_checkbox = memnew(CheckBox); - bucket_continuous_checkbox->set_flat(true); - bucket_continuous_checkbox->set_text(TTR("Contiguous")); - tools_settings->add_child(bucket_continuous_checkbox); + bucket_contiguous_checkbox = memnew(CheckBox); + bucket_contiguous_checkbox->set_flat(true); + bucket_contiguous_checkbox->set_text(TTR("Contiguous")); + bucket_contiguous_checkbox->set_pressed(true); + tools_settings->add_child(bucket_contiguous_checkbox); // Random tile checkbox. random_tile_checkbox = memnew(CheckBox); @@ -2210,6 +2205,26 @@ void TileMapEditorTerrainsPlugin::_update_toolbar() { tools_settings_vsep->show(); picker_button->show(); erase_button->show(); + tools_settings_vsep_2->hide(); + bucket_contiguous_checkbox->hide(); + } else if (tool_buttons_group->get_pressed_button() == line_tool_button) { + tools_settings_vsep->show(); + picker_button->show(); + erase_button->show(); + tools_settings_vsep_2->hide(); + bucket_contiguous_checkbox->hide(); + } else if (tool_buttons_group->get_pressed_button() == rect_tool_button) { + tools_settings_vsep->show(); + picker_button->show(); + erase_button->show(); + tools_settings_vsep_2->hide(); + bucket_contiguous_checkbox->hide(); + } else if (tool_buttons_group->get_pressed_button() == bucket_tool_button) { + tools_settings_vsep->show(); + picker_button->show(); + erase_button->show(); + tools_settings_vsep_2->show(); + bucket_contiguous_checkbox->show(); } } @@ -2321,23 +2336,224 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map // Actually paint the tiles. for (const KeyValue<Vector2i, TileSet::TerrainsPattern> &E_to_paint : p_to_paint) { - output[E_to_paint.key] = tile_set->get_random_tile_from_pattern(p_terrain_set, E_to_paint.value); + output[E_to_paint.key] = tile_set->get_random_tile_from_terrains_pattern(p_terrain_set, E_to_paint.value); } // Use the WFC run for the output. for (const KeyValue<Vector2i, TileSet::TerrainsPattern> &E : wfc_output) { - output[E.key] = tile_set->get_random_tile_from_pattern(p_terrain_set, E.value); + output[E.key] = tile_set->get_random_tile_from_terrains_pattern(p_terrain_set, E.value); } return output; } +Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_line(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase) { + TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); + if (!tile_map) { + return Map<Vector2i, TileMapCell>(); + } + + Ref<TileSet> tile_set = tile_map->get_tileset(); + if (!tile_set.is_valid()) { + return Map<Vector2i, TileMapCell>(); + } + + TileSet::TerrainsPattern terrains_pattern; + if (p_erase) { + terrains_pattern = TileSet::TerrainsPattern(*tile_set, selected_terrain_set); + } else { + terrains_pattern = selected_terrains_pattern; + } + + Vector<Vector2i> line = TileMapEditor::get_line(tile_map, p_start_cell, p_end_cell); + Map<Vector2i, TileSet::TerrainsPattern> to_draw; + for (int i = 0; i < line.size(); i++) { + to_draw[line[i]] = terrains_pattern; + } + return _draw_terrains(to_draw, selected_terrain_set); +} + +Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase) { + TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); + if (!tile_map) { + return Map<Vector2i, TileMapCell>(); + } + + Ref<TileSet> tile_set = tile_map->get_tileset(); + if (!tile_set.is_valid()) { + return Map<Vector2i, TileMapCell>(); + } + + TileSet::TerrainsPattern terrains_pattern; + if (p_erase) { + terrains_pattern = TileSet::TerrainsPattern(*tile_set, selected_terrain_set); + } else { + terrains_pattern = selected_terrains_pattern; + } + + Rect2i rect; + rect.set_position(p_start_cell); + rect.set_end(p_end_cell); + rect = rect.abs(); + + Map<Vector2i, TileSet::TerrainsPattern> to_draw; + for (int x = rect.position.x; x <= rect.get_end().x; x++) { + for (int y = rect.position.y; y <= rect.get_end().y; y++) { + to_draw[Vector2i(x, y)] = terrains_pattern; + } + } + return _draw_terrains(to_draw, selected_terrain_set); +} + +Set<Vector2i> TileMapEditorTerrainsPlugin::_get_cells_for_bucket_fill(Vector2i p_coords, bool p_contiguous) { + TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); + if (!tile_map) { + return Set<Vector2i>(); + } + + Ref<TileSet> tile_set = tile_map->get_tileset(); + if (!tile_set.is_valid()) { + return Set<Vector2i>(); + } + + TileMapCell source_cell = tile_map->get_cell(tile_map_layer, p_coords); + + TileSet::TerrainsPattern source_pattern(*tile_set, selected_terrain_set); + if (source_cell.source_id != TileSet::INVALID_SOURCE) { + TileData *tile_data = nullptr; + Ref<TileSetSource> source = tile_set->get_source(source_cell.source_id); + Ref<TileSetAtlasSource> atlas_source = source; + if (atlas_source.is_valid()) { + tile_data = Object::cast_to<TileData>(atlas_source->get_tile_data(source_cell.get_atlas_coords(), source_cell.alternative_tile)); + } + if (!tile_data) { + return Set<Vector2i>(); + } + source_pattern = tile_data->get_terrains_pattern(); + } + + // If we are filling empty tiles, compute the tilemap boundaries. + Rect2i boundaries; + if (source_cell.source_id == TileSet::INVALID_SOURCE) { + boundaries = tile_map->get_used_rect(); + } + + Set<Vector2i> output; + if (p_contiguous) { + // Replace continuous tiles like the source. + Set<Vector2i> already_checked; + List<Vector2i> to_check; + to_check.push_back(p_coords); + while (!to_check.is_empty()) { + Vector2i coords = to_check.back()->get(); + to_check.pop_back(); + if (!already_checked.has(coords)) { + // Get the candidate cell pattern. + TileSet::TerrainsPattern candidate_pattern(*tile_set, selected_terrain_set); + if (tile_map->get_cell_source_id(tile_map_layer, coords) != TileSet::INVALID_SOURCE) { + TileData *tile_data = nullptr; + Ref<TileSetSource> source = tile_set->get_source(tile_map->get_cell_source_id(tile_map_layer, coords)); + Ref<TileSetAtlasSource> atlas_source = source; + if (atlas_source.is_valid()) { + tile_data = Object::cast_to<TileData>(atlas_source->get_tile_data(tile_map->get_cell_atlas_coords(tile_map_layer, coords), tile_map->get_cell_alternative_tile(tile_map_layer, coords))); + } + if (tile_data) { + candidate_pattern = tile_data->get_terrains_pattern(); + } + } + + // Draw. + if (candidate_pattern == source_pattern && (!source_pattern.is_erase_pattern() || boundaries.has_point(coords))) { + output.insert(coords); + + // Get surrounding tiles (handles different tile shapes). + TypedArray<Vector2i> around = tile_map->get_surrounding_tiles(coords); + for (int i = 0; i < around.size(); i++) { + to_check.push_back(around[i]); + } + } + already_checked.insert(coords); + } + } + } else { + // Replace all tiles like the source. + TypedArray<Vector2i> to_check; + if (source_cell.source_id == TileSet::INVALID_SOURCE) { + Rect2i rect = tile_map->get_used_rect(); + if (rect.has_no_area()) { + rect = Rect2i(p_coords, Vector2i(1, 1)); + } + for (int x = boundaries.position.x; x < boundaries.get_end().x; x++) { + for (int y = boundaries.position.y; y < boundaries.get_end().y; y++) { + to_check.append(Vector2i(x, y)); + } + } + } else { + to_check = tile_map->get_used_cells(tile_map_layer); + } + for (int i = 0; i < to_check.size(); i++) { + Vector2i coords = to_check[i]; + // Get the candidate cell pattern. + TileSet::TerrainsPattern candidate_pattern; + if (tile_map->get_cell_source_id(tile_map_layer, coords) != TileSet::INVALID_SOURCE) { + TileData *tile_data = nullptr; + Ref<TileSetSource> source = tile_set->get_source(tile_map->get_cell_source_id(tile_map_layer, coords)); + Ref<TileSetAtlasSource> atlas_source = source; + if (atlas_source.is_valid()) { + tile_data = Object::cast_to<TileData>(atlas_source->get_tile_data(tile_map->get_cell_atlas_coords(tile_map_layer, coords), tile_map->get_cell_alternative_tile(tile_map_layer, coords))); + } + if (tile_data) { + candidate_pattern = tile_data->get_terrains_pattern(); + } + } + + // Draw. + if (candidate_pattern == source_pattern && (!source_pattern.is_erase_pattern() || boundaries.has_point(coords))) { + output.insert(coords); + } + } + } + return output; +} + +Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase) { + TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); + if (!tile_map) { + return Map<Vector2i, TileMapCell>(); + } + + Ref<TileSet> tile_set = tile_map->get_tileset(); + if (!tile_set.is_valid()) { + return Map<Vector2i, TileMapCell>(); + } + + TileSet::TerrainsPattern terrains_pattern; + if (p_erase) { + terrains_pattern = TileSet::TerrainsPattern(*tile_set, selected_terrain_set); + } else { + terrains_pattern = selected_terrains_pattern; + } + + Set<Vector2i> cells_to_draw = _get_cells_for_bucket_fill(p_coords, p_contiguous); + Map<Vector2i, TileSet::TerrainsPattern> to_draw; + for (const Vector2i &coords : cells_to_draw) { + to_draw[coords] = terrains_pattern; + } + + return _draw_terrains(to_draw, selected_terrain_set); +} + void TileMapEditorTerrainsPlugin::_stop_dragging() { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { return; } + Ref<TileSet> tile_set = tile_map->get_tileset(); + if (!tile_set.is_valid()) { + return; + } + Transform2D xform = CanvasItemEditor::get_singleton()->get_canvas_transform() * tile_map->get_global_transform(); Vector2 mpos = xform.affine_inverse().xform(CanvasItemEditor::get_singleton()->get_viewport_control()->get_local_mouse_position()); @@ -2345,12 +2561,6 @@ void TileMapEditorTerrainsPlugin::_stop_dragging() { case DRAG_TYPE_PICK: { Vector2i coords = tile_map->world_to_map(mpos); TileMapCell cell = tile_map->get_cell(tile_map_layer, coords); - - Ref<TileSet> tile_set = tile_map->get_tileset(); - if (!tile_set.is_valid()) { - return; - } - TileData *tile_data = nullptr; Ref<TileSetSource> source = tile_set->get_source(cell.source_id); @@ -2360,17 +2570,19 @@ void TileMapEditorTerrainsPlugin::_stop_dragging() { } if (tile_data) { - Array terrains_pattern = tile_data->get_terrains_pattern(); + TileSet::TerrainsPattern terrains_pattern = tile_data->get_terrains_pattern(); // Find the tree item for the right terrain set. bool need_tree_item_switch = true; TreeItem *tree_item = terrains_tree->get_selected(); + int new_terrain_set = -1; if (tree_item) { Dictionary metadata_dict = tree_item->get_metadata(0); if (metadata_dict.has("terrain_set") && metadata_dict.has("terrain_id")) { int terrain_set = metadata_dict["terrain_set"]; int terrain_id = metadata_dict["terrain_id"]; if (per_terrain_terrains_patterns[terrain_set][terrain_id].has(terrains_pattern)) { + new_terrain_set = terrain_set; need_tree_item_switch = false; } } @@ -2384,6 +2596,7 @@ void TileMapEditorTerrainsPlugin::_stop_dragging() { int terrain_id = metadata_dict["terrain_id"]; if (per_terrain_terrains_patterns[terrain_set][terrain_id].has(terrains_pattern)) { // Found + new_terrain_set = terrain_set; tree_item->select(0); _update_tiles_list(); break; @@ -2396,15 +2609,9 @@ void TileMapEditorTerrainsPlugin::_stop_dragging() { if (tree_item) { for (int i = 0; i < terrains_tile_list->get_item_count(); i++) { Dictionary metadata_dict = terrains_tile_list->get_item_metadata(i); - TileSet::TerrainsPattern in_meta_terrains_pattern = metadata_dict["terrains_pattern"]; - bool equals = true; - for (int j = 0; j < terrains_pattern.size(); j++) { - if (terrains_pattern[j] != in_meta_terrains_pattern[j]) { - equals = false; - break; - } - } - if (equals) { + TileSet::TerrainsPattern in_meta_terrains_pattern(*tile_set, new_terrain_set); + in_meta_terrains_pattern.set_terrains_from_array(metadata_dict["terrains_pattern"]); + if (in_meta_terrains_pattern == terrains_pattern) { terrains_tile_list->select(i); break; } @@ -2423,12 +2630,82 @@ void TileMapEditorTerrainsPlugin::_stop_dragging() { } undo_redo->commit_action(false); } break; + case DRAG_TYPE_LINE: { + Map<Vector2i, TileMapCell> to_draw = _draw_line(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(mpos), drag_erasing); + undo_redo->create_action(TTR("Paint terrain")); + for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { + if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { + continue; + } + undo_redo->add_do_method(tile_map, "set_cell", tile_map_layer, E.key, E.value.source_id, E.value.get_atlas_coords(), E.value.alternative_tile); + undo_redo->add_undo_method(tile_map, "set_cell", tile_map_layer, E.key, tile_map->get_cell_source_id(tile_map_layer, E.key), tile_map->get_cell_atlas_coords(tile_map_layer, E.key), tile_map->get_cell_alternative_tile(tile_map_layer, E.key)); + } + undo_redo->commit_action(); + } break; + case DRAG_TYPE_RECT: { + Map<Vector2i, TileMapCell> to_draw = _draw_rect(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(mpos), drag_erasing); + undo_redo->create_action(TTR("Paint terrain")); + for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { + if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { + continue; + } + undo_redo->add_do_method(tile_map, "set_cell", tile_map_layer, E.key, E.value.source_id, E.value.get_atlas_coords(), E.value.alternative_tile); + undo_redo->add_undo_method(tile_map, "set_cell", tile_map_layer, E.key, tile_map->get_cell_source_id(tile_map_layer, E.key), tile_map->get_cell_atlas_coords(tile_map_layer, E.key), tile_map->get_cell_alternative_tile(tile_map_layer, E.key)); + } + undo_redo->commit_action(); + } break; + case DRAG_TYPE_BUCKET: { + undo_redo->create_action(TTR("Paint terrain")); + for (const KeyValue<Vector2i, TileMapCell> &E : drag_modified) { + undo_redo->add_do_method(tile_map, "set_cell", tile_map_layer, E.key, tile_map->get_cell_source_id(tile_map_layer, E.key), tile_map->get_cell_atlas_coords(tile_map_layer, E.key), tile_map->get_cell_alternative_tile(tile_map_layer, E.key)); + undo_redo->add_undo_method(tile_map, "set_cell", tile_map_layer, E.key, E.value.source_id, E.value.get_atlas_coords(), E.value.alternative_tile); + } + undo_redo->commit_action(false); + } break; + default: break; } drag_type = DRAG_TYPE_NONE; } +void TileMapEditorTerrainsPlugin::_mouse_exited_viewport() { + has_mouse = false; + CanvasItemEditor::get_singleton()->update_viewport(); +} + +void TileMapEditorTerrainsPlugin::_update_selection() { + TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); + if (!tile_map) { + return; + } + + Ref<TileSet> tile_set = tile_map->get_tileset(); + if (!tile_set.is_valid()) { + return; + } + + // Get the selected terrain. + selected_terrains_pattern = TileSet::TerrainsPattern(); + selected_terrain_set = -1; + + TreeItem *selected_tree_item = terrains_tree->get_selected(); + if (selected_tree_item && selected_tree_item->get_metadata(0)) { + Dictionary metadata_dict = selected_tree_item->get_metadata(0); + // Selected terrain + selected_terrain_set = metadata_dict["terrain_set"]; + + // Selected tile + if (erase_button->is_pressed()) { + selected_terrains_pattern = TileSet::TerrainsPattern(*tile_set, selected_terrain_set); + } else if (terrains_tile_list->is_anything_selected()) { + metadata_dict = terrains_tile_list->get_item_metadata(terrains_tile_list->get_selected_items()[0]); + selected_terrains_pattern = TileSet::TerrainsPattern(*tile_set, selected_terrain_set); + selected_terrains_pattern.set_terrains_from_array(metadata_dict["terrains_pattern"]); + } + } +} + bool TileMapEditorTerrainsPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p_event) { if (!main_vbox_container->is_visible_in_tree()) { // If the bottom editor is not visible, we ignore inputs. @@ -2454,46 +2731,19 @@ bool TileMapEditorTerrainsPlugin::forward_canvas_gui_input(const Ref<InputEvent> } ERR_FAIL_COND_V(tile_map_layer >= tile_map->get_layers_count(), false); - // Get the selected terrain. - TileSet::TerrainsPattern selected_terrains_pattern; - int selected_terrain_set = -1; - - TreeItem *selected_tree_item = terrains_tree->get_selected(); - if (selected_tree_item && selected_tree_item->get_metadata(0)) { - Dictionary metadata_dict = selected_tree_item->get_metadata(0); - // Selected terrain - selected_terrain_set = metadata_dict["terrain_set"]; - - // Selected tile - if (erase_button->is_pressed()) { - selected_terrains_pattern.clear(); - for (uint32_t i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) { - TileSet::CellNeighbor side = TileSet::CellNeighbor(i); - if (tile_set->is_valid_peering_bit_terrain(selected_terrain_set, side)) { - selected_terrains_pattern.push_back(-1); - } - } - } else if (terrains_tile_list->is_anything_selected()) { - metadata_dict = terrains_tile_list->get_item_metadata(terrains_tile_list->get_selected_items()[0]); - selected_terrains_pattern = metadata_dict["terrains_pattern"]; - } - } + _update_selection(); Ref<InputEventMouseMotion> mm = p_event; if (mm.is_valid()) { + has_mouse = true; Transform2D xform = CanvasItemEditor::get_singleton()->get_canvas_transform() * tile_map->get_global_transform(); Vector2 mpos = xform.affine_inverse().xform(mm->get_position()); switch (drag_type) { case DRAG_TYPE_PAINT: { if (selected_terrain_set >= 0) { - Vector<Vector2i> line = TileMapEditor::get_line(tile_map, tile_map->world_to_map(drag_last_mouse_pos), tile_map->world_to_map(mpos)); - Map<Vector2i, TileSet::TerrainsPattern> to_draw; - for (int i = 0; i < line.size(); i++) { - to_draw[line[i]] = selected_terrains_pattern; - } - Map<Vector2i, TileMapCell> modified = _draw_terrains(to_draw, selected_terrain_set); - for (const KeyValue<Vector2i, TileMapCell> &E : modified) { + Map<Vector2i, TileMapCell> to_draw = _draw_line(tile_map->world_to_map(drag_last_mouse_pos), tile_map->world_to_map(mpos), drag_erasing); + for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { if (!drag_modified.has(E.key)) { drag_modified[E.key] = tile_map->get_cell(tile_map_layer, E.key); } @@ -2512,35 +2762,79 @@ bool TileMapEditorTerrainsPlugin::forward_canvas_gui_input(const Ref<InputEvent> Ref<InputEventMouseButton> mb = p_event; if (mb.is_valid()) { + has_mouse = true; Transform2D xform = CanvasItemEditor::get_singleton()->get_canvas_transform() * tile_map->get_global_transform(); Vector2 mpos = xform.affine_inverse().xform(mb->get_position()); - if (mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb->get_button_index() == MOUSE_BUTTON_LEFT || mb->get_button_index() == MOUSE_BUTTON_RIGHT) { if (mb->is_pressed()) { // Pressed + if (erase_button->is_pressed() || mb->get_button_index() == MOUSE_BUTTON_RIGHT) { + drag_erasing = true; + } + if (picker_button->is_pressed()) { drag_type = DRAG_TYPE_PICK; } else { // Paint otherwise. - if (selected_terrain_set >= 0 && !selected_terrains_pattern.is_empty() && tool_buttons_group->get_pressed_button() == paint_tool_button) { + if (tool_buttons_group->get_pressed_button() == paint_tool_button && !Input::get_singleton()->is_key_pressed(KEY_CTRL) && !Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + if (selected_terrain_set < 0 || !selected_terrains_pattern.is_valid()) { + return true; + } + drag_type = DRAG_TYPE_PAINT; drag_start_mouse_pos = mpos; drag_modified.clear(); - - Map<Vector2i, TileSet::TerrainsPattern> terrains_to_draw; - terrains_to_draw[tile_map->world_to_map(mpos)] = selected_terrains_pattern; - - Map<Vector2i, TileMapCell> to_draw = _draw_terrains(terrains_to_draw, selected_terrain_set); + Vector2i cell = tile_map->world_to_map(mpos); + Map<Vector2i, TileMapCell> to_draw = _draw_line(cell, cell, drag_erasing); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { drag_modified[E.key] = tile_map->get_cell(tile_map_layer, E.key); tile_map->set_cell(tile_map_layer, E.key, E.value.source_id, E.value.get_atlas_coords(), E.value.alternative_tile); } + } else if (tool_buttons_group->get_pressed_button() == line_tool_button || (tool_buttons_group->get_pressed_button() == paint_tool_button && Input::get_singleton()->is_key_pressed(KEY_SHIFT) && !Input::get_singleton()->is_key_pressed(KEY_CTRL))) { + if (selected_terrain_set < 0 || !selected_terrains_pattern.is_valid()) { + return true; + } + drag_type = DRAG_TYPE_LINE; + drag_start_mouse_pos = mpos; + drag_modified.clear(); + } else if (tool_buttons_group->get_pressed_button() == rect_tool_button || (tool_buttons_group->get_pressed_button() == paint_tool_button && Input::get_singleton()->is_key_pressed(KEY_SHIFT) && Input::get_singleton()->is_key_pressed(KEY_CTRL))) { + if (selected_terrain_set < 0 || !selected_terrains_pattern.is_valid()) { + return true; + } + drag_type = DRAG_TYPE_RECT; + drag_start_mouse_pos = mpos; + drag_modified.clear(); + } else if (tool_buttons_group->get_pressed_button() == bucket_tool_button) { + if (selected_terrain_set < 0 || !selected_terrains_pattern.is_valid()) { + return true; + } + drag_type = DRAG_TYPE_BUCKET; + drag_start_mouse_pos = mpos; + drag_modified.clear(); + Vector<Vector2i> line = TileMapEditor::get_line(tile_map, tile_map->world_to_map(drag_last_mouse_pos), tile_map->world_to_map(mpos)); + for (int i = 0; i < line.size(); i++) { + if (!drag_modified.has(line[i])) { + Map<Vector2i, TileMapCell> to_draw = _draw_bucket_fill(line[i], bucket_contiguous_checkbox->is_pressed(), drag_erasing); + for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { + if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { + continue; + } + Vector2i coords = E.key; + if (!drag_modified.has(coords)) { + drag_modified.insert(coords, tile_map->get_cell(tile_map_layer, coords)); + } + tile_map->set_cell(tile_map_layer, coords, E.value.source_id, E.value.get_atlas_coords(), E.value.alternative_tile); + } + } + } } } } else { // Released _stop_dragging(); + drag_erasing = false; } CanvasItemEditor::get_singleton()->update_viewport(); @@ -2553,6 +2847,135 @@ bool TileMapEditorTerrainsPlugin::forward_canvas_gui_input(const Ref<InputEvent> return false; } +void TileMapEditorTerrainsPlugin::forward_canvas_draw_over_viewport(Control *p_overlay) { + TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); + if (!tile_map) { + return; + } + + if (tile_map_layer < 0) { + return; + } + ERR_FAIL_INDEX(tile_map_layer, tile_map->get_layers_count()); + + Ref<TileSet> tile_set = tile_map->get_tileset(); + if (!tile_set.is_valid()) { + return; + } + + if (!tile_map->is_visible_in_tree()) { + return; + } + + Transform2D xform = CanvasItemEditor::get_singleton()->get_canvas_transform() * tile_map->get_global_transform(); + Vector2i tile_shape_size = tile_set->get_tile_size(); + + // Handle the preview of the tiles to be placed. + if (main_vbox_container->is_visible_in_tree() && has_mouse) { // Only if the tilemap editor is opened and the viewport is hovered. + Set<Vector2i> preview; + Rect2i drawn_grid_rect; + + if (drag_type == DRAG_TYPE_PICK) { + // Draw the area being picked. + Vector2i coords = tile_map->world_to_map(drag_last_mouse_pos); + if (tile_map->get_cell_source_id(tile_map_layer, coords) != TileSet::INVALID_SOURCE) { + Transform2D tile_xform; + tile_xform.set_origin(tile_map->map_to_world(coords)); + tile_xform.set_scale(tile_shape_size); + tile_set->draw_tile_shape(p_overlay, xform * tile_xform, Color(1.0, 1.0, 1.0), false); + } + } else if (!picker_button->is_pressed() && !(drag_type == DRAG_TYPE_NONE && Input::get_singleton()->is_key_pressed(KEY_CTRL) && !Input::get_singleton()->is_key_pressed(KEY_SHIFT))) { + bool expand_grid = false; + if (tool_buttons_group->get_pressed_button() == paint_tool_button && drag_type == DRAG_TYPE_NONE) { + // Preview for a single tile. + preview.insert(tile_map->world_to_map(drag_last_mouse_pos)); + expand_grid = true; + } else if (tool_buttons_group->get_pressed_button() == line_tool_button || drag_type == DRAG_TYPE_LINE) { + if (drag_type == DRAG_TYPE_NONE) { + // Preview for a single tile. + preview.insert(tile_map->world_to_map(drag_last_mouse_pos)); + } else if (drag_type == DRAG_TYPE_LINE) { + // Preview for a line. + Vector<Vector2i> line = TileMapEditor::get_line(tile_map, tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(drag_last_mouse_pos)); + for (int i = 0; i < line.size(); i++) { + preview.insert(line[i]); + } + expand_grid = true; + } + } else if (drag_type == DRAG_TYPE_RECT) { + // Preview for a rect. + Rect2i rect; + rect.set_position(tile_map->world_to_map(drag_start_mouse_pos)); + rect.set_end(tile_map->world_to_map(drag_last_mouse_pos)); + rect = rect.abs(); + + Map<Vector2i, TileSet::TerrainsPattern> to_draw; + for (int x = rect.position.x; x <= rect.get_end().x; x++) { + for (int y = rect.position.y; y <= rect.get_end().y; y++) { + preview.insert(Vector2i(x, y)); + } + } + expand_grid = true; + } else if (tool_buttons_group->get_pressed_button() == bucket_tool_button && drag_type == DRAG_TYPE_NONE) { + // Preview for a fill. + preview = _get_cells_for_bucket_fill(tile_map->world_to_map(drag_last_mouse_pos), bucket_contiguous_checkbox->is_pressed()); + } + + // Expand the grid if needed + if (expand_grid && !preview.is_empty()) { + drawn_grid_rect = Rect2i(preview.front()->get(), Vector2i(1, 1)); + for (const Vector2i &E : preview) { + drawn_grid_rect.expand_to(E); + } + } + } + + if (!preview.is_empty()) { + const int fading = 5; + + // Draw the lines of the grid behind the preview. + bool display_grid = EditorSettings::get_singleton()->get("editors/tiles_editor/display_grid"); + if (display_grid) { + Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color"); + if (drawn_grid_rect.size.x > 0 && drawn_grid_rect.size.y > 0) { + drawn_grid_rect = drawn_grid_rect.grow(fading); + for (int x = drawn_grid_rect.position.x; x < (drawn_grid_rect.position.x + drawn_grid_rect.size.x); x++) { + for (int y = drawn_grid_rect.position.y; y < (drawn_grid_rect.position.y + drawn_grid_rect.size.y); y++) { + Vector2i pos_in_rect = Vector2i(x, y) - drawn_grid_rect.position; + + // Fade out the border of the grid. + float left_opacity = CLAMP(Math::inverse_lerp(0.0f, (float)fading, (float)pos_in_rect.x), 0.0f, 1.0f); + float right_opacity = CLAMP(Math::inverse_lerp((float)drawn_grid_rect.size.x, (float)(drawn_grid_rect.size.x - fading), (float)pos_in_rect.x), 0.0f, 1.0f); + float top_opacity = CLAMP(Math::inverse_lerp(0.0f, (float)fading, (float)pos_in_rect.y), 0.0f, 1.0f); + float bottom_opacity = CLAMP(Math::inverse_lerp((float)drawn_grid_rect.size.y, (float)(drawn_grid_rect.size.y - fading), (float)pos_in_rect.y), 0.0f, 1.0f); + float opacity = CLAMP(MIN(left_opacity, MIN(right_opacity, MIN(top_opacity, bottom_opacity))) + 0.1, 0.0f, 1.0f); + + Transform2D tile_xform; + tile_xform.set_origin(tile_map->map_to_world(Vector2(x, y))); + tile_xform.set_scale(tile_shape_size); + Color color = grid_color; + color.a = color.a * opacity; + tile_set->draw_tile_shape(p_overlay, xform * tile_xform, color, false); + } + } + } + } + + // Draw the preview. + for (const Vector2i &E : preview) { + Transform2D tile_xform; + tile_xform.set_origin(tile_map->map_to_world(E)); + tile_xform.set_scale(tile_set->get_tile_size()); + if (drag_erasing || erase_button->is_pressed()) { + tile_set->draw_tile_shape(p_overlay, xform * tile_xform, Color(0.0, 0.0, 0.0, 0.5), true); + } else { + tile_set->draw_tile_shape(p_overlay, xform * tile_xform, Color(1.0, 1.0, 1.0, 0.5), true); + } + } + } + } +} + void TileMapEditorTerrainsPlugin::_update_terrains_cache() { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { @@ -2595,12 +3018,14 @@ void TileMapEditorTerrainsPlugin::_update_terrains_cache() { cell.alternative_tile = alternative_id; TileSet::TerrainsPattern terrains_pattern = tile_data->get_terrains_pattern(); - // Terrain bits. - for (int i = 0; i < terrains_pattern.size(); i++) { - int terrain = terrains_pattern[i]; - if (terrain >= 0 && terrain < (int)per_terrain_terrains_patterns[terrain_set].size()) { - per_terrain_terrains_patterns[terrain_set][terrain].insert(terrains_pattern); + for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) { + TileSet::CellNeighbor bit = TileSet::CellNeighbor(i); + if (tile_set->is_valid_peering_bit_terrain(terrain_set, bit)) { + int terrain = terrains_pattern.get_terrain(bit); + if (terrain >= 0 && terrain < (int)per_terrain_terrains_patterns[terrain_set].size()) { + per_terrain_terrains_patterns[terrain_set][terrain].insert(terrains_pattern); + } } } } @@ -2686,8 +3111,9 @@ void TileMapEditorTerrainsPlugin::_update_tiles_list() { // Count the number of matching sides/terrains. int count = 0; - for (int i = 0; i < E->get().size(); i++) { - if (int(E->get()[i]) == selected_terrain_id) { + for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) { + TileSet::CellNeighbor bit = TileSet::CellNeighbor(i); + if (tile_set->is_valid_peering_bit_terrain(selected_terrain_set, bit) && E->get().get_terrain(bit) == selected_terrain_id) { count++; } } @@ -2733,7 +3159,7 @@ void TileMapEditorTerrainsPlugin::_update_tiles_list() { terrains_tile_list->set_item_icon_region(item_index, region); terrains_tile_list->set_item_icon_transposed(item_index, transpose); Dictionary list_metadata_dict; - list_metadata_dict["terrains_pattern"] = terrains_pattern; + list_metadata_dict["terrains_pattern"] = terrains_pattern.get_terrains_as_array(); terrains_tile_list->set_item_metadata(item_index, list_metadata_dict); } } @@ -2745,6 +3171,10 @@ void TileMapEditorTerrainsPlugin::_update_tiles_list() { void TileMapEditorTerrainsPlugin::_update_theme() { paint_tool_button->set_icon(main_vbox_container->get_theme_icon(SNAME("Edit"), SNAME("EditorIcons"))); + line_tool_button->set_icon(main_vbox_container->get_theme_icon(SNAME("CurveLinear"), SNAME("EditorIcons"))); + rect_tool_button->set_icon(main_vbox_container->get_theme_icon(SNAME("Rectangle"), SNAME("EditorIcons"))); + bucket_tool_button->set_icon(main_vbox_container->get_theme_icon(SNAME("Bucket"), SNAME("EditorIcons"))); + picker_button->set_icon(main_vbox_container->get_theme_icon(SNAME("ColorPick"), SNAME("EditorIcons"))); erase_button->set_icon(main_vbox_container->get_theme_icon(SNAME("Eraser"), SNAME("EditorIcons"))); } @@ -2804,6 +3234,30 @@ TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() { paint_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_toolbar)); tilemap_tiles_tools_buttons->add_child(paint_tool_button); + line_tool_button = memnew(Button); + line_tool_button->set_flat(true); + line_tool_button->set_toggle_mode(true); + line_tool_button->set_button_group(tool_buttons_group); + line_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/line_tool", "Line", KEY_L)); + line_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_toolbar)); + tilemap_tiles_tools_buttons->add_child(line_tool_button); + + rect_tool_button = memnew(Button); + rect_tool_button->set_flat(true); + rect_tool_button->set_toggle_mode(true); + rect_tool_button->set_button_group(tool_buttons_group); + rect_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/rect_tool", "Rect", KEY_R)); + rect_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_toolbar)); + tilemap_tiles_tools_buttons->add_child(rect_tool_button); + + bucket_tool_button = memnew(Button); + bucket_tool_button->set_flat(true); + bucket_tool_button->set_toggle_mode(true); + bucket_tool_button->set_button_group(tool_buttons_group); + bucket_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/bucket_tool", "Bucket", KEY_B)); + bucket_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_toolbar)); + tilemap_tiles_tools_buttons->add_child(bucket_tool_button); + toolbar->add_child(tilemap_tiles_tools_buttons); // -- TileMap tool settings -- @@ -2828,6 +3282,17 @@ TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() { erase_button->set_shortcut(ED_SHORTCUT("tiles_editor/eraser", "Eraser", KEY_E)); erase_button->connect("pressed", callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport)); tools_settings->add_child(erase_button); + + // Separator 2. + tools_settings_vsep_2 = memnew(VSeparator); + tools_settings->add_child(tools_settings_vsep_2); + + // Continuous checkbox. + bucket_contiguous_checkbox = memnew(CheckBox); + bucket_contiguous_checkbox->set_flat(true); + bucket_contiguous_checkbox->set_text(TTR("Contiguous")); + bucket_contiguous_checkbox->set_pressed(true); + tools_settings->add_child(bucket_contiguous_checkbox); } TileMapEditorTerrainsPlugin::~TileMapEditorTerrainsPlugin() { @@ -2894,7 +3359,11 @@ void TileMapEditor::_layers_selection_button_draw() { clr = get_theme_color(SNAME("font_disabled_color")); break; default: - clr = get_theme_color(SNAME("font_color")); + if (layers_selection_button->has_focus()) { + clr = get_theme_color(SNAME("font_focus_color")); + } else { + clr = get_theme_color(SNAME("font_color")); + } } } diff --git a/editor/plugins/tiles/tile_map_editor.h b/editor/plugins/tiles/tile_map_editor.h index 0513a7b365..f462119727 100644 --- a/editor/plugins/tiles/tile_map_editor.h +++ b/editor/plugins/tiles/tile_map_editor.h @@ -75,14 +75,15 @@ private: Button *line_tool_button; Button *rect_tool_button; Button *bucket_tool_button; - Button *picker_button; HBoxContainer *tools_settings; + VSeparator *tools_settings_vsep; + Button *picker_button; Button *erase_button; - CheckBox *bucket_continuous_checkbox; VSeparator *tools_settings_vsep_2; + CheckBox *bucket_contiguous_checkbox; CheckBox *random_tile_checkbox; float scattering = 0.0; Label *scatter_label; @@ -108,17 +109,16 @@ private: DRAG_TYPE_CLIPBOARD_PASTE, }; DragType drag_type = DRAG_TYPE_NONE; + bool drag_erasing = false; Vector2 drag_start_mouse_pos; Vector2 drag_last_mouse_pos; Map<Vector2i, TileMapCell> drag_modified; - bool rmb_erasing = false; TileMapCell _pick_random_tile(Ref<TileMapPattern> p_pattern); - Map<Vector2i, TileMapCell> _draw_line(Vector2 p_start_drag_mouse_pos, Vector2 p_from_mouse_pos, Vector2 p_to_mouse_pos); - Map<Vector2i, TileMapCell> _draw_rect(Vector2i p_start_cell, Vector2i p_end_cell); - Map<Vector2i, TileMapCell> _draw_bucket_fill(Vector2i p_coords, bool p_contiguous); + Map<Vector2i, TileMapCell> _draw_line(Vector2 p_start_drag_mouse_pos, Vector2 p_from_mouse_pos, Vector2 p_to_mouse_pos, bool p_erase); + Map<Vector2i, TileMapCell> _draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase); + Map<Vector2i, TileMapCell> _draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase); void _stop_dragging(); - bool _is_erasing() const; ///// Selection system. ///// Set<Vector2i> tile_map_selection; @@ -220,32 +220,53 @@ private: Ref<ButtonGroup> tool_buttons_group; Button *paint_tool_button; + Button *line_tool_button; + Button *rect_tool_button; + Button *bucket_tool_button; HBoxContainer *tools_settings; + VSeparator *tools_settings_vsep; Button *picker_button; Button *erase_button; + VSeparator *tools_settings_vsep_2; + CheckBox *bucket_contiguous_checkbox; void _update_toolbar(); // Main vbox. VBoxContainer *main_vbox_container; // TileMap editing. + bool has_mouse = false; + void _mouse_exited_viewport(); + enum DragType { DRAG_TYPE_NONE = 0, DRAG_TYPE_PAINT, + DRAG_TYPE_LINE, + DRAG_TYPE_RECT, + DRAG_TYPE_BUCKET, DRAG_TYPE_PICK, }; DragType drag_type = DRAG_TYPE_NONE; + bool drag_erasing = false; Vector2 drag_start_mouse_pos; Vector2 drag_last_mouse_pos; Map<Vector2i, TileMapCell> drag_modified; // Painting Map<Vector2i, TileMapCell> _draw_terrains(const Map<Vector2i, TileSet::TerrainsPattern> &p_to_paint, int p_terrain_set) const; + Map<Vector2i, TileMapCell> _draw_line(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase); + Map<Vector2i, TileMapCell> _draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase); + Set<Vector2i> _get_cells_for_bucket_fill(Vector2i p_coords, bool p_contiguous); + Map<Vector2i, TileMapCell> _draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase); void _stop_dragging(); + int selected_terrain_set = -1; + TileSet::TerrainsPattern selected_terrains_pattern; + void _update_selection(); + // Bottom panel. Tree *terrains_tree; ItemList *terrains_tile_list; @@ -265,7 +286,7 @@ private: public: virtual Vector<TabData> get_tabs() const override; virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) override; - //virtual void forward_canvas_draw_over_viewport(Control *p_overlay) override; + virtual void forward_canvas_draw_over_viewport(Control *p_overlay) override; TileMapEditorTerrainsPlugin(); ~TileMapEditorTerrainsPlugin(); diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp index 31b2f96b62..e54a57b130 100644 --- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp +++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp @@ -841,7 +841,11 @@ void TileSetAtlasSourceEditor::_tile_data_editor_dropdown_button_draw() { clr = get_theme_color(SNAME("font_disabled_color")); break; default: - clr = get_theme_color(SNAME("font_color")); + if (tile_data_editor_dropdown_button->has_focus()) { + clr = get_theme_color(SNAME("font_focus_color")); + } else { + clr = get_theme_color(SNAME("font_color")); + } } } diff --git a/editor/plugins/tiles/tile_set_editor.cpp b/editor/plugins/tiles/tile_set_editor.cpp index 0fbb9a98c7..915ce50836 100644 --- a/editor/plugins/tiles/tile_set_editor.cpp +++ b/editor/plugins/tiles/tile_set_editor.cpp @@ -41,10 +41,10 @@ TileSetEditor *TileSetEditor::singleton = nullptr; -void TileSetEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) { +void TileSetEditor::_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) { ERR_FAIL_COND(!tile_set.is_valid()); - if (!can_drop_data_fw(p_point, p_data, p_from)) { + if (!_can_drop_data_fw(p_point, p_data, p_from)) { return; } @@ -81,7 +81,7 @@ void TileSetEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, C } } -bool TileSetEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const { +bool TileSetEditor::_can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const { ERR_FAIL_COND_V(!tile_set.is_valid(), false); if (p_from == sources_list) { @@ -608,8 +608,8 @@ void TileSetEditor::_undo_redo_inspector_callback(Object *p_undo_redo, Object *p } void TileSetEditor::_bind_methods() { - ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &TileSetEditor::can_drop_data_fw); - ClassDB::bind_method(D_METHOD("_drop_data_fw"), &TileSetEditor::drop_data_fw); + ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &TileSetEditor::_can_drop_data_fw); + ClassDB::bind_method(D_METHOD("_drop_data_fw"), &TileSetEditor::_drop_data_fw); } void TileSetEditor::edit(Ref<TileSet> p_tile_set) { diff --git a/editor/plugins/tiles/tile_set_editor.h b/editor/plugins/tiles/tile_set_editor.h index cda38760cf..58312ce3df 100644 --- a/editor/plugins/tiles/tile_set_editor.h +++ b/editor/plugins/tiles/tile_set_editor.h @@ -59,6 +59,9 @@ private: UndoRedo *undo_redo = EditorNode::get_undo_redo(); + void _drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from); + bool _can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const; + void _update_sources_list(int force_selected_id = -1); // Sources management. @@ -98,9 +101,6 @@ public: void edit(Ref<TileSet> p_tile_set); - void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from); - bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const; - TileSetEditor(); ~TileSetEditor(); }; diff --git a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp index dc26d380b8..d687d9651d 100644 --- a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp +++ b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp @@ -385,8 +385,8 @@ void TileSetScenesCollectionSourceEditor::edit(Ref<TileSet> p_tile_set, TileSetS _update_tile_inspector(); } -void TileSetScenesCollectionSourceEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) { - if (!can_drop_data_fw(p_point, p_data, p_from)) { +void TileSetScenesCollectionSourceEditor::_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) { + if (!_can_drop_data_fw(p_point, p_data, p_from)) { return; } @@ -412,7 +412,7 @@ void TileSetScenesCollectionSourceEditor::drop_data_fw(const Point2 &p_point, co } } -bool TileSetScenesCollectionSourceEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const { +bool TileSetScenesCollectionSourceEditor::_can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const { if (p_from == scene_tiles_list) { Dictionary d = p_data; @@ -447,8 +447,8 @@ void TileSetScenesCollectionSourceEditor::_bind_methods() { ADD_SIGNAL(MethodInfo("source_id_changed", PropertyInfo(Variant::INT, "source_id"))); ClassDB::bind_method(D_METHOD("_scene_thumbnail_done"), &TileSetScenesCollectionSourceEditor::_scene_thumbnail_done); - ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &TileSetScenesCollectionSourceEditor::can_drop_data_fw); - ClassDB::bind_method(D_METHOD("drop_data_fw"), &TileSetScenesCollectionSourceEditor::drop_data_fw); + ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &TileSetScenesCollectionSourceEditor::_can_drop_data_fw); + ClassDB::bind_method(D_METHOD("_drop_data_fw"), &TileSetScenesCollectionSourceEditor::_drop_data_fw); } TileSetScenesCollectionSourceEditor::TileSetScenesCollectionSourceEditor() { diff --git a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.h b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.h index 3be7bee714..4e33128be5 100644 --- a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.h +++ b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.h @@ -125,14 +125,15 @@ private: void _update_scenes_list(); void _update_action_buttons(); + void _drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from); + bool _can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const; + protected: void _notification(int p_what); static void _bind_methods(); public: void edit(Ref<TileSet> p_tile_set, TileSetScenesCollectionSource *p_tile_set_scenes_collection_source, int p_source_id); - void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from); - bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const; TileSetScenesCollectionSourceEditor(); ~TileSetScenesCollectionSourceEditor(); }; diff --git a/editor/plugins/tiles/tiles_editor_plugin.cpp b/editor/plugins/tiles/tiles_editor_plugin.cpp index f1918073fb..47dfc57b0f 100644 --- a/editor/plugins/tiles/tiles_editor_plugin.cpp +++ b/editor/plugins/tiles/tiles_editor_plugin.cpp @@ -47,8 +47,12 @@ TilesEditorPlugin *TilesEditorPlugin::singleton = nullptr; -void TilesEditorPlugin::_pattern_preview_done(const Variant &p_udata) { - pattern_preview_done.set(); +void TilesEditorPlugin::_preview_frame_started() { + RS::get_singleton()->request_frame_drawn_callback(callable_mp(const_cast<TilesEditorPlugin *>(this), &TilesEditorPlugin::_pattern_preview_done)); +} + +void TilesEditorPlugin::_pattern_preview_done() { + pattern_preview_done.post(); } void TilesEditorPlugin::_thread_func(void *ud) { @@ -112,12 +116,9 @@ void TilesEditorPlugin::_thread() { // Add the viewport at the lasst moment to avoid rendering too early. EditorNode::get_singleton()->add_child(viewport); - pattern_preview_done.clear(); - RS::get_singleton()->request_frame_drawn_callback(const_cast<TilesEditorPlugin *>(this), "_pattern_preview_done", Variant()); + RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<TilesEditorPlugin *>(this), &TilesEditorPlugin::_preview_frame_started), Vector<Variant>(), Object::CONNECT_ONESHOT); - while (!pattern_preview_done.is_set()) { - OS::get_singleton()->delay_usec(10); - } + pattern_preview_done.wait(); Ref<Image> image = viewport->get_texture()->get_image(); Ref<ImageTexture> image_texture; @@ -274,10 +275,6 @@ bool TilesEditorPlugin::handles(Object *p_object) const { return p_object->is_class("TileMap") || p_object->is_class("TileSet"); } -void TilesEditorPlugin::_bind_methods() { - ClassDB::bind_method(D_METHOD("_pattern_preview_done", "pattern"), &TilesEditorPlugin::_pattern_preview_done); -} - TilesEditorPlugin::TilesEditorPlugin(EditorNode *p_node) { set_process_internal(true); diff --git a/editor/plugins/tiles/tiles_editor_plugin.h b/editor/plugins/tiles/tiles_editor_plugin.h index dd52bdc31a..33493040f6 100644 --- a/editor/plugins/tiles/tiles_editor_plugin.h +++ b/editor/plugins/tiles/tiles_editor_plugin.h @@ -77,14 +77,14 @@ private: Thread pattern_preview_thread; SafeFlag pattern_thread_exit; SafeFlag pattern_thread_exited; - mutable SafeFlag pattern_preview_done; - void _pattern_preview_done(const Variant &p_udata); + Semaphore pattern_preview_done; + void _preview_frame_started(); + void _pattern_preview_done(); static void _thread_func(void *ud); void _thread(); protected: void _notification(int p_what); - static void _bind_methods(); public: _FORCE_INLINE_ static TilesEditorPlugin *get_singleton() { return singleton; } diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index 09ca1f7608..140ee0cffc 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -104,7 +104,6 @@ void VisualShaderGraphPlugin::_bind_methods() { ClassDB::bind_method("connect_nodes", &VisualShaderGraphPlugin::connect_nodes); ClassDB::bind_method("disconnect_nodes", &VisualShaderGraphPlugin::disconnect_nodes); ClassDB::bind_method("set_node_position", &VisualShaderGraphPlugin::set_node_position); - ClassDB::bind_method("set_node_size", &VisualShaderGraphPlugin::set_node_size); ClassDB::bind_method("update_node", &VisualShaderGraphPlugin::update_node); ClassDB::bind_method("update_node_deferred", &VisualShaderGraphPlugin::update_node_deferred); ClassDB::bind_method("set_input_port_default_value", &VisualShaderGraphPlugin::set_input_port_default_value); @@ -292,12 +291,6 @@ void VisualShaderGraphPlugin::set_node_position(VisualShader::Type p_type, int p } } -void VisualShaderGraphPlugin::set_node_size(VisualShader::Type p_type, int p_id, const Vector2 &p_size) { - if (visual_shader->get_shader_type() == p_type && links.has(p_id)) { - links[p_id].graph_node->set_size(p_size); - } -} - bool VisualShaderGraphPlugin::is_preview_visible(int p_id) const { return links[p_id].preview_visible; } @@ -1047,7 +1040,6 @@ void VisualShaderEditor::edit(VisualShader *p_visual_shader) { hide(); } else { if (changed) { // to avoid tree collapse - _clear_buffer(); _update_options_menu(); _update_preview(); _update_graph(); @@ -1246,7 +1238,7 @@ void VisualShaderEditor::_update_options_menu() { Color unsupported_color = get_theme_color(SNAME("error_color"), SNAME("Editor")); Color supported_color = get_theme_color(SNAME("warning_color"), SNAME("Editor")); - static bool low_driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name") == "GLES2"; + static bool low_driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name") == "opengl3"; Map<String, TreeItem *> folders; @@ -1426,13 +1418,23 @@ void VisualShaderEditor::_set_mode(int p_which) { edit_type_standard->set_visible(false); edit_type_particles->set_visible(false); edit_type_sky->set_visible(true); + edit_type_fog->set_visible(false); edit_type = edit_type_sky; custom_mode_box->set_visible(false); mode = MODE_FLAGS_SKY; + } else if (p_which == VisualShader::MODE_FOG) { + edit_type_standard->set_visible(false); + edit_type_particles->set_visible(false); + edit_type_sky->set_visible(false); + edit_type_fog->set_visible(true); + edit_type = edit_type_fog; + custom_mode_box->set_visible(false); + mode = MODE_FLAGS_FOG; } else if (p_which == VisualShader::MODE_PARTICLES) { edit_type_standard->set_visible(false); edit_type_particles->set_visible(true); edit_type_sky->set_visible(false); + edit_type_fog->set_visible(false); edit_type = edit_type_particles; if ((edit_type->get_selected() + 3) > VisualShader::TYPE_PROCESS) { custom_mode_box->set_visible(false); @@ -1444,6 +1446,7 @@ void VisualShaderEditor::_set_mode(int p_which) { edit_type_particles->set_visible(false); edit_type_standard->set_visible(true); edit_type_sky->set_visible(false); + edit_type_fog->set_visible(false); edit_type = edit_type_standard; custom_mode_box->set_visible(false); mode = MODE_FLAGS_SPATIAL_CANVASITEM; @@ -1601,6 +1604,8 @@ VisualShader::Type VisualShaderEditor::get_current_shader_type() const { type = VisualShader::Type(edit_type->get_selected() + 3 + (custom_mode_enabled ? 3 : 0)); } else if (mode & MODE_FLAGS_SKY) { type = VisualShader::Type(edit_type->get_selected() + 8); + } else if (mode & MODE_FLAGS_FOG) { + type = VisualShader::Type(edit_type->get_selected() + 9); } else { type = VisualShader::Type(edit_type->get_selected()); } @@ -2752,9 +2757,6 @@ void VisualShaderEditor::_delete_nodes(int p_type, const List<int> &p_nodes) { undo_redo->add_undo_method(visual_shader.ptr(), "add_node", type, node, visual_shader->get_node_position(type, F), F); undo_redo->add_undo_method(graph_plugin.ptr(), "add_node", type, F); - undo_redo->add_do_method(this, "_clear_buffer"); - undo_redo->add_undo_method(this, "_clear_buffer"); - // restore size, inputs and outputs if node is group VisualShaderNodeGroupBase *group = Object::cast_to<VisualShaderNodeGroupBase>(node.ptr()); if (group) { @@ -3090,13 +3092,15 @@ void VisualShaderEditor::_graph_gui_input(const Ref<InputEvent> &p_event) { selected_float_constant = -1; } - if (to_change.is_empty() && copy_nodes_buffer.is_empty()) { + if (to_change.is_empty() && copy_items_buffer.is_empty()) { _show_members_dialog(true); } else { + popup_menu->set_item_disabled(NodeMenuOptions::CUT, to_change.is_empty()); popup_menu->set_item_disabled(NodeMenuOptions::COPY, to_change.is_empty()); - popup_menu->set_item_disabled(NodeMenuOptions::PASTE, copy_nodes_buffer.is_empty()); + popup_menu->set_item_disabled(NodeMenuOptions::PASTE, copy_items_buffer.is_empty()); popup_menu->set_item_disabled(NodeMenuOptions::DELETE, to_change.is_empty()); popup_menu->set_item_disabled(NodeMenuOptions::DUPLICATE, to_change.is_empty()); + popup_menu->set_item_disabled(NodeMenuOptions::CLEAR_COPY_BUFFER, copy_items_buffer.is_empty()); int temp = popup_menu->get_item_index(NodeMenuOptions::SEPARATOR2); if (temp != -1) { @@ -3207,10 +3211,7 @@ void VisualShaderEditor::_show_members_dialog(bool at_mouse_pos, VisualShaderNod void VisualShaderEditor::_sbox_input(const Ref<InputEvent> &p_ie) { Ref<InputEventKey> ie = p_ie; - if (ie.is_valid() && (ie->get_keycode() == KEY_UP || - ie->get_keycode() == KEY_DOWN || - ie->get_keycode() == KEY_ENTER || - ie->get_keycode() == KEY_KP_ENTER)) { + if (ie.is_valid() && (ie->get_keycode() == KEY_UP || ie->get_keycode() == KEY_DOWN || ie->get_keycode() == KEY_ENTER || ie->get_keycode() == KEY_KP_ENTER)) { members->gui_input(ie); node_filter->accept_event(); } @@ -3319,69 +3320,88 @@ void VisualShaderEditor::_node_changed(int p_id) { } } -void VisualShaderEditor::_dup_update_excluded(int p_type, Set<int> &r_excluded) { - r_excluded.clear(); - VisualShader::Type type = (VisualShader::Type)p_type; - - for (int i = 0; i < graph->get_child_count(); i++) { - GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i)); - if (gn) { - int id = String(gn->get_name()).to_int(); - Ref<VisualShaderNode> node = visual_shader->get_node(type, id); - Ref<VisualShaderNodeOutput> output = node; - if (output.is_valid()) { - r_excluded.insert(id); - continue; - } - r_excluded.insert(id); - } - } -} - -void VisualShaderEditor::_dup_copy_nodes(int p_type, List<int> &r_nodes, Set<int> &r_excluded) { +void VisualShaderEditor::_dup_copy_nodes(int p_type, List<CopyItem> &r_items, List<VisualShader::Connection> &r_connections) { VisualShader::Type type = (VisualShader::Type)p_type; selection_center.x = 0.0f; selection_center.y = 0.0f; + Set<int> nodes; + for (int i = 0; i < graph->get_child_count(); i++) { GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i)); if (gn) { int id = String(gn->get_name()).to_int(); + Ref<VisualShaderNode> node = visual_shader->get_node(type, id); Ref<VisualShaderNodeOutput> output = node; if (output.is_valid()) { // can't duplicate output - r_excluded.insert(id); continue; } + if (node.is_valid() && gn->is_selected()) { Vector2 pos = visual_shader->get_node_position(type, id); selection_center += pos; - r_nodes.push_back(id); + + CopyItem item; + item.id = id; + item.node = visual_shader->get_node(type, id)->duplicate(); + item.position = visual_shader->get_node_position(type, id); + + Ref<VisualShaderNodeResizableBase> resizable_base = node; + if (resizable_base.is_valid()) { + item.size = resizable_base->get_size(); + } + + Ref<VisualShaderNodeGroupBase> group = node; + if (group.is_valid()) { + item.group_inputs = group->get_inputs(); + item.group_outputs = group->get_outputs(); + } + + Ref<VisualShaderNodeExpression> expression = node; + if (expression.is_valid()) { + item.expression = expression->get_expression(); + } + + r_items.push_back(item); + + nodes.insert(id); } - r_excluded.insert(id); } } - selection_center /= (float)r_nodes.size(); + List<VisualShader::Connection> connections; + visual_shader->get_node_connections(type, &connections); + + for (const VisualShader::Connection &E : connections) { + if (nodes.has(E.from_node) && nodes.has(E.to_node)) { + r_connections.push_back(E); + } + } + + selection_center /= (float)r_items.size(); } -void VisualShaderEditor::_dup_paste_nodes(int p_type, int p_pasted_type, List<int> &r_nodes, Set<int> &r_excluded, const Vector2 &p_offset, bool p_select) { +void VisualShaderEditor::_dup_paste_nodes(int p_type, List<CopyItem> &r_items, const List<VisualShader::Connection> &p_connections, const Vector2 &p_offset, bool p_duplicate) { + if (p_duplicate) { + undo_redo->create_action(TTR("Duplicate VisualShader Node(s)")); + } else { + undo_redo->create_action(TTR("Paste VisualShader Node(s)")); + } + VisualShader::Type type = (VisualShader::Type)p_type; - VisualShader::Type pasted_type = (VisualShader::Type)p_pasted_type; int base_id = visual_shader->get_valid_node_id(type); int id_from = base_id; Map<int, int> connection_remap; Set<int> unsupported_set; + Set<int> added_set; - for (int &E : r_nodes) { - connection_remap[E] = id_from; - Ref<VisualShaderNode> node = visual_shader->get_node(pasted_type, E); - + for (CopyItem &item : r_items) { bool unsupported = false; for (int i = 0; i < add_options.size(); i++) { - if (add_options[i].type == node->get_class_name()) { + if (add_options[i].type == item.node->get_class_name()) { if (!_is_available(add_options[i].mode)) { unsupported = true; } @@ -3389,48 +3409,47 @@ void VisualShaderEditor::_dup_paste_nodes(int p_type, int p_pasted_type, List<in } } if (unsupported) { - unsupported_set.insert(E); + unsupported_set.insert(item.id); continue; } + connection_remap[item.id] = id_from; + Ref<VisualShaderNode> node = item.node->duplicate(); - Ref<VisualShaderNode> dupli = node->duplicate(); - - undo_redo->add_do_method(visual_shader.ptr(), "add_node", type, dupli, visual_shader->get_node_position(pasted_type, E) + p_offset, id_from); - undo_redo->add_do_method(graph_plugin.ptr(), "add_node", type, id_from); + Ref<VisualShaderNodeResizableBase> resizable_base = Object::cast_to<VisualShaderNodeResizableBase>(node.ptr()); + if (resizable_base.is_valid()) { + undo_redo->add_do_method(node.ptr(), "set_size", item.size); + } - // duplicate size, inputs and outputs if node is group Ref<VisualShaderNodeGroupBase> group = Object::cast_to<VisualShaderNodeGroupBase>(node.ptr()); - if (!group.is_null()) { - undo_redo->add_do_method(dupli.ptr(), "set_size", group->get_size()); - undo_redo->add_do_method(graph_plugin.ptr(), "set_node_size", type, id_from, group->get_size()); - undo_redo->add_do_method(dupli.ptr(), "set_inputs", group->get_inputs()); - undo_redo->add_do_method(dupli.ptr(), "set_outputs", group->get_outputs()); + if (group.is_valid()) { + undo_redo->add_do_method(node.ptr(), "set_inputs", item.group_inputs); + undo_redo->add_do_method(node.ptr(), "set_outputs", item.group_outputs); } - // duplicate expression text if node is expression + Ref<VisualShaderNodeExpression> expression = Object::cast_to<VisualShaderNodeExpression>(node.ptr()); - if (!expression.is_null()) { - undo_redo->add_do_method(dupli.ptr(), "set_expression", expression->get_expression()); + if (expression.is_valid()) { + undo_redo->add_do_method(node.ptr(), "set_expression", item.expression); } + undo_redo->add_do_method(visual_shader.ptr(), "add_node", type, node, item.position + p_offset, id_from); + undo_redo->add_do_method(graph_plugin.ptr(), "add_node", type, id_from); + + added_set.insert(id_from); id_from++; } - List<VisualShader::Connection> conns; - visual_shader->get_node_connections(pasted_type, &conns); - - for (const VisualShader::Connection &E : conns) { + for (const VisualShader::Connection &E : p_connections) { if (unsupported_set.has(E.from_node) || unsupported_set.has(E.to_node)) { continue; } - if (connection_remap.has(E.from_node) && connection_remap.has(E.to_node)) { - undo_redo->add_do_method(visual_shader.ptr(), "connect_nodes", type, connection_remap[E.from_node], E.from_port, connection_remap[E.to_node], E.to_port); - undo_redo->add_do_method(graph_plugin.ptr(), "connect_nodes", type, connection_remap[E.from_node], E.from_port, connection_remap[E.to_node], E.to_port); - undo_redo->add_undo_method(graph_plugin.ptr(), "disconnect_nodes", type, connection_remap[E.from_node], E.from_port, connection_remap[E.to_node], E.to_port); - } + + undo_redo->add_do_method(visual_shader.ptr(), "connect_nodes", type, connection_remap[E.from_node], E.from_port, connection_remap[E.to_node], E.to_port); + undo_redo->add_do_method(graph_plugin.ptr(), "connect_nodes", type, connection_remap[E.from_node], E.from_port, connection_remap[E.to_node], E.to_port); + undo_redo->add_undo_method(graph_plugin.ptr(), "disconnect_nodes", type, connection_remap[E.from_node], E.from_port, connection_remap[E.to_node], E.to_port); } id_from = base_id; - for (int i = 0; i < r_nodes.size(); i++) { + for (int i = 0; i < r_items.size(); i++) { undo_redo->add_undo_method(visual_shader.ptr(), "remove_node", type, id_from); undo_redo->add_undo_method(graph_plugin.ptr(), "remove_node", type, id_from); id_from++; @@ -3438,54 +3457,61 @@ void VisualShaderEditor::_dup_paste_nodes(int p_type, int p_pasted_type, List<in undo_redo->commit_action(); - if (p_select) { - // reselect duplicated nodes by excluding the other ones - for (int i = 0; i < graph->get_child_count(); i++) { - GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i)); - if (gn) { - int id = String(gn->get_name()).to_int(); - if (!r_excluded.has(id)) { - gn->set_selected(true); - } else { - gn->set_selected(false); - } + // reselect nodes by excluding the other ones + for (int i = 0; i < graph->get_child_count(); i++) { + GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i)); + if (gn) { + int id = String(gn->get_name()).to_int(); + if (added_set.has(id)) { + gn->set_selected(true); + } else { + gn->set_selected(false); } } } } -void VisualShaderEditor::_clear_buffer() { - copy_nodes_buffer.clear(); - copy_nodes_excluded_buffer.clear(); +void VisualShaderEditor::_clear_copy_buffer() { + copy_items_buffer.clear(); + copy_connections_buffer.clear(); } void VisualShaderEditor::_duplicate_nodes() { int type = get_current_shader_type(); - List<int> nodes; - Set<int> excluded; + List<CopyItem> items; + List<VisualShader::Connection> connections; - _dup_copy_nodes(type, nodes, excluded); + _dup_copy_nodes(type, items, connections); - if (nodes.is_empty()) { + if (items.is_empty()) { return; } - undo_redo->create_action(TTR("Duplicate VisualShader Node(s)")); - - _dup_paste_nodes(type, type, nodes, excluded, Vector2(10, 10) * EDSCALE, true); + _dup_paste_nodes(type, items, connections, Vector2(10, 10) * EDSCALE, true); } -void VisualShaderEditor::_copy_nodes() { - copy_type = get_current_shader_type(); +void VisualShaderEditor::_copy_nodes(bool p_cut) { + _clear_copy_buffer(); - _clear_buffer(); + _dup_copy_nodes(get_current_shader_type(), copy_items_buffer, copy_connections_buffer); - _dup_copy_nodes(copy_type, copy_nodes_buffer, copy_nodes_excluded_buffer); + if (p_cut) { + undo_redo->create_action(TTR("Cut VisualShader Node(s)")); + + List<int> ids; + for (const CopyItem &E : copy_items_buffer) { + ids.push_back(E.id); + } + + _delete_nodes(get_current_shader_type(), ids); + + undo_redo->commit_action(); + } } void VisualShaderEditor::_paste_nodes(bool p_use_custom_position, const Vector2 &p_custom_position) { - if (copy_nodes_buffer.is_empty()) { + if (copy_items_buffer.is_empty()) { return; } @@ -3500,11 +3526,7 @@ void VisualShaderEditor::_paste_nodes(bool p_use_custom_position, const Vector2 mpos = graph->get_local_mouse_position(); } - undo_redo->create_action(TTR("Paste VisualShader Node(s)")); - - _dup_paste_nodes(type, copy_type, copy_nodes_buffer, copy_nodes_excluded_buffer, (graph->get_scroll_ofs() / scale + mpos / scale - selection_center), false); - - _dup_update_excluded(type, copy_nodes_excluded_buffer); // to prevent selection of previous copies at new paste + _dup_paste_nodes(type, copy_items_buffer, copy_connections_buffer, graph->get_scroll_ofs() / scale + mpos / scale - selection_center, false); } void VisualShaderEditor::_mode_selected(int p_id) { @@ -3523,11 +3545,15 @@ void VisualShaderEditor::_mode_selected(int p_id) { } } else if (mode & MODE_FLAGS_SKY) { offset = 8; + } else if (mode & MODE_FLAGS_FOG) { + offset = 9; } visual_shader->set_shader_type(VisualShader::Type(p_id + offset)); _update_options_menu(); _update_graph(); + + graph->grab_focus(); } void VisualShaderEditor::_custom_mode_toggled(bool p_enabled) { @@ -3730,8 +3756,11 @@ void VisualShaderEditor::_node_menu_id_pressed(int p_idx) { case NodeMenuOptions::ADD: _show_members_dialog(true); break; + case NodeMenuOptions::CUT: + _copy_nodes(true); + break; case NodeMenuOptions::COPY: - _copy_nodes(); + _copy_nodes(false); break; case NodeMenuOptions::PASTE: _paste_nodes(true, menu_point); @@ -3742,6 +3771,9 @@ void VisualShaderEditor::_node_menu_id_pressed(int p_idx) { case NodeMenuOptions::DUPLICATE: _duplicate_nodes(); break; + case NodeMenuOptions::CLEAR_COPY_BUFFER: + _clear_copy_buffer(); + break; case NodeMenuOptions::CONVERT_CONSTANTS_TO_UNIFORMS: _convert_constants_to_uniforms(false); break; @@ -3956,7 +3988,7 @@ void VisualShaderEditor::_bind_methods() { ClassDB::bind_method("_input_select_item", &VisualShaderEditor::_input_select_item); ClassDB::bind_method("_uniform_select_item", &VisualShaderEditor::_uniform_select_item); ClassDB::bind_method("_set_node_size", &VisualShaderEditor::_set_node_size); - ClassDB::bind_method("_clear_buffer", &VisualShaderEditor::_clear_buffer); + ClassDB::bind_method("_clear_copy_buffer", &VisualShaderEditor::_clear_copy_buffer); ClassDB::bind_method("_update_uniforms", &VisualShaderEditor::_update_uniforms); ClassDB::bind_method("_set_mode", &VisualShaderEditor::_set_mode); ClassDB::bind_method("_nodes_dragged", &VisualShaderEditor::_nodes_dragged); @@ -4010,7 +4042,7 @@ VisualShaderEditor::VisualShaderEditor() { graph->connect("node_selected", callable_mp(this, &VisualShaderEditor::_node_selected)); graph->connect("scroll_offset_changed", callable_mp(this, &VisualShaderEditor::_scroll_changed)); graph->connect("duplicate_nodes_request", callable_mp(this, &VisualShaderEditor::_duplicate_nodes)); - graph->connect("copy_nodes_request", callable_mp(this, &VisualShaderEditor::_copy_nodes)); + graph->connect("copy_nodes_request", callable_mp(this, &VisualShaderEditor::_copy_nodes), varray(false)); graph->connect("paste_nodes_request", callable_mp(this, &VisualShaderEditor::_paste_nodes), varray(false, Point2())); graph->connect("delete_nodes_request", callable_mp(this, &VisualShaderEditor::_delete_nodes_request)); graph->connect("gui_input", callable_mp(this, &VisualShaderEditor::_graph_gui_input)); @@ -4065,6 +4097,11 @@ VisualShaderEditor::VisualShaderEditor() { edit_type_sky->select(0); edit_type_sky->connect("item_selected", callable_mp(this, &VisualShaderEditor::_mode_selected)); + edit_type_fog = memnew(OptionButton); + edit_type_fog->add_item(TTR("Fog")); + edit_type_fog->select(0); + edit_type_fog->connect("item_selected", callable_mp(this, &VisualShaderEditor::_mode_selected)); + edit_type = edit_type_standard; graph->get_zoom_hbox()->add_child(custom_mode_box); @@ -4075,6 +4112,8 @@ VisualShaderEditor::VisualShaderEditor() { graph->get_zoom_hbox()->move_child(edit_type_particles, 0); graph->get_zoom_hbox()->add_child(edit_type_sky); graph->get_zoom_hbox()->move_child(edit_type_sky, 0); + graph->get_zoom_hbox()->add_child(edit_type_fog); + graph->get_zoom_hbox()->move_child(edit_type_fog, 0); add_node = memnew(Button); add_node->set_flat(true); @@ -4129,10 +4168,12 @@ VisualShaderEditor::VisualShaderEditor() { add_child(popup_menu); popup_menu->add_item(TTR("Add Node"), NodeMenuOptions::ADD); popup_menu->add_separator(); + popup_menu->add_item(TTR("Cut"), NodeMenuOptions::CUT); popup_menu->add_item(TTR("Copy"), NodeMenuOptions::COPY); popup_menu->add_item(TTR("Paste"), NodeMenuOptions::PASTE); popup_menu->add_item(TTR("Delete"), NodeMenuOptions::DELETE); popup_menu->add_item(TTR("Duplicate"), NodeMenuOptions::DUPLICATE); + popup_menu->add_item(TTR("Clear Copy Buffer"), NodeMenuOptions::CLEAR_COPY_BUFFER); popup_menu->connect("id_pressed", callable_mp(this, &VisualShaderEditor::_node_menu_id_pressed)); /////////////////////////////////////// @@ -4343,6 +4384,7 @@ VisualShaderEditor::VisualShaderEditor() { const String input_param_for_fragment_and_light_shader_modes = TTR("'%s' input parameter for fragment and light shader modes."); const String input_param_for_fragment_shader_mode = TTR("'%s' input parameter for fragment shader mode."); const String input_param_for_sky_shader_mode = TTR("'%s' input parameter for sky shader mode."); + const String input_param_for_fog_shader_mode = TTR("'%s' input parameter for fog shader mode."); const String input_param_for_light_shader_mode = TTR("'%s' input parameter for light shader mode."); const String input_param_for_vertex_shader_mode = TTR("'%s' input parameter for vertex shader mode."); const String input_param_for_start_shader_mode = TTR("'%s' input parameter for start shader mode."); @@ -4462,6 +4504,16 @@ VisualShaderEditor::VisualShaderEditor() { add_options.push_back(AddOption("SkyCoords", "Input", "Sky", "VisualShaderNodeInput", vformat(input_param_for_sky_shader_mode, "sky_coords"), "sky_coords", VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_SKY, Shader::MODE_SKY)); add_options.push_back(AddOption("Time", "Input", "Sky", "VisualShaderNodeInput", vformat(input_param_for_sky_shader_mode, "time"), "time", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_SKY, Shader::MODE_SKY)); + // FOG INPUTS + + add_options.push_back(AddOption("WorldPosition", "Input", "Fog", "VisualShaderNodeInput", vformat(input_param_for_fog_shader_mode, "world_position"), "world_position", VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_FOG, Shader::MODE_FOG)); + add_options.push_back(AddOption("ObjectPosition", "Input", "Fog", "VisualShaderNodeInput", vformat(input_param_for_fog_shader_mode, "object_position"), "object_position", VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_FOG, Shader::MODE_FOG)); + add_options.push_back(AddOption("UVW", "Input", "Fog", "VisualShaderNodeInput", vformat(input_param_for_fog_shader_mode, "uvw"), "uvw", VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_FOG, Shader::MODE_FOG)); + add_options.push_back(AddOption("Extents", "Input", "Fog", "VisualShaderNodeInput", vformat(input_param_for_fog_shader_mode, "extents"), "extents", VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_FOG, Shader::MODE_FOG)); + add_options.push_back(AddOption("Transform", "Input", "Fog", "VisualShaderNodeInput", vformat(input_param_for_fog_shader_mode, "transform"), "transform", VisualShaderNode::PORT_TYPE_TRANSFORM, TYPE_FLAGS_FOG, Shader::MODE_FOG)); + add_options.push_back(AddOption("SDF", "Input", "Fog", "VisualShaderNodeInput", vformat(input_param_for_fog_shader_mode, "sdf"), "sdf", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_FOG, Shader::MODE_FOG)); + add_options.push_back(AddOption("Time", "Input", "Fog", "VisualShaderNodeInput", vformat(input_param_for_fog_shader_mode, "time"), "time", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_FOG, Shader::MODE_FOG)); + // PARTICLES INPUTS add_options.push_back(AddOption("CollisionDepth", "Input", "Collide", "VisualShaderNodeInput", vformat(input_param_for_collide_shader_mode, "collision_depth"), "collision_depth", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_COLLIDE, Shader::MODE_PARTICLES)); @@ -4475,6 +4527,7 @@ VisualShaderEditor::VisualShaderEditor() { add_options.push_back(AddOption("MultiplyByAxisAngle", "Particles", "Transform", "VisualShaderNodeParticleMultiplyByAxisAngle", "A node for help to multiply a position input vector by rotation using specific axis. Intended to work with emitters.", -1, VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_EMIT | TYPE_FLAGS_PROCESS | TYPE_FLAGS_COLLIDE, Shader::MODE_PARTICLES)); add_options.push_back(AddOption("BoxEmitter", "Particles", "Emitters", "VisualShaderNodeParticleBoxEmitter", "", -1, VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("MeshEmitter", "Particles", "Emitters", "VisualShaderNodeParticleMeshEmitter", "", -1, VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); add_options.push_back(AddOption("RingEmitter", "Particles", "Emitters", "VisualShaderNodeParticleRingEmitter", "", -1, VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); add_options.push_back(AddOption("SphereEmitter", "Particles", "Emitters", "VisualShaderNodeParticleSphereEmitter", "", -1, VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); @@ -4925,7 +4978,7 @@ public: } } - void setup(Ref<Resource> p_parent_resource, Vector<EditorProperty *> p_properties, const Vector<StringName> &p_names, Ref<VisualShaderNode> p_node) { + void setup(Ref<Resource> p_parent_resource, Vector<EditorProperty *> p_properties, const Vector<StringName> &p_names, const Map<StringName, String> &p_overrided_names, Ref<VisualShaderNode> p_node) { parent_resource = p_parent_resource; updating = false; node = p_node; @@ -4941,7 +4994,11 @@ public: Label *prop_name = memnew(Label); String prop_name_str = p_names[i]; - prop_name_str = prop_name_str.capitalize() + ":"; + if (p_overrided_names.has(p_names[i])) { + prop_name_str = p_overrided_names[p_names[i]] + ":"; + } else { + prop_name_str = prop_name_str.capitalize() + ":"; + } prop_name->set_text(prop_name_str); prop_name->set_visible(false); hbox->add_child(prop_name); @@ -5033,7 +5090,7 @@ Control *VisualShaderNodePluginDefault::create_editor(const Ref<Resource> &p_par properties.push_back(pinfo[i].name); } VisualShaderNodePluginDefaultEditor *editor = memnew(VisualShaderNodePluginDefaultEditor); - editor->setup(p_parent_resource, editors, properties, p_node); + editor->setup(p_parent_resource, editors, properties, p_node->get_editable_properties_names(), p_node); return editor; } @@ -5130,11 +5187,7 @@ EditorPropertyShaderMode::EditorPropertyShaderMode() { } bool EditorInspectorShaderModePlugin::can_handle(Object *p_object) { - return true; //can handle everything -} - -void EditorInspectorShaderModePlugin::parse_begin(Object *p_object) { - //do none + return true; // Can handle everything. } bool EditorInspectorShaderModePlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) { @@ -5147,11 +5200,7 @@ bool EditorInspectorShaderModePlugin::parse_property(Object *p_object, const Var return true; } - return false; //can be overridden, although it will most likely be last anyway -} - -void EditorInspectorShaderModePlugin::parse_end() { - //do none + return false; } ////////////////////////////////// @@ -5168,7 +5217,9 @@ void VisualShaderNodePortPreview::_shader_changed() { preview_shader.instantiate(); preview_shader->set_code(shader_code); for (int i = 0; i < default_textures.size(); i++) { - preview_shader->set_default_texture_param(default_textures[i].name, default_textures[i].param); + for (int j = 0; j < default_textures[i].params.size(); j++) { + preview_shader->set_default_texture_param(default_textures[i].name, default_textures[i].params[j], j); + } } Ref<ShaderMaterial> material; diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h index 5788959a77..74ccda3c9a 100644 --- a/editor/plugins/visual_shader_editor_plugin.h +++ b/editor/plugins/visual_shader_editor_plugin.h @@ -111,7 +111,6 @@ public: void disconnect_nodes(VisualShader::Type p_type, int p_from_node, int p_from_port, int p_to_node, int p_to_port); void show_port_preview(VisualShader::Type p_type, int p_node_id, int p_port_id); void set_node_position(VisualShader::Type p_type, int p_id, const Vector2 &p_position); - void set_node_size(VisualShader::Type p_type, int p_id, const Vector2 &p_size); void refresh_node_ports(VisualShader::Type p_type, int p_node); void set_input_port_default_value(VisualShader::Type p_type, int p_node_id, int p_port_id, Variant p_value); void update_uniform_refs(); @@ -145,6 +144,7 @@ class VisualShaderEditor : public VBoxContainer { OptionButton *edit_type_standard; OptionButton *edit_type_particles; OptionButton *edit_type_sky; + OptionButton *edit_type_fog; CheckBox *custom_mode_box; bool custom_mode_enabled = false; @@ -180,7 +180,8 @@ class VisualShaderEditor : public VBoxContainer { enum ShaderModeFlags { MODE_FLAGS_SPATIAL_CANVASITEM = 1, MODE_FLAGS_SKY = 2, - MODE_FLAGS_PARTICLES = 4 + MODE_FLAGS_PARTICLES = 4, + MODE_FLAGS_FOG = 8, }; int mode = MODE_FLAGS_SPATIAL_CANVASITEM; @@ -203,6 +204,10 @@ class VisualShaderEditor : public VBoxContainer { TYPE_FLAGS_SKY = 1, }; + enum FogTypeFlags { + TYPE_FLAGS_FOG = 1, + }; + enum ToolsMenuOptions { EXPAND_ALL, COLLAPSE_ALL @@ -211,10 +216,12 @@ class VisualShaderEditor : public VBoxContainer { enum NodeMenuOptions { ADD, SEPARATOR, // ignore + CUT, COPY, PASTE, DELETE, DUPLICATE, + CLEAR_COPY_BUFFER, SEPARATOR2, // ignore FLOAT_CONSTANTS, CONVERT_CONSTANTS_TO_UNIFORMS, @@ -374,19 +381,27 @@ class VisualShaderEditor : public VBoxContainer { void _port_name_focus_out(Object *line_edit, int p_node_id, int p_port_id, bool p_output); - void _dup_copy_nodes(int p_type, List<int> &r_nodes, Set<int> &r_excluded); - void _dup_update_excluded(int p_type, Set<int> &r_excluded); - void _dup_paste_nodes(int p_type, int p_pasted_type, List<int> &r_nodes, Set<int> &r_excluded, const Vector2 &p_offset, bool p_select); + struct CopyItem { + int id; + Ref<VisualShaderNode> node; + Vector2 position; + Vector2 size; + String group_inputs; + String group_outputs; + String expression; + }; + + void _dup_copy_nodes(int p_type, List<CopyItem> &r_nodes, List<VisualShader::Connection> &r_connections); + void _dup_paste_nodes(int p_type, List<CopyItem> &r_items, const List<VisualShader::Connection> &p_connections, const Vector2 &p_offset, bool p_duplicate); void _duplicate_nodes(); Vector2 selection_center; - int copy_type; // shader type - List<int> copy_nodes_buffer; - Set<int> copy_nodes_excluded_buffer; + List<CopyItem> copy_items_buffer; + List<VisualShader::Connection> copy_connections_buffer; - void _clear_buffer(); - void _copy_nodes(); + void _clear_copy_buffer(); + void _copy_nodes(bool p_cut); void _paste_nodes(bool p_use_custom_position = false, const Vector2 &p_custom_position = Vector2()); Vector<Ref<VisualShaderNodePlugin>> plugins; @@ -508,9 +523,7 @@ class EditorInspectorShaderModePlugin : public EditorInspectorPlugin { public: virtual bool can_handle(Object *p_object) override; - virtual void parse_begin(Object *p_object) override; virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override; - virtual void parse_end() override; }; class VisualShaderNodePortPreview : public Control { diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index e8fd3070c2..150dde79e5 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -1297,8 +1297,7 @@ void ProjectList::update_dock_menu() { void ProjectList::_global_menu_new_window(const Variant &p_tag) { List<String> args; args.push_back("-p"); - String exec = OS::get_singleton()->get_executable_path(); - OS::get_singleton()->create_process(exec, args); + OS::get_singleton()->create_instance(args); } void ProjectList::_global_menu_open_project(const Variant &p_tag) { @@ -1308,8 +1307,7 @@ void ProjectList::_global_menu_open_project(const Variant &p_tag) { String conf = _projects[idx].path.plus_file("project.godot"); List<String> args; args.push_back(conf); - String exec = OS::get_singleton()->get_executable_path(); - OS::get_singleton()->create_process(exec, args); + OS::get_singleton()->create_instance(args); } } @@ -2055,8 +2053,7 @@ void ProjectManager::_open_selected_projects() { args.push_back("--single-window"); } - String exec = OS::get_singleton()->get_executable_path(); - Error err = OS::get_singleton()->create_process(exec, args); + Error err = OS::get_singleton()->create_instance(args); ERR_FAIL_COND(err); } @@ -2141,8 +2138,7 @@ void ProjectManager::_run_project_confirm() { args.push_back("--disable-crash-handler"); } - String exec = OS::get_singleton()->get_executable_path(); - Error err = OS::get_singleton()->create_process(exec, args); + Error err = OS::get_singleton()->create_instance(args); ERR_FAIL_COND(err); } } @@ -2271,8 +2267,7 @@ void ProjectManager::_language_selected(int p_id) { void ProjectManager::_restart_confirm() { List<String> args = OS::get_singleton()->get_cmdline_args(); - String exec = OS::get_singleton()->get_executable_path(); - Error err = OS::get_singleton()->create_process(exec, args); + Error err = OS::get_singleton()->create_instance(args); ERR_FAIL_COND(err); _dim_window(); diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 6ea9b9dfae..62c5cc5cc1 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -407,11 +407,11 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: return false; } else if (hint == PROPERTY_HINT_LAYERS_2D_PHYSICS || - hint == PROPERTY_HINT_LAYERS_2D_RENDER || - hint == PROPERTY_HINT_LAYERS_2D_NAVIGATION || - hint == PROPERTY_HINT_LAYERS_3D_PHYSICS || - hint == PROPERTY_HINT_LAYERS_3D_RENDER || - hint == PROPERTY_HINT_LAYERS_3D_NAVIGATION) { + hint == PROPERTY_HINT_LAYERS_2D_RENDER || + hint == PROPERTY_HINT_LAYERS_2D_NAVIGATION || + hint == PROPERTY_HINT_LAYERS_3D_PHYSICS || + hint == PROPERTY_HINT_LAYERS_3D_RENDER || + hint == PROPERTY_HINT_LAYERS_3D_NAVIGATION) { String basename; switch (hint) { case PROPERTY_HINT_LAYERS_2D_RENDER: @@ -1671,7 +1671,7 @@ void CustomPropertyEditor::_focus_exit() { } void CustomPropertyEditor::config_action_buttons(const List<String> &p_strings) { - Ref<StyleBox> sb = action_buttons[0]->get_theme_stylebox(SNAME("panel")); + Ref<StyleBox> sb = action_buttons[0]->get_theme_stylebox(SNAME("button")); int margin_top = sb->get_margin(SIDE_TOP); int margin_left = sb->get_margin(SIDE_LEFT); int margin_bottom = sb->get_margin(SIDE_BOTTOM); @@ -1804,26 +1804,18 @@ CustomPropertyEditor::CustomPropertyEditor() { } text_edit = memnew(TextEdit); - add_child(text_edit); + value_vbox->add_child(text_edit); text_edit->set_anchors_and_offsets_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 5); + text_edit->set_v_size_flags(Control::SIZE_EXPAND_FILL); text_edit->set_offset(SIDE_BOTTOM, -30); text_edit->hide(); text_edit->connect("text_changed", callable_mp(this, &CustomPropertyEditor::_text_edit_changed)); - for (int i = 0; i < MAX_ACTION_BUTTONS; i++) { - action_buttons[i] = memnew(Button); - action_buttons[i]->hide(); - add_child(action_buttons[i]); - Vector<Variant> binds; - binds.push_back(i); - action_buttons[i]->connect("pressed", callable_mp(this, &CustomPropertyEditor::_action_pressed), binds); - } - color_picker = nullptr; file = memnew(EditorFileDialog); - add_child(file); + value_vbox->add_child(file); file->hide(); file->connect("file_selected", callable_mp(this, &CustomPropertyEditor::_file_selected)); @@ -1831,46 +1823,58 @@ CustomPropertyEditor::CustomPropertyEditor() { error = memnew(ConfirmationDialog); error->set_title(TTR("Error!")); - add_child(error); + value_vbox->add_child(error); scene_tree = memnew(SceneTreeDialog); - add_child(scene_tree); + value_vbox->add_child(scene_tree); scene_tree->connect("selected", callable_mp(this, &CustomPropertyEditor::_node_path_selected)); scene_tree->get_scene_tree()->set_show_enabled_subscene(true); texture_preview = memnew(TextureRect); - add_child(texture_preview); + value_vbox->add_child(texture_preview); texture_preview->hide(); easing_draw = memnew(Control); - add_child(easing_draw); + value_vbox->add_child(easing_draw); easing_draw->hide(); easing_draw->connect("draw", callable_mp(this, &CustomPropertyEditor::_draw_easing)); easing_draw->connect("gui_input", callable_mp(this, &CustomPropertyEditor::_drag_easing)); easing_draw->set_default_cursor_shape(Control::CURSOR_MOVE); type_button = memnew(MenuButton); - add_child(type_button); + value_vbox->add_child(type_button); type_button->hide(); type_button->get_popup()->connect("id_pressed", callable_mp(this, &CustomPropertyEditor::_type_create_selected)); menu = memnew(PopupMenu); // menu->set_pass_on_modal_close_click(false); - add_child(menu); + value_vbox->add_child(menu); menu->connect("id_pressed", callable_mp(this, &CustomPropertyEditor::_menu_option)); evaluator = nullptr; spinbox = memnew(SpinBox); - add_child(spinbox); + value_vbox->add_child(spinbox); spinbox->set_anchors_and_offsets_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 5); spinbox->connect("value_changed", callable_mp(this, &CustomPropertyEditor::_range_modified)); slider = memnew(HSlider); - add_child(slider); + value_vbox->add_child(slider); slider->set_anchors_and_offsets_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 5); slider->connect("value_changed", callable_mp(this, &CustomPropertyEditor::_range_modified)); + action_hboxes = memnew(HBoxContainer); + action_hboxes->set_alignment(BoxContainer::ALIGN_CENTER); + value_vbox->add_child(action_hboxes); + for (int i = 0; i < MAX_ACTION_BUTTONS; i++) { + action_buttons[i] = memnew(Button); + action_buttons[i]->hide(); + action_hboxes->add_child(action_buttons[i]); + Vector<Variant> binds; + binds.push_back(i); + action_buttons[i]->connect("pressed", callable_mp(this, &CustomPropertyEditor::_action_pressed), binds); + } + create_dialog = nullptr; property_select = nullptr; } diff --git a/editor/property_editor.h b/editor/property_editor.h index 23771b7494..2565c6ee27 100644 --- a/editor/property_editor.h +++ b/editor/property_editor.h @@ -110,6 +110,7 @@ class CustomPropertyEditor : public PopupPanel { int focused_value_editor; Label *value_label[MAX_VALUE_EDITORS]; HScrollBar *scroll[4]; + HBoxContainer *action_hboxes; Button *action_buttons[MAX_ACTION_BUTTONS]; MenuButton *type_button; Vector<String> inheritors_array; diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp index a5e1b0eab8..eb73f88e61 100644 --- a/editor/rename_dialog.cpp +++ b/editor/rename_dialog.cpp @@ -30,6 +30,7 @@ #include "rename_dialog.h" +#include "modules/modules_enabled.gen.h" // For regex. #ifdef MODULE_REGEX_ENABLED #include "core/string/print_string.h" @@ -461,7 +462,7 @@ String RenameDialog::_substitute(const String &subject, const Node *node, int co void RenameDialog::_error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, bool p_editor_notify, ErrorHandlerType p_type) { RenameDialog *self = (RenameDialog *)p_self; - String source_file(p_file); + String source_file = String::utf8(p_file); // Only show first error that is related to "regex" if (self->has_errors || source_file.find("regex") < 0) { @@ -470,9 +471,9 @@ void RenameDialog::_error_handler(void *p_self, const char *p_func, const char * String err_str; if (p_errorexp && p_errorexp[0]) { - err_str = p_errorexp; + err_str = String::utf8(p_errorexp); } else { - err_str = p_error; + err_str = String::utf8(p_error); } self->has_errors = true; @@ -626,7 +627,7 @@ void RenameDialog::reset() { bool RenameDialog::_is_main_field(LineEdit *line_edit) { return line_edit && - (line_edit == lne_search || line_edit == lne_replace || line_edit == lne_prefix || line_edit == lne_suffix); + (line_edit == lne_search || line_edit == lne_replace || line_edit == lne_prefix || line_edit == lne_suffix); } void RenameDialog::_insert_text(String text) { diff --git a/editor/rename_dialog.h b/editor/rename_dialog.h index 4db3ef6740..f383877eb2 100644 --- a/editor/rename_dialog.h +++ b/editor/rename_dialog.h @@ -31,17 +31,16 @@ #ifndef RENAME_DIALOG_H #define RENAME_DIALOG_H -#include "modules/modules_enabled.gen.h" +#include "modules/modules_enabled.gen.h" // For regex. #ifdef MODULE_REGEX_ENABLED +#include "core/object/undo_redo.h" +#include "editor/scene_tree_editor.h" #include "scene/gui/check_box.h" #include "scene/gui/dialogs.h" #include "scene/gui/option_button.h" #include "scene/gui/spin_box.h" -#include "core/object/undo_redo.h" -#include "editor/scene_tree_editor.h" - /** @author Blazej Floch */ diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 4a59eb4fb3..def97345aa 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -47,10 +47,13 @@ #include "editor/plugins/script_editor_plugin.h" #include "editor/shader_create_dialog.h" #include "scene/main/window.h" +#include "scene/property_utils.h" #include "scene/resources/packed_scene.h" #include "servers/display_server.h" #include "servers/rendering_server.h" +#include "modules/modules_enabled.gen.h" // For regex. + void SceneTreeDock::_nodes_drag_begin() { if (restore_script_editor_on_drag) { EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT); @@ -213,7 +216,7 @@ void SceneTreeDock::_perform_instantiate_scenes(const Vector<String> &p_files, N for (int i = 0; i < instances.size(); i++) { Node *instantiated_scene = instances[i]; - editor_data->get_undo_redo().add_do_method(parent, "add_child", instantiated_scene); + editor_data->get_undo_redo().add_do_method(parent, "add_child", instantiated_scene, true); if (p_pos >= 0) { editor_data->get_undo_redo().add_do_method(parent, "move_child", instantiated_scene, p_pos + i); } @@ -258,8 +261,8 @@ void SceneTreeDock::_replace_with_branch_scene(const String &p_file, Node *base) int pos = base->get_index(); undo_redo->add_do_method(parent, "remove_child", base); undo_redo->add_undo_method(parent, "remove_child", instantiated_scene); - undo_redo->add_do_method(parent, "add_child", instantiated_scene); - undo_redo->add_undo_method(parent, "add_child", base); + undo_redo->add_do_method(parent, "add_child", instantiated_scene, true); + undo_redo->add_undo_method(parent, "add_child", base, true); undo_redo->add_do_method(parent, "move_child", instantiated_scene, pos); undo_redo->add_undo_method(parent, "move_child", base, pos); @@ -511,7 +514,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { ERR_CONTINUE(!dup); - editor_data->get_undo_redo().add_do_method(paste_parent, "add_child", dup); + editor_data->get_undo_redo().add_do_method(paste_parent, "add_child", dup, true); for (KeyValue<const Node *, Node *> &E2 : duplimap) { Node *d = E2.value; @@ -813,7 +816,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { editor_data->get_undo_redo().create_action(TTR("Make node as Root")); editor_data->get_undo_redo().add_do_method(node->get_parent(), "remove_child", node); editor_data->get_undo_redo().add_do_method(editor, "set_edited_scene", node); - editor_data->get_undo_redo().add_do_method(node, "add_child", root); + editor_data->get_undo_redo().add_do_method(node, "add_child", root, true); editor_data->get_undo_redo().add_do_method(node, "set_scene_file_path", root->get_scene_file_path()); editor_data->get_undo_redo().add_do_method(root, "set_scene_file_path", String()); editor_data->get_undo_redo().add_do_method(node, "set_owner", (Object *)nullptr); @@ -824,7 +827,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { editor_data->get_undo_redo().add_undo_method(node, "set_scene_file_path", String()); editor_data->get_undo_redo().add_undo_method(node, "remove_child", root); editor_data->get_undo_redo().add_undo_method(editor, "set_edited_scene", root); - editor_data->get_undo_redo().add_undo_method(node->get_parent(), "add_child", node); + editor_data->get_undo_redo().add_undo_method(node->get_parent(), "add_child", node, true); editor_data->get_undo_redo().add_undo_method(node->get_parent(), "move_child", node, node->get_index()); editor_data->get_undo_redo().add_undo_method(root, "set_owner", (Object *)nullptr); editor_data->get_undo_redo().add_undo_method(node, "set_owner", root); @@ -1785,7 +1788,7 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V } editor_data->get_undo_redo().add_do_method(node->get_parent(), "remove_child", node); - editor_data->get_undo_redo().add_do_method(new_parent, "add_child", node); + editor_data->get_undo_redo().add_do_method(new_parent, "add_child", node, true); if (p_position_in_parent >= 0) { editor_data->get_undo_redo().add_do_method(new_parent, "move_child", node, p_position_in_parent + inc); @@ -1858,7 +1861,7 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V int child_pos = node->get_index(); - editor_data->get_undo_redo().add_undo_method(node->get_parent(), "add_child", node); + editor_data->get_undo_redo().add_undo_method(node->get_parent(), "add_child", node, true); editor_data->get_undo_redo().add_undo_method(node->get_parent(), "move_child", node, child_pos); editor_data->get_undo_redo().add_undo_method(this, "_set_owners", edited_scene, owners); if (AnimationPlayerEditor::get_singleton()->get_track_editor()->get_root() == node) { @@ -2071,7 +2074,7 @@ void SceneTreeDock::_delete_confirm(bool p_cut) { } editor_data->get_undo_redo().add_do_method(n->get_parent(), "remove_child", n); - editor_data->get_undo_redo().add_undo_method(n->get_parent(), "add_child", n); + editor_data->get_undo_redo().add_undo_method(n->get_parent(), "add_child", n, true); editor_data->get_undo_redo().add_undo_method(n->get_parent(), "move_child", n, n->get_index()); if (AnimationPlayerEditor::get_singleton()->get_track_editor()->get_root() == n) { editor_data->get_undo_redo().add_undo_method(AnimationPlayerEditor::get_singleton()->get_track_editor(), "set_root", n); @@ -2153,7 +2156,7 @@ void SceneTreeDock::_do_create(Node *p_parent) { editor_data->get_undo_redo().create_action(TTR("Create Node")); if (edited_scene) { - editor_data->get_undo_redo().add_do_method(p_parent, "add_child", child); + editor_data->get_undo_redo().add_do_method(p_parent, "add_child", child, true); editor_data->get_undo_redo().add_do_method(child, "set_owner", edited_scene); editor_data->get_undo_redo().add_do_method(editor_selection, "clear"); editor_data->get_undo_redo().add_do_method(editor_selection, "add_node", child); @@ -2943,7 +2946,7 @@ void SceneTreeDock::open_script_dialog(Node *p_for_node, bool p_extend) { } } -void SceneTreeDock::attach_shader_to_selected() { +void SceneTreeDock::attach_shader_to_selected(int p_preferred_mode) { if (selected_shader_material.is_null()) { return; } @@ -2970,13 +2973,13 @@ void SceneTreeDock::attach_shader_to_selected() { shader_create_dialog->connect("shader_created", callable_mp(this, &SceneTreeDock::_shader_created)); shader_create_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_shader_creation_closed)); shader_create_dialog->connect("cancelled", callable_mp(this, &SceneTreeDock::_shader_creation_closed)); - shader_create_dialog->config(path); + shader_create_dialog->config(path, true, true, p_preferred_mode); shader_create_dialog->popup_centered(); } -void SceneTreeDock::open_shader_dialog(Ref<ShaderMaterial> &p_for_material) { +void SceneTreeDock::open_shader_dialog(Ref<ShaderMaterial> &p_for_material, int p_preferred_mode) { selected_shader_material = p_for_material; - attach_shader_to_selected(); + attach_shader_to_selected(p_preferred_mode); } void SceneTreeDock::open_add_child_dialog() { @@ -3132,7 +3135,9 @@ void SceneTreeDock::_clear_clipboard() { void SceneTreeDock::_create_remap_for_node(Node *p_node, Map<RES, RES> &r_remap) { List<PropertyInfo> props; p_node->get_property_list(&props); - bool is_instantiated = EditorPropertyRevert::may_node_be_in_instance(p_node); + + Vector<SceneState::PackState> states_stack; + bool states_stack_ready = false; for (const PropertyInfo &E : props) { if (!(E.usage & PROPERTY_USAGE_STORAGE)) { @@ -3143,16 +3148,17 @@ void SceneTreeDock::_create_remap_for_node(Node *p_node, Map<RES, RES> &r_remap) if (v.is_ref()) { RES res = v; if (res.is_valid()) { - if (is_instantiated) { - Variant orig; - if (EditorPropertyRevert::get_instantiated_node_original_property(p_node, E.name, orig)) { - if (!EditorPropertyRevert::is_node_property_different(p_node, v, orig)) { - continue; - } - } + if (!states_stack_ready) { + states_stack = PropertyUtils::get_node_states_stack(p_node); + states_stack_ready = true; + } + + Variant orig = PropertyUtils::get_property_default_value(p_node, E.name, &states_stack); + if (!PropertyUtils::is_property_value_different(v, orig)) { + continue; } - if ((res->get_path() == "" || res->get_path().find("::") > -1) && !r_remap.has(res)) { + if (res->is_built_in() && !r_remap.has(res)) { _create_remap_for_resource(res, r_remap); } } @@ -3179,7 +3185,7 @@ void SceneTreeDock::_create_remap_for_resource(RES p_resource, Map<RES, RES> &r_ if (v.is_ref()) { RES res = v; if (res.is_valid()) { - if ((res->get_path() == "" || res->get_path().find("::") > -1) && !r_remap.has(res)) { + if (res->is_built_in() && !r_remap.has(res)) { _create_remap_for_resource(res, r_remap); } } diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h index 66000602fa..c6e47fa002 100644 --- a/editor/scene_tree_dock.h +++ b/editor/scene_tree_dock.h @@ -48,6 +48,8 @@ #include "scene/gui/tree.h" #include "scene_tree_editor.h" +#include "modules/modules_enabled.gen.h" // For regex. + class EditorNode; class ShaderCreateDialog; @@ -300,8 +302,8 @@ public: void attach_script_to_selected(bool p_extend); void open_script_dialog(Node *p_for_node, bool p_extend); - void attach_shader_to_selected(); - void open_shader_dialog(Ref<ShaderMaterial> &p_for_material); + void attach_shader_to_selected(int p_preferred_mode = -1); + void open_shader_dialog(Ref<ShaderMaterial> &p_for_material, int p_preferred_mode = -1); void open_add_child_dialog(); void open_instance_child_dialog(); diff --git a/editor/shader_create_dialog.cpp b/editor/shader_create_dialog.cpp index 6bbefb3bb2..23bdc06f95 100644 --- a/editor/shader_create_dialog.cpp +++ b/editor/shader_create_dialog.cpp @@ -168,6 +168,11 @@ void ShaderCreateDialog::_create_new() { code += "\t// Place sky code here.\n"; code += "}\n"; break; + case Shader::MODE_FOG: + code += "void fog() {\n"; + code += "\t// Place fog code here.\n"; + code += "}\n"; + break; } } text_shader->set_code(code.as_string()); @@ -319,7 +324,7 @@ void ShaderCreateDialog::_path_submitted(const String &p_path) { ok_pressed(); } -void ShaderCreateDialog::config(const String &p_base_path, bool p_built_in_enabled, bool p_load_enabled) { +void ShaderCreateDialog::config(const String &p_base_path, bool p_built_in_enabled, bool p_load_enabled, int p_preferred_mode) { if (p_base_path != "") { initial_base_path = p_base_path.get_basename(); file_path->set_text(initial_base_path + "." + language_data[language_menu->get_selected()].default_extension); @@ -333,6 +338,11 @@ void ShaderCreateDialog::config(const String &p_base_path, bool p_built_in_enabl built_in_enabled = p_built_in_enabled; load_enabled = p_load_enabled; + if (p_preferred_mode > -1) { + mode_menu->select(p_preferred_mode); + _mode_changed(p_preferred_mode); + } + _language_changed(current_language); _path_changed(file_path->get_text()); } diff --git a/editor/shader_create_dialog.h b/editor/shader_create_dialog.h index 6962fa3d8d..be0a0cad06 100644 --- a/editor/shader_create_dialog.h +++ b/editor/shader_create_dialog.h @@ -108,7 +108,7 @@ protected: static void _bind_methods(); public: - void config(const String &p_base_path, bool p_built_in_enabled = true, bool p_load_enabled = true); + void config(const String &p_base_path, bool p_built_in_enabled = true, bool p_load_enabled = true, int p_preferred_mode = -1); ShaderCreateDialog(); }; diff --git a/editor/translations/af.po b/editor/translations/af.po index a38a5103d2..2e733a4fb8 100644 --- a/editor/translations/af.po +++ b/editor/translations/af.po @@ -11143,11 +11143,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/ar.po b/editor/translations/ar.po index 67b76771d2..a32b919cf2 100644 --- a/editor/translations/ar.po +++ b/editor/translations/ar.po @@ -61,8 +61,8 @@ msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-09-19 11:14+0000\n" -"Last-Translator: Mohammed Mubarak <modymu9@gmail.com>\n" +"PO-Revision-Date: 2021-10-30 00:50+0000\n" +"Last-Translator: HASSAN GAMER - حسن جيمر <gamerhassan55@gmail.com>\n" "Language-Team: Arabic <https://hosted.weblate.org/projects/godot-engine/" "godot/ar/>\n" "Language: ar\n" @@ -641,9 +641,8 @@ msgid "Go to Previous Step" msgstr "إذهب إلى الخطوة السابقة" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Apply Reset" -msgstr "إعادة تعيين" +msgstr "طَبق إعادة تعيين" #: editor/animation_track_editor.cpp msgid "Optimize Animation" @@ -1108,17 +1107,16 @@ msgid "Owners Of:" msgstr "ملاك:" #: editor/dependency_editor.cpp -#, fuzzy msgid "" "Remove the selected files from the project? (Cannot be undone.)\n" "Depending on your filesystem configuration, the files will either be moved " "to the system trash or deleted permanently." msgstr "" -"حذف الملفات المختارة من المشروع؟ (لا يمكن استعادتها)\n" -"يمكنك إيجاد الملفات المحذوفة في سلة مهملات النظام حيث يمكنك إسترجاعها." +"حذف الملفات المُختارة من المشروع؟ (لا يمكن استعادتها).\n" +"حسب إِعدادات مُدير ملفاتِك, إِما سيتم نقل الملقات إِلى سلة المُهملات أَو سيتم حذفها " +"نهائياً." #: editor/dependency_editor.cpp -#, fuzzy msgid "" "The files being removed are required by other resources in order for them to " "work.\n" @@ -1126,9 +1124,10 @@ msgid "" "Depending on your filesystem configuration, the files will either be moved " "to the system trash or deleted permanently." msgstr "" -"الملفات التي يتم إزالتها مطلوبة من قبل موارد أخرى من اجل ان تعمل.\n" -"هل تريد إزالتها على أي حال؟ (لا تراجع)\n" -"يمكنك العثور على الملفات التي تمت إزالتها في مهملات النظام لاستعادتها." +"الملفات التي يتم إزالتها مطلوبة من قبل موارد أخرى من اجل أَن تعمل.\n" +"هل تريد إزالتها على أي حال؟ (لا تراجع).\n" +"حسب إِعدادات مُدير ملفاتِك, إِما سيتم نقل الملقات إِلى سلة المُهملات أَو سيتم حذفها " +"نهائياً." #: editor/dependency_editor.cpp msgid "Cannot remove:" @@ -11284,14 +11283,14 @@ msgstr "" "عنه query على الأقل حرف `/` واحد." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "زر " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "الزر الفيزيائي" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "زر " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "زر Joy" diff --git a/editor/translations/az.po b/editor/translations/az.po index 76fb760ac1..77470b2db5 100644 --- a/editor/translations/az.po +++ b/editor/translations/az.po @@ -10699,11 +10699,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/bg.po b/editor/translations/bg.po index c4ad5a3993..11a94b8796 100644 --- a/editor/translations/bg.po +++ b/editor/translations/bg.po @@ -10720,11 +10720,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/bn.po b/editor/translations/bn.po index 96a57f9dd5..b3efe37fe4 100644 --- a/editor/translations/bn.po +++ b/editor/translations/bn.po @@ -11793,14 +11793,14 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "কী/চাবি " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "কী/চাবি " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "জয়স্টিক বোতাম" diff --git a/editor/translations/br.po b/editor/translations/br.po index 071e1f021c..690ede66ef 100644 --- a/editor/translations/br.po +++ b/editor/translations/br.po @@ -10614,11 +10614,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/ca.po b/editor/translations/ca.po index 26f7646086..92dd5fff63 100644 --- a/editor/translations/ca.po +++ b/editor/translations/ca.po @@ -11447,14 +11447,14 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Tecla " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Tecla " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Botó de la Maneta" diff --git a/editor/translations/cs.po b/editor/translations/cs.po index 598ff4163c..721a03dfc5 100644 --- a/editor/translations/cs.po +++ b/editor/translations/cs.po @@ -26,13 +26,14 @@ # Václav Blažej <vaclavblazej@seznam.cz>, 2020, 2021. # ProfJack <profjackcz@gmail.com>, 2021. # swifterik <blaha.j502@gmail.com>, 2021. +# Daniel <dan@ger.cz>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-09-15 00:46+0000\n" -"Last-Translator: Zbyněk <zbynek.fiala@gmail.com>\n" +"PO-Revision-Date: 2021-10-27 21:45+0000\n" +"Last-Translator: Daniel <dan@ger.cz>\n" "Language-Team: Czech <https://hosted.weblate.org/projects/godot-engine/godot/" "cs/>\n" "Language: cs\n" @@ -389,15 +390,13 @@ msgstr "Animace: vložit" #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp -#, fuzzy msgid "node '%s'" -msgstr "Nelze otevřít '%s'." +msgstr "uzel '%s'" #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp -#, fuzzy msgid "animation" -msgstr "Animace" +msgstr "animace" #: editor/animation_track_editor.cpp msgid "AnimationPlayer can't animate itself, only other players." @@ -405,9 +404,8 @@ msgstr "AnimationPlayer nemůže animovat sám sebe, pouze ostatní přehrávač #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp -#, fuzzy msgid "property '%s'" -msgstr "Vlastnost '%s' neexistuje." +msgstr "vlastnost '%s'" #: editor/animation_track_editor.cpp msgid "Anim Create & Insert" @@ -554,7 +552,7 @@ msgstr "Seskupit stopy podle uzlu nebo je zobrazit jako jednoduchý seznam." #: editor/animation_track_editor.cpp msgid "Snap:" -msgstr "Přichycení:" +msgstr "Přichytit:" #: editor/animation_track_editor.cpp msgid "Animation step value." @@ -965,7 +963,6 @@ msgid "Edit..." msgstr "Upravit..." #: editor/connections_dialog.cpp -#, fuzzy msgid "Go to Method" msgstr "Přejít na metodu" @@ -987,7 +984,7 @@ msgstr "Žádné výsledky pro \"%s\"." #: editor/create_dialog.cpp editor/property_selector.cpp msgid "No description available for %s." -msgstr "" +msgstr "Pro %s není dostupný popis." #: editor/create_dialog.cpp editor/editor_file_dialog.cpp #: editor/filesystem_dock.cpp @@ -1087,17 +1084,16 @@ msgid "Owners Of:" msgstr "Vlastníci:" #: editor/dependency_editor.cpp -#, fuzzy msgid "" "Remove the selected files from the project? (Cannot be undone.)\n" "Depending on your filesystem configuration, the files will either be moved " "to the system trash or deleted permanently." msgstr "" -"Odebrat vybrané soubory z projektu? (Nelze vrátit zpět)\n" -"Odebrané soubory budou v systémovém koši a obnovit je." +"Odebrat vybrané soubory z projektu? (Nelze vrátit zpět.)\n" +"V závislosti na konfiguraci souborového systému budou soubory buď přesunuty " +"do systémového koše, nebo trvale odstraněny." #: editor/dependency_editor.cpp -#, fuzzy msgid "" "The files being removed are required by other resources in order for them to " "work.\n" @@ -1105,9 +1101,10 @@ msgid "" "Depending on your filesystem configuration, the files will either be moved " "to the system trash or deleted permanently." msgstr "" -"Soubory ke smazání potřebují jiné zdroje ke své činnosti.\n" -"Přesto je chcete smazat? (nelze vrátit zpět)\n" -"Odebrané soubory budou v systémovém koši a obnovit je." +"Odstraňované soubory potřebují jiné zdroje ke své činnosti.\n" +"Chcete je přesto odstranit? (Nelze vrátit zpět.)\n" +"V závislosti na konfiguraci souborového systému budou soubory buď přesunuty " +"do systémového koše, nebo trvale odstraněny." #: editor/dependency_editor.cpp msgid "Cannot remove:" @@ -1179,7 +1176,7 @@ msgstr "Děkujeme za komunitu Godotu!" #: editor/editor_about.cpp editor/editor_node.cpp editor/project_manager.cpp msgid "Click to copy." -msgstr "" +msgstr "Klikněte pro zkopírování." #: editor/editor_about.cpp msgid "Godot Engine contributors" @@ -1277,41 +1274,37 @@ msgid "Licenses" msgstr "Licence" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Error opening asset file for \"%s\" (not in ZIP format)." -msgstr "Chyba při otevírání balíčku (není ve formátu ZIP)." +msgstr "Chyba při otevírání balíčku \"%s\" (není ve formátu ZIP)." #: editor/editor_asset_installer.cpp -#, fuzzy msgid "%s (already exists)" msgstr "%s (již existuje)" #: editor/editor_asset_installer.cpp msgid "Contents of asset \"%s\" - %d file(s) conflict with your project:" -msgstr "" +msgstr "Obsah balíčku \"%s\" - %d souborů koliduje s vaším projektem:" #: editor/editor_asset_installer.cpp msgid "Contents of asset \"%s\" - No files conflict with your project:" msgstr "" +"Obsah balíčku \"%s\" - Žádné soubory nejsou v konfliktu s vaším projektem:" #: editor/editor_asset_installer.cpp msgid "Uncompressing Assets" msgstr "Dekomprese uživatelského obsahu" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "The following files failed extraction from asset \"%s\":" -msgstr "Selhala extrakce následujících souborů z balíčku:" +msgstr "Následující soubory se nepodařilo extrahovat z balíčku \"%s\":" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "(and %s more files)" -msgstr "A %s dalších souborů." +msgstr "(a %s dalších souborů)" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Asset \"%s\" installed successfully!" -msgstr "Balíček byl úspěšně nainstalován!" +msgstr "Balíček \"%s\" byl úspěšně nainstalován!" #: editor/editor_asset_installer.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -1323,7 +1316,6 @@ msgid "Install" msgstr "Instalovat" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Asset Installer" msgstr "Instalátor balíčků" @@ -1556,13 +1548,12 @@ msgid "Can't add autoload:" msgstr "Nelze přidat auto-načítání:" #: editor/editor_autoload_settings.cpp -#, fuzzy msgid "%s is an invalid path. File does not exist." -msgstr "Soubor neexistuje." +msgstr "%s je neplatná cesta. Soubor neexistuje." #: editor/editor_autoload_settings.cpp msgid "%s is an invalid path. Not in resource path (res://)." -msgstr "" +msgstr "%s je neplatná cesta. Není v cestě ke zdrojům (res://)." #: editor/editor_autoload_settings.cpp msgid "Add AutoLoad" @@ -1586,9 +1577,8 @@ msgid "Name" msgstr "Název" #: editor/editor_autoload_settings.cpp -#, fuzzy msgid "Global Variable" -msgstr "Proměnná" +msgstr "Globální proměnná" #: editor/editor_data.cpp msgid "Paste Params" @@ -1762,48 +1752,50 @@ msgstr "Importovat panel" #: editor/editor_feature_profile.cpp msgid "Allows to view and edit 3D scenes." -msgstr "" +msgstr "Umožňuje prohlížet a upravovat 3D scény." #: editor/editor_feature_profile.cpp msgid "Allows to edit scripts using the integrated script editor." -msgstr "" +msgstr "Umožňuje upravovat skripty pomocí integrovaného editoru skriptů." #: editor/editor_feature_profile.cpp msgid "Provides built-in access to the Asset Library." -msgstr "" +msgstr "Poskytuje integrovaný přístup ke Knihovně balíčků." #: editor/editor_feature_profile.cpp msgid "Allows editing the node hierarchy in the Scene dock." -msgstr "" +msgstr "Umožňuje upravovat hierarchii uzlů v doku scény." #: editor/editor_feature_profile.cpp msgid "" "Allows to work with signals and groups of the node selected in the Scene " "dock." -msgstr "" +msgstr "Umožňuje pracovat se signály a skupinami uzlu vybraného v doku scény." #: editor/editor_feature_profile.cpp msgid "Allows to browse the local file system via a dedicated dock." msgstr "" +"Umožňuje procházet místní souborový systém prostřednictvím vyhrazeného doku." #: editor/editor_feature_profile.cpp msgid "" "Allows to configure import settings for individual assets. Requires the " "FileSystem dock to function." msgstr "" +"Umožňuje konfigurovat nastavení importu pro jednotlivé zdroje. Pro svou " +"funkci vyžaduje dok Souborový systém." #: editor/editor_feature_profile.cpp -#, fuzzy msgid "(current)" -msgstr "(Aktuální)" +msgstr "(aktuální)" #: editor/editor_feature_profile.cpp msgid "(none)" -msgstr "" +msgstr "(žádný)" #: editor/editor_feature_profile.cpp msgid "Remove currently selected profile, '%s'? Cannot be undone." -msgstr "" +msgstr "Odstranit aktuálně vybraný profil, '%s'? Nelze vrátit zpět." #: editor/editor_feature_profile.cpp msgid "Profile must be a valid filename and must not contain '.'" @@ -1834,19 +1826,16 @@ msgid "Enable Contextual Editor" msgstr "Aktivovat kontextový editor" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Class Properties:" -msgstr "Vlastnosti:" +msgstr "Vlastnosti třídy:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Main Features:" -msgstr "Vlastnosti" +msgstr "Hlavní funkce:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Nodes and Classes:" -msgstr "Povolené třídy:" +msgstr "Uzly a třídy:" #: editor/editor_feature_profile.cpp msgid "File '%s' format is invalid, import aborted." @@ -1863,7 +1852,6 @@ msgid "Error saving profile to path: '%s'." msgstr "Chyba při ukládání profilu do cesty: '%s '." #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Reset to Default" msgstr "Obnovit výchozí" @@ -1872,14 +1860,12 @@ msgid "Current Profile:" msgstr "Aktuální profil:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Create Profile" -msgstr "Smazat profil" +msgstr "Vytvořit profil" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Remove Profile" -msgstr "Odstranit dlaždici" +msgstr "Odstranit profil" #: editor/editor_feature_profile.cpp msgid "Available Profiles:" @@ -1899,18 +1885,16 @@ msgid "Export" msgstr "Export" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Configure Selected Profile:" -msgstr "Aktuální profil:" +msgstr "Konfigurace vybraného profilu:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Extra Options:" -msgstr "Možnosti třídy:" +msgstr "Další možnosti:" #: editor/editor_feature_profile.cpp msgid "Create or import a profile to edit available classes and properties." -msgstr "" +msgstr "Vytvořte nebo importujte profil a upravte dostupné třídy a vlastnosti." #: editor/editor_feature_profile.cpp msgid "New profile name:" @@ -1937,9 +1921,8 @@ msgid "Select Current Folder" msgstr "Vybrat stávající složku" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp -#, fuzzy msgid "File exists, overwrite?" -msgstr "Soubor už existuje. Přepsat?" +msgstr "Soubor existuje, přepsat?" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Select This Folder" @@ -2337,6 +2320,9 @@ msgid "" "Update Continuously is enabled, which can increase power usage. Click to " "disable it." msgstr "" +"Aktivuje se při překreslování okna editoru.\n" +"Je zapnuta funkce Průběžná aktualizace, která může zvýšit spotřebu energie. " +"Klepnutím ji zakážete." #: editor/editor_node.cpp msgid "Spins when the editor window redraws." @@ -2433,9 +2419,8 @@ msgstr "" "(instance nebo dědičnosti)." #: editor/editor_node.cpp -#, fuzzy msgid "Could not save one or more scenes!" -msgstr "Nelze spustit podproces!" +msgstr "Nelze uložit jednu nebo více scén!" #: editor/editor_node.cpp msgid "Save All Scenes" @@ -2577,20 +2562,23 @@ msgstr "Uložit změny '%s' před zavřením?" #: editor/editor_node.cpp msgid "%s no longer exists! Please specify a new save location." -msgstr "" +msgstr "%s již neexistuje! Zadejte prosím nové umístění pro uložení." #: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." msgstr "" +"Aktuální scéna nemá kořenový uzel, ale přesto bylo uloženo %d upravených " +"externích zdrojů." #: editor/editor_node.cpp -#, fuzzy msgid "" "A root node is required to save the scene. You can add a root node using the " "Scene tree dock." -msgstr "Pro uložení scény je vyžadován kořenový uzel." +msgstr "" +"Pro uložení scény je nutný kořenový uzel. Kořenový uzel můžete přidat pomocí " +"doku Strom scény." #: editor/editor_node.cpp msgid "Save Scene As..." @@ -2622,29 +2610,27 @@ msgstr "Aktuální scéna neuložena. Přesto otevřít?" #: editor/editor_node.cpp msgid "Can't undo while mouse buttons are pressed." -msgstr "" +msgstr "Nelze vrátit zpět, když jsou stisknuta tlačítka myši." #: editor/editor_node.cpp msgid "Nothing to undo." -msgstr "" +msgstr "Není co vracet." #: editor/editor_node.cpp -#, fuzzy msgid "Undo: %s" -msgstr "Zpět" +msgstr "Zpět: %s" #: editor/editor_node.cpp msgid "Can't redo while mouse buttons are pressed." -msgstr "" +msgstr "Nelze opakovat, když jsou stisknuta tlačítka myši." #: editor/editor_node.cpp msgid "Nothing to redo." -msgstr "" +msgstr "Není co opakovat." #: editor/editor_node.cpp -#, fuzzy msgid "Redo: %s" -msgstr "Znovu" +msgstr "Opakovat: %s" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." @@ -2929,11 +2915,11 @@ msgstr "Konvertovat na..." #: editor/editor_node.cpp msgid "MeshLibrary..." -msgstr "MeshLibrary..." +msgstr "Knihovna modelů..." #: editor/editor_node.cpp msgid "TileSet..." -msgstr "TileSet..." +msgstr "Sada dlaždic..." #: editor/editor_node.cpp editor/plugins/script_text_editor.cpp #: scene/gui/line_edit.cpp scene/gui/text_edit.cpp @@ -2991,9 +2977,8 @@ msgid "Orphan Resource Explorer..." msgstr "Průzkumník osiřelých zdrojů..." #: editor/editor_node.cpp -#, fuzzy msgid "Reload Current Project" -msgstr "Přejmenovat projekt" +msgstr "Znovu načíst aktuální projekt" #: editor/editor_node.cpp msgid "Quit to Project List" @@ -3151,13 +3136,12 @@ msgid "Help" msgstr "Nápověda" #: editor/editor_node.cpp -#, fuzzy msgid "Online Documentation" -msgstr "Otevřít dokumentaci" +msgstr "Online dokumentace" #: editor/editor_node.cpp msgid "Questions & Answers" -msgstr "" +msgstr "Otázky & odpovědi" #: editor/editor_node.cpp msgid "Report a Bug" @@ -3165,7 +3149,7 @@ msgstr "Nahlásit chybu" #: editor/editor_node.cpp msgid "Suggest a Feature" -msgstr "" +msgstr "Navrhnout funkci" #: editor/editor_node.cpp msgid "Send Docs Feedback" @@ -3176,9 +3160,8 @@ msgid "Community" msgstr "Komunita" #: editor/editor_node.cpp -#, fuzzy msgid "About Godot" -msgstr "O aplikaci" +msgstr "O aplikaci Godot" #: editor/editor_node.cpp msgid "Support Godot Development" @@ -3271,14 +3254,12 @@ msgid "Manage Templates" msgstr "Spravovat šablony" #: editor/editor_node.cpp -#, fuzzy msgid "Install from file" msgstr "Instalovat ze souboru" #: editor/editor_node.cpp -#, fuzzy msgid "Select android sources file" -msgstr "Vyberte zdrojovou síť:" +msgstr "Vyberte soubor se zdroji pro Android" #: editor/editor_node.cpp msgid "" @@ -3326,9 +3307,8 @@ msgid "Merge With Existing" msgstr "Sloučit s existující" #: editor/editor_node.cpp -#, fuzzy msgid "Apply MeshInstance Transforms" -msgstr "Animace: Změna transformace" +msgstr "Použít transformace MeshInstance" #: editor/editor_node.cpp msgid "Open & Run a Script" @@ -3365,9 +3345,8 @@ msgid "Select" msgstr "Vybrat" #: editor/editor_node.cpp -#, fuzzy msgid "Select Current" -msgstr "Vybrat stávající složku" +msgstr "Vybrat aktuální" #: editor/editor_node.cpp msgid "Open 2D Editor" @@ -3402,9 +3381,8 @@ msgid "No sub-resources found." msgstr "Nebyly nalezeny žádné dílčí zdroje." #: editor/editor_path.cpp -#, fuzzy msgid "Open a list of sub-resources." -msgstr "Nebyly nalezeny žádné dílčí zdroje." +msgstr "Otevřete seznam dílčích zdrojů." #: editor/editor_plugin.cpp msgid "Creating Mesh Previews" @@ -3431,14 +3409,12 @@ msgid "Update" msgstr "Aktualizovat" #: editor/editor_plugin_settings.cpp -#, fuzzy msgid "Version" -msgstr "Verze:" +msgstr "Verze" #: editor/editor_plugin_settings.cpp -#, fuzzy msgid "Author" -msgstr "Autoři" +msgstr "Autor" #: editor/editor_plugin_settings.cpp #: editor/plugins/version_control_editor_plugin.cpp @@ -3451,14 +3427,12 @@ msgid "Measure:" msgstr "Měření:" #: editor/editor_profiler.cpp -#, fuzzy msgid "Frame Time (ms)" -msgstr "Čas snímku (sek.)" +msgstr "Čas snímku (ms)" #: editor/editor_profiler.cpp -#, fuzzy msgid "Average Time (ms)" -msgstr "Průměrný čas (sek.)" +msgstr "Průměrný čas (ms)" #: editor/editor_profiler.cpp msgid "Frame %" @@ -3485,6 +3459,12 @@ msgid "" "functions called by that function.\n" "Use this to find individual functions to optimize." msgstr "" +"Včetně: Zahrnuje čas z jiných funkcí volaných touto funkcí.\n" +"Slouží k odhalení úzkých míst.\n" +"\n" +"Vlastní: Započítává pouze čas strávený v samotné funkci, nikoli v jiných " +"funkcích volaných touto funkcí.\n" +"Použijte k vyhledání jednotlivých funkcí, které je třeba optimalizovat." #: editor/editor_profiler.cpp msgid "Frame #:" @@ -3589,7 +3569,7 @@ msgstr "" #: editor/editor_resource_picker.cpp msgid "Quick Load" -msgstr "" +msgstr "Rychlé načtení" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "Make Unique" @@ -3610,9 +3590,8 @@ msgid "Paste" msgstr "Vložit" #: editor/editor_resource_picker.cpp editor/property_editor.cpp -#, fuzzy msgid "Convert to %s" -msgstr "Konvertovat na %s" +msgstr "Převést na %s" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "New %s" @@ -3662,11 +3641,9 @@ msgid "Did you forget the '_run' method?" msgstr "Nezapoměl jste metodu '_run'?" #: editor/editor_spin_slider.cpp -#, fuzzy msgid "Hold %s to round to integers. Hold Shift for more precise changes." msgstr "" -"Podržte Ctrl pro zaokrouhlení na celá čísla. Podržte Shift pro přesnější " -"úpravy." +"Podržte %s pro zaokrouhlení na celá čísla. Pro přesnější změny podržte Shift." #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" @@ -3686,49 +3663,43 @@ msgstr "Import z uzlu:" #: editor/export_template_manager.cpp msgid "Open the folder containing these templates." -msgstr "" +msgstr "Otevřít složku obsahující tyto šablony." #: editor/export_template_manager.cpp msgid "Uninstall these templates." -msgstr "" +msgstr "Odinstalovat tyto šablony." #: editor/export_template_manager.cpp -#, fuzzy msgid "There are no mirrors available." -msgstr "Neexistuje '%s' soubor." +msgstr "Nejsou k dispozici žádná zrcadla." #: editor/export_template_manager.cpp -#, fuzzy msgid "Retrieving the mirror list..." -msgstr "Získávání zrcadel, prosím čekejte..." +msgstr "Získávání seznamu zrcadel..." #: editor/export_template_manager.cpp msgid "Starting the download..." -msgstr "" +msgstr "Zahájení stahování..." #: editor/export_template_manager.cpp msgid "Error requesting URL:" msgstr "Chyba žádosti o URL:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Connecting to the mirror..." -msgstr "Připojuji se k zrcadlu..." +msgstr "Připojení k zrcadlu..." #: editor/export_template_manager.cpp -#, fuzzy msgid "Can't resolve the requested address." -msgstr "Nelze přeložit název hostitele:" +msgstr "Nelze dohledat požadovanou adresu." #: editor/export_template_manager.cpp -#, fuzzy msgid "Can't connect to the mirror." -msgstr "Nelze se připojit k hostiteli:" +msgstr "Nelze se připojit k zrcadlu." #: editor/export_template_manager.cpp -#, fuzzy msgid "No response from the mirror." -msgstr "Žádná odpověď od hostitele:" +msgstr "Zrcadlo neodpovídá." #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -3736,18 +3707,16 @@ msgid "Request failed." msgstr "Požadavek selhal." #: editor/export_template_manager.cpp -#, fuzzy msgid "Request ended up in a redirect loop." -msgstr "Požadavek se nezdařil, příliš mnoho přesměrování" +msgstr "Požadavek skončil ve smyčce přesměrování." #: editor/export_template_manager.cpp -#, fuzzy msgid "Request failed:" -msgstr "Požadavek selhal." +msgstr "Požadavek selhal:" #: editor/export_template_manager.cpp msgid "Download complete; extracting templates..." -msgstr "" +msgstr "Stažení dokončeno; extrahování šablon..." #: editor/export_template_manager.cpp msgid "Cannot remove temporary file:" @@ -3766,13 +3735,13 @@ msgid "Error getting the list of mirrors." msgstr "Chyba při získávání seznamu zrcadel." #: editor/export_template_manager.cpp -#, fuzzy msgid "Error parsing JSON with the list of mirrors. Please report this issue!" -msgstr "Chyba parsování JSON mirror list. Prosím nahlaste tuto chybu!" +msgstr "" +"Chyba při parsování JSON se seznamem zrcadel. Nahlaste prosím tento problém!" #: editor/export_template_manager.cpp msgid "Best available mirror" -msgstr "" +msgstr "Nejlepší dostupné zrcadlo" #: editor/export_template_manager.cpp msgid "" @@ -3825,24 +3794,20 @@ msgid "SSL Handshake Error" msgstr "Selhání SSL handshaku" #: editor/export_template_manager.cpp -#, fuzzy msgid "Can't open the export templates file." -msgstr "Nelze otevřít zip soubor exportních šablon." +msgstr "Nelze otevřít soubor exportních šablon." #: editor/export_template_manager.cpp -#, fuzzy msgid "Invalid version.txt format inside the export templates file: %s." -msgstr "Neplatný formát version.txt uvnitř šablon: %s." +msgstr "Nesprávný formát version.txt uvnitř souboru exportních šablon: %s." #: editor/export_template_manager.cpp -#, fuzzy msgid "No version.txt found inside the export templates file." -msgstr "Nenalezena version.txt uvnitř šablon." +msgstr "V souboru exportních šablon nebyl nalezen soubor version.txt." #: editor/export_template_manager.cpp -#, fuzzy msgid "Error creating path for extracting templates:" -msgstr "Chyba při vytváření cesty pro šablony:" +msgstr "Chyba při vytváření cesty pro extrakci šablon:" #: editor/export_template_manager.cpp msgid "Extracting Export Templates" @@ -3853,9 +3818,8 @@ msgid "Importing:" msgstr "Importování:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Remove templates for the version '%s'?" -msgstr "Odstranit šablonu verze '%s'?" +msgstr "Odstranit šablony pro verzi '%s'?" #: editor/export_template_manager.cpp msgid "Uncompressing Android Build Sources" @@ -3872,67 +3836,62 @@ msgstr "Aktuální verze:" #: editor/export_template_manager.cpp msgid "Export templates are missing. Download them or install from a file." msgstr "" +"Chybí šablony pro export. Stáhněte si je nebo je nainstalujte ze souboru." #: editor/export_template_manager.cpp msgid "Export templates are installed and ready to be used." -msgstr "" +msgstr "Exportní šablony jsou nainstalovány a připraveny k použití." #: editor/export_template_manager.cpp -#, fuzzy msgid "Open Folder" -msgstr "Otevřít soubor" +msgstr "Otevřít složku" #: editor/export_template_manager.cpp msgid "Open the folder containing installed templates for the current version." -msgstr "" +msgstr "Otevře složku obsahující nainstalované šablony pro aktuální verzi." #: editor/export_template_manager.cpp msgid "Uninstall" msgstr "Odinstalovat" #: editor/export_template_manager.cpp -#, fuzzy msgid "Uninstall templates for the current version." -msgstr "Počáteční hodnota pro počítadlo" +msgstr "Odinstalování šablon pro aktuální verzi." #: editor/export_template_manager.cpp -#, fuzzy msgid "Download from:" -msgstr "Chyba při stahování" +msgstr "Stáhnout z:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Open in Web Browser" -msgstr "Spustit v prohlížeči" +msgstr "Otevřít v prohlížeči" #: editor/export_template_manager.cpp -#, fuzzy msgid "Copy Mirror URL" -msgstr "Kopírovat chybu" +msgstr "Kopírovat URL zrcadla" #: editor/export_template_manager.cpp msgid "Download and Install" -msgstr "" +msgstr "Stáhnout a instalovat" #: editor/export_template_manager.cpp msgid "" "Download and install templates for the current version from the best " "possible mirror." msgstr "" +"Stáhnutí a instalace šablon pro aktuální verzi z nejlepšího možného zrcadla." #: editor/export_template_manager.cpp msgid "Official export templates aren't available for development builds." msgstr "Oficiální šablony exportu nejsou k dispozici pro vývojová sestavení." #: editor/export_template_manager.cpp -#, fuzzy msgid "Install from File" msgstr "Instalovat ze souboru" #: editor/export_template_manager.cpp -#, fuzzy msgid "Install templates from a local file." -msgstr "Importovat šablony ze ZIP souboru" +msgstr "Instalace šablon z místního souboru." #: editor/export_template_manager.cpp editor/find_in_files.cpp #: editor/progress_dialog.cpp scene/gui/dialogs.cpp @@ -3940,19 +3899,16 @@ msgid "Cancel" msgstr "Zrušit" #: editor/export_template_manager.cpp -#, fuzzy msgid "Cancel the download of the templates." -msgstr "Nelze otevřít zip soubor exportních šablon." +msgstr "Zrušit stahování šablon." #: editor/export_template_manager.cpp -#, fuzzy msgid "Other Installed Versions:" -msgstr "Instalované verze:" +msgstr "Další nainstalované verze:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Uninstall Template" -msgstr "Odinstalovat" +msgstr "Odinstalovat šablonu" #: editor/export_template_manager.cpp msgid "Select Template File" @@ -3967,6 +3923,8 @@ msgid "" "The templates will continue to download.\n" "You may experience a short editor freeze when they finish." msgstr "" +"Šablony se budou stahovat i nadále.\n" +"Po dokončení může dojít ke krátkému zamrznutí editoru." #: editor/filesystem_dock.cpp msgid "Favorites" @@ -4113,35 +4071,32 @@ msgid "Collapse All" msgstr "Sbalit vše" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Sort files" -msgstr "Hledat soubory" +msgstr "Seřadit soubory" #: editor/filesystem_dock.cpp msgid "Sort by Name (Ascending)" -msgstr "" +msgstr "Seřadit podle názvu (vzestupně)" #: editor/filesystem_dock.cpp msgid "Sort by Name (Descending)" -msgstr "" +msgstr "Seřadit podle názvu (sestupně)" #: editor/filesystem_dock.cpp msgid "Sort by Type (Ascending)" -msgstr "" +msgstr "Seřadit podle typu (vzestupně)" #: editor/filesystem_dock.cpp msgid "Sort by Type (Descending)" -msgstr "" +msgstr "Seřadit podle typu (sestupně)" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Sort by Last Modified" -msgstr "Datum modifikace" +msgstr "Seřadit podle poslední změny" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Sort by First Modified" -msgstr "Datum modifikace" +msgstr "Seřadit podle první změny" #: editor/filesystem_dock.cpp msgid "Duplicate..." @@ -4153,7 +4108,7 @@ msgstr "Přejmenovat..." #: editor/filesystem_dock.cpp msgid "Focus the search box" -msgstr "" +msgstr "Přejít do vyhledávacího pole" #: editor/filesystem_dock.cpp msgid "Previous Folder/File" @@ -4440,6 +4395,10 @@ msgid "" "Selecting another resource in the FileSystem dock without clicking Reimport " "first will discard changes made in the Import dock." msgstr "" +"Máte čekající změny, které ještě nebyly použity. Klepnutím na tlačítko Znovu " +"importovat uplatníte změny provedené v možnostech importu.\n" +"Výběrem jiného zdroje v doku Souborový systém bez předchozího kliknutí na " +"tlačítko Znovu importovat se změny provedené v doku Import zruší." #: editor/import_dock.cpp msgid "Import As:" @@ -4469,14 +4428,12 @@ msgid "Failed to load resource." msgstr "Selhalo nahrání zdroje." #: editor/inspector_dock.cpp -#, fuzzy msgid "Copy Properties" -msgstr "Vlastnosti" +msgstr "Kopírovat vlastnosti" #: editor/inspector_dock.cpp -#, fuzzy msgid "Paste Properties" -msgstr "Vlastnosti" +msgstr "Vložit vlastnosti" #: editor/inspector_dock.cpp msgid "Make Sub-Resources Unique" @@ -4501,23 +4458,20 @@ msgid "Save As..." msgstr "Uložit jako..." #: editor/inspector_dock.cpp -#, fuzzy msgid "Extra resource options." -msgstr "Není v cestě ke zdroji." +msgstr "Další možnosti zdrojů." #: editor/inspector_dock.cpp -#, fuzzy msgid "Edit Resource from Clipboard" -msgstr "Editovat schránku zdrojů" +msgstr "Upravit zdroj ze schránky" #: editor/inspector_dock.cpp msgid "Copy Resource" msgstr "Kopírovat zdroj" #: editor/inspector_dock.cpp -#, fuzzy msgid "Make Resource Built-In" -msgstr "Vytvořit vestavěný" +msgstr "Vytvořit vestavěný zdroj" #: editor/inspector_dock.cpp msgid "Go to the previous edited object in history." @@ -4532,9 +4486,8 @@ msgid "History of recently edited objects." msgstr "Historie naposledy upravených objektů." #: editor/inspector_dock.cpp -#, fuzzy msgid "Open documentation for this object." -msgstr "Otevřít dokumentaci" +msgstr "Otevřít dokumentaci k tomuto objektu." #: editor/inspector_dock.cpp editor/scene_tree_dock.cpp msgid "Open Documentation" @@ -4545,9 +4498,8 @@ msgid "Filter properties" msgstr "Filtrovat vlastnosti" #: editor/inspector_dock.cpp -#, fuzzy msgid "Manage object properties." -msgstr "Vlastnosti objektu." +msgstr "Spravovat vlastnosti objektu." #: editor/inspector_dock.cpp msgid "Changes may be lost!" @@ -4791,9 +4743,8 @@ msgid "Blend:" msgstr "Prolínání:" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Parameter Changed:" -msgstr "Parametr změněn" +msgstr "Změněný parametr:" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp @@ -5519,11 +5470,11 @@ msgstr "všichni" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Search templates, projects, and demos" -msgstr "" +msgstr "Vyhledávání šablon, projektů a ukázek" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Search assets (excluding templates, projects, and demos)" -msgstr "" +msgstr "Vyhledávání zdrojů (kromě šablon, projektů a ukázek)" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Import..." @@ -5567,7 +5518,7 @@ msgstr "ZIP soubor asetů" #: editor/plugins/audio_stream_editor_plugin.cpp msgid "Audio Preview Play/Pause" -msgstr "" +msgstr "Náhled zvuku Přehrát/Pozastavit" #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "" @@ -5578,13 +5529,12 @@ msgstr "" "Uložte scénu a zkuste to znovu." #: editor/plugins/baked_lightmap_editor_plugin.cpp -#, fuzzy msgid "" "No meshes to bake. Make sure they contain an UV2 channel and that the 'Use " "In Baked Light' and 'Generate Lightmap' flags are on." msgstr "" -"Žádné sítě k zapečení. Ujistěte se, že obsahují kanál UV2 a že je nastaven " -"příznak \"Zapéct světlo\"." +"Žádné sítě k zapečení. Ujistěte se, že obsahují kanál UV2 a že jsou zapnuté " +"přepínače \"Použít v zapečeném světle\" a \"Generovat světelnou mapu\"." #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "Failed creating lightmap images, make sure path is writable." @@ -5727,15 +5677,13 @@ msgstr "Přemístit CanvasItem \"%s\" na (%d, %d)" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Locked" -msgstr "Uzamčít vybraný" +msgstr "Zamčeno" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Grouped" -msgstr "Skupiny" +msgstr "Seskupené" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -5839,13 +5787,12 @@ msgstr "Upravit kotvy" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "" "Project Camera Override\n" "Overrides the running project's camera with the editor viewport camera." msgstr "" -"Přepsat herní kameru\n" -"Herní kamera se nahradí kamerou z pohledu editoru." +"Přepsání projektové kamery\n" +"Přepíše kameru spuštěného projektu kamerou v pohledu editoru." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5854,6 +5801,9 @@ msgid "" "No project instance running. Run the project from the editor to use this " "feature." msgstr "" +"Přepsání projektové kamery\n" +"Není spuštěna žádná instance projektu. Chcete-li tuto funkci použít, spusťte " +"projekt z editoru." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5921,31 +5871,26 @@ msgstr "Režim výběru" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Drag: Rotate selected node around pivot." -msgstr "Odstranit vybraný uzel nebo přechod." +msgstr "Přetažení: Otáčení vybraného uzlu kolem pivotu." #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Alt+Drag: Move selected node." -msgstr "Alt+Táhnutí: Přemístit" +msgstr "Alt+přetažení: Přesun vybraného uzlu." #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "V: Set selected node's pivot position." -msgstr "Odstranit vybraný uzel nebo přechod." +msgstr "V: Nastavení polohy pivotu vybraného uzlu." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Alt+RMB: Show list of all nodes at position clicked, including locked." msgstr "" -"Zobrazit seznam objektů v bodě kliknutí\n" -"(stejné jako Alt+PTM v režimu výběru)." +"Alt+PTM: Zobrazí seznam všech uzlů na kliknuté pozici, včetně uzamčených." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "RMB: Add node at position clicked." -msgstr "" +msgstr "PTM: Přidání uzlu na pozici, na kterou bylo kliknuto." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -6183,14 +6128,12 @@ msgid "Clear Pose" msgstr "Vymazat pózu" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Add Node Here" -msgstr "Přidat uzel" +msgstr "Přidání uzlu sem" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Instance Scene Here" -msgstr "Scéna/Scény instance" +msgstr "Instance scény sem" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Multiply grid step by 2" @@ -6206,49 +6149,43 @@ msgstr "Přesunout pohled" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Zoom to 3.125%" -msgstr "" +msgstr "Přiblížení na 3,125 %" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Zoom to 6.25%" -msgstr "" +msgstr "Přiblížení na 6,25 %" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Zoom to 12.5%" -msgstr "" +msgstr "Přiblížení na 12,5 %" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 25%" -msgstr "Zmenšit" +msgstr "Přiblížení na 25 %" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 50%" -msgstr "Zmenšit" +msgstr "Přiblížení na 50 %" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 100%" -msgstr "Zmenšit" +msgstr "Přiblížení na 100 %" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 200%" -msgstr "Zmenšit" +msgstr "Přiblížení na 200 %" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 400%" -msgstr "Zmenšit" +msgstr "Přiblížení na 400 %" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 800%" -msgstr "Zmenšit" +msgstr "Přiblížení na 800 %" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Zoom to 1600%" -msgstr "" +msgstr "Přiblížení na 1600 %" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Add %s" @@ -6493,9 +6430,8 @@ msgid "Couldn't create a single convex collision shape." msgstr "Vytvoření jediného konvexního kolizního tvaru se nezdařilo." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Simplified Convex Shape" -msgstr "Vytvořit jediný konvexní tvar" +msgstr "Vytvoření zjednodušeného konvexního tvaru" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Single Convex Shape" @@ -6530,9 +6466,8 @@ msgid "No mesh to debug." msgstr "Žádná mesh pro debugování." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Mesh has no UV in layer %d." -msgstr "Model nemá UV v této vrstvě" +msgstr "Model nemá ve vrstvě %d žádné UV." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "MeshInstance lacks a Mesh!" @@ -6607,6 +6542,9 @@ msgid "" "This is similar to single collision shape, but can result in a simpler " "geometry in some cases, at the cost of accuracy." msgstr "" +"Vytvoří zjednodušený konvexní kolizní tvar.\n" +"Je podobný jednoduchému koliznímu tvaru, ale v některých případech může vést " +"k jednodušší geometrii na úkor přesnosti." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Multiple Convex Collision Siblings" @@ -6652,7 +6590,7 @@ msgstr "Rozbalit UV2 pro Lightmapu/AO" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh" -msgstr "Vytvořit síť obrysu" +msgstr "Vytvoření obrysového modelu" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Outline Size:" @@ -6676,7 +6614,7 @@ msgstr "" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Mesh Library" -msgstr "Knihovna síťí" +msgstr "Knihovna modelů" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Add Item" @@ -6739,7 +6677,7 @@ msgstr "Povrch je neplatný (žádné stěny)." #: editor/plugins/multimesh_editor_plugin.cpp msgid "Select a Source Mesh:" -msgstr "Vyberte zdrojovou síť:" +msgstr "Vyberte zdrojový model:" #: editor/plugins/multimesh_editor_plugin.cpp msgid "Select a Target Surface:" @@ -7272,14 +7210,12 @@ msgid "Flip Portals" msgstr "Převrátit horizontálně" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Room Generate Points" -msgstr "Počet vygenerovaných bodů:" +msgstr "Generovat body místnosti" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Generate Points" -msgstr "Počet vygenerovaných bodů:" +msgstr "Generovat body" #: editor/plugins/room_manager_editor_plugin.cpp #, fuzzy @@ -7894,12 +7830,12 @@ msgstr "Perspektivní" #. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled. #: editor/plugins/spatial_editor_plugin.cpp msgid " [auto]" -msgstr "" +msgstr " [auto]" #. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled. #: editor/plugins/spatial_editor_plugin.cpp msgid " [portals active]" -msgstr "" +msgstr " [aktivní portály]" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Aborted." @@ -7928,20 +7864,17 @@ msgid "None" msgstr "Žádné" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rotate" -msgstr "Režim otáčení" +msgstr "Otočit" #. TRANSLATORS: This refers to the movement that changes the position of an object. #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Translate" -msgstr "Posunout:" +msgstr "Posunout" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Scale" -msgstr "Zvětšení:" +msgstr "Zvětšit" #: editor/plugins/spatial_editor_plugin.cpp msgid "Scaling: " @@ -7964,52 +7897,44 @@ msgid "Animation Key Inserted." msgstr "Animační klíč vložen." #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Pitch:" -msgstr "Stoupání" +msgstr "Stoupání:" #: editor/plugins/spatial_editor_plugin.cpp msgid "Yaw:" -msgstr "" +msgstr "Odklon (Yaw):" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Size:" -msgstr "Velikost: " +msgstr "Velikost:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Objects Drawn:" -msgstr "Objekty vykreslené" +msgstr "Kreslené objekty:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Material Changes:" -msgstr "Změny materiálu" +msgstr "Změny materiálu:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Shader Changes:" -msgstr "Změny shaderu" +msgstr "Změny shaderu:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Surface Changes:" -msgstr "Změny povrchu" +msgstr "Změny povrchu:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Draw Calls:" -msgstr "Vykreslovací volání" +msgstr "Vykreslovací volání:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Vertices:" -msgstr "Vrcholy" +msgstr "Vrcholy:" #: editor/plugins/spatial_editor_plugin.cpp msgid "FPS: %d (%s ms)" -msgstr "" +msgstr "FPS: %d (%s ms)" #: editor/plugins/spatial_editor_plugin.cpp msgid "Top View." @@ -8156,6 +8081,8 @@ msgstr "Rotace pohledu uzamknuta" msgid "" "To zoom further, change the camera's clipping planes (View -> Settings...)" msgstr "" +"Chcete-li přiblížení zvětšit, změňte roviny oříznutí kamery (Zobrazit -> " +"Nastavení...)" #: editor/plugins/spatial_editor_plugin.cpp msgid "" @@ -8172,7 +8099,7 @@ msgstr "Konvertovat na %s" #: editor/plugins/spatial_editor_plugin.cpp msgid "XForm Dialog" -msgstr "XForm Dialog" +msgstr "XForm dialog" #: editor/plugins/spatial_editor_plugin.cpp msgid "" @@ -8313,7 +8240,7 @@ msgstr "4 výřezy" #: editor/plugins/spatial_editor_plugin.cpp msgid "Gizmos" -msgstr "Gizmos" +msgstr "Gizma" #: editor/plugins/spatial_editor_plugin.cpp msgid "View Origin" @@ -8609,7 +8536,7 @@ msgstr "Vytvořit rámečky ze Sprite Sheet" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "SpriteFrames" -msgstr "SpriteFrames" +msgstr "Snímky spritu" #: editor/plugins/texture_region_editor_plugin.cpp msgid "Set Region Rect" @@ -8695,18 +8622,16 @@ msgid "{num} font(s)" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "No fonts found." -msgstr "Nenalezeno!" +msgstr "Nebyla nalezena žádná písma." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} icon(s)" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "No icons found." -msgstr "Nenalezeno!" +msgstr "Nebyly nalezeny žádné ikony." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} stylebox(es)" @@ -8735,9 +8660,8 @@ msgid "Importing items {n}/{n}" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Updating the editor" -msgstr "Ukončit editor?" +msgstr "Aktualizace editoru" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -8754,14 +8678,12 @@ msgid "With Data" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select by data type:" -msgstr "Vybrat uzel" +msgstr "Výběr podle typu dat:" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible color items." -msgstr "Vyberte složku pro skenování" +msgstr "Vybrat všechny viditelné barevné položky." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible color items and their data." @@ -8772,9 +8694,8 @@ msgid "Deselect all visible color items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible constant items." -msgstr "Nejprve vyberte nastavení ze seznamu!" +msgstr "Vybrat všechny viditelné konstantní položky." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible constant items and their data." @@ -8785,9 +8706,8 @@ msgid "Deselect all visible constant items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible font items." -msgstr "Nejprve vyberte nastavení ze seznamu!" +msgstr "Vybrat všechny viditelné položky písma." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible font items and their data." @@ -8798,19 +8718,16 @@ msgid "Deselect all visible font items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible icon items." -msgstr "Nejprve vyberte nastavení ze seznamu!" +msgstr "Vybrat všechny viditelné položky ikon." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible icon items and their data." -msgstr "Nejprve vyberte nastavení ze seznamu!" +msgstr "Vybrat všechny viditelné položky ikon a jejich data." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Deselect all visible icon items." -msgstr "Nejprve vyberte nastavení ze seznamu!" +msgstr "Zrušit výběr všech viditelných položek ikon." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible stylebox items." @@ -8831,19 +8748,16 @@ msgid "" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Collapse types." -msgstr "Sbalit vše" +msgstr "Sbalit typy." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Expand types." -msgstr "Rozbalit vše" +msgstr "Rozbalit typy." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all Theme items." -msgstr "Vybrat soubor šablony" +msgstr "Vybrat všechny položky motivu." #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -8997,9 +8911,8 @@ msgid "Add Type:" msgstr "Typ:" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Item:" -msgstr "Přidat položku" +msgstr "Přidat položku:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9007,9 +8920,8 @@ msgid "Add StyleBox Item" msgstr "Přidat všechny položky" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Items:" -msgstr "Odstranit položku" +msgstr "Odstranit položky:" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove Class Items" @@ -9050,9 +8962,8 @@ msgid "Editor Theme" msgstr "Editovat téma" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select Another Theme Resource:" -msgstr "Smazat zdroj" +msgstr "Vybrerte jiný zdroj motivu:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9095,9 +9006,8 @@ msgid "Add Item Type" msgstr "Přidat položku" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Node Types:" -msgstr "Typ uzlu" +msgstr "Typy uzlu:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9118,9 +9028,8 @@ msgid "Override all default type items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Theme:" -msgstr "Téma" +msgstr "Motiv:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9142,9 +9051,8 @@ msgid "Default Preview" msgstr "Obnovit náhled" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select UI Scene:" -msgstr "Vyberte zdrojovou síť:" +msgstr "Vyberte scénu uživatelského rozhraní:" #: editor/plugins/theme_editor_preview.cpp msgid "" @@ -9421,7 +9329,7 @@ msgstr "Bitmaska" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Priority" -msgstr "Priority" +msgstr "Priorita" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Icon" @@ -9796,7 +9704,7 @@ msgstr "Boolean" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Sampler" -msgstr "Sampler" +msgstr "Vzorkovač" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Add input port" @@ -10642,12 +10550,11 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "VisualShader" -msgstr "VisualShader" +msgstr "Vizuální shader" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Edit Visual Property:" -msgstr "Upravit vizuální vlastnost" +msgstr "Upravit vizuální vlastnost:" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Visual Shader Mode Changed" @@ -10959,7 +10866,7 @@ msgstr "Instalační cesta k projektu:" #: editor/project_manager.cpp msgid "Renderer:" -msgstr "Renderer:" +msgstr "Vykreslovač:" #: editor/project_manager.cpp msgid "OpenGL ES 3.0" @@ -11092,14 +10999,12 @@ msgid "Are you sure to run %d projects at once?" msgstr "Jste si jisti, že chcete spustit %d projektů najednou?" #: editor/project_manager.cpp -#, fuzzy msgid "Remove %d projects from the list?" -msgstr "Vyberte zařízení ze seznamu" +msgstr "Odstranit %d projektů ze seznamu?" #: editor/project_manager.cpp -#, fuzzy msgid "Remove this project from the list?" -msgstr "Vyberte zařízení ze seznamu" +msgstr "Odstranit tento projekt ze seznamu?" #: editor/project_manager.cpp msgid "" @@ -11235,14 +11140,14 @@ msgstr "" "jeden znak \"/\"." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Klávesa " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Klávesa " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Tlačítko gamepadu" @@ -12747,7 +12652,7 @@ msgstr "GridMap Vyplnit výběr" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" -msgstr "Grid Map" +msgstr "Mřížková mapa" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Snap View" @@ -12880,7 +12785,7 @@ msgstr "Zapéct NavMesh" #: modules/recast/navigation_mesh_editor_plugin.cpp msgid "Clear the navigation mesh." -msgstr "Vymazat navigační síť." +msgstr "Vymazat navigační model." #: modules/recast/navigation_mesh_generator.cpp msgid "Setting up Configuration..." @@ -13382,14 +13287,12 @@ msgid "Running on %s" msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Exporting APK..." -msgstr "Exportování všeho" +msgstr "Exportování APK..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Uninstalling..." -msgstr "Odinstalovat" +msgstr "Odinstalování..." #: platform/android/export/export_plugin.cpp #, fuzzy @@ -13397,9 +13300,8 @@ msgid "Installing to device, please wait..." msgstr "Načítání, prosím čekejte..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not install to device: %s" -msgstr "Nelze spustit podproces!" +msgstr "Nepodařilo se nainstalovat do zařízení: %s" #: platform/android/export/export_plugin.cpp #, fuzzy @@ -13521,16 +13423,12 @@ msgid "Signing debug %s..." msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Signing release %s..." -msgstr "" -"Skenování souborů,\n" -"Prosím, čekejte..." +msgstr "Podepisování vydání %s..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not find keystore, unable to export." -msgstr "Nelze otevřít šablonu pro export:" +msgstr "Nepodařilo se najít úložiště klíčů, nelze exportovat." #: platform/android/export/export_plugin.cpp msgid "'apksigner' returned with error #%d" @@ -13591,14 +13489,12 @@ msgid "" msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not export project files to gradle project\n" -msgstr "Nelze upravit project.godot v umístění projektu." +msgstr "Nelze exportovat soubory projektu do projektu gradle\n" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not write expansion package file!" -msgstr "Nelze zapsat soubor:" +msgstr "Nelze zapsat soubor rozšiřujícího balíčku!" #: platform/android/export/export_plugin.cpp msgid "Building Android Project (gradle)" @@ -13635,11 +13531,12 @@ msgid "Creating APK..." msgstr "Vytvářím kontury..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "" "Could not find template APK to export:\n" "%s" -msgstr "Nelze otevřít šablonu pro export:" +msgstr "" +"Nepodařilo se najít šablonu APK pro export:\n" +"%s" #: platform/android/export/export_plugin.cpp msgid "" @@ -13655,9 +13552,8 @@ msgid "Adding files..." msgstr "Přidávám %s..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not export project files" -msgstr "Nelze zapsat soubor:" +msgstr "Nelze exportovat soubory projektu" #: platform/android/export/export_plugin.cpp msgid "Aligning APK..." @@ -13722,14 +13618,12 @@ msgid "Could not read HTML shell:" msgstr "Nebylo možné přečíst HTML shell:" #: platform/javascript/export/export.cpp -#, fuzzy msgid "Could not create HTTP server directory:" -msgstr "Nelze vytvořit složku." +msgstr "Nepodařilo se vytvořit adresář serveru HTTP:" #: platform/javascript/export/export.cpp -#, fuzzy msgid "Error starting HTTP server:" -msgstr "Chyba při ukládání scény." +msgstr "Chyba při spuštění serveru HTTP:" #: platform/osx/export/export.cpp #, fuzzy @@ -14361,7 +14255,7 @@ msgstr "" #: scene/3d/soft_body.cpp msgid "This body will be ignored until you set a mesh." -msgstr "Toto tělo bude ignorováno dokud nenastavíte síť." +msgstr "Toto těleso bude ignorováno, dokud nenastavíte model." #: scene/3d/soft_body.cpp msgid "" @@ -14475,7 +14369,7 @@ msgstr "HSV" #: scene/gui/color_picker.cpp msgid "Raw" -msgstr "Raw" +msgstr "Surový" #: scene/gui/color_picker.cpp msgid "Switch between hexadecimal and code values." diff --git a/editor/translations/da.po b/editor/translations/da.po index af1038552e..fcef08f4e1 100644 --- a/editor/translations/da.po +++ b/editor/translations/da.po @@ -23,7 +23,7 @@ msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-04-26 22:31+0000\n" +"PO-Revision-Date: 2021-10-31 22:17+0000\n" "Last-Translator: Kim Nielsen <kimmowich@stofanet.dk>\n" "Language-Team: Danish <https://hosted.weblate.org/projects/godot-engine/" "godot/da/>\n" @@ -32,7 +32,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.7-dev\n" +"X-Generator: Weblate 4.9-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -5291,7 +5291,7 @@ msgstr "Slut" #: editor/plugins/animation_state_machine_editor.cpp msgid "Immediate" -msgstr "Umiddelbart" +msgstr "Umiddelbar" #: editor/plugins/animation_state_machine_editor.cpp msgid "Sync" @@ -5332,8 +5332,8 @@ msgid "" "Shift+LMB to create connections." msgstr "" "Vælg og flyt nodes.\n" -"RMB for at tilføje ny nodes.\n" -"Shift+LMB for at oprette forbindelse." +"RMB for at tilføje nye nodes.\n" +"Shift+LMB for at oprette forbindelser." #: editor/plugins/animation_state_machine_editor.cpp msgid "Create new nodes." @@ -5367,7 +5367,7 @@ msgstr "Afspil Mode:" #: editor/plugins/animation_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "AnimationTree" -msgstr "Animation Tree" +msgstr "Animation Træ" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "New name:" @@ -5380,11 +5380,11 @@ msgstr "Skalér:" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Fade In (s):" -msgstr "" +msgstr "Fade ind (s):" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Fade Out (s):" -msgstr "" +msgstr "Fade Ud (s):" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Blend" @@ -5409,7 +5409,7 @@ msgstr "" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Start!" -msgstr "" +msgstr "Start!" #: editor/plugins/animation_tree_player_editor_plugin.cpp #: editor/plugins/multimesh_editor_plugin.cpp @@ -5442,11 +5442,11 @@ msgstr "Tilføj Input" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Clear Auto-Advance" -msgstr "" +msgstr "Ryd Automatisk Fremrykning" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Set Auto-Advance" -msgstr "" +msgstr "Sæt Automatisk Fremrykning" #: editor/plugins/animation_tree_player_editor_plugin.cpp #, fuzzy @@ -5463,7 +5463,7 @@ msgstr "Animationstræ er ugyldigt." #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Animation Node" -msgstr "" +msgstr "Animations Node" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "OneShot Node" @@ -5487,15 +5487,15 @@ msgstr "" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "TimeScale Node" -msgstr "" +msgstr "Tidsskala Node" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "TimeSeek Node" -msgstr "" +msgstr "Tidssøgning Node" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Transition Node" -msgstr "" +msgstr "Overgangs Node" #: editor/plugins/animation_tree_player_editor_plugin.cpp #, fuzzy @@ -5525,52 +5525,49 @@ msgid "Download" msgstr "Download" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Connection error, please try again." msgstr "Forbindelsesfejl, prøv venligst igen." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Can't connect." -msgstr "Ingen forbindelse." +msgstr "Kan ikke oprette forbindelse." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Can't connect to host:" -msgstr "Kan ikke forbinde til host:" +msgstr "Kan ikke forbinde til værten:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "No response from host:" -msgstr "Ingen respons fra host:" +msgstr "Intet svar fra værten:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "No response." -msgstr "Ingen reaktion." +msgstr "Intet svar." #: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy msgid "Can't resolve hostname:" -msgstr "" +msgstr "Kan ikke løse værtsnavnet:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Can't resolve." msgstr "Kan ikke løses." #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Request failed, return code:" msgstr "Forespørgsel mislykkedes, returkode:" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Cannot save response to:" -msgstr "Kan ikke gemme respons i:" +msgstr "Kan ikke gemme svar til:" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Write error." msgstr "Skrivefejl." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Request failed, too many redirects" -msgstr "" +msgstr "Anmodningen mislykkedes, for mange omdirigeringer" #: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy @@ -5578,12 +5575,10 @@ msgid "Redirect loop." msgstr "Omdiriger Løkke." #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Request failed, timeout" msgstr "Forespørgsel mislykkedes, tiden udløb." #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Timeout." msgstr "Tiden udløb." @@ -5593,23 +5588,24 @@ msgstr "Fejlet:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Bad download hash, assuming file has been tampered with." -msgstr "" +msgstr "Dårligt download-hash, formoder at filen er blevet manipuleret." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Expected:" -msgstr "" +msgstr "Forventet:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Got:" -msgstr "" +msgstr "Fik:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Failed SHA-256 hash check" -msgstr "" +msgstr "Mislykkedes SHA-256 hash-tjek" #: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy msgid "Asset Download Error:" -msgstr "" +msgstr "Asset Download Fejl:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Downloading (%s / %s)..." @@ -5620,8 +5616,9 @@ msgid "Downloading..." msgstr "Downloader..." #: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy msgid "Resolving..." -msgstr "" +msgstr "Løser..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Error making request" @@ -5632,9 +5629,8 @@ msgid "Idle" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Install..." -msgstr "Installér..." +msgstr "Installere.." #: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy @@ -5643,19 +5639,20 @@ msgstr "Prøv igen" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Download Error" -msgstr "" +msgstr "Fejl i Download" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Download for this asset is already in progress!" -msgstr "" +msgstr "Download for dette asset er allerede i gang!" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Recently Updated" -msgstr "" +msgstr "Nyligt Opdateret" #: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy msgid "Least Recently Updated" -msgstr "" +msgstr "Seneste Nyligt Opdateret" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Name (A-Z)" @@ -5678,9 +5675,8 @@ msgid "First" msgstr "Første" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Previous" -msgstr "Forrige fane" +msgstr "Forrige" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Next" @@ -5696,11 +5692,12 @@ msgstr "Alle" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Search templates, projects, and demos" -msgstr "" +msgstr "Søg skabeloner, projekter og demoer" #: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy msgid "Search assets (excluding templates, projects, and demos)" -msgstr "" +msgstr "Søge assets (undtagen skabeloner, projekter og demoer)" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Import..." @@ -5743,14 +5740,18 @@ msgid "Assets ZIP File" msgstr "Assets zipfil" #: editor/plugins/audio_stream_editor_plugin.cpp +#, fuzzy msgid "Audio Preview Play/Pause" -msgstr "" +msgstr "Lyd forhåndsvisning Afspil/pause" #: editor/plugins/baked_lightmap_editor_plugin.cpp +#, fuzzy msgid "" "Can't determine a save path for lightmap images.\n" "Save your scene and try again." msgstr "" +"Kan ikke finde et sted at gemme lightmap images.\n" +"Gem din scene, og prøv igen." #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "" @@ -11420,11 +11421,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/de.po b/editor/translations/de.po index 9f6f7ee0bf..ecc7ec9611 100644 --- a/editor/translations/de.po +++ b/editor/translations/de.po @@ -73,13 +73,14 @@ # jmih03 <joerni@mail.de>, 2021. # Dominik Moos <dominik.moos@protonmail.com>, 2021. # Zae Chao <zaevi@live.com>, 2021. +# Tim <tim14speckenwirth@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-10-23 10:13+0000\n" -"Last-Translator: Zae Chao <zaevi@live.com>\n" +"PO-Revision-Date: 2021-10-31 22:17+0000\n" +"Last-Translator: Tim <tim14speckenwirth@gmail.com>\n" "Language-Team: German <https://hosted.weblate.org/projects/godot-engine/" "godot/de/>\n" "Language: de\n" @@ -11218,14 +11219,14 @@ msgstr "" "der Suchanfrage vorhanden sein." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Taste " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "Physische Taste" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Taste " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Joysticktaste" @@ -14383,7 +14384,7 @@ msgid "" "Please check the RoomList branch has been assigned in the RoomManager." msgstr "" "RoomList-Pfad ist ungültig.\n" -"Wurde der RoomList-Zweig im RoomManager zugewiesen?" +"Bitte überprüfen Sie, ob der RoomList-Zweig im RoomManager zugewiesen wurde." #: scene/3d/room_manager.cpp msgid "RoomList contains no Rooms, aborting." @@ -14420,8 +14421,9 @@ msgid "" "Error calculating room bounds.\n" "Ensure all rooms contain geometry or manual bounds." msgstr "" -"Fehler beim Berechnen der Raumbegrenzungen.\n" -"Enthalten alle Räume Geometrie oder manuelle Begrenzungen?" +"Fehler bei der Berechnung von Raumbegrenzungen.\n" +"Stellen Sie sicher, dass alle Räume Geometrie oder manuelle Begrenzungen " +"enthalten." #: scene/3d/soft_body.cpp msgid "This body will be ignored until you set a mesh." diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot index 60507c472d..778947373b 100644 --- a/editor/translations/editor.pot +++ b/editor/translations/editor.pot @@ -10587,11 +10587,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/el.po b/editor/translations/el.po index d8d6251838..07e55d9a90 100644 --- a/editor/translations/el.po +++ b/editor/translations/el.po @@ -11340,14 +11340,14 @@ msgstr "" "περιέχει τουλάχιστον έναν χαρακτήρα `/`." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Κλειδί " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Κλειδί " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Κουμπί Joystick" diff --git a/editor/translations/eo.po b/editor/translations/eo.po index c0aa10e89f..9ccaacaa39 100644 --- a/editor/translations/eo.po +++ b/editor/translations/eo.po @@ -11061,14 +11061,14 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Klavo " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Klavo " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Butono de stirstango" diff --git a/editor/translations/es.po b/editor/translations/es.po index bc314e8294..b1b3ba6b69 100644 --- a/editor/translations/es.po +++ b/editor/translations/es.po @@ -70,13 +70,14 @@ # Erick Figueroa <querecuto@hotmail.com>, 2021. # jonagamerpro1234 ss <js398704@gmail.com>, 2021. # davidrogel <david.rogel.pernas@icloud.com>, 2021. +# Anderson Guzman Abreu <chicobello1111@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-10-23 10:13+0000\n" -"Last-Translator: Lisandro Lorea <lisandrolorea@gmail.com>\n" +"PO-Revision-Date: 2021-10-31 22:17+0000\n" +"Last-Translator: Anderson Guzman Abreu <chicobello1111@gmail.com>\n" "Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/" "godot/es/>\n" "Language: es\n" @@ -2233,7 +2234,7 @@ msgstr "Buscar en la Ayuda" #: editor/editor_help_search.cpp msgid "Case Sensitive" -msgstr "Respetar Mayus./Minus." +msgstr "Respeta Mayus./Minus." #: editor/editor_help_search.cpp msgid "Show Hierarchy" @@ -11212,14 +11213,14 @@ msgstr "" "al menos un carácter `/`." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Tecla " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "Tecla Física" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Tecla " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Botón del Mando" diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po index dbff18af4e..1276ebe607 100644 --- a/editor/translations/es_AR.po +++ b/editor/translations/es_AR.po @@ -11148,14 +11148,14 @@ msgstr "" "al menos un carácter `/`." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Tecla " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "Tecla Física" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Tecla " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Bottón de Joystick" diff --git a/editor/translations/et.po b/editor/translations/et.po index ccc2681d0f..bc58f54d39 100644 --- a/editor/translations/et.po +++ b/editor/translations/et.po @@ -10768,11 +10768,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/eu.po b/editor/translations/eu.po index 9a2948582e..54b7590858 100644 --- a/editor/translations/eu.po +++ b/editor/translations/eu.po @@ -10726,11 +10726,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/fa.po b/editor/translations/fa.po index e61aa0a6c7..cc894bba12 100644 --- a/editor/translations/fa.po +++ b/editor/translations/fa.po @@ -11249,11 +11249,11 @@ msgstr "" "`کاراکتر باشد." #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/fi.po b/editor/translations/fi.po index a7dca1dd0d..830a83ccd8 100644 --- a/editor/translations/fi.po +++ b/editor/translations/fi.po @@ -17,7 +17,7 @@ msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-10-18 15:35+0000\n" +"PO-Revision-Date: 2021-10-28 22:09+0000\n" "Last-Translator: Tapani Niemi <tapani.niemi@kapsi.fi>\n" "Language-Team: Finnish <https://hosted.weblate.org/projects/godot-engine/" "godot/fi/>\n" @@ -1302,7 +1302,7 @@ msgstr "Assettien asentaja" #: editor/editor_audio_buses.cpp msgid "Speakers" -msgstr "Kaiuttimiet" +msgstr "Kaiuttimet" #: editor/editor_audio_buses.cpp msgid "Add Effect" @@ -2210,7 +2210,7 @@ msgstr "Signaali" #: editor/editor_help_search.cpp msgid "Constant" -msgstr "Muuttumaton" +msgstr "Vakio" #: editor/editor_help_search.cpp msgid "Property" @@ -5027,7 +5027,7 @@ msgstr "Pakota valkoisen modulaatio" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Include Gizmos (3D)" -msgstr "Näytä 3D-muokkaimet" +msgstr "Näytä 3D-vempaimet" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Pin AnimationPlayer" @@ -7997,7 +7997,7 @@ msgstr "Näytä ympäristö" #: editor/plugins/spatial_editor_plugin.cpp msgid "View Gizmos" -msgstr "Näytä muokkaimet" +msgstr "Näytä vempaimet" #: editor/plugins/spatial_editor_plugin.cpp msgid "View Information" @@ -8100,9 +8100,9 @@ msgid "" msgstr "" "Napsauta vaihtaaksesi näkyvyystilojen välillä.\n" "\n" -"Avoin silmä: muokkain on näkyvissä.\n" -"Suljettu silmä: muokkain on piilotettu.\n" -"Puoliavoin silmä: muokkain on näkyvissä myös läpikuultamattomien pintojen " +"Avoin silmä: vempain on näkyvissä.\n" +"Suljettu silmä: vempain on piilotettu.\n" +"Puoliavoin silmä: vempain on näkyvissä myös läpikuultamattomien pintojen " "läpi (\"röntgen\")." #: editor/plugins/spatial_editor_plugin.cpp @@ -8228,7 +8228,7 @@ msgstr "4 Näyttöruutua" #: editor/plugins/spatial_editor_plugin.cpp msgid "Gizmos" -msgstr "Muokkaimet" +msgstr "Vempaimet" #: editor/plugins/spatial_editor_plugin.cpp msgid "View Origin" @@ -8313,7 +8313,7 @@ msgstr "Jälki" #: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" -msgstr "Nimetön muokkain" +msgstr "Nimetön vempain" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create Mesh2D" @@ -8481,7 +8481,7 @@ msgstr "Lisää tekstuuri tiedostosta" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Add Frames from a Sprite Sheet" -msgstr "Lisää ruudut Sprite Sheetistä" +msgstr "Lisää ruudut sprite-arkista" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Insert Empty (Before)" @@ -8517,7 +8517,7 @@ msgstr "Valitse tai tyhjää kaikki ruudut" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Create Frames from Sprite Sheet" -msgstr "Luo ruudut Sprite Sheetistä" +msgstr "Luo ruudut sprite-arkista" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "SpriteFrames" @@ -11083,14 +11083,14 @@ msgstr "" "mukana vähintään yksi `/` merkki." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Näppäin " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "Fyysinen avain" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Näppäin " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Ohjaimen painike" diff --git a/editor/translations/fil.po b/editor/translations/fil.po index 44176ea6bc..6452afd85e 100644 --- a/editor/translations/fil.po +++ b/editor/translations/fil.po @@ -10636,11 +10636,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/fr.po b/editor/translations/fr.po index 872b22322e..5661d9bb62 100644 --- a/editor/translations/fr.po +++ b/editor/translations/fr.po @@ -11266,14 +11266,14 @@ msgstr "" "recherche doit inclure au moins un caractère `/`." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Touche " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "Touche physique" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Touche " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Bouton de joystick" diff --git a/editor/translations/ga.po b/editor/translations/ga.po index de8d178967..25b6ffc4eb 100644 --- a/editor/translations/ga.po +++ b/editor/translations/ga.po @@ -10617,11 +10617,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/gl.po b/editor/translations/gl.po index ff6fc36818..7d310fe7f9 100644 --- a/editor/translations/gl.po +++ b/editor/translations/gl.po @@ -11089,14 +11089,14 @@ msgstr "" "polo menos un carácter '/'." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Botón: " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Botón: " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Botón Joystick" diff --git a/editor/translations/he.po b/editor/translations/he.po index 9e41b7f9c4..094b9c7850 100644 --- a/editor/translations/he.po +++ b/editor/translations/he.po @@ -11249,14 +11249,14 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "מקש " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "מקש " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "" diff --git a/editor/translations/hi.po b/editor/translations/hi.po index 585fb5e33c..637ce36b91 100644 --- a/editor/translations/hi.po +++ b/editor/translations/hi.po @@ -14,13 +14,14 @@ # Bishwajeet Parhi <bishwajeet.techmaster@gmail.com>, 2020. # l4KKY <greenforcesave@gmail.com>, 2020. # harvinder rathor <harvinderr09@gmail.com>, 2021. +# Sumanyu Aggarwal <sumanyu.code@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-05-03 21:29+0000\n" -"Last-Translator: harvinder rathor <harvinderr09@gmail.com>\n" +"PO-Revision-Date: 2021-10-28 22:09+0000\n" +"Last-Translator: Sumanyu Aggarwal <sumanyu.code@gmail.com>\n" "Language-Team: Hindi <https://hosted.weblate.org/projects/godot-engine/godot/" "hi/>\n" "Language: hi\n" @@ -28,7 +29,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.7-dev\n" +"X-Generator: Weblate 4.9-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -383,7 +384,7 @@ msgstr "" #: editor/animation_track_editor.cpp #, fuzzy msgid "animation" -msgstr "कार्यों:" +msgstr "एनिमेशन" #: editor/animation_track_editor.cpp msgid "AnimationPlayer can't animate itself, only other players." @@ -3677,14 +3678,12 @@ msgid "Can't resolve the requested address." msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Can't connect to the mirror." -msgstr "कनेक्ट नहीं कर सकते।" +msgstr "शीशे से जोड़ नहीं सकते|" #: editor/export_template_manager.cpp -#, fuzzy msgid "No response from the mirror." -msgstr "कोई जवाब नहीं।" +msgstr "शीशे से कोई जवाब नहीं।" #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -10996,11 +10995,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/hr.po b/editor/translations/hr.po index a61ff60a0e..bc30be7c08 100644 --- a/editor/translations/hr.po +++ b/editor/translations/hr.po @@ -10692,11 +10692,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/hu.po b/editor/translations/hu.po index 3ceb60fa99..fbce7de381 100644 --- a/editor/translations/hu.po +++ b/editor/translations/hu.po @@ -17,13 +17,14 @@ # Újvári Marcell <mmarci72@gmail.com>, 2021. # Gergő Pistai <gergopistai@gmail.com>, 2021. # Misi <varady.misi@gmail.com>, 2021. +# Looky1173 <lgl1173and2006@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-10-09 16:52+0000\n" -"Last-Translator: Misi <varady.misi@gmail.com>\n" +"PO-Revision-Date: 2021-10-31 22:17+0000\n" +"Last-Translator: Looky1173 <lgl1173and2006@gmail.com>\n" "Language-Team: Hungarian <https://hosted.weblate.org/projects/godot-engine/" "godot/hu/>\n" "Language: hu\n" @@ -490,7 +491,7 @@ msgstr "Animáció - Kulcsok Mozgatása" #: editor/animation_track_editor.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Clipboard is empty!" -msgstr "" +msgstr "A vágólap üres!" #: editor/animation_track_editor.cpp msgid "Paste Tracks" @@ -1173,7 +1174,7 @@ msgstr "Köszönet a Godot közösségétől!" #: editor/editor_about.cpp editor/editor_node.cpp editor/project_manager.cpp msgid "Click to copy." -msgstr "" +msgstr "Kattints a másoláshoz." #: editor/editor_about.cpp msgid "Godot Engine contributors" @@ -1558,6 +1559,8 @@ msgstr "A fájl nem létezik." #: editor/editor_autoload_settings.cpp msgid "%s is an invalid path. Not in resource path (res://)." msgstr "" +"%s egy érvénytelen elérési útvonal. Nincs az erőforrás elérési útvonalában " +"(res://)." #: editor/editor_autoload_settings.cpp msgid "Add AutoLoad" @@ -1756,8 +1759,9 @@ msgid "Import Dock" msgstr "Dock importálása" #: editor/editor_feature_profile.cpp +#, fuzzy msgid "Allows to view and edit 3D scenes." -msgstr "" +msgstr "Lehetővé teszi a 3D jelenetek megtekintését és szerkesztését." #: editor/editor_feature_profile.cpp msgid "Allows to edit scripts using the integrated script editor." @@ -11019,14 +11023,14 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Kulcs " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Kulcs " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Joy gomb" diff --git a/editor/translations/id.po b/editor/translations/id.po index b45942a7c4..784409cddb 100644 --- a/editor/translations/id.po +++ b/editor/translations/id.po @@ -11169,14 +11169,14 @@ msgstr "" "mengandung paling tidak satu karakter `/`." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Kunci " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Kunci " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Tombol Joystick" diff --git a/editor/translations/is.po b/editor/translations/is.po index 0d4f9a00f5..4c9221925a 100644 --- a/editor/translations/is.po +++ b/editor/translations/is.po @@ -10757,11 +10757,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/it.po b/editor/translations/it.po index 8ec6f16734..5dfecbf0e8 100644 --- a/editor/translations/it.po +++ b/editor/translations/it.po @@ -66,8 +66,8 @@ msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-10-11 15:44+0000\n" -"Last-Translator: Luigi <luibass92@live.it>\n" +"PO-Revision-Date: 2021-10-24 20:52+0000\n" +"Last-Translator: Riteo Siuga <riteo@posteo.net>\n" "Language-Team: Italian <https://hosted.weblate.org/projects/godot-engine/" "godot/it/>\n" "Language: it\n" @@ -1948,7 +1948,7 @@ msgstr "Rendi attuale" #: editor/editor_feature_profile.cpp editor/editor_node.cpp #: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp msgid "Import" -msgstr "Importazione" +msgstr "Importa" #: editor/editor_feature_profile.cpp editor/project_export.cpp msgid "Export" @@ -11471,14 +11471,14 @@ msgstr "" "contenere almeno un carattere `/`." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Tasto " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Tasto " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Pulsante Joy" diff --git a/editor/translations/ja.po b/editor/translations/ja.po index 4a2075e20b..0f9ea94f57 100644 --- a/editor/translations/ja.po +++ b/editor/translations/ja.po @@ -11092,14 +11092,14 @@ msgstr "" "とも1つ必要です。" #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "キー " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "物理キー" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "キー " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "ゲームパッドのボタン" diff --git a/editor/translations/ka.po b/editor/translations/ka.po index 548e016719..1ce6deba73 100644 --- a/editor/translations/ka.po +++ b/editor/translations/ka.po @@ -11004,11 +11004,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/km.po b/editor/translations/km.po index 860accd0c5..e54ab26b7b 100644 --- a/editor/translations/km.po +++ b/editor/translations/km.po @@ -10596,11 +10596,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/ko.po b/editor/translations/ko.po index b9faa4762e..649e623c63 100644 --- a/editor/translations/ko.po +++ b/editor/translations/ko.po @@ -25,13 +25,15 @@ # Postive_ Cloud <postive12@gmail.com>, 2021. # dewcked <dewcked@protonmail.ch>, 2021. # SteamB23 <steamb23@outlook.com>, 2021. +# Jaemin Park <ppparkje@naver.com>, 2021. +# 신동규 <rlsl0422@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-10-07 10:25+0000\n" -"Last-Translator: SteamB23 <steamb23@outlook.com>\n" +"PO-Revision-Date: 2021-11-03 13:15+0000\n" +"Last-Translator: Myeongjin Lee <aranet100@gmail.com>\n" "Language-Team: Korean <https://hosted.weblate.org/projects/godot-engine/" "godot/ko/>\n" "Language: ko\n" @@ -522,18 +524,18 @@ msgid "" "Alternatively, use an import preset that imports animations to separate " "files." msgstr "" -"이 애니메이션은 불러온 씬에 속해 있습니다. 불러온 트랙의 변경사항은 저장되지 " +"이 애니메이션은 가져온 씬에 속해 있습니다. 가져온 트랙의 변경사항은 저장되지 " "않습니다.\n" "\n" -"저장 기능을 활성화하려면 커스텀 트랙을 추가하고, 씬의 불러오기기 설정으로 가" +"저장 기능을 활성화하려면 커스텀 트랙을 추가하고, 씬의 가져오기 설정으로 가" "서\n" "\"Animation > Storage\" 설정을 \"Files\"로, \"Animation > Keep Custom Tracks" "\" 설정을 활성화한 뒤, 다시 가져오십시오.\n" -"아니면 불러오기 프리셋으로 애니메이션을 별도의 파일로 불러올 수도 있습니다." +"아니면 가져오기 프리셋으로 애니메이션을 별도의 파일로 가져올 수도 있습니다." #: editor/animation_track_editor.cpp msgid "Warning: Editing imported animation" -msgstr "경고: 불러온 애니메이션을 편집하고 있음" +msgstr "경고: 가져온 애니메이션을 편집하고 있음" #: editor/animation_track_editor.cpp msgid "Select an AnimationPlayer node to create and edit animations." @@ -1740,7 +1742,7 @@ msgstr "파일시스템 독" #: editor/editor_feature_profile.cpp msgid "Import Dock" -msgstr "독 불러오기" +msgstr "독 가져오기" #: editor/editor_feature_profile.cpp msgid "Allows to view and edit 3D scenes." @@ -1773,7 +1775,7 @@ msgid "" "Allows to configure import settings for individual assets. Requires the " "FileSystem dock to function." msgstr "" -"개별 애셋에 대한 불러오기 설정을 구성할 수 있게 합니다. 작동하려면 파일시스" +"개별 애셋에 대한 가져오기 설정을 구성할 수 있게 합니다. 작동하려면 파일시스" "템 독이 필요합니다." #: editor/editor_feature_profile.cpp @@ -1830,15 +1832,15 @@ msgstr "노드와 클래스:" #: editor/editor_feature_profile.cpp msgid "File '%s' format is invalid, import aborted." -msgstr "파일 '%s' 형식이 올바르지 않습니다. 불러오기를 중단합니다." +msgstr "파일 '%s' 형식이 올바르지 않습니다. 가져오기를 중단합니다." #: editor/editor_feature_profile.cpp msgid "" "Profile '%s' already exists. Remove it first before importing, import " "aborted." msgstr "" -"프로필 '%s'이(가) 이미 있습니다. 불러오기 전에 이미 있는 프로필을 먼저 제거하" -"세요. 불러오기를 중단합니다." +"프로필 '%s'이(가) 이미 있습니다. 가져오기 전에 이미 있는 프로필을 먼저 제거하" +"세요. 가져오기를 중단합니다." #: editor/editor_feature_profile.cpp msgid "Error saving profile to path: '%s'." @@ -1871,7 +1873,7 @@ msgstr "현재 프로필로 설정" #: editor/editor_feature_profile.cpp editor/editor_node.cpp #: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp msgid "Import" -msgstr "불러오기" +msgstr "가져오기" #: editor/editor_feature_profile.cpp editor/project_export.cpp msgid "Export" @@ -1887,7 +1889,7 @@ msgstr "별도의 옵션:" #: editor/editor_feature_profile.cpp msgid "Create or import a profile to edit available classes and properties." -msgstr "사용 가능한 클래스와 속성을 편집하려면 프로필을 만들거나 불러오세요." +msgstr "사용 가능한 클래스와 속성을 편집하려면 프로필을 만들거나 가져오세요." #: editor/editor_feature_profile.cpp msgid "New profile name:" @@ -1899,7 +1901,7 @@ msgstr "Godot 기능 프로필" #: editor/editor_feature_profile.cpp msgid "Import Profile(s)" -msgstr "프로필 불러오기" +msgstr "프로필 가져오기" #: editor/editor_feature_profile.cpp msgid "Export Profile" @@ -2074,7 +2076,7 @@ msgstr "" #: editor/editor_file_system.cpp msgid "(Re)Importing Assets" -msgstr "애셋 (다시) 불러오기" +msgstr "애셋 (다시) 가져오는 중" #: editor/editor_help.cpp msgid "Top" @@ -2323,7 +2325,7 @@ msgstr "에디터 창에 변화가 있을 때마다 회전합니다." #: editor/editor_node.cpp msgid "Imported resources can't be saved." -msgstr "불러온 리소스를 저장할 수 없습니다." +msgstr "가져온 리소스를 저장할 수 없습니다." #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: editor/plugins/theme_editor_plugin.cpp @@ -2412,9 +2414,8 @@ msgstr "" "는 것 같습니다." #: editor/editor_node.cpp -#, fuzzy msgid "Could not save one or more scenes!" -msgstr "변환된 텍스쳐를 저장할 수 없음:" +msgstr "하나 이상의 장면을 저장할수 없습니다!" #: editor/editor_node.cpp msgid "Save All Scenes" @@ -2472,8 +2473,8 @@ msgid "" "Please read the documentation relevant to importing scenes to better " "understand this workflow." msgstr "" -"이 리소스는 불러온 씬에 속한 리소스이므로 편집할 수 없습니다.\n" -"이 워크플로를 이해하려면 씬 불러오기(Importing Scenes)와 관련된 문서를 읽어주" +"이 리소스는 가져온 씬에 속한 리소스이므로 편집할 수 없습니다.\n" +"이 워크플로를 이해하려면 씬 가져오기(Importing Scenes)와 관련된 문서를 읽어주" "세요." #: editor/editor_node.cpp @@ -2489,8 +2490,8 @@ msgid "" "This resource was imported, so it's not editable. Change its settings in the " "import panel and then re-import." msgstr "" -"이 리소스는 불러온 것이므로 편집할 수 없습니다. 불러오기 패널에서 설정을 변경" -"한 뒤 다시 불러오세요." +"이 리소스는 가져온 것이므로 편집할 수 없습니다. 가져오기 패널에서 설정을 변경" +"한 뒤 다시 가져오세요." #: editor/editor_node.cpp msgid "" @@ -2499,9 +2500,9 @@ msgid "" "Please read the documentation relevant to importing scenes to better " "understand this workflow." msgstr "" -"이 씬은 불러온 것이므로 변경사항이 유지되지 않습니다.\n" +"이 씬은 가져온 것이므로 변경사항이 유지되지 않습니다.\n" "이 씬을 인스턴스화하거나 상속하면 편집할 수 있습니다.\n" -"이 워크플로를 이해하려면 씬 불러오기(Importing Scenes)와 관련된 문서를 읽어주" +"이 워크플로를 이해하려면 씬 가져오기(Importing Scenes)와 관련된 문서를 읽어주" "세요." #: editor/editor_node.cpp @@ -2555,7 +2556,7 @@ msgstr "닫기 전에 '%s'에 변경사항을 저장하시겠습니까?" #: editor/editor_node.cpp msgid "%s no longer exists! Please specify a new save location." -msgstr "" +msgstr "%s은(는) 더 이상 존재하지 않습니다! 새 저장 위치를 지정해 주세요." #: editor/editor_node.cpp msgid "" @@ -2736,7 +2737,7 @@ msgid "" "Scene '%s' was automatically imported, so it can't be modified.\n" "To make changes to it, a new inherited scene can be created." msgstr "" -"씬 '%s'을(를) 자동으로 불러왔으므로 수정할 수 없습니다.\n" +"씬 '%s'을(를) 자동으로 가져왔으므로 수정할 수 없습니다.\n" "이 씬을 편집하려면 새로운 상속 씬을 만들어야 합니다." #: editor/editor_node.cpp @@ -2745,7 +2746,7 @@ msgid "" "open the scene, then save it inside the project path." msgstr "" "씬을 불러오는 중 오류가 발생했습니다. 씬은 프로젝트 경로 안에 있어야 합니다. " -"'불러오기'를 사용해서 씬을 열고, 그 씬을 프로젝트 경로 안에 저장하세요." +"'가져오기'를 사용해서 씬을 열고, 그 씬을 프로젝트 경로 안에 저장하세요." #: editor/editor_node.cpp msgid "Scene '%s' has broken dependencies:" @@ -3285,7 +3286,7 @@ msgstr "" #: editor/editor_node.cpp msgid "Import Templates From ZIP File" -msgstr "ZIP 파일에서 템플릿 불러오기" +msgstr "ZIP 파일에서 템플릿 가져오기" #: editor/editor_node.cpp msgid "Template Package" @@ -3636,7 +3637,7 @@ msgstr "%s를 눌러 정수로 반올림합니다. Shift를 눌러 좀 더 정 #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" -msgstr "불러올 노드 선택" +msgstr "가져올 노드 선택" #: editor/editor_sub_scene.cpp editor/project_manager.cpp msgid "Browse" @@ -3648,7 +3649,7 @@ msgstr "씬 경로:" #: editor/editor_sub_scene.cpp msgid "Import From Node:" -msgstr "노드에서 불러오기:" +msgstr "노드에서 가져오기:" #: editor/export_template_manager.cpp msgid "Open the folder containing these templates." @@ -3803,7 +3804,7 @@ msgstr "내보내기 템플릿 압축 푸는 중" #: editor/export_template_manager.cpp msgid "Importing:" -msgstr "불러오는 중:" +msgstr "가져오는 중:" #: editor/export_template_manager.cpp msgid "Remove templates for the version '%s'?" @@ -3921,14 +3922,14 @@ msgstr "즐겨찾기" #: editor/filesystem_dock.cpp msgid "Status: Import of file failed. Please fix file and reimport manually." msgstr "" -"상태: 파일 불러오기에 실패했습니다. 수동으로 파일을 수정하고 다시 불러와주세" +"상태: 파일 가져오기에 실패했습니다. 수동으로 파일을 수정하고 다시 가져와주세" "요." #: editor/filesystem_dock.cpp msgid "" "Importing has been disabled for this file, so it can't be opened for editing." msgstr "" -"이 파일에 대해 불러오기가 비활성화되었으며, 편집을 위해 열 수 없습니다." +"이 파일에 대해 가져오기가 비활성화되었으며, 편집을 위해 열 수 없습니다." #: editor/filesystem_dock.cpp msgid "Cannot move/rename resources root." @@ -4264,52 +4265,52 @@ msgstr "그룹 관리" #: editor/import/resource_importer_scene.cpp msgid "Import as Single Scene" -msgstr "단일 씬으로 불러오기" +msgstr "단일 씬으로 가져오기" #: editor/import/resource_importer_scene.cpp msgid "Import with Separate Animations" -msgstr "별도의 애니메이션으로 불러오기" +msgstr "별도의 애니메이션으로 가져오기" #: editor/import/resource_importer_scene.cpp msgid "Import with Separate Materials" -msgstr "별도의 머티리얼로 불러오기" +msgstr "별도의 머티리얼로 가져오기" #: editor/import/resource_importer_scene.cpp msgid "Import with Separate Objects" -msgstr "별도의 오브젝트로 불러오기" +msgstr "별도의 오브젝트로 가져오기" #: editor/import/resource_importer_scene.cpp msgid "Import with Separate Objects+Materials" -msgstr "별도의 오브젝트와 머티리얼로 불러오기" +msgstr "별도의 오브젝트와 머티리얼로 가져오기" #: editor/import/resource_importer_scene.cpp msgid "Import with Separate Objects+Animations" -msgstr "별도의 오브젝트와 애니메이션으로 불러오기" +msgstr "별도의 오브젝트와 애니메이션으로 가져오기" #: editor/import/resource_importer_scene.cpp msgid "Import with Separate Materials+Animations" -msgstr "별도의 머티리얼과 애니메이션으로 불러오기" +msgstr "별도의 머티리얼과 애니메이션으로 가져오기" #: editor/import/resource_importer_scene.cpp msgid "Import with Separate Objects+Materials+Animations" -msgstr "별도의 오브젝트, 머티리얼과 애니메이션으로 불러오기" +msgstr "별도의 오브젝트, 머티리얼과 애니메이션으로 가져오기" #: editor/import/resource_importer_scene.cpp msgid "Import as Multiple Scenes" -msgstr "여러 개의 씬으로 불러오기" +msgstr "여러 개의 씬으로 가져오기" #: editor/import/resource_importer_scene.cpp msgid "Import as Multiple Scenes+Materials" -msgstr "여러 개의 씬과 머티리얼로 불러오기" +msgstr "여러 개의 씬과 머티리얼로 가져오기" #: editor/import/resource_importer_scene.cpp #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Import Scene" -msgstr "씬 불러오기" +msgstr "씬 가져오기" #: editor/import/resource_importer_scene.cpp msgid "Importing Scene..." -msgstr "씬 불러오는 중..." +msgstr "씬 가져오는 중..." #: editor/import/resource_importer_scene.cpp msgid "Generating Lightmaps" @@ -4357,7 +4358,7 @@ msgstr "디폴트로 재설정" #: editor/import_dock.cpp msgid "Keep File (No Import)" -msgstr "파일 유지 (불러오기 없음)" +msgstr "파일 유지 (가져오기 없음)" #: editor/import_dock.cpp msgid "%d Files" @@ -4365,7 +4366,7 @@ msgstr "파일 %d개" #: editor/import_dock.cpp msgid "Set as Default for '%s'" -msgstr "'%s'을(를) 디폴트으로 설정" +msgstr "'%s'을(를) 디폴트로 설정" #: editor/import_dock.cpp msgid "Clear Default for '%s'" @@ -4373,7 +4374,7 @@ msgstr "'%s'을(를) 디폴트에서 지우기" #: editor/import_dock.cpp msgid "Reimport" -msgstr "다시 불러오기" +msgstr "다시 가져오기" #: editor/import_dock.cpp msgid "" @@ -4385,7 +4386,7 @@ msgstr "" #: editor/import_dock.cpp msgid "Import As:" -msgstr "다음 형식으로 불러오기:" +msgstr "다음 형식으로 가져오기:" #: editor/import_dock.cpp msgid "Preset" @@ -4393,11 +4394,11 @@ msgstr "프리셋" #: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" -msgstr "씬 저장, 다시 불러오기 및 다시 시작" +msgstr "씬 저장, 다시 가져오기 및 다시 시작" #: editor/import_dock.cpp msgid "Changing the type of an imported file requires editor restart." -msgstr "불러온 파일의 타입을 바꾸려면 에디터를 다시 시작해야 합니다." +msgstr "가져온 파일의 타입을 바꾸려면 에디터를 다시 시작해야 합니다." #: editor/import_dock.cpp msgid "" @@ -5271,7 +5272,7 @@ msgstr "전환 노드" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Import Animations..." -msgstr "애니메이션 불러오기..." +msgstr "애니메이션 가져오기..." #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Edit Node Filters" @@ -5355,7 +5356,7 @@ msgstr "실패함:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Bad download hash, assuming file has been tampered with." -msgstr "잘못된 다운로드 해시. 파일이 변조된 것 같아요." +msgstr "잘못된 다운로드 해시. 파일이 변조된 것 같습니다." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Expected:" @@ -5463,7 +5464,7 @@ msgstr "애셋 검색 (템플릿, 프로젝트, 및 데모 제외)" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Import..." -msgstr "불러오기..." +msgstr "가져오기..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Plugins..." @@ -6600,11 +6601,11 @@ msgstr "선택한 항목 제거" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Import from Scene (Ignore Transforms)" -msgstr "씬에서 불러오기 (변형 무시)" +msgstr "씬에서 가져오기 (변형 무시)" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Import from Scene (Apply Transforms)" -msgstr "씬에서 불러오기 (변형 적용)" +msgstr "씬에서 가져오기 (변형 적용)" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Update from Scene" @@ -7240,11 +7241,11 @@ msgstr "저장 중 오류" #: editor/plugins/script_editor_plugin.cpp msgid "Error importing theme." -msgstr "테마 불러오는 중 오류." +msgstr "테마 가져오는 중 오류." #: editor/plugins/script_editor_plugin.cpp msgid "Error Importing" -msgstr "불러오는 중 오류" +msgstr "가져오는 중 오류" #: editor/plugins/script_editor_plugin.cpp msgid "New Text File..." @@ -7279,7 +7280,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp msgid "Import Theme" -msgstr "테마 불러오기" +msgstr "테마 가져오기" #: editor/plugins/script_editor_plugin.cpp msgid "Error while saving theme" @@ -7336,12 +7337,10 @@ msgid "Move Down" msgstr "아래로 이동" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Next Script" msgstr "다음 스크립트" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Previous Script" msgstr "이전 스크립트" @@ -7384,7 +7383,7 @@ msgstr "테마" #: editor/plugins/script_editor_plugin.cpp msgid "Import Theme..." -msgstr "테마 불러오기..." +msgstr "테마 가져오기..." #: editor/plugins/script_editor_plugin.cpp msgid "Reload Theme" @@ -7759,9 +7758,8 @@ msgid "Left Orthogonal" msgstr "좌측 직교" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Left Perspective" -msgstr "원근" +msgstr "좌측 원근" #: editor/plugins/spatial_editor_plugin.cpp msgid "Right Orthogonal" @@ -8116,25 +8114,29 @@ msgid "Right View" msgstr "우측 뷰" #: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Orbit View Down" -msgstr "" +msgstr "선회 뷰 아래로" #: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Orbit View Left" -msgstr "" +msgstr "선회 뷰 왼쪽으로" #: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Orbit View Right" -msgstr "" +msgstr "선회 뷰 오른쪽으로" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy msgid "Orbit View Up" -msgstr "정면 뷰" +msgstr "선회 뷰 위로" #: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Orbit View 180" -msgstr "" +msgstr "선회 뷰 180으로" #: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" @@ -8592,15 +8594,15 @@ msgstr "현재 선택 {num}개" #: editor/plugins/theme_editor_plugin.cpp msgid "Nothing was selected for the import." -msgstr "불러올 것이 선택되지 않았습니다." +msgstr "가져올 것이 선택되지 않았습니다." #: editor/plugins/theme_editor_plugin.cpp msgid "Importing Theme Items" -msgstr "테마 항목을 불러오는 중" +msgstr "테마 항목을 가져오는 중" #: editor/plugins/theme_editor_plugin.cpp msgid "Importing items {n}/{n}" -msgstr "항목을 불러오는 중 {n}/{n}" +msgstr "항목 {n}/{n}을 가져오는 중" #: editor/plugins/theme_editor_plugin.cpp msgid "Updating the editor" @@ -8719,7 +8721,7 @@ msgstr "모든 테마 항목을 선택 해제합니다." #: editor/plugins/theme_editor_plugin.cpp msgid "Import Selected" -msgstr "선택된 항목 불러오기" +msgstr "선택된 항목 가져오기" #: editor/plugins/theme_editor_plugin.cpp msgid "" @@ -8727,7 +8729,7 @@ msgid "" "closing this window.\n" "Close anyway?" msgstr "" -"항목 불러오기 탭에 일부 항목이 선택되어 있습니다. 이 창을 닫으면 선택을 잃게 " +"항목 가져오기 탭에 일부 항목이 선택되어 있습니다. 이 창을 닫으면 선택을 잃게 " "됩니다.\n" "무시하고 닫으시겠습니까?" @@ -8737,7 +8739,7 @@ msgid "" "You can add a custom type or import a type with its items from another theme." msgstr "" "테마의 항목을 편집하려면 목록에서 테마 타입을 선택하세요.\n" -"커스텀 타입을 추가하거나 다른 테마의 항목과 함께 타입을 불러올 수 있습니다." +"커스텀 타입을 추가하거나 다른 테마의 항목과 함께 타입을 가져올 수 있습니다." #: editor/plugins/theme_editor_plugin.cpp msgid "Remove All Color Items" @@ -8769,7 +8771,7 @@ msgid "" "Add more items to it manually or by importing from another theme." msgstr "" "이 테마 타입은 비어 있습니다.\n" -"직접 또는 다른 테마에서 불러와서 테마에 더 많은 항목을 추가하세요." +"직접 또는 다른 테마에서 가져와서 테마에 더 많은 항목을 추가하세요." #: editor/plugins/theme_editor_plugin.cpp msgid "Add Color Item" @@ -8869,7 +8871,7 @@ msgstr "이전 이름:" #: editor/plugins/theme_editor_plugin.cpp msgid "Import Items" -msgstr "항목 불러오기" +msgstr "항목 가져오기" #: editor/plugins/theme_editor_plugin.cpp msgid "Default Theme" @@ -8949,7 +8951,7 @@ msgstr "항목 관리..." #: editor/plugins/theme_editor_plugin.cpp msgid "Add, remove, organize and import Theme items." -msgstr "테마 항목을 추가, 제거, 구성 및 불러옵니다." +msgstr "테마 항목을 추가, 제거, 구성 및 가져옵니다." #: editor/plugins/theme_editor_plugin.cpp msgid "Add Preview" @@ -9020,7 +9022,6 @@ msgid "Subitem 2" msgstr "하위 항목 2" #: editor/plugins/theme_editor_preview.cpp -#, fuzzy msgid "Has" msgstr "갖춤" @@ -9053,9 +9054,8 @@ msgid "Subtree" msgstr "하위 트리" #: editor/plugins/theme_editor_preview.cpp -#, fuzzy msgid "Has,Many,Options" -msgstr "많은,옵션,갖춤" +msgstr "갖춤,많은,옵션" #: editor/plugins/theme_editor_preview.cpp msgid "Invalid path, the PackedScene resource was probably moved or removed." @@ -10665,7 +10665,7 @@ msgstr "새 게임 프로젝트" #: editor/project_manager.cpp msgid "Imported Project" -msgstr "불러온 프로젝트" +msgstr "가져온 프로젝트" #: editor/project_manager.cpp msgid "Invalid project name." @@ -10721,11 +10721,11 @@ msgstr "프로젝트 이름 바꾸기" #: editor/project_manager.cpp msgid "Import Existing Project" -msgstr "기존 프로젝트 불러오기" +msgstr "기존 프로젝트 가져오기" #: editor/project_manager.cpp msgid "Import & Edit" -msgstr "불러오기 & 편집" +msgstr "가져오기 & 편집" #: editor/project_manager.cpp msgid "Create New Project" @@ -10880,8 +10880,8 @@ msgid "" "Can't run project: Assets need to be imported.\n" "Please edit the project to trigger the initial import." msgstr "" -"프로젝트를 실행할 수 없음: 애셋을 불러와야 합니다.\n" -"프로젝트를 편집해서 최초 불러오기가 실행되도록 하세요." +"프로젝트를 실행할 수 없음: 애셋을 가져와야 합니다.\n" +"프로젝트를 편집해서 최초 가져오기가 실행되도록 하세요." #: editor/project_manager.cpp msgid "Are you sure to run %d projects at once?" @@ -10962,7 +10962,7 @@ msgstr "새 프로젝트" #: editor/project_manager.cpp msgid "Import Project" -msgstr "프로젝트 불러오기" +msgstr "프로젝트 가져오기" #: editor/project_manager.cpp msgid "Remove Project" @@ -11019,14 +11019,14 @@ msgstr "" "상 포함시켜야 합니다." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "키 " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "물리 키" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "키 " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "조이스틱 버튼" @@ -11144,7 +11144,7 @@ msgstr "이벤트 추가" #: editor/project_settings_editor.cpp msgid "Button" -msgstr "Button" +msgstr "버튼" #: editor/project_settings_editor.cpp msgid "Left Button." @@ -11348,7 +11348,7 @@ msgstr "플러그인(Plugin)" #: editor/project_settings_editor.cpp msgid "Import Defaults" -msgstr "디폴트 불러오기" +msgstr "디폴트 가져오기" #: editor/property_editor.cpp msgid "Preset..." @@ -12247,7 +12247,7 @@ msgstr "형식" #: editor/script_editor_debugger.cpp msgid "Usage" -msgstr "사용" +msgstr "사용례" #: editor/script_editor_debugger.cpp msgid "Misc" diff --git a/editor/translations/lt.po b/editor/translations/lt.po index 404f9f5096..a4d205e4b1 100644 --- a/editor/translations/lt.po +++ b/editor/translations/lt.po @@ -10989,11 +10989,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/lv.po b/editor/translations/lv.po index 68dd8370bd..91d9e7e3d2 100644 --- a/editor/translations/lv.po +++ b/editor/translations/lv.po @@ -8,13 +8,14 @@ # Anonymous <noreply@weblate.org>, 2020. # StiLins <aigars.skilins@gmail.com>, 2020. # Rihards Kubilis <oldcar@inbox.lv>, 2020. +# M E <gruffy7932@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-11-15 12:43+0000\n" -"Last-Translator: Rihards Kubilis <oldcar@inbox.lv>\n" +"PO-Revision-Date: 2021-11-03 13:53+0000\n" +"Last-Translator: M E <gruffy7932@gmail.com>\n" "Language-Team: Latvian <https://hosted.weblate.org/projects/godot-engine/" "godot/lv/>\n" "Language: lv\n" @@ -23,7 +24,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n % 10 == 0 || n % 100 >= 11 && n % 100 <= " "19) ? 0 : ((n % 10 == 1 && n % 100 != 11) ? 1 : 2);\n" -"X-Generator: Weblate 4.4-dev\n" +"X-Generator: Weblate 4.9-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -47,7 +48,7 @@ msgstr "Nederīga ievade %i (nav padota) izteikumā" #: core/math/expression.cpp msgid "self can't be used because instance is null (not passed)" -msgstr "'self' nevar izmantot, jo instance ir 'null' (nav padota)" +msgstr "'self' nevar izmantot, jo instance ir tukša (nav norādīta)" #: core/math/expression.cpp msgid "Invalid operands to operator %s, %s and %s." @@ -373,13 +374,12 @@ msgstr "Anim ievietot" #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp msgid "node '%s'" -msgstr "" +msgstr "mezgls '%s'" #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp -#, fuzzy msgid "animation" -msgstr "Funkcijas:" +msgstr "animācija" #: editor/animation_track_editor.cpp msgid "AnimationPlayer can't animate itself, only other players." @@ -388,7 +388,7 @@ msgstr "AnimationPlayer nevar animēt pats sevi, tikai citus spēlētājus." #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp msgid "property '%s'" -msgstr "" +msgstr "vērtība '%s'" #: editor/animation_track_editor.cpp msgid "Anim Create & Insert" @@ -477,7 +477,7 @@ msgstr "Anim Pārvietot Atslēgas" #: editor/animation_track_editor.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Clipboard is empty!" -msgstr "" +msgstr "Starpliktuve ir tukša!" #: editor/animation_track_editor.cpp msgid "Paste Tracks" @@ -595,12 +595,11 @@ msgstr "Doties uz Nākamo Soli" #: editor/animation_track_editor.cpp msgid "Go to Previous Step" -msgstr "Doties uz Iepriekšējo Soli" +msgstr "Doties uz iepriekšejo soli" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Apply Reset" -msgstr "Atiestatīt tālummaiņu" +msgstr "Pielietot atiestatīšanu" #: editor/animation_track_editor.cpp msgid "Optimize Animation" @@ -619,9 +618,8 @@ msgid "Use Bezier Curves" msgstr "Izmanto Bezjē Līknes" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Create RESET Track(s)" -msgstr "Ielīmēt celiņus" +msgstr "Izveidot atiestatīšanas celiņu(s)" #: editor/animation_track_editor.cpp msgid "Anim. Optimizer" @@ -788,9 +786,8 @@ msgid "Method in target node must be specified." msgstr "Metodi mērķa mezglā nepieciešams specificēt." #: editor/connections_dialog.cpp -#, fuzzy msgid "Method name must be a valid identifier." -msgstr "Metodi mērķa mezglā nepieciešams specificēt." +msgstr "Metodes nosaukumam jābūt korektam identifikātoram." #: editor/connections_dialog.cpp msgid "" @@ -910,7 +907,7 @@ msgstr "Savieno..." #: editor/connections_dialog.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Disconnect" -msgstr "Atvieno" +msgstr "Atvienot" #: editor/connections_dialog.cpp msgid "Connect a Signal to a Method" @@ -930,9 +927,8 @@ msgid "Signals" msgstr "Signāli" #: editor/connections_dialog.cpp -#, fuzzy msgid "Filter signals" -msgstr "No Signāla:" +msgstr "Filtrēt signālus" #: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" @@ -941,16 +937,15 @@ msgstr "" #: editor/connections_dialog.cpp msgid "Disconnect All" -msgstr "Atvienot Visu" +msgstr "Atvienot visu" #: editor/connections_dialog.cpp msgid "Edit..." msgstr "Rediģēt..." #: editor/connections_dialog.cpp -#, fuzzy msgid "Go to Method" -msgstr "Doties Uz Metodi" +msgstr "Doties uz Metodi" #: editor/create_dialog.cpp msgid "Change %s Type" @@ -966,11 +961,11 @@ msgstr "Izveidot Jaunu %s" #: editor/create_dialog.cpp editor/plugins/asset_library_editor_plugin.cpp msgid "No results for \"%s\"." -msgstr "" +msgstr "Nav rezultātu \"%s\"." #: editor/create_dialog.cpp editor/property_selector.cpp msgid "No description available for %s." -msgstr "" +msgstr "Apraksts nav pieejams priekš %s." #: editor/create_dialog.cpp editor/editor_file_dialog.cpp #: editor/filesystem_dock.cpp @@ -1070,15 +1065,16 @@ msgid "Owners Of:" msgstr "Īpašnieki:" #: editor/dependency_editor.cpp -#, fuzzy msgid "" "Remove the selected files from the project? (Cannot be undone.)\n" "Depending on your filesystem configuration, the files will either be moved " "to the system trash or deleted permanently." -msgstr "Vai noņemt izvēlētos failus no projekta? (Netiks atjaunoti)" +msgstr "" +"Vai noņemt izvēlētos failus no projekta? (Netiks atjaunoti)\n" +"Atšķirībā no failu sistēmas konfigurācijas, faili tiks aizvākti uz sistēmas " +"atkritni vai dzēsti pilnībā." #: editor/dependency_editor.cpp -#, fuzzy msgid "" "The files being removed are required by other resources in order for them to " "work.\n" @@ -1086,9 +1082,11 @@ msgid "" "Depending on your filesystem configuration, the files will either be moved " "to the system trash or deleted permanently." msgstr "" -"Faili, kurus Jūs vēlaties noņemt ir nepieciešami citiem resursiem lai tie " +"Faili, kurus Jūs vēlaties noņemt ir nepieciešami citiem resursiem, lai tie " "varētu strādāt.\n" -"Tik un tā noņemt tos? (Nevar atsaukt)" +"Tik un tā noņemt tos? (Nevar atsaukt)\n" +"Atšķirībā no jūsu failu sistēmas konfigurācijas, faili tiks aizvākti uz " +"sistēmas atkritni vai dzēsti pilnībā." #: editor/dependency_editor.cpp msgid "Cannot remove:" @@ -1160,7 +1158,7 @@ msgstr "Paldies no Godot sabiedrības!" #: editor/editor_about.cpp editor/editor_node.cpp editor/project_manager.cpp msgid "Click to copy." -msgstr "" +msgstr "Klikšķini, lai kopētu." #: editor/editor_about.cpp msgid "Godot Engine contributors" @@ -1198,14 +1196,12 @@ msgid "Gold Sponsors" msgstr "Zelta Sponsori" #: editor/editor_about.cpp -#, fuzzy msgid "Silver Sponsors" -msgstr "Sudraba Donors" +msgstr "Sudraba Sponsors" #: editor/editor_about.cpp -#, fuzzy msgid "Bronze Sponsors" -msgstr "Bronzas Donors" +msgstr "Bronzas Sponsors" #: editor/editor_about.cpp msgid "Mini Sponsors" @@ -1260,41 +1256,36 @@ msgid "Licenses" msgstr "Licences" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Error opening asset file for \"%s\" (not in ZIP format)." -msgstr "Kļūme atverot arhīvu failu, nav ZIP formātā." +msgstr "Kļūme atverot pakotnes failu \"%s\" (nav ZIP formātā)." #: editor/editor_asset_installer.cpp -#, fuzzy msgid "%s (already exists)" -msgstr "%s (Jau Eksistē)" +msgstr "%s (jau eksistē)" #: editor/editor_asset_installer.cpp msgid "Contents of asset \"%s\" - %d file(s) conflict with your project:" -msgstr "" +msgstr "Pakotnes \"%s\" saturs - %d fails(-i) konfliktē ar tavu projektu:" #: editor/editor_asset_installer.cpp msgid "Contents of asset \"%s\" - No files conflict with your project:" -msgstr "" +msgstr "Pakotnes \"%s\" saturs - Neviens fails nekonfliktē ar tavu projektu:" #: editor/editor_asset_installer.cpp msgid "Uncompressing Assets" msgstr "Nekompresēti Līdzekļi" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "The following files failed extraction from asset \"%s\":" -msgstr "Sekojošie faili netika izvilkti no paketes:" +msgstr "Sekojošie faili netika izvilkti no paketes \"%s\":" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "(and %s more files)" -msgstr "Un %s vēl faili." +msgstr "(un vēl %s faili)" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Asset \"%s\" installed successfully!" -msgstr "Pakete instalēta sekmīgi!" +msgstr "Pakete \"%s\" instalēta sekmīgi!" #: editor/editor_asset_installer.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -1306,7 +1297,6 @@ msgid "Install" msgstr "Ieinstalēt" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Asset Installer" msgstr "Paketes Instalētājs" @@ -1360,7 +1350,7 @@ msgstr "Velc un atlaid, lai pārkārtotu." #: editor/editor_audio_buses.cpp msgid "Solo" -msgstr "Solo" +msgstr "Individuāli" #: editor/editor_audio_buses.cpp msgid "Mute" @@ -1371,9 +1361,8 @@ msgid "Bypass" msgstr "Šunts" #: editor/editor_audio_buses.cpp -#, fuzzy msgid "Bus Options" -msgstr "Kopnes iestatījumi" +msgstr "Kopnes Iestatījumi" #: editor/editor_audio_buses.cpp editor/filesystem_dock.cpp #: editor/plugins/animation_player_editor_plugin.cpp editor/scene_tree_dock.cpp @@ -1382,7 +1371,7 @@ msgstr "Izveidot Dublikātu" #: editor/editor_audio_buses.cpp msgid "Reset Volume" -msgstr "" +msgstr "Atiestatīt Skaļumu" #: editor/editor_audio_buses.cpp msgid "Delete Effect" @@ -1398,47 +1387,47 @@ msgstr "Pievienot Audio Kopni" #: editor/editor_audio_buses.cpp msgid "Master bus can't be deleted!" -msgstr "" +msgstr "Master kopni nevar idzēst!" #: editor/editor_audio_buses.cpp msgid "Delete Audio Bus" -msgstr "" +msgstr "Izdzēst Audio Kopni" #: editor/editor_audio_buses.cpp msgid "Duplicate Audio Bus" -msgstr "" +msgstr "Dubultot Audio Kopni" #: editor/editor_audio_buses.cpp msgid "Reset Bus Volume" -msgstr "" +msgstr "Atiestatīt Kopnes Skaļumu" #: editor/editor_audio_buses.cpp msgid "Move Audio Bus" -msgstr "" +msgstr "Pārvietot Audio Kopni" #: editor/editor_audio_buses.cpp msgid "Save Audio Bus Layout As..." -msgstr "" +msgstr "Saglabāt Audio Kopņu Izkārtojumu Kā...." #: editor/editor_audio_buses.cpp msgid "Location for New Layout..." -msgstr "" +msgstr "Jaunā izkārtojuma lokācija..." #: editor/editor_audio_buses.cpp msgid "Open Audio Bus Layout" -msgstr "" +msgstr "Atvērt audio kopnes izkārtojumu" #: editor/editor_audio_buses.cpp msgid "There is no '%s' file." -msgstr "" +msgstr "Fails '%s' neeksistē." #: editor/editor_audio_buses.cpp editor/plugins/canvas_item_editor_plugin.cpp msgid "Layout" -msgstr "" +msgstr "Izkārtojums" #: editor/editor_audio_buses.cpp msgid "Invalid file, not an audio bus layout." -msgstr "" +msgstr "Nepareizs fails, nav audio kopnes izkārtojuma." #: editor/editor_audio_buses.cpp msgid "Error saving file: %s" @@ -1450,7 +1439,7 @@ msgstr "Pievienot Kopni" #: editor/editor_audio_buses.cpp msgid "Add a new Audio Bus to this layout." -msgstr "" +msgstr "Pievienot jaunu Audio Kopni šim izkārtojumam." #: editor/editor_audio_buses.cpp editor/editor_resource_picker.cpp #: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp @@ -1480,7 +1469,7 @@ msgstr "Ielādēt Kopnes Izkārtojuma noklusējumu." #: editor/editor_audio_buses.cpp msgid "Create a new Bus Layout." -msgstr "" +msgstr "Izveidot jaunu Kopnes izkārtojumu." #: editor/editor_autoload_settings.cpp msgid "Invalid name." @@ -1506,27 +1495,27 @@ msgstr "" #: editor/editor_autoload_settings.cpp msgid "Keyword cannot be used as an autoload name." -msgstr "" +msgstr "Atslēgvārdu nedrīkst lietot kā auto-ielādes vārdu." #: editor/editor_autoload_settings.cpp msgid "Autoload '%s' already exists!" -msgstr "" +msgstr "Auto-ielāde '%s' jau eksistē!" #: editor/editor_autoload_settings.cpp msgid "Rename Autoload" -msgstr "" +msgstr "Pārsaukt Auto-ielādi" #: editor/editor_autoload_settings.cpp msgid "Toggle AutoLoad Globals" -msgstr "" +msgstr "Pārslēgt Auto-ielādes Globālās vērtības" #: editor/editor_autoload_settings.cpp msgid "Move Autoload" -msgstr "" +msgstr "Pārvietot Auto-ielādi" #: editor/editor_autoload_settings.cpp msgid "Remove Autoload" -msgstr "" +msgstr "Izdzēst Auto-ielādi" #: editor/editor_autoload_settings.cpp editor/editor_plugin_settings.cpp msgid "Enable" @@ -1534,34 +1523,34 @@ msgstr "Iespējot" #: editor/editor_autoload_settings.cpp msgid "Rearrange Autoloads" -msgstr "" +msgstr "Pārkārtot Auto-ielādes" #: editor/editor_autoload_settings.cpp msgid "Can't add autoload:" -msgstr "" +msgstr "Nevar pievienot Auto-ielādi:" #: editor/editor_autoload_settings.cpp msgid "%s is an invalid path. File does not exist." -msgstr "" +msgstr "%s ir nederīgs ceļš. Fails neeksistē." #: editor/editor_autoload_settings.cpp msgid "%s is an invalid path. Not in resource path (res://)." -msgstr "" +msgstr "%s ir nederīgs ceļš. Nav resursu ceļā (res://)." #: editor/editor_autoload_settings.cpp msgid "Add AutoLoad" -msgstr "" +msgstr "Pievienot Auto-ielādi" #: editor/editor_autoload_settings.cpp editor/editor_file_dialog.cpp #: editor/editor_plugin_settings.cpp #: editor/plugins/animation_tree_editor_plugin.cpp #: editor/script_create_dialog.cpp scene/gui/file_dialog.cpp msgid "Path:" -msgstr "" +msgstr "Ceļš:" #: editor/editor_autoload_settings.cpp msgid "Node Name:" -msgstr "" +msgstr "Mezgla Vārds:" #: editor/editor_autoload_settings.cpp editor/editor_help_search.cpp #: editor/editor_plugin_settings.cpp editor/editor_profiler.cpp @@ -1571,11 +1560,11 @@ msgstr "Nosaukums" #: editor/editor_autoload_settings.cpp msgid "Global Variable" -msgstr "" +msgstr "Globāls mainīgais" #: editor/editor_data.cpp msgid "Paste Params" -msgstr "" +msgstr "Ielīmēt Parametrus" #: editor/editor_data.cpp msgid "Updating Scene" @@ -1583,11 +1572,11 @@ msgstr "Atjaunina Ainu" #: editor/editor_data.cpp msgid "Storing local changes..." -msgstr "" +msgstr "Saglabā lokālās izmaiņas..." #: editor/editor_data.cpp msgid "Updating scene..." -msgstr "" +msgstr "Atjauno ainu...." #: editor/editor_data.cpp editor/editor_resource_picker.cpp msgid "[empty]" @@ -1599,57 +1588,61 @@ msgstr "[nesaglabāts]" #: editor/editor_dir_dialog.cpp msgid "Please select a base directory first." -msgstr "" +msgstr "Lūdzu vispirms izvēlaties bāzes mapi." #: editor/editor_dir_dialog.cpp msgid "Choose a Directory" -msgstr "" +msgstr "Izvēlēties Direktoriju" #: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp #: editor/filesystem_dock.cpp editor/project_manager.cpp #: scene/gui/file_dialog.cpp msgid "Create Folder" -msgstr "" +msgstr "Izveidot mapi" #: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp #: editor/editor_plugin_settings.cpp editor/filesystem_dock.cpp #: editor/plugins/theme_editor_plugin.cpp editor/project_export.cpp #: modules/visual_script/visual_script_editor.cpp scene/gui/file_dialog.cpp msgid "Name:" -msgstr "" +msgstr "Nosaukums:" #: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp #: editor/filesystem_dock.cpp scene/gui/file_dialog.cpp msgid "Could not create folder." -msgstr "" +msgstr "Neizdevās izveidot mapi." #: editor/editor_dir_dialog.cpp msgid "Choose" -msgstr "" +msgstr "Izvēlaties" #: editor/editor_export.cpp msgid "Storing File:" -msgstr "" +msgstr "Faila saglabāšana:" #: editor/editor_export.cpp msgid "No export template found at the expected path:" -msgstr "" +msgstr "Norādītajā ceļā nav atrasta eksporta veidne:" #: editor/editor_export.cpp msgid "Packing" -msgstr "" +msgstr "Pako" #: editor/editor_export.cpp msgid "" "Target platform requires 'ETC' texture compression for GLES2. Enable 'Import " "Etc' in Project Settings." msgstr "" +"Mērķa platforma pieprasa 'ETC' tekstūru saspiešanu priekš GLES2. Iespējo " +"'Importēt Etc' projekta iestatījumos." #: editor/editor_export.cpp msgid "" "Target platform requires 'ETC2' texture compression for GLES3. Enable " "'Import Etc 2' in Project Settings." msgstr "" +"Mērķa platforma pieprasa 'ETC2' tekstūru saspiešanu priekš GLES3. Iespējo " +"'Importēt Etc 2' projekta iestatījumos." #: editor/editor_export.cpp msgid "" @@ -1658,18 +1651,26 @@ msgid "" "Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback " "Enabled'." msgstr "" +"Mērķa platforma pieprasa 'ETC' tekstūru saspiešanu priekš draivera atkāpes " +"uz GLES2.\n" +"Iespējo 'Importēt Etc' projekta iestatījumos vai atslēdz 'Draivera atkāpe " +"ieslēgta'." #: editor/editor_export.cpp msgid "" "Target platform requires 'PVRTC' texture compression for GLES2. Enable " "'Import Pvrtc' in Project Settings." msgstr "" +"Mērķa platforma pieprasa 'PVRTV' tekstūru saspiešanu priekš GLES2. Iespējo " +"'Importēt Pvrtc' projekta iestatījumos." #: editor/editor_export.cpp msgid "" "Target platform requires 'ETC2' or 'PVRTC' texture compression for GLES3. " "Enable 'Import Etc 2' or 'Import Pvrtc' in Project Settings." msgstr "" +"Mērķa platforma pieprasa 'ETC2' vai 'PVRTC' tekstūru saspiešanu priekš " +"GLES3. Iespējo 'Importēt Etc 2' vai 'Importēt Pvrtc' projekta iestatījumos." #: editor/editor_export.cpp msgid "" @@ -1678,26 +1679,30 @@ msgid "" "Enable 'Import Pvrtc' in Project Settings, or disable 'Driver Fallback " "Enabled'." msgstr "" +"Mērķa platforma pieprasa 'PVRTC' tekstūru saspiešanu priekš draivera atkāpes " +"uz GLES2.\n" +"Iespējo 'Importēt Pvrtc' projekta iestatījumos vai atslēdz 'Draivera atkāpe " +"ieslēgta'." #: editor/editor_export.cpp platform/android/export/export_plugin.cpp #: platform/iphone/export/export.cpp platform/javascript/export/export.cpp #: platform/osx/export/export.cpp platform/uwp/export/export.cpp msgid "Custom debug template not found." -msgstr "" +msgstr "Pielāgots atkļūdošanas šablons nav atrasts." #: editor/editor_export.cpp platform/android/export/export_plugin.cpp #: platform/iphone/export/export.cpp platform/javascript/export/export.cpp #: platform/osx/export/export.cpp platform/uwp/export/export.cpp msgid "Custom release template not found." -msgstr "" +msgstr "Pielāgots relīzes sablons nav atrasts." #: editor/editor_export.cpp platform/javascript/export/export.cpp msgid "Template file not found:" -msgstr "" +msgstr "Šablona fails nav atrasts:" #: editor/editor_export.cpp msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB." -msgstr "" +msgstr "Pie 32-bitu eksportēšanas, iepakotais PCK nevar būt lielāks par 4GB." #: editor/editor_feature_profile.cpp msgid "3D Editor" @@ -1705,87 +1710,90 @@ msgstr "3D Redaktors" #: editor/editor_feature_profile.cpp msgid "Script Editor" -msgstr "" +msgstr "Skripta redaktors" #: editor/editor_feature_profile.cpp msgid "Asset Library" -msgstr "" +msgstr "Līdzekļu bibliotēka" #: editor/editor_feature_profile.cpp msgid "Scene Tree Editing" -msgstr "" +msgstr "Ainas koka rediģēšana" #: editor/editor_feature_profile.cpp msgid "Node Dock" -msgstr "" +msgstr "Mezgla doks" #: editor/editor_feature_profile.cpp msgid "FileSystem Dock" -msgstr "" +msgstr "Failu sistēmas doks" #: editor/editor_feature_profile.cpp msgid "Import Dock" -msgstr "" +msgstr "Importēt doku" #: editor/editor_feature_profile.cpp msgid "Allows to view and edit 3D scenes." -msgstr "" +msgstr "Atļauj skatīt un rediģēt visas 3D ainas." #: editor/editor_feature_profile.cpp msgid "Allows to edit scripts using the integrated script editor." -msgstr "" +msgstr "Atļauj rediģēt skriptus izmantojot iebūvēto skriptu redaktoru." #: editor/editor_feature_profile.cpp msgid "Provides built-in access to the Asset Library." -msgstr "" +msgstr "Nodrošina iebūvēto piekļuvi līdzekļu bibliotēkai." #: editor/editor_feature_profile.cpp msgid "Allows editing the node hierarchy in the Scene dock." -msgstr "" +msgstr "Atļauj mezgla hierarhijas rediģēšanu ainu dokā." #: editor/editor_feature_profile.cpp msgid "" "Allows to work with signals and groups of the node selected in the Scene " "dock." -msgstr "" +msgstr "Atļauj strādāt ar signāliem un grupām izvēlētā mezgla ainu dokā." #: editor/editor_feature_profile.cpp msgid "Allows to browse the local file system via a dedicated dock." -msgstr "" +msgstr "Atļauj pārlūkot lokālo failu sistēmu atvēlētajā dokā." #: editor/editor_feature_profile.cpp msgid "" "Allows to configure import settings for individual assets. Requires the " "FileSystem dock to function." msgstr "" +"Atļauj konfigurēt importēšanas iestatījumus individuāliem līdzekļiem. " +"Pieprasa failu sistēmas doku, lai funkcionētu." #: editor/editor_feature_profile.cpp msgid "(current)" -msgstr "" +msgstr "(current) / pašreizējs" #: editor/editor_feature_profile.cpp msgid "(none)" -msgstr "" +msgstr "(neviens)" #: editor/editor_feature_profile.cpp msgid "Remove currently selected profile, '%s'? Cannot be undone." -msgstr "" +msgstr "Noņemt pašreiz izvēlēto profilu '%s' ? Nevar atsaukt." #: editor/editor_feature_profile.cpp msgid "Profile must be a valid filename and must not contain '.'" msgstr "" +"Profila nosaukumam jābūt derīgam faila nosaukumam un tas nedrīkst iekļaut '.'" #: editor/editor_feature_profile.cpp msgid "Profile with this name already exists." -msgstr "" +msgstr "Profils ar šādu nosaukumu jau eksistē." #: editor/editor_feature_profile.cpp msgid "(Editor Disabled, Properties Disabled)" -msgstr "" +msgstr "(Redaktors atslēgts, iestatījumi atslēgti)" #: editor/editor_feature_profile.cpp msgid "(Properties Disabled)" -msgstr "" +msgstr "(Iestatījumi atslēgti)" #: editor/editor_feature_profile.cpp msgid "(Editor Disabled)" @@ -1797,53 +1805,51 @@ msgstr "Klases Iespējas:" #: editor/editor_feature_profile.cpp msgid "Enable Contextual Editor" -msgstr "" +msgstr "Iespējot kontekstuālo redaktoru" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Class Properties:" -msgstr "Ieslēgtie Mainīgie:" +msgstr "Klases iestatījumi:" #: editor/editor_feature_profile.cpp msgid "Main Features:" -msgstr "" +msgstr "Galvenās iespējas:" #: editor/editor_feature_profile.cpp msgid "Nodes and Classes:" -msgstr "" +msgstr "Mezgli un klases:" #: editor/editor_feature_profile.cpp msgid "File '%s' format is invalid, import aborted." -msgstr "" +msgstr "Faila '%s' formāts ir nepareizs, importēšana atcelta." #: editor/editor_feature_profile.cpp msgid "" "Profile '%s' already exists. Remove it first before importing, import " "aborted." msgstr "" +"Profils '%s' jau eksistē. Vispirms to noņem pirms importēšanas. Importēšana " +"atcelta." #: editor/editor_feature_profile.cpp msgid "Error saving profile to path: '%s'." msgstr "Kļūda saglabājot profilu uz ceļu: '%s'." #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Reset to Default" -msgstr "Ielādēt Noklusējumu" +msgstr "Atiestatīt uz noklusējumu" #: editor/editor_feature_profile.cpp msgid "Current Profile:" -msgstr "" +msgstr "Pašreizējais profils:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Create Profile" -msgstr "Izveidot" +msgstr "Izveidot profilu" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Remove Profile" -msgstr "Noņemt" +msgstr "Noņemt profilu" #: editor/editor_feature_profile.cpp msgid "Available Profiles:" @@ -1856,52 +1862,52 @@ msgstr "Aktualizēt" #: editor/editor_feature_profile.cpp editor/editor_node.cpp #: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp msgid "Import" -msgstr "" +msgstr "Importēt" #: editor/editor_feature_profile.cpp editor/project_export.cpp msgid "Export" -msgstr "" +msgstr "Eksportēt" #: editor/editor_feature_profile.cpp msgid "Configure Selected Profile:" -msgstr "" +msgstr "Konfigurēt izvēlēto profilu:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Extra Options:" -msgstr "Klases Iespējas:" +msgstr "Papildus iespējas:" #: editor/editor_feature_profile.cpp msgid "Create or import a profile to edit available classes and properties." msgstr "" +"Izveidot vai importēt profilu, lai rediģētu pieejamās klases un iestatījumus." #: editor/editor_feature_profile.cpp msgid "New profile name:" -msgstr "" +msgstr "Jaunais profila nosaukums:" #: editor/editor_feature_profile.cpp msgid "Godot Feature Profile" -msgstr "" +msgstr "Godot iespēju profils" #: editor/editor_feature_profile.cpp msgid "Import Profile(s)" -msgstr "" +msgstr "Importēt profilu(s)" #: editor/editor_feature_profile.cpp msgid "Export Profile" -msgstr "" +msgstr "Eksportēt profilu" #: editor/editor_feature_profile.cpp msgid "Manage Editor Feature Profiles" -msgstr "" +msgstr "Pārvaldīt redaktora iespēju profilus" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Select Current Folder" -msgstr "" +msgstr "Izvēlēties pašreizējo mapi" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "File exists, overwrite?" -msgstr "" +msgstr "Fails eksistē. Pārrakstīt ?" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Select This Folder" @@ -1909,7 +1915,7 @@ msgstr "Izvēlēties Šo Mapi" #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "Copy Path" -msgstr "" +msgstr "Kopēt celiņu" #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "Open in File Manager" @@ -1918,40 +1924,40 @@ msgstr "Atvērt Failu Pārlūkā" #: editor/editor_file_dialog.cpp editor/editor_node.cpp #: editor/filesystem_dock.cpp editor/project_manager.cpp msgid "Show in File Manager" -msgstr "" +msgstr "Parādīt failu menedžerī" #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "New Folder..." -msgstr "" +msgstr "Jauna mape..." #: editor/editor_file_dialog.cpp editor/find_in_files.cpp #: editor/plugins/version_control_editor_plugin.cpp msgid "Refresh" -msgstr "" +msgstr "Atsvaidzināt" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "All Recognized" -msgstr "" +msgstr "Viss atpazīts" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "All Files (*)" -msgstr "" +msgstr "Visi faili (*)" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Open a File" -msgstr "" +msgstr "Atvērt failu" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Open File(s)" -msgstr "" +msgstr "Atvērt failu(s)" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Open a Directory" -msgstr "" +msgstr "Atvērt mapi" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Open a File or Directory" -msgstr "" +msgstr "Atvērt failu vai mapi" #: editor/editor_file_dialog.cpp editor/editor_node.cpp #: editor/editor_resource_picker.cpp editor/import_defaults_editor.cpp @@ -1959,47 +1965,47 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/file_dialog.cpp msgid "Save" -msgstr "" +msgstr "Saglabāt" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Save a File" -msgstr "" +msgstr "Saglabāt failu" #: editor/editor_file_dialog.cpp msgid "Go Back" -msgstr "" +msgstr "Doties atpakaļ" #: editor/editor_file_dialog.cpp msgid "Go Forward" -msgstr "" +msgstr "Doties tālāk" #: editor/editor_file_dialog.cpp msgid "Go Up" -msgstr "" +msgstr "Doties augšup" #: editor/editor_file_dialog.cpp msgid "Toggle Hidden Files" -msgstr "" +msgstr "Pārslēgt slēptos failus" #: editor/editor_file_dialog.cpp msgid "Toggle Favorite" -msgstr "" +msgstr "Pārslēgt favorītu" #: editor/editor_file_dialog.cpp msgid "Toggle Mode" -msgstr "" +msgstr "Pārslēgt režīmu" #: editor/editor_file_dialog.cpp msgid "Focus Path" -msgstr "" +msgstr "Fokusa ceļš" #: editor/editor_file_dialog.cpp msgid "Move Favorite Up" -msgstr "" +msgstr "Pārvietot favorītu augšup" #: editor/editor_file_dialog.cpp msgid "Move Favorite Down" -msgstr "" +msgstr "Pārvietot favorītu lejup" #: editor/editor_file_dialog.cpp msgid "Go to previous folder." @@ -2011,7 +2017,7 @@ msgstr "Doties uz nākamo mapi." #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Go to parent folder." -msgstr "" +msgstr "Atvērt mātes mapi." #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Refresh files." @@ -2019,63 +2025,65 @@ msgstr "Atjaunot failus." #: editor/editor_file_dialog.cpp msgid "(Un)favorite current folder." -msgstr "" +msgstr "Pievienot/noņemt pašreizējo mapi pie/no favorītiem." #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Toggle the visibility of hidden files." -msgstr "" +msgstr "Pārslēgt slēpto failu redzamību." #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "View items as a grid of thumbnails." -msgstr "" +msgstr "Skatīt vienumus kā režģi ar sīktēliem." #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "View items as a list." -msgstr "" +msgstr "Skatīt lietas kā sarakstu." #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Directories & Files:" -msgstr "" +msgstr "Mapes & Faili:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" -msgstr "" +msgstr "Priekškatījums:" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "File:" -msgstr "" +msgstr "Fails:" #: editor/editor_file_system.cpp msgid "ScanSources" -msgstr "" +msgstr "ScanSources / Skenēšanas Avoti" #: editor/editor_file_system.cpp msgid "" "There are multiple importers for different types pointing to file %s, import " "aborted" msgstr "" +"Ir vairāki importētāji dažādiem tipiem, kas norāda uz failu %s, importēšana " +"atcelta" #: editor/editor_file_system.cpp msgid "(Re)Importing Assets" -msgstr "" +msgstr "(Re)Importē līdzekļus" #: editor/editor_help.cpp msgid "Top" -msgstr "" +msgstr "Virsotne" #: editor/editor_help.cpp msgid "Class:" -msgstr "" +msgstr "Klase:" #: editor/editor_help.cpp editor/scene_tree_editor.cpp #: editor/script_create_dialog.cpp msgid "Inherits:" -msgstr "" +msgstr "Manto:" #: editor/editor_help.cpp msgid "Inherited by:" -msgstr "" +msgstr "Manto uz:" #: editor/editor_help.cpp msgid "Description" @@ -2083,15 +2091,15 @@ msgstr "Apraksts" #: editor/editor_help.cpp msgid "Online Tutorials" -msgstr "" +msgstr "Online Pamācības" #: editor/editor_help.cpp msgid "Properties" -msgstr "" +msgstr "Iestatījumi" #: editor/editor_help.cpp msgid "override:" -msgstr "" +msgstr "pārrakstīšana:" #: editor/editor_help.cpp msgid "default:" @@ -2099,15 +2107,15 @@ msgstr "pēc noklusējuma:" #: editor/editor_help.cpp msgid "Methods" -msgstr "" +msgstr "Metodes" #: editor/editor_help.cpp msgid "Theme Properties" -msgstr "" +msgstr "Motīva iestatījumi" #: editor/editor_help.cpp msgid "Enumerations" -msgstr "" +msgstr "Uzskaitījumi" #: editor/editor_help.cpp editor/plugins/theme_editor_plugin.cpp msgid "Constants" @@ -2115,17 +2123,19 @@ msgstr "Konstantes" #: editor/editor_help.cpp msgid "Property Descriptions" -msgstr "Mainīgo Apraksts" +msgstr "Iestatījumu apraksti" #: editor/editor_help.cpp msgid "(value)" -msgstr "" +msgstr "(vērtība)" #: editor/editor_help.cpp msgid "" "There is currently no description for this property. Please help us by " "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +"Pašreiz šim mainīgajam nav apraksta. Lūdzu, palīdzi mums [color=$color][url=" +"$url]izveidot to[/url][/color]!" #: editor/editor_help.cpp msgid "Method Descriptions" @@ -2136,31 +2146,33 @@ msgid "" "There is currently no description for this method. Please help us by [color=" "$color][url=$url]contributing one[/url][/color]!" msgstr "" +"Pašreiz šai metodei nav apraksta. Lūdzu, palīdzi mums [color=$color][url=" +"$url]pievienojot vienu[/url][/color]!" #: editor/editor_help_search.cpp editor/editor_node.cpp #: editor/plugins/script_editor_plugin.cpp msgid "Search Help" -msgstr "" +msgstr "Meklēt Palīdzību" #: editor/editor_help_search.cpp msgid "Case Sensitive" -msgstr "" +msgstr "Reģistrjūtīgs" #: editor/editor_help_search.cpp msgid "Show Hierarchy" -msgstr "" +msgstr "Rādīt Hierarhiju" #: editor/editor_help_search.cpp msgid "Display All" -msgstr "" +msgstr "Parādīt Visu" #: editor/editor_help_search.cpp msgid "Classes Only" -msgstr "" +msgstr "Tikai Klases" #: editor/editor_help_search.cpp msgid "Methods Only" -msgstr "" +msgstr "Tikai Metodes" #: editor/editor_help_search.cpp msgid "Signals Only" @@ -2168,27 +2180,27 @@ msgstr "Tikai Signāli" #: editor/editor_help_search.cpp msgid "Constants Only" -msgstr "" +msgstr "Tikai Konstantes" #: editor/editor_help_search.cpp msgid "Properties Only" -msgstr "" +msgstr "Tikai Iestatījumus" #: editor/editor_help_search.cpp msgid "Theme Properties Only" -msgstr "" +msgstr "Tikai Motīva Iestatījumus" #: editor/editor_help_search.cpp msgid "Member Type" -msgstr "" +msgstr "Dalībnieka veids" #: editor/editor_help_search.cpp msgid "Class" -msgstr "" +msgstr "Klase" #: editor/editor_help_search.cpp msgid "Method" -msgstr "" +msgstr "Metode" #: editor/editor_help_search.cpp editor/plugins/script_text_editor.cpp msgid "Signal" @@ -2196,32 +2208,32 @@ msgstr "Signāls" #: editor/editor_help_search.cpp msgid "Constant" -msgstr "" +msgstr "Konstante" #: editor/editor_help_search.cpp msgid "Property" -msgstr "" +msgstr "Mainīgais" #: editor/editor_help_search.cpp msgid "Theme Property" -msgstr "" +msgstr "Motīva Mainīgais" #: editor/editor_inspector.cpp editor/project_settings_editor.cpp msgid "Property:" -msgstr "" +msgstr "Parametrs:" #: editor/editor_inspector.cpp editor/scene_tree_dock.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Set %s" -msgstr "" +msgstr "Likt %s" #: editor/editor_inspector.cpp msgid "Set Multiple:" -msgstr "" +msgstr "Uzlikt vairākus:" #: editor/editor_log.cpp msgid "Output:" -msgstr "" +msgstr "Izeja:" #: editor/editor_log.cpp editor/plugins/tile_map_editor_plugin.cpp msgid "Copy Selection" @@ -2235,57 +2247,57 @@ msgstr "Kopēt Izvēlēto" #: modules/gdnative/gdnative_library_editor_plugin.cpp scene/gui/line_edit.cpp #: scene/gui/text_edit.cpp msgid "Clear" -msgstr "" +msgstr "Notītīt" #: editor/editor_log.cpp msgid "Clear Output" -msgstr "" +msgstr "Notīrīt Izeju" #: editor/editor_network_profiler.cpp editor/editor_node.cpp #: editor/editor_profiler.cpp msgid "Stop" -msgstr "" +msgstr "Pārtraukt" #: editor/editor_network_profiler.cpp editor/editor_profiler.cpp #: editor/plugins/animation_state_machine_editor.cpp editor/rename_dialog.cpp msgid "Start" -msgstr "" +msgstr "Sākt" #: editor/editor_network_profiler.cpp msgid "%s/s" -msgstr "" +msgstr "%s/s" #: editor/editor_network_profiler.cpp msgid "Down" -msgstr "" +msgstr "Lejup" #: editor/editor_network_profiler.cpp msgid "Up" -msgstr "" +msgstr "Augšup" #: editor/editor_network_profiler.cpp editor/editor_node.cpp msgid "Node" -msgstr "" +msgstr "Mezgls" #: editor/editor_network_profiler.cpp msgid "Incoming RPC" -msgstr "" +msgstr "Ienākošs RPC" #: editor/editor_network_profiler.cpp msgid "Incoming RSET" -msgstr "" +msgstr "Ienākošs RSET" #: editor/editor_network_profiler.cpp msgid "Outgoing RPC" -msgstr "" +msgstr "Izejošs RPC" #: editor/editor_network_profiler.cpp msgid "Outgoing RSET" -msgstr "" +msgstr "Izejošs RSET" #: editor/editor_node.cpp editor/project_manager.cpp msgid "New Window" -msgstr "" +msgstr "Jauns logs" #: editor/editor_node.cpp msgid "" @@ -2293,98 +2305,107 @@ msgid "" "Update Continuously is enabled, which can increase power usage. Click to " "disable it." msgstr "" +"Griežas, kad redaktora logs atjauninas.\n" +"Atjaunināt konstanti ir iespējots, kas var palielināt jaudas izmantošanu. " +"Klikšķini, lai atslēgtu." #: editor/editor_node.cpp msgid "Spins when the editor window redraws." -msgstr "" +msgstr "Griežas, kad redaktora logs atjauninas." #: editor/editor_node.cpp msgid "Imported resources can't be saved." -msgstr "" +msgstr "Importētie resursi nevar tikt saglabāti." #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: editor/plugins/theme_editor_plugin.cpp #: modules/gltf/editor_scene_exporter_gltf_plugin.cpp scene/gui/dialogs.cpp msgid "OK" -msgstr "" +msgstr "Labi" #: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp msgid "Error saving resource!" -msgstr "" +msgstr "Kļūda saglabājot resursu!" #: editor/editor_node.cpp msgid "" "This resource can't be saved because it does not belong to the edited scene. " "Make it unique first." msgstr "" +"Šo resursu nevar saglabāt, jo tas nepieder rediģētajai ainai. Vispirms " +"uztaisi to unikālu." #: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp msgid "Save Resource As..." -msgstr "" +msgstr "Saglabāt Resursu Kā..." #: editor/editor_node.cpp msgid "Can't open file for writing:" -msgstr "" +msgstr "Nevar atvērt failu rakstīšanai:" #: editor/editor_node.cpp msgid "Requested file format unknown:" -msgstr "" +msgstr "Pieprasītais faila formāts ir nezināms:" #: editor/editor_node.cpp msgid "Error while saving." -msgstr "" +msgstr "Kļūda saglabājot." #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp msgid "Can't open '%s'. The file could have been moved or deleted." -msgstr "" +msgstr "Nevar atvērt '%s'. Fails ir pārvietots vai dzēsts." #: editor/editor_node.cpp msgid "Error while parsing '%s'." -msgstr "" +msgstr "Kļūda pārsienot '%s'." #: editor/editor_node.cpp msgid "Unexpected end of file '%s'." -msgstr "" +msgstr "Negaidītas faila beigas '%s'." #: editor/editor_node.cpp msgid "Missing '%s' or its dependencies." -msgstr "" +msgstr "Iztrūkst '%s' vai tā atkarības." #: editor/editor_node.cpp msgid "Error while loading '%s'." -msgstr "" +msgstr "Kļūda ielādējot '%s'." #: editor/editor_node.cpp msgid "Saving Scene" -msgstr "" +msgstr "Saglabā Ainu" #: editor/editor_node.cpp msgid "Analyzing" -msgstr "" +msgstr "Analizē" #: editor/editor_node.cpp msgid "Creating Thumbnail" -msgstr "" +msgstr "Izveido sīktēlu" #: editor/editor_node.cpp msgid "This operation can't be done without a tree root." -msgstr "" +msgstr "Nevar veikt šo darbību bez koka cilmes." #: editor/editor_node.cpp msgid "" "This scene can't be saved because there is a cyclic instancing inclusion.\n" "Please resolve it and then attempt to save again." msgstr "" +"Šo ainu nevar saglabāt, jo ir konstatēta cikliska instancēšanas cilpa.\n" +"Lūdzu, atrisini to un tad mēgini saglabāt ainu vēlreiz." #: editor/editor_node.cpp msgid "" "Couldn't save scene. Likely dependencies (instances or inheritance) couldn't " "be satisfied." msgstr "" +"Nevar saglabāt ainu. Drošivien atkarības (instances vai mantojumi) ir " +"kļūdainas." #: editor/editor_node.cpp msgid "Could not save one or more scenes!" -msgstr "" +msgstr "Nevar saglabāt vienu vai vairākas ainas!" #: editor/editor_node.cpp msgid "Save All Scenes" @@ -2392,29 +2413,31 @@ msgstr "Saglabāt Visas Ainas" #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" -msgstr "" +msgstr "Nevar pārrakstīt ainu, kas joprojām ir atvērta!" #: editor/editor_node.cpp msgid "Can't load MeshLibrary for merging!" -msgstr "" +msgstr "Nevarēja ielādēt tīklu bibliotēku sapludināšanai!" #: editor/editor_node.cpp msgid "Error saving MeshLibrary!" -msgstr "" +msgstr "Kļūda saglabājot tīkla bibliotēku!" #: editor/editor_node.cpp msgid "Can't load TileSet for merging!" -msgstr "" +msgstr "Nevar ielādēt flīžu karti sapludināšanai!" #: editor/editor_node.cpp msgid "Error saving TileSet!" -msgstr "" +msgstr "Kļūda saglabājot flīžu komplektu!" #: editor/editor_node.cpp msgid "" "An error occurred while trying to save the editor layout.\n" "Make sure the editor's user data path is writable." msgstr "" +"Notika gļūda saglabājot redaktora izkārtojumu.\n" +"Pārliecinies, ka redaktora lietotāja datu mape ir rakstāma." #: editor/editor_node.cpp msgid "" @@ -2425,11 +2448,11 @@ msgstr "" #: editor/editor_node.cpp msgid "Layout name not found!" -msgstr "" +msgstr "Izkārtojuma nosaukums nav atrasts!" #: editor/editor_node.cpp msgid "Restored the Default layout to its base settings." -msgstr "" +msgstr "Noklusējuma izkārtojums atjaunots uz bāzes iestatījumiem." #: editor/editor_node.cpp msgid "" @@ -2467,23 +2490,23 @@ msgstr "" #: editor/editor_node.cpp msgid "There is no defined scene to run." -msgstr "" +msgstr "Nav definēta aina, kuru palaist." #: editor/editor_node.cpp msgid "Save scene before running..." -msgstr "" +msgstr "Saglabā ainu pirms palaišanas..." #: editor/editor_node.cpp msgid "Could not start subprocess!" -msgstr "" +msgstr "Nevar palaist sub-procesu!" #: editor/editor_node.cpp editor/filesystem_dock.cpp msgid "Open Scene" -msgstr "" +msgstr "Atvērt ainu" #: editor/editor_node.cpp msgid "Open Base Scene" -msgstr "" +msgstr "Atvērt bāzes ainu" #: editor/editor_node.cpp msgid "Quick Open..." @@ -2491,23 +2514,23 @@ msgstr "Ātri Atvērt..." #: editor/editor_node.cpp msgid "Quick Open Scene..." -msgstr "" +msgstr "Ātri atvērt ainu..." #: editor/editor_node.cpp msgid "Quick Open Script..." -msgstr "" +msgstr "ātri atvērt skriptu..." #: editor/editor_node.cpp msgid "Save & Close" -msgstr "" +msgstr "Saglabāt & aizvērt" #: editor/editor_node.cpp msgid "Save changes to '%s' before closing?" -msgstr "" +msgstr "Saglabāt izmaiņas '%s' pirms aizvēršanas ?" #: editor/editor_node.cpp msgid "%s no longer exists! Please specify a new save location." -msgstr "" +msgstr "%s vairs neeksistē! Lūdzu norādi jaunu saglabāšanas lokāciju." #: editor/editor_node.cpp msgid "" @@ -2523,43 +2546,43 @@ msgstr "" #: editor/editor_node.cpp msgid "Save Scene As..." -msgstr "" +msgstr "Saglabāt ainu kā..." #: editor/editor_node.cpp modules/gltf/editor_scene_exporter_gltf_plugin.cpp msgid "This operation can't be done without a scene." -msgstr "" +msgstr "Šo operāciju nevar veikt bez ainas." #: editor/editor_node.cpp msgid "Export Mesh Library" -msgstr "" +msgstr "Ekportēt tīkla bibliotēku" #: editor/editor_node.cpp msgid "This operation can't be done without a root node." -msgstr "" +msgstr "Šī darbība nevar tikt veikta bez cilmes mezgla." #: editor/editor_node.cpp msgid "Export Tile Set" -msgstr "" +msgstr "Eksportēt flīžu kopumu" #: editor/editor_node.cpp msgid "This operation can't be done without a selected node." -msgstr "" +msgstr "Šo darbību nevar veikt bez izvēlēta mezgla." #: editor/editor_node.cpp msgid "Current scene not saved. Open anyway?" -msgstr "" +msgstr "Pašreizējā aina nav saglabāta. Vienalga atvērt ?" #: editor/editor_node.cpp msgid "Can't undo while mouse buttons are pressed." -msgstr "" +msgstr "Nevar atgriezt, kad peles pogas ir nospiestas." #: editor/editor_node.cpp msgid "Nothing to undo." -msgstr "" +msgstr "Nav ko atgriezt." #: editor/editor_node.cpp msgid "Undo: %s" -msgstr "" +msgstr "Atgriezts: %s" #: editor/editor_node.cpp msgid "Can't redo while mouse buttons are pressed." @@ -2575,12 +2598,11 @@ msgstr "" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." -msgstr "" +msgstr "Nevar pārlādēt ainu, kas nav bijusi saglabāta." #: editor/editor_node.cpp -#, fuzzy msgid "Reload Saved Scene" -msgstr "Atvērt Aizvērto Ainu" +msgstr "Pārlādēt saglabāto ainu" #: editor/editor_node.cpp msgid "" @@ -2590,49 +2612,52 @@ msgstr "" #: editor/editor_node.cpp msgid "Quick Run Scene..." -msgstr "" +msgstr "Ātri palaist ainu..." #: editor/editor_node.cpp msgid "Quit" -msgstr "" +msgstr "Iziet" #: editor/editor_node.cpp msgid "Yes" -msgstr "" +msgstr "Jā" #: editor/editor_node.cpp msgid "Exit the editor?" -msgstr "" +msgstr "Iziet no redaktora?" #: editor/editor_node.cpp msgid "Open Project Manager?" -msgstr "" +msgstr "Atvērt projektu menedžeri ?" #: editor/editor_node.cpp msgid "Save & Quit" -msgstr "" +msgstr "Saglabāt & iziet" #: editor/editor_node.cpp msgid "Save changes to the following scene(s) before quitting?" -msgstr "" +msgstr "Saglabāt izmaiņas sekojošai ainai(-ām) pirms iziešanas ?" #: editor/editor_node.cpp msgid "Save changes to the following scene(s) before opening Project Manager?" msgstr "" +"Saglabāt izmaiņas sekojošai ainai(-ām) pirms projektu menedžera atvēršanas ?" #: editor/editor_node.cpp msgid "" "This option is deprecated. Situations where refresh must be forced are now " "considered a bug. Please report." msgstr "" +"Šī iespēja in novecojusi. Situācijas, kad atsvaidzināšana ir jāveic " +"piespiedu kārtā, ir uzskatāma par kļūdu, lūdzu ziņojiet." #: editor/editor_node.cpp msgid "Pick a Main Scene" -msgstr "" +msgstr "Izvēlēties galveno ainu" #: editor/editor_node.cpp msgid "Close Scene" -msgstr "" +msgstr "Aizvērt ainu" #: editor/editor_node.cpp msgid "Reopen Closed Scene" @@ -2644,11 +2669,11 @@ msgstr "" #: editor/editor_node.cpp msgid "Unable to find script field for addon plugin at: '%s'." -msgstr "" +msgstr "Nevarēja atrast skripta lauku spraudnim: '%s'." #: editor/editor_node.cpp msgid "Unable to load addon script from path: '%s'." -msgstr "" +msgstr "Nevarēja ielādēt spraudņa skriptu no: '%s'." #: editor/editor_node.cpp msgid "" @@ -2665,6 +2690,7 @@ msgstr "" #: editor/editor_node.cpp msgid "Unable to load addon script from path: '%s' Script is not in tool mode." msgstr "" +"Nevarēja ielādēt spraudņā skriptu no mapes: '%s' Skripts nav rīka režīmā." #: editor/editor_node.cpp msgid "" @@ -2680,11 +2706,11 @@ msgstr "" #: editor/editor_node.cpp msgid "Scene '%s' has broken dependencies:" -msgstr "" +msgstr "Ainai '%s' ir bojātas atkarības:" #: editor/editor_node.cpp msgid "Clear Recent Scenes" -msgstr "" +msgstr "Notīrīt nesenās ainas" #: editor/editor_node.cpp msgid "" @@ -2709,25 +2735,25 @@ msgstr "" #: editor/editor_node.cpp msgid "Save Layout" -msgstr "" +msgstr "Saglabāt izkārtojumu" #: editor/editor_node.cpp msgid "Delete Layout" -msgstr "" +msgstr "Dzēst izkārtojumu" #: editor/editor_node.cpp editor/import_dock.cpp #: editor/script_create_dialog.cpp msgid "Default" -msgstr "" +msgstr "Noklusējuma" #: editor/editor_node.cpp editor/editor_resource_picker.cpp #: editor/plugins/script_editor_plugin.cpp editor/property_editor.cpp msgid "Show in FileSystem" -msgstr "" +msgstr "Parādīt failu sistēmā" #: editor/editor_node.cpp msgid "Play This Scene" -msgstr "" +msgstr "Spēlēt šo ainu" #: editor/editor_node.cpp msgid "Close Tab" @@ -2739,11 +2765,11 @@ msgstr "Atcelt Cilnes Aizvēršanu" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp msgid "Close Other Tabs" -msgstr "" +msgstr "Aizvērt pārējās cilnes" #: editor/editor_node.cpp msgid "Close Tabs to the Right" -msgstr "" +msgstr "Aizvērt cilnes pa labi" #: editor/editor_node.cpp msgid "Close All Tabs" @@ -2751,23 +2777,23 @@ msgstr "Aizvērt Visas Cilnes" #: editor/editor_node.cpp msgid "Switch Scene Tab" -msgstr "" +msgstr "Pārslēgt ainas cilni" #: editor/editor_node.cpp msgid "%d more files or folders" -msgstr "" +msgstr "%d vēl faili vai mapes" #: editor/editor_node.cpp msgid "%d more folders" -msgstr "" +msgstr "%s vēl mapes" #: editor/editor_node.cpp msgid "%d more files" -msgstr "" +msgstr "%d vēl faili" #: editor/editor_node.cpp msgid "Dock Position" -msgstr "" +msgstr "Doka pozīcija" #: editor/editor_node.cpp msgid "Distraction Free Mode" @@ -2779,15 +2805,15 @@ msgstr "" #: editor/editor_node.cpp msgid "Add a new scene." -msgstr "" +msgstr "Pievienot jaunu ainu." #: editor/editor_node.cpp msgid "Scene" -msgstr "" +msgstr "Aina" #: editor/editor_node.cpp msgid "Go to previously opened scene." -msgstr "" +msgstr "Iet uz iepriekš atvērto ainu." #: editor/editor_node.cpp msgid "Copy Text" @@ -2795,15 +2821,15 @@ msgstr "Kopēt Tekstu" #: editor/editor_node.cpp msgid "Next tab" -msgstr "" +msgstr "Nākamā cilne" #: editor/editor_node.cpp msgid "Previous tab" -msgstr "" +msgstr "Iepriekšējā cilne" #: editor/editor_node.cpp msgid "Filter Files..." -msgstr "" +msgstr "Filtrēt failus..." #: editor/editor_node.cpp msgid "Operations with scene files." @@ -2823,15 +2849,15 @@ msgstr "" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp msgid "Open Recent" -msgstr "" +msgstr "Atvērt nesenu" #: editor/editor_node.cpp msgid "Save Scene" -msgstr "" +msgstr "Saglabāt ainu" #: editor/editor_node.cpp msgid "Convert To..." -msgstr "" +msgstr "Konvertēt Uz..." #: editor/editor_node.cpp msgid "MeshLibrary..." @@ -2844,12 +2870,12 @@ msgstr "" #: editor/editor_node.cpp editor/plugins/script_text_editor.cpp #: scene/gui/line_edit.cpp scene/gui/text_edit.cpp msgid "Undo" -msgstr "" +msgstr "Atsaukt" #: editor/editor_node.cpp editor/plugins/script_text_editor.cpp #: scene/gui/line_edit.cpp scene/gui/text_edit.cpp msgid "Redo" -msgstr "" +msgstr "Pārtaisīt" #: editor/editor_node.cpp msgid "Miscellaneous project or scene-wide tools." @@ -2858,31 +2884,31 @@ msgstr "" #: editor/editor_node.cpp editor/project_manager.cpp #: editor/script_create_dialog.cpp msgid "Project" -msgstr "" +msgstr "Projekts" #: editor/editor_node.cpp msgid "Project Settings..." -msgstr "" +msgstr "Projekta iestatjumi..." #: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp msgid "Version Control" -msgstr "" +msgstr "Versiju Kontrole" #: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp msgid "Set Up Version Control" -msgstr "" +msgstr "Uzstādīt Versiju Kontroli" #: editor/editor_node.cpp msgid "Shut Down Version Control" -msgstr "" +msgstr "Izbeigt Versiju Kontroli" #: editor/editor_node.cpp msgid "Export..." -msgstr "" +msgstr "Eksportēt..." #: editor/editor_node.cpp msgid "Install Android Build Template..." -msgstr "" +msgstr "Instalēt Android būves šablonu..." #: editor/editor_node.cpp msgid "Open Project Data Folder" @@ -2890,28 +2916,28 @@ msgstr "Atvērt Projekta Datu Mapi" #: editor/editor_node.cpp editor/plugins/tile_set_editor_plugin.cpp msgid "Tools" -msgstr "" +msgstr "Rīki" #: editor/editor_node.cpp msgid "Orphan Resource Explorer..." -msgstr "" +msgstr "Bāreņu resursu pārlūks..." #: editor/editor_node.cpp msgid "Reload Current Project" -msgstr "" +msgstr "Pārlādēt pašreizējo projektu" #: editor/editor_node.cpp msgid "Quit to Project List" -msgstr "" +msgstr "Iziet uz projektu sarakstu" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: editor/project_export.cpp msgid "Debug" -msgstr "" +msgstr "Atkļūdot" #: editor/editor_node.cpp msgid "Deploy with Remote Debug" -msgstr "" +msgstr "Palaist ar tālvadības atkļūdošanu" #: editor/editor_node.cpp msgid "" @@ -2922,10 +2948,16 @@ msgid "" "mobile device).\n" "You don't need to enable it to use the GDScript debugger locally." msgstr "" +"Kad šī opcija ir ieslēgta, izmantojot viena klikšķa palaišanu, tā liks " +"spēlei savienoties ar šī datora IP adresi, lai pašreizējais projekts varētu " +"tik atkļūdots attālināti.\n" +"Šī opcija ir paredzēta izmantošanai tālvadības atkļūdošanai (parasti ar " +"mobilu ierīci).\n" +"Jums tā nav jāieslēdz, lai izmantotu GDScript atkļūdotāju lokāli." #: editor/editor_node.cpp msgid "Small Deploy with Network Filesystem" -msgstr "" +msgstr "Mazā palaišana ar tīkla failu sistēmu" #: editor/editor_node.cpp msgid "" @@ -2936,10 +2968,15 @@ msgid "" "On Android, deploying will use the USB cable for faster performance. This " "option speeds up testing for projects with large assets." msgstr "" +"Kad šī opcija ir ieslēgta, izmantojot viena klikšķa palaišanu uz Android, tā " +"eksportēs tikai spēles palaišanas failu bez projekta datiem.\n" +"Projekta failu sistēma tiks nodrošināta attālināti, caur internetu.\n" +"Uz Android, palaišana izmantos USB kabeli, lai nodrošinātu ātrāku " +"izpildījumu. Šī opcija paātrina projektu testēšanu ar milzīgiem resursiem." #: editor/editor_node.cpp msgid "Visible Collision Shapes" -msgstr "" +msgstr "Redzamas sadursmes formas" #: editor/editor_node.cpp msgid "" @@ -2949,7 +2986,7 @@ msgstr "" #: editor/editor_node.cpp msgid "Visible Navigation" -msgstr "" +msgstr "Redzama navigācija" #: editor/editor_node.cpp msgid "" @@ -2959,7 +2996,7 @@ msgstr "" #: editor/editor_node.cpp msgid "Synchronize Scene Changes" -msgstr "" +msgstr "Sinhronizēt ainas izmaiņas" #: editor/editor_node.cpp msgid "" @@ -2971,7 +3008,7 @@ msgstr "" #: editor/editor_node.cpp msgid "Synchronize Script Changes" -msgstr "" +msgstr "Sinhronizēt skripta izmaiņas" #: editor/editor_node.cpp msgid "" @@ -2983,108 +3020,107 @@ msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp msgid "Editor" -msgstr "" +msgstr "Redaktors" #: editor/editor_node.cpp msgid "Editor Settings..." -msgstr "" +msgstr "Redaktora iestatījumi..." #: editor/editor_node.cpp msgid "Editor Layout" -msgstr "" +msgstr "Redaktora izkārtojums" #: editor/editor_node.cpp msgid "Take Screenshot" -msgstr "" +msgstr "Uzņemt Ekrānšāviņu" #: editor/editor_node.cpp msgid "Screenshots are stored in the Editor Data/Settings Folder." -msgstr "" +msgstr "Ekrānšāviņi tiek saglabāti redaktora datu / iestatījumu mapē." #: editor/editor_node.cpp msgid "Toggle Fullscreen" -msgstr "" +msgstr "Pārslēgt Pilnekrānu" #: editor/editor_node.cpp msgid "Toggle System Console" -msgstr "" +msgstr "Pārslēgt sistēmas konsoli" #: editor/editor_node.cpp msgid "Open Editor Data/Settings Folder" -msgstr "" +msgstr "Atvērt redaktora datu / iestatījumu mapi" #: editor/editor_node.cpp msgid "Open Editor Data Folder" -msgstr "" +msgstr "Atvērt redaktora datu mapi" #: editor/editor_node.cpp msgid "Open Editor Settings Folder" -msgstr "" +msgstr "Atvērt redaktora iestatījumu mapi" #: editor/editor_node.cpp msgid "Manage Editor Features..." -msgstr "" +msgstr "Pārcaldīt redaktora iespējas..." #: editor/editor_node.cpp msgid "Manage Export Templates..." -msgstr "" +msgstr "Pārvaldīt eksporta šablonus..." #: editor/editor_node.cpp editor/plugins/shader_editor_plugin.cpp msgid "Help" -msgstr "" +msgstr "Palīdzība" #: editor/editor_node.cpp msgid "Online Documentation" -msgstr "" +msgstr "Tiešsaistes Dokumentācija" #: editor/editor_node.cpp msgid "Questions & Answers" -msgstr "" +msgstr "Jautājumi & Atbildes" #: editor/editor_node.cpp msgid "Report a Bug" -msgstr "" +msgstr "Ziņot par kļūmi" #: editor/editor_node.cpp msgid "Suggest a Feature" -msgstr "" +msgstr "Ieteikt Iespēju" #: editor/editor_node.cpp msgid "Send Docs Feedback" -msgstr "" +msgstr "Sūtīt dokumentu atsauksmi" #: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp msgid "Community" -msgstr "Sabiedrība" +msgstr "Komūns" #: editor/editor_node.cpp -#, fuzzy msgid "About Godot" -msgstr "Par" +msgstr "Par Godot" #: editor/editor_node.cpp msgid "Support Godot Development" -msgstr "" +msgstr "Atbalstīt Godot izstrādi" #: editor/editor_node.cpp msgid "Play the project." -msgstr "" +msgstr "Atskaņot projektu." #: editor/editor_node.cpp msgid "Play" -msgstr "" +msgstr "Atskaņot" #: editor/editor_node.cpp msgid "Pause the scene execution for debugging." -msgstr "" +msgstr "Pauzēt ainas izpildi priekš atkļūdošanas." #: editor/editor_node.cpp msgid "Pause Scene" -msgstr "" +msgstr "Pauzēt ainu" #: editor/editor_node.cpp msgid "Stop the scene." -msgstr "" +msgstr "Apstādināt ainu." #: editor/editor_node.cpp msgid "Play the edited scene." @@ -3092,7 +3128,7 @@ msgstr "" #: editor/editor_node.cpp msgid "Play Scene" -msgstr "" +msgstr "Spēlēt Ainu" #: editor/editor_node.cpp msgid "Play custom scene" @@ -3109,7 +3145,7 @@ msgstr "" #: editor/editor_node.cpp editor/project_settings_editor.cpp #: editor/settings_config_dialog.cpp msgid "Save & Restart" -msgstr "" +msgstr "Saglabāt & pārstartēt" #: editor/editor_node.cpp msgid "Update Continuously" @@ -3117,7 +3153,7 @@ msgstr "Nepārtraukti Atjaunot" #: editor/editor_node.cpp msgid "Update When Changed" -msgstr "" +msgstr "Atjaunot Kad Mainīts" #: editor/editor_node.cpp msgid "Hide Update Spinner" @@ -3125,11 +3161,11 @@ msgstr "" #: editor/editor_node.cpp msgid "FileSystem" -msgstr "" +msgstr "Failu sistēma" #: editor/editor_node.cpp msgid "Inspector" -msgstr "" +msgstr "Inspektors" #: editor/editor_node.cpp msgid "Expand Bottom Panel" @@ -3137,11 +3173,11 @@ msgstr "" #: editor/editor_node.cpp msgid "Output" -msgstr "" +msgstr "Izeja" #: editor/editor_node.cpp msgid "Don't Save" -msgstr "" +msgstr "Nesaglabāt" #: editor/editor_node.cpp msgid "Android build template is missing, please install relevant templates." @@ -3169,6 +3205,12 @@ msgid "" "the \"Use Custom Build\" option should be enabled in the Android export " "preset." msgstr "" +"Šis iestatīs jūsu projektu priekš pielāgotām Android būvēm, ieinstalējot " +"avota šablonu uz \"res://android/build\".\n" +"Jūs varat veikt izmaiņas un uzbūvēt paši savu pielāgoto APK pie " +"eksportēšanas (pievienot moduļus, mainīt AndroidManifest.xml, utt.).\n" +"Piezīme - lai veiktu pielāgotās būves jau iebūvēto APK vietā, opcijai " +"\"Izmantot Pielāgotu būvi\" jābūt ieslēgtai pie Android eksporta šablona." #: editor/editor_node.cpp msgid "" @@ -3195,30 +3237,30 @@ msgid "Merge With Existing" msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "Apply MeshInstance Transforms" -msgstr "Anim Izmainīt Transformāciju" +msgstr "Pielietot MeshInstances Transformācijas" #: editor/editor_node.cpp msgid "Open & Run a Script" msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "" "The following files are newer on disk.\n" "What action should be taken?" -msgstr "Sekojošie faili netika izvilkti no paketes:" +msgstr "" +"Sekojošie faili ir jaunāki uz diska.\n" +"Kādu darbību veikt ?" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Reload" -msgstr "" +msgstr "Pārlādēt" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Resave" -msgstr "" +msgstr "Pārglabāt" #: editor/editor_node.cpp msgid "New Inherited" @@ -3226,28 +3268,27 @@ msgstr "" #: editor/editor_node.cpp msgid "Load Errors" -msgstr "" +msgstr "Ielādēt kļūdas" #: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp msgid "Select" -msgstr "" +msgstr "Izvēlēties" #: editor/editor_node.cpp -#, fuzzy msgid "Select Current" -msgstr "Aktualizēt" +msgstr "Izvēlēties pašreizējo" #: editor/editor_node.cpp msgid "Open 2D Editor" -msgstr "" +msgstr "Atvērt 2D redaktoru" #: editor/editor_node.cpp msgid "Open 3D Editor" -msgstr "" +msgstr "Atvērt 3D redaktoru" #: editor/editor_node.cpp msgid "Open Script Editor" -msgstr "" +msgstr "Atvērt skriptu redaktoru" #: editor/editor_node.cpp editor/project_manager.cpp msgid "Open Asset Library" @@ -3255,23 +3296,23 @@ msgstr "" #: editor/editor_node.cpp msgid "Open the next Editor" -msgstr "" +msgstr "Atvērt nākamo redaktoru" #: editor/editor_node.cpp msgid "Open the previous Editor" -msgstr "" +msgstr "Atvērt iepriekšējo redaktoru" #: editor/editor_node.h msgid "Warning!" -msgstr "" +msgstr "Brīdinājums!" #: editor/editor_path.cpp msgid "No sub-resources found." -msgstr "" +msgstr "Sub-resursi nav atrasti." #: editor/editor_path.cpp msgid "Open a list of sub-resources." -msgstr "" +msgstr "Atvērt sarakstu ar sub-resursiem." #: editor/editor_plugin.cpp msgid "Creating Mesh Previews" @@ -3279,7 +3320,7 @@ msgstr "" #: editor/editor_plugin.cpp msgid "Thumbnail..." -msgstr "" +msgstr "Sīktēls..." #: editor/editor_plugin_settings.cpp msgid "Main Script:" @@ -3287,59 +3328,57 @@ msgstr "Galvenais Skripts:" #: editor/editor_plugin_settings.cpp msgid "Edit Plugin" -msgstr "" +msgstr "Rediģēt spraudni" #: editor/editor_plugin_settings.cpp msgid "Installed Plugins:" -msgstr "" +msgstr "Instalētie spraudņi:" #: editor/editor_plugin_settings.cpp editor/plugin_config_dialog.cpp msgid "Update" -msgstr "" +msgstr "Atjaunināt" #: editor/editor_plugin_settings.cpp msgid "Version" -msgstr "" +msgstr "Versija" #: editor/editor_plugin_settings.cpp -#, fuzzy msgid "Author" -msgstr "Autori" +msgstr "Autors" #: editor/editor_plugin_settings.cpp #: editor/plugins/version_control_editor_plugin.cpp #: modules/gdnative/gdnative_library_singleton_editor.cpp msgid "Status" -msgstr "" +msgstr "Statuss" #: editor/editor_profiler.cpp msgid "Measure:" -msgstr "" +msgstr "Mērogs:" #: editor/editor_profiler.cpp -#, fuzzy msgid "Frame Time (ms)" -msgstr "Laiks (s): " +msgstr "Kadra Laiks (ms)" #: editor/editor_profiler.cpp msgid "Average Time (ms)" -msgstr "" +msgstr "Vidējais laiks (ms)" #: editor/editor_profiler.cpp msgid "Frame %" -msgstr "" +msgstr "Kadrs %" #: editor/editor_profiler.cpp msgid "Physics Frame %" -msgstr "" +msgstr "Fizikas kadrs %" #: editor/editor_profiler.cpp msgid "Inclusive" -msgstr "" +msgstr "Iekļaujošs" #: editor/editor_profiler.cpp msgid "Self" -msgstr "" +msgstr "Sevi" #: editor/editor_profiler.cpp msgid "" @@ -3353,15 +3392,15 @@ msgstr "" #: editor/editor_profiler.cpp msgid "Frame #:" -msgstr "" +msgstr "Kadrs #:" #: editor/editor_profiler.cpp msgid "Time" -msgstr "" +msgstr "Laiks" #: editor/editor_profiler.cpp msgid "Calls" -msgstr "" +msgstr "Izsaukumi" #: editor/editor_properties.cpp msgid "Edit Text:" @@ -3373,19 +3412,19 @@ msgstr "" #: editor/editor_properties.cpp msgid "Layer" -msgstr "" +msgstr "Kārta" #: editor/editor_properties.cpp msgid "Bit %d, value %d" -msgstr "" +msgstr "Bits %d, vērtība %d" #: editor/editor_properties.cpp msgid "[Empty]" -msgstr "" +msgstr "[Tukšs]" #: editor/editor_properties.cpp editor/plugins/root_motion_editor_plugin.cpp msgid "Assign..." -msgstr "" +msgstr "Pievienot..." #: editor/editor_properties.cpp msgid "Invalid RID" @@ -3415,24 +3454,24 @@ msgstr "" #: editor/editor_properties_array_dict.cpp msgid "Size: " -msgstr "" +msgstr "Izmērs: " #: editor/editor_properties_array_dict.cpp msgid "Page: " -msgstr "" +msgstr "Lapa: " #: editor/editor_properties_array_dict.cpp #: editor/plugins/theme_editor_plugin.cpp msgid "Remove Item" -msgstr "" +msgstr "Noņemt vienumu" #: editor/editor_properties_array_dict.cpp msgid "New Key:" -msgstr "" +msgstr "Jauna atslēga:" #: editor/editor_properties_array_dict.cpp msgid "New Value:" -msgstr "" +msgstr "Jauna vērtība:" #: editor/editor_properties_array_dict.cpp msgid "Add Key/Value Pair" @@ -3464,12 +3503,11 @@ msgstr "" #: editor/plugins/tile_map_editor_plugin.cpp editor/property_editor.cpp #: editor/scene_tree_dock.cpp scene/gui/line_edit.cpp scene/gui/text_edit.cpp msgid "Paste" -msgstr "" +msgstr "Ielīmēt" #: editor/editor_resource_picker.cpp editor/property_editor.cpp -#, fuzzy msgid "Convert to %s" -msgstr "Izveidot" +msgstr "Konvertēt uz %s" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "New %s" @@ -3477,7 +3515,7 @@ msgstr "" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "New Script" -msgstr "" +msgstr "Jauns skripts" #: editor/editor_resource_picker.cpp editor/scene_tree_dock.cpp msgid "Extend Script" @@ -3524,7 +3562,7 @@ msgstr "" #: editor/editor_sub_scene.cpp editor/project_manager.cpp msgid "Browse" -msgstr "" +msgstr "Pālūkot" #: editor/editor_sub_scene.cpp msgid "Scene Path:" @@ -3552,7 +3590,7 @@ msgstr "" #: editor/export_template_manager.cpp msgid "Starting the download..." -msgstr "" +msgstr "Sāk lejuplādi..." #: editor/export_template_manager.cpp msgid "Error requesting URL:" @@ -3621,11 +3659,11 @@ msgstr "" #: editor/export_template_manager.cpp msgid "Disconnected" -msgstr "" +msgstr "Atvienots" #: editor/export_template_manager.cpp msgid "Resolving" -msgstr "" +msgstr "Atrisina" #: editor/export_template_manager.cpp msgid "Can't Resolve" @@ -3634,24 +3672,24 @@ msgstr "" #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp msgid "Connecting..." -msgstr "" +msgstr "Savienojas..." #: editor/export_template_manager.cpp msgid "Can't Connect" -msgstr "" +msgstr "Nevar Savieoties" #: editor/export_template_manager.cpp msgid "Connected" -msgstr "" +msgstr "Savienots" #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp msgid "Requesting..." -msgstr "" +msgstr "Pieprasa..." #: editor/export_template_manager.cpp msgid "Downloading" -msgstr "" +msgstr "Lejuplādē" #: editor/export_template_manager.cpp msgid "Connection Error" @@ -3683,23 +3721,23 @@ msgstr "" #: editor/export_template_manager.cpp msgid "Importing:" -msgstr "" +msgstr "Importē:" #: editor/export_template_manager.cpp msgid "Remove templates for the version '%s'?" -msgstr "" +msgstr "Noņemt šablonus versijai '%s'?" #: editor/export_template_manager.cpp msgid "Uncompressing Android Build Sources" -msgstr "" +msgstr "Atspiež Android būves avotus" #: editor/export_template_manager.cpp msgid "Export Template Manager" -msgstr "" +msgstr "Eksporta šablonu menedžeris" #: editor/export_template_manager.cpp msgid "Current Version:" -msgstr "" +msgstr "Pašreizējā Versija:" #: editor/export_template_manager.cpp msgid "Export templates are missing. Download them or install from a file." @@ -3710,9 +3748,8 @@ msgid "Export templates are installed and ready to be used." msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Open Folder" -msgstr "Atvērt" +msgstr "Atvērt mapi" #: editor/export_template_manager.cpp msgid "Open the folder containing installed templates for the current version." @@ -3720,7 +3757,7 @@ msgstr "" #: editor/export_template_manager.cpp msgid "Uninstall" -msgstr "" +msgstr "Atinstalēt" #: editor/export_template_manager.cpp msgid "Uninstall templates for the current version." @@ -3731,9 +3768,8 @@ msgid "Download from:" msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Open in Web Browser" -msgstr "Atvērt Failu Pārlūkā" +msgstr "Atvērt interneta pārlūkā" #: editor/export_template_manager.cpp msgid "Copy Mirror URL" @@ -3755,7 +3791,7 @@ msgstr "" #: editor/export_template_manager.cpp msgid "Install from File" -msgstr "" +msgstr "Instalēt no Faila" #: editor/export_template_manager.cpp msgid "Install templates from a local file." @@ -3791,6 +3827,8 @@ msgid "" "The templates will continue to download.\n" "You may experience a short editor freeze when they finish." msgstr "" +"Šablonu lejuplādes turpināsies.\n" +"Jūs varat pieredzēt īslaicīgu redaktora sastingšanu, kad tās tiks pabeigtas." #: editor/filesystem_dock.cpp msgid "Favorites" @@ -3815,7 +3853,7 @@ msgstr "" #: editor/filesystem_dock.cpp msgid "Error moving:" -msgstr "" +msgstr "Kļūda parvietojot:" #: editor/filesystem_dock.cpp msgid "Error duplicating:" @@ -3853,7 +3891,7 @@ msgstr "" #: editor/filesystem_dock.cpp msgid "Renaming file:" -msgstr "" +msgstr "Pārsauc failu:" #: editor/filesystem_dock.cpp msgid "Renaming folder:" @@ -3881,7 +3919,7 @@ msgstr "Atvērt Ainas" #: editor/filesystem_dock.cpp msgid "Instance" -msgstr "" +msgstr "Šablons" #: editor/filesystem_dock.cpp msgid "Add to Favorites" @@ -3909,7 +3947,7 @@ msgstr "Jauna Aina..." #: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp msgid "New Script..." -msgstr "" +msgstr "Jauns Skripts..." #: editor/filesystem_dock.cpp msgid "New Resource..." @@ -3928,9 +3966,8 @@ msgid "Collapse All" msgstr "" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Sort files" -msgstr "Meklēt failus" +msgstr "Šķirot failus" #: editor/filesystem_dock.cpp msgid "Sort by Name (Ascending)" @@ -3958,11 +3995,11 @@ msgstr "" #: editor/filesystem_dock.cpp msgid "Duplicate..." -msgstr "" +msgstr "Dublicēt..." #: editor/filesystem_dock.cpp editor/plugins/animation_player_editor_plugin.cpp msgid "Rename..." -msgstr "" +msgstr "Pārsaukt..." #: editor/filesystem_dock.cpp msgid "Focus the search box" @@ -3996,14 +4033,14 @@ msgstr "" #: editor/filesystem_dock.cpp msgid "Move" -msgstr "" +msgstr "Kustināt" #: editor/filesystem_dock.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp #: editor/project_manager.cpp editor/rename_dialog.cpp #: editor/scene_tree_dock.cpp msgid "Rename" -msgstr "" +msgstr "Pārsaukt" #: editor/filesystem_dock.cpp msgid "Overwrite" @@ -4042,11 +4079,11 @@ msgstr "" #: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find..." -msgstr "" +msgstr "Meklēt..." #: editor/find_in_files.cpp editor/plugins/script_text_editor.cpp msgid "Replace..." -msgstr "" +msgstr "Aizvietot..." #: editor/find_in_files.cpp msgid "Find: " @@ -4065,19 +4102,16 @@ msgid "Searching..." msgstr "Meklē..." #: editor/find_in_files.cpp -#, fuzzy msgid "%d match in %d file." -msgstr "%d sakritības." +msgstr "%d sakritības %d failā." #: editor/find_in_files.cpp -#, fuzzy msgid "%d matches in %d file." -msgstr "%d sakritības." +msgstr "%d sakritības %d failā." #: editor/find_in_files.cpp -#, fuzzy msgid "%d matches in %d files." -msgstr "%d sakritības." +msgstr "%d sakritības %d failos." #: editor/groups_editor.cpp msgid "Add to Group" @@ -4105,7 +4139,7 @@ msgstr "Izdzēst Grupu" #: editor/groups_editor.cpp editor/node_dock.cpp msgid "Groups" -msgstr "" +msgstr "Grupas" #: editor/groups_editor.cpp msgid "Nodes Not in Group" @@ -4122,7 +4156,7 @@ msgstr "" #: editor/groups_editor.cpp msgid "Empty groups will be automatically removed." -msgstr "" +msgstr "Tukšās grupas tiks automātiski noņemtas." #: editor/groups_editor.cpp msgid "Group Editor" @@ -4130,7 +4164,7 @@ msgstr "Grupas Redaktors" #: editor/groups_editor.cpp msgid "Manage Groups" -msgstr "" +msgstr "Pārvaldīt grupas" #: editor/import/resource_importer_scene.cpp msgid "Import as Single Scene" @@ -4211,21 +4245,19 @@ msgstr "" #: editor/import/resource_importer_scene.cpp msgid "Saving..." -msgstr "" +msgstr "Saglabā..." #: editor/import_defaults_editor.cpp -#, fuzzy msgid "Select Importer" -msgstr "Izvēlēties Šablona Failu" +msgstr "Izvēlēties importētāju" #: editor/import_defaults_editor.cpp msgid "Importer:" msgstr "" #: editor/import_defaults_editor.cpp -#, fuzzy msgid "Reset to Defaults" -msgstr "Ielādēt Noklusējumu" +msgstr "Atiestatīt uz noklusējumiem" #: editor/import_dock.cpp msgid "Keep File (No Import)" @@ -4245,7 +4277,7 @@ msgstr "" #: editor/import_dock.cpp msgid "Reimport" -msgstr "" +msgstr "Reimportēt" #: editor/import_dock.cpp msgid "" @@ -4281,14 +4313,12 @@ msgid "Failed to load resource." msgstr "" #: editor/inspector_dock.cpp -#, fuzzy msgid "Copy Properties" -msgstr "Ieslēgtie Mainīgie:" +msgstr "Kopēt iestatījumus" #: editor/inspector_dock.cpp -#, fuzzy msgid "Paste Properties" -msgstr "Ieslēgtie Mainīgie:" +msgstr "Ielīmēt iestatījumus" #: editor/inspector_dock.cpp msgid "Make Sub-Resources Unique" @@ -4310,7 +4340,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/theme_editor_plugin.cpp msgid "Save As..." -msgstr "" +msgstr "Saglabāt kā..." #: editor/inspector_dock.cpp msgid "Extra resource options." @@ -4353,9 +4383,8 @@ msgid "Filter properties" msgstr "" #: editor/inspector_dock.cpp -#, fuzzy msgid "Manage object properties." -msgstr "Animācijas īpašības." +msgstr "Pārvaldīt objekta rekvizītus." #: editor/inspector_dock.cpp msgid "Changes may be lost!" @@ -4367,7 +4396,7 @@ msgstr "" #: editor/node_dock.cpp msgid "Select a single node to edit its signals and groups." -msgstr "" +msgstr "Izvēlies kādu mezglu, lai rediģētu tā signālus un grupas." #: editor/plugin_config_dialog.cpp msgid "Edit a Plugin" @@ -4387,12 +4416,12 @@ msgstr "" #: editor/plugin_config_dialog.cpp msgid "Author:" -msgstr "" +msgstr "Autors:" #: editor/plugin_config_dialog.cpp #: editor/plugins/asset_library_editor_plugin.cpp msgid "Version:" -msgstr "" +msgstr "Versija:" #: editor/plugin_config_dialog.cpp editor/script_create_dialog.cpp msgid "Language:" @@ -4590,7 +4619,7 @@ msgstr "" #: editor/plugins/animation_blend_space_2d_editor.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Blend:" -msgstr "" +msgstr "Sapludināt:" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Parameter Changed:" @@ -4804,12 +4833,12 @@ msgstr "" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Animation" -msgstr "" +msgstr "Animācija" #: editor/plugins/animation_player_editor_plugin.cpp #: editor/plugins/version_control_editor_plugin.cpp msgid "New" -msgstr "" +msgstr "Jauns" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Edit Transitions..." @@ -4837,23 +4866,23 @@ msgstr "" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Directions" -msgstr "" +msgstr "Virzieni" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Past" -msgstr "" +msgstr "Pagātne" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Future" -msgstr "" +msgstr "Nākotne" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Depth" -msgstr "" +msgstr "Dziļums" #: editor/plugins/animation_player_editor_plugin.cpp msgid "1 step" -msgstr "" +msgstr "1 solis" #: editor/plugins/animation_player_editor_plugin.cpp msgid "2 steps" @@ -4892,7 +4921,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp msgid "Error!" -msgstr "" +msgstr "Kļūda!" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Blend Times:" @@ -4933,7 +4962,7 @@ msgstr "" #: editor/plugins/animation_state_machine_editor.cpp msgid "Sync" -msgstr "" +msgstr "Sinhronizācija" #: editor/plugins/animation_state_machine_editor.cpp msgid "At End" @@ -5010,7 +5039,7 @@ msgstr "" #: editor/plugins/animation_tree_player_editor_plugin.cpp #: editor/plugins/multimesh_editor_plugin.cpp msgid "Scale:" -msgstr "" +msgstr "Mērogs:" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Fade In (s):" @@ -5022,11 +5051,11 @@ msgstr "" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Blend" -msgstr "" +msgstr "Pludināt" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Mix" -msgstr "" +msgstr "Miksēt" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Auto Restart:" @@ -5042,12 +5071,12 @@ msgstr "" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Start!" -msgstr "" +msgstr "Sākt!" #: editor/plugins/animation_tree_player_editor_plugin.cpp #: editor/plugins/multimesh_editor_plugin.cpp msgid "Amount:" -msgstr "" +msgstr "Daudzums:" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Blend 0:" @@ -5063,7 +5092,7 @@ msgstr "" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Current:" -msgstr "" +msgstr "Pašreizējs:" #: editor/plugins/animation_tree_player_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp @@ -5137,11 +5166,11 @@ msgstr "" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Filters..." -msgstr "" +msgstr "Filtri..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Contents:" -msgstr "" +msgstr "Saturs:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "View Files" @@ -5149,7 +5178,7 @@ msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Download" -msgstr "" +msgstr "Lejuplādēt" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Connection error, please try again." @@ -5209,7 +5238,7 @@ msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Failed:" -msgstr "" +msgstr "Neizdevās:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Bad download hash, assuming file has been tampered with." @@ -5217,11 +5246,11 @@ msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Expected:" -msgstr "" +msgstr "Sagaidāms:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Got:" -msgstr "" +msgstr "Saņemts:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Failed SHA-256 hash check" @@ -5241,7 +5270,7 @@ msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Resolving..." -msgstr "" +msgstr "Atrisina.." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Error making request" @@ -5249,7 +5278,7 @@ msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Idle" -msgstr "" +msgstr "Dīkstāve" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Install..." @@ -5257,7 +5286,7 @@ msgstr "Instalēt..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Retry" -msgstr "" +msgstr "Mēģināt vēlreiz" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Download Error" @@ -5293,23 +5322,23 @@ msgstr "Licence (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp msgid "First" -msgstr "" +msgstr "Pirmais" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Previous" -msgstr "" +msgstr "Iepriekšējais" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Next" -msgstr "" +msgstr "Nākamais" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Last" -msgstr "" +msgstr "Pēdējais" #: editor/plugins/asset_library_editor_plugin.cpp msgid "All" -msgstr "" +msgstr "Visi" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Search templates, projects, and demos" @@ -5329,15 +5358,15 @@ msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp editor/project_manager.cpp msgid "Sort:" -msgstr "" +msgstr "Kārtot:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Category:" -msgstr "" +msgstr "Kategorija:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Site:" -msgstr "" +msgstr "Lapa:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Support" @@ -5345,11 +5374,11 @@ msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Official" -msgstr "" +msgstr "Oficiāls" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Testing" -msgstr "" +msgstr "Testē" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Loading..." @@ -5399,14 +5428,13 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/baked_lightmap_editor_plugin.cpp -#, fuzzy msgid "Select lightmap bake file:" -msgstr "Izvēlēties Šablona Failu" +msgstr "Izvēlēties gaismas kartes cepšanas failu:" #: editor/plugins/camera_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" -msgstr "" +msgstr "Priekšskats" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Configure Snap" @@ -5515,9 +5543,8 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Grouped" -msgstr "Grupa Izvēlēta" +msgstr "Grupēts" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -5694,19 +5721,16 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Drag: Rotate selected node around pivot." -msgstr "Noņemt izvēlēto mezglu vai pāreju." +msgstr "Bīdīt: Rotē izvēlēto mezglu apkārt asij." #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Alt+Drag: Move selected node." -msgstr "Izdzēst izvēlēto Taisnstūri." +msgstr "Alt+Bīdīt: Pārvietot izvēlēto mezglu." #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "V: Set selected node's pivot position." -msgstr "Noņemt izvēlēto mezglu vai pāreju." +msgstr "V: Uzlikt izvēlētā mezgla centra pozīciju." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5859,7 +5883,7 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "View" -msgstr "" +msgstr "Skatīt" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Always Show Grid" @@ -5946,14 +5970,12 @@ msgid "Clear Pose" msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Add Node Here" -msgstr "Pievienot Mezgla Punktu" +msgstr "Pievienot mezglu šeit" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Instance Scene Here" -msgstr "Ievadiet Atslēgu Šeit" +msgstr "Izveidot ainas instanci šeit" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Multiply grid step by 2" @@ -5980,34 +6002,28 @@ msgid "Zoom to 12.5%" msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 25%" -msgstr "Attālināt" +msgstr "Tuvināt uz 25%" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 50%" -msgstr "Attālināt" +msgstr "Tuvināt uz 50%" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 100%" -msgstr "Attālināt" +msgstr "Tuvināt uz 100%" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 200%" -msgstr "Attālināt" +msgstr "Tuvināt uz 200%" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 400%" -msgstr "Attālināt" +msgstr "Tuvināt uz 400%" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 800%" -msgstr "Attālināt" +msgstr "Tuvināt uz 800%" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Zoom to 1600%" @@ -6082,7 +6098,7 @@ msgstr "" #: editor/plugins/particles_2d_editor_plugin.cpp #: editor/plugins/particles_editor_plugin.cpp msgid "Particles" -msgstr "" +msgstr "Daļiņas" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp @@ -6139,7 +6155,7 @@ msgstr "" #: editor/plugins/curve_editor_plugin.cpp msgid "Flat 1" -msgstr "" +msgstr "Plakans 1" #: editor/plugins/curve_editor_plugin.cpp editor/property_editor.cpp msgid "Ease In" @@ -6254,9 +6270,8 @@ msgid "Couldn't create a single convex collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Simplified Convex Shape" -msgstr "Izveidot Vienu Izliektu Formu" +msgstr "Izveidot vienkāršotu izliektu formu" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Single Convex Shape" @@ -6350,9 +6365,8 @@ msgid "" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Simplified Convex Collision Sibling" -msgstr "Izveidot Vienu Izliektu Sadursmes Uzmavu" +msgstr "Izveidot vienkāršotu izliektu sadursmes radinieku" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "" @@ -6504,15 +6518,15 @@ msgstr "" #: editor/plugins/multimesh_editor_plugin.cpp msgid "X-Axis" -msgstr "" +msgstr "X ass" #: editor/plugins/multimesh_editor_plugin.cpp msgid "Y-Axis" -msgstr "" +msgstr "Y ass" #: editor/plugins/multimesh_editor_plugin.cpp msgid "Z-Axis" -msgstr "" +msgstr "Z ass" #: editor/plugins/multimesh_editor_plugin.cpp msgid "Mesh Up Axis:" @@ -6532,7 +6546,7 @@ msgstr "" #: editor/plugins/multimesh_editor_plugin.cpp msgid "Populate" -msgstr "" +msgstr "Apdzīvot" #: editor/plugins/navigation_polygon_editor_plugin.cpp #: editor/plugins/tile_set_editor_plugin.cpp @@ -6557,9 +6571,8 @@ msgid "Can only set point into a ParticlesMaterial process material" msgstr "" #: editor/plugins/particles_2d_editor_plugin.cpp -#, fuzzy msgid "Convert to CPUParticles2D" -msgstr "Izveidot" +msgstr "Konvertēt uz CPUParticles2D" #: editor/plugins/particles_2d_editor_plugin.cpp #: editor/plugins/particles_editor_plugin.cpp @@ -6604,7 +6617,7 @@ msgstr "" #: editor/plugins/particles_editor_plugin.cpp msgid "Volume" -msgstr "" +msgstr "Tilpums" #: editor/plugins/particles_editor_plugin.cpp msgid "Emission Source: " @@ -6703,7 +6716,7 @@ msgstr "" #: editor/plugins/theme_editor_preview.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_export.cpp msgid "Options" -msgstr "" +msgstr "Opcijas" #: editor/plugins/path_2d_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp @@ -6797,23 +6810,20 @@ msgid "Invalid Polygon (need 3 different vertices)" msgstr "" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Add Custom Polygon" -msgstr "Izveidot" +msgstr "Pievienot pielāgotu daudzstūri" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Remove Custom Polygon" -msgstr "Izveidot" +msgstr "Noņemt pielāgotu daudzstūri" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Transform UV Map" msgstr "" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Transform Polygon" -msgstr "Izveidot" +msgstr "Transformēt daudzstūri" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Paint Bone Weights" @@ -6836,9 +6846,8 @@ msgid "Points" msgstr "" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Polygons" -msgstr "Izveidot" +msgstr "Daudzstūri" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Bones" @@ -6907,9 +6916,8 @@ msgid "Copy Polygon to UV" msgstr "" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Copy UV to Polygon" -msgstr "Izveidot" +msgstr "Kopēt UV uz daudzstūra" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Clear UV" @@ -6929,7 +6937,7 @@ msgstr "" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Grid" -msgstr "" +msgstr "Režģis" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Show Grid" @@ -6994,7 +7002,7 @@ msgstr "" #: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Type:" -msgstr "" +msgstr "Tips:" #: editor/plugins/resource_preloader_editor_plugin.cpp #: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp @@ -7014,14 +7022,12 @@ msgid "Flip Portals" msgstr "" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Room Generate Points" -msgstr "Pārvietot Bezjē Punktus" +msgstr "Telpas punktu ģenerācija" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Generate Points" -msgstr "Izveidot punktus." +msgstr "Ģenerēt Punktus" #: editor/plugins/room_manager_editor_plugin.cpp msgid "Flip Portal" @@ -7032,9 +7038,8 @@ msgid "Occluder Set Transform" msgstr "" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Center Node" -msgstr "Izdzēst" +msgstr "Centrēt mezglu" #: editor/plugins/root_motion_editor_plugin.cpp msgid "AnimationTree has no path set to an AnimationPlayer" @@ -7050,7 +7055,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp msgid "Close and save changes?" -msgstr "" +msgstr "Aizvērt un saglabāt izmaiņas?" #: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" @@ -7061,9 +7066,8 @@ msgid "Could not load file at:" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Error saving file!" -msgstr "Kļūmes lādējot!" +msgstr "Kļūda saglabājot failu!" #: editor/plugins/script_editor_plugin.cpp msgid "Error while saving theme." @@ -7074,9 +7078,8 @@ msgid "Error Saving" msgstr "Kļūda Saglabājot" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Error importing theme." -msgstr "Kļūda lādējot fontu." +msgstr "Kļūda importējot motīvu." #: editor/plugins/script_editor_plugin.cpp msgid "Error Importing" @@ -7084,12 +7087,11 @@ msgstr "Kļūda Importējot" #: editor/plugins/script_editor_plugin.cpp msgid "New Text File..." -msgstr "" +msgstr "Jauns teksta fails..." #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Open File" -msgstr "Atvērt" +msgstr "Atvērt failu" #: editor/plugins/script_editor_plugin.cpp msgid "Save File As..." @@ -7126,7 +7128,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp msgid "Save Theme As..." -msgstr "" +msgstr "Saglabāt motīvu kā..." #: editor/plugins/script_editor_plugin.cpp msgid "%s Class Reference" @@ -7135,7 +7137,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" -msgstr "" +msgstr "Atrast Nākamo" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp @@ -7156,13 +7158,13 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp msgid "Sort" -msgstr "" +msgstr "Šķirot" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp #: modules/gdnative/gdnative_library_editor_plugin.cpp msgid "Move Up" -msgstr "" +msgstr "Bīdīt augšup" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp @@ -7171,18 +7173,16 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Next Script" -msgstr "Galvenais Skripts:" +msgstr "Nākamais skripts" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Previous Script" -msgstr "Izvēlēties šo Mapi" +msgstr "Iepriekšējais skripts" #: editor/plugins/script_editor_plugin.cpp msgid "File" -msgstr "" +msgstr "Fails" #: editor/plugins/script_editor_plugin.cpp msgid "Open..." @@ -7190,11 +7190,11 @@ msgstr "Atvērt..." #: editor/plugins/script_editor_plugin.cpp msgid "Reopen Closed Script" -msgstr "" +msgstr "Atvērt aizvērto skriptu" #: editor/plugins/script_editor_plugin.cpp msgid "Save All" -msgstr "" +msgstr "Saglabāt visu" #: editor/plugins/script_editor_plugin.cpp msgid "Soft Reload Script" @@ -7227,11 +7227,11 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp msgid "Save Theme" -msgstr "" +msgstr "Saglabāt motīvu" #: editor/plugins/script_editor_plugin.cpp msgid "Close All" -msgstr "" +msgstr "Aizvērt Visu" #: editor/plugins/script_editor_plugin.cpp msgid "Close Docs" @@ -7239,7 +7239,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp msgid "Run" -msgstr "" +msgstr "Palaist" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp @@ -7247,7 +7247,7 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp #: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" -msgstr "" +msgstr "Meklēt" #: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp msgid "Step Into" @@ -7259,16 +7259,16 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp msgid "Break" -msgstr "" +msgstr "Pārtraukt" #: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp #: editor/script_editor_debugger.cpp msgid "Continue" -msgstr "" +msgstr "turpināt" #: editor/plugins/script_editor_plugin.cpp msgid "Keep Debugger Open" -msgstr "" +msgstr "Atstāt atkļūdotāju atvērtu" #: editor/plugins/script_editor_plugin.cpp msgid "Debug with External Editor" @@ -7277,7 +7277,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Online Docs" -msgstr "" +msgstr "Tiešsaistes Dokumenti" #: editor/plugins/script_editor_plugin.cpp msgid "Open Godot online documentation." @@ -7297,7 +7297,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp msgid "Discard" -msgstr "" +msgstr "Atmest" #: editor/plugins/script_editor_plugin.cpp msgid "" @@ -7307,7 +7307,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp msgid "Debugger" -msgstr "" +msgstr "Atkļūdotājs" #: editor/plugins/script_editor_plugin.cpp msgid "Search Results" @@ -7322,9 +7322,8 @@ msgid "Connections to method:" msgstr "" #: editor/plugins/script_text_editor.cpp editor/script_editor_debugger.cpp -#, fuzzy msgid "Source" -msgstr "Resurs" +msgstr "Avots" #: editor/plugins/script_text_editor.cpp msgid "Target" @@ -7338,16 +7337,15 @@ msgstr "" #: editor/plugins/script_text_editor.cpp msgid "[Ignore]" -msgstr "" +msgstr "[Ignorēt]" #: editor/plugins/script_text_editor.cpp msgid "Line" msgstr "Rinda" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Go to Function" -msgstr "Izveidot Funkciju" +msgstr "Iet uz funkciju" #: editor/plugins/script_text_editor.cpp msgid "Only resources from filesystem can be dropped." @@ -7392,9 +7390,8 @@ msgid "Bookmarks" msgstr "" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Breakpoints" -msgstr "Izveidot" +msgstr "Pārrāvumpunkts" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp @@ -7404,7 +7401,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp #: scene/gui/line_edit.cpp scene/gui/text_edit.cpp msgid "Cut" -msgstr "" +msgstr "Izgriezt" #: editor/plugins/script_text_editor.cpp editor/plugins/theme_editor_plugin.cpp #: scene/gui/line_edit.cpp scene/gui/text_edit.cpp @@ -7444,9 +7441,8 @@ msgid "Complete Symbol" msgstr "" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Evaluate Selection" -msgstr "Mēroga Izvēle" +msgstr "Novērtēt izvēli" #: editor/plugins/script_text_editor.cpp msgid "Trim Trailing Whitespace" @@ -7477,14 +7473,12 @@ msgid "Toggle Bookmark" msgstr "" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Go to Next Bookmark" -msgstr "Doties uz nākamo soli" +msgstr "Doties uz nākamo grāmatzīmi" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Go to Previous Bookmark" -msgstr "Doties uz iepriekšējo soli" +msgstr "Doties uz iepriekšējo grāmatzīmi" #: editor/plugins/script_text_editor.cpp msgid "Remove All Bookmarks" @@ -7508,14 +7502,12 @@ msgid "Remove All Breakpoints" msgstr "" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Go to Next Breakpoint" -msgstr "Doties uz nākamo soli" +msgstr "Doties uz nākamo pārrāvumpunktu" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Go to Previous Breakpoint" -msgstr "Doties uz iepriekšējo soli" +msgstr "Doties uz iepriekšējo pārrāvumpunktu" #: editor/plugins/shader_editor_plugin.cpp msgid "" @@ -7525,7 +7517,7 @@ msgstr "" #: editor/plugins/shader_editor_plugin.cpp msgid "Shader" -msgstr "" +msgstr "Ēnotājs" #: editor/plugins/skeleton_2d_editor_plugin.cpp msgid "This skeleton has no bones, create some children Bone2D nodes." @@ -7544,9 +7536,8 @@ msgid "Skeleton2D" msgstr "" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Reset to Rest Pose" -msgstr "Ielādēt Noklusējumu" +msgstr "Atiestatīt uz atpūtas pozu" #: editor/plugins/skeleton_2d_editor_plugin.cpp msgid "Overwrite Rest Pose" @@ -7574,7 +7565,7 @@ msgstr "" #: editor/plugins/spatial_editor_plugin.cpp msgid "Perspective" -msgstr "" +msgstr "Perspektīva" #: editor/plugins/spatial_editor_plugin.cpp msgid "Top Orthogonal" @@ -7670,13 +7661,12 @@ msgid "Translate" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Scale" -msgstr "Mēroga Režīms" +msgstr "Mērogs" #: editor/plugins/spatial_editor_plugin.cpp msgid "Scaling: " -msgstr "" +msgstr "Mērogs: " #: editor/plugins/spatial_editor_plugin.cpp msgid "Translating: " @@ -7715,14 +7705,12 @@ msgid "Material Changes:" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Shader Changes:" -msgstr "Nomainīt" +msgstr "Ēnotāja izmaiņas:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Surface Changes:" -msgstr "Nomainīt" +msgstr "Virsmas izmaiņas:" #: editor/plugins/spatial_editor_plugin.cpp msgid "Draw Calls:" @@ -7825,9 +7813,8 @@ msgid "Audio Listener" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Enable Doppler" -msgstr "Nomainīt" +msgstr "Iespējot doppler" #: editor/plugins/spatial_editor_plugin.cpp msgid "Cinematic Preview" @@ -7889,9 +7876,8 @@ msgid "" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Convert Rooms" -msgstr "Izveidot" +msgstr "Konvertēt telpas" #: editor/plugins/spatial_editor_plugin.cpp msgid "XForm Dialog" @@ -8044,9 +8030,8 @@ msgid "View Portal Culling" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "View Occlusion Culling" -msgstr "Izveidot" +msgstr "Skatīt sķēršļu izkaušanu" #: editor/plugins/spatial_editor_plugin.cpp #: modules/gridmap/grid_map_editor_plugin.cpp @@ -8107,7 +8092,7 @@ msgstr "" #: editor/plugins/spatial_editor_plugin.cpp msgid "Pre" -msgstr "" +msgstr "iepriekš" #: editor/plugins/spatial_editor_plugin.cpp msgid "Post" @@ -8118,42 +8103,36 @@ msgid "Unnamed Gizmo" msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Create Mesh2D" -msgstr "Izveidot Jaunu %s" +msgstr "Izveidot Mesh2D" #: editor/plugins/sprite_editor_plugin.cpp msgid "Mesh2D Preview" msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Create Polygon2D" -msgstr "Izveidot" +msgstr "Izveidot Polygon2D" #: editor/plugins/sprite_editor_plugin.cpp msgid "Polygon2D Preview" msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Create CollisionPolygon2D" -msgstr "Izveidot" +msgstr "Izveidot CollisionPolygon2D" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "CollisionPolygon2D Preview" -msgstr "Izveidot" +msgstr "CollisionPolygon2D priekšskatījums" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Create LightOccluder2D" -msgstr "Izveidot" +msgstr "Izveidot LightOccluder2D" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "LightOccluder2D Preview" -msgstr "Izveidot" +msgstr "LightOccluder2D priekšskatījums" #: editor/plugins/sprite_editor_plugin.cpp msgid "Sprite is empty!" @@ -8176,18 +8155,16 @@ msgid "Invalid geometry, can't create polygon." msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Convert to Polygon2D" -msgstr "Izveidot" +msgstr "Konvertēt uz Polygon2D" #: editor/plugins/sprite_editor_plugin.cpp msgid "Invalid geometry, can't create collision polygon." msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Create CollisionPolygon2D Sibling" -msgstr "Izveidot" +msgstr "Izveidot CollisionPolygon2D radinieku" #: editor/plugins/sprite_editor_plugin.cpp msgid "Invalid geometry, can't create light occluder." @@ -8222,9 +8199,8 @@ msgid "Settings:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "No Frames Selected" -msgstr "Savienot" +msgstr "Nav izvēlēti kadri" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Add %d Frame(s)" @@ -8267,14 +8243,12 @@ msgid "Move Frame" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Animations:" -msgstr "Funkcijas:" +msgstr "Animācijas:" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "New Animation" -msgstr "Optimizēt animāciju" +msgstr "Jauna animācija" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Speed:" @@ -8282,16 +8256,15 @@ msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Loop" -msgstr "" +msgstr "Cilpa" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Animation Frames:" msgstr "Animācijas Kadri:" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Add a Texture from File" -msgstr "Noņemt Izvēlēto" +msgstr "Pievienot tekstūru no faila" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Add Frames from a Sprite Sheet" @@ -8370,9 +8343,8 @@ msgid "Step:" msgstr "" #: editor/plugins/texture_region_editor_plugin.cpp -#, fuzzy msgid "Separation:" -msgstr "Sēpija funkcija." +msgstr "Atdalījums:" #: editor/plugins/texture_region_editor_plugin.cpp msgid "TextureRegion" @@ -8403,9 +8375,8 @@ msgid "No colors found." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "{num} constant(s)" -msgstr "Konstantes" +msgstr "{num} konstante(s)" #: editor/plugins/theme_editor_plugin.cpp msgid "No constants found." @@ -8444,27 +8415,24 @@ msgid "Nothing was selected for the import." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Importing Theme Items" -msgstr "Kļūda lādējot fontu." +msgstr "Tēmas elementu importēšana" #: editor/plugins/theme_editor_plugin.cpp msgid "Importing items {n}/{n}" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Updating the editor" -msgstr "Atjaunina Ainu" +msgstr "Atjaunina redaktoru" #: editor/plugins/theme_editor_plugin.cpp msgid "Finalizing" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Filter:" -msgstr "Nomainīt Filtru" +msgstr "Filtrs:" #: editor/plugins/theme_editor_plugin.cpp msgid "With Data" @@ -8549,9 +8517,8 @@ msgid "Expand types." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all Theme items." -msgstr "Izvēlēties Šablona Failu" +msgstr "Atlasiet visus motīvu vienumus." #: editor/plugins/theme_editor_plugin.cpp msgid "Select With Data" @@ -8562,18 +8529,16 @@ msgid "Select all Theme items with item data." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Deselect All" -msgstr "Atvienot Visu" +msgstr "Atcelt visu atlasi" #: editor/plugins/theme_editor_plugin.cpp msgid "Deselect all Theme items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Import Selected" -msgstr "Grupa Izvēlēta" +msgstr "Importēt izvēlēto" #: editor/plugins/theme_editor_plugin.cpp msgid "" @@ -8589,28 +8554,24 @@ msgid "" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove All Color Items" -msgstr "Noņemt no Favorītiem" +msgstr "Noņemt visas krāsas vienības" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Rename Item" -msgstr "Pārsaukt Audio Kopni" +msgstr "Noņemt vienību" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove All Constant Items" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove All Font Items" -msgstr "Noņemt no Favorītiem" +msgstr "Noņemt visus fontu vienumus" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove All Icon Items" -msgstr "Saglabāt Visas Ainas" +msgstr "Noņemt visus ikonu vienumus" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove All StyleBox Items" @@ -8623,24 +8584,20 @@ msgid "" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Color Item" -msgstr "Pievienot Favorītiem" +msgstr "Pievienot krāsas vienumu" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Constant Item" -msgstr "Konstantes" +msgstr "Pievienot konstantes vienumu" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Font Item" -msgstr "Pievienot Punktu" +msgstr "Pievienot fonta vienumu" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Icon Item" -msgstr "Pievienot Punktu" +msgstr "Pievienot ikonas vienumu" #: editor/plugins/theme_editor_plugin.cpp msgid "Add Stylebox Item" @@ -8679,9 +8636,8 @@ msgid "Manage Theme Items" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Edit Items" -msgstr "Rediģēt Tekstu:" +msgstr "Rediģēt vienumus" #: editor/plugins/theme_editor_plugin.cpp msgid "Types:" @@ -8700,18 +8656,16 @@ msgid "Add StyleBox Item" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Items:" -msgstr "Noņemt Izvēlēto" +msgstr "Noņemt vienumus:" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove Class Items" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Custom Items" -msgstr "Izveidot" +msgstr "Noņemt pielāgotos vienumus" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove All Items" @@ -8722,29 +8676,24 @@ msgid "Add Theme Item" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Old Name:" -msgstr "Nosaukums" +msgstr "Vecais vārds:" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Import Items" -msgstr "Ielādēt Noklusējumu" +msgstr "Importēt vienumus" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Default Theme" -msgstr "Nomainīt Noklusējuma Tipu" +msgstr "Noklusējuma motīvs" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Editor Theme" -msgstr "Rediģēt Tekstu:" +msgstr "Redaktora motīvs" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select Another Theme Resource:" -msgstr "Meklēt Aizstājēja Resursu:" +msgstr "Izvēlēties citu motīva resursu:" #: editor/plugins/theme_editor_plugin.cpp msgid "Another Theme" @@ -8773,9 +8722,8 @@ msgid "" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Type" -msgstr "Pievienot Trijstūri" +msgstr "Pievienot tipu" #: editor/plugins/theme_editor_plugin.cpp msgid "Add Item Type" @@ -8786,9 +8734,8 @@ msgid "Node Types:" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Show Default" -msgstr "Ielādēt Noklusējumu" +msgstr "Rādīt noklusējumu" #: editor/plugins/theme_editor_plugin.cpp msgid "Show default type items alongside items that have been overridden." @@ -8803,9 +8750,8 @@ msgid "Override all default type items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Theme:" -msgstr "Atvērt" +msgstr "Motīvs:" #: editor/plugins/theme_editor_plugin.cpp msgid "Manage Items..." @@ -8816,18 +8762,16 @@ msgid "Add, remove, organize and import Theme items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Preview" -msgstr "Pievienot Trijstūri" +msgstr "Pievienot priekšskatījumu" #: editor/plugins/theme_editor_plugin.cpp msgid "Default Preview" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select UI Scene:" -msgstr "Iestatīt Kā Galveno Ainu" +msgstr "Izvēlēties UI ainu:" #: editor/plugins/theme_editor_preview.cpp msgid "" @@ -8840,18 +8784,16 @@ msgid "Toggle Button" msgstr "" #: editor/plugins/theme_editor_preview.cpp -#, fuzzy msgid "Disabled Button" -msgstr "Atspējots" +msgstr "Atspējota poga" #: editor/plugins/theme_editor_preview.cpp msgid "Item" msgstr "" #: editor/plugins/theme_editor_preview.cpp -#, fuzzy msgid "Disabled Item" -msgstr "Atspējots" +msgstr "Atspējots vienums" #: editor/plugins/theme_editor_preview.cpp msgid "Check Item" @@ -8887,16 +8829,15 @@ msgstr "" #: editor/plugins/theme_editor_preview.cpp msgid "Has" -msgstr "" +msgstr "Satur" #: editor/plugins/theme_editor_preview.cpp msgid "Many" -msgstr "" +msgstr "Daudz" #: editor/plugins/theme_editor_preview.cpp -#, fuzzy msgid "Disabled LineEdit" -msgstr "Atspējots" +msgstr "Atspējota LineEdit" #: editor/plugins/theme_editor_preview.cpp msgid "Tab 1" @@ -8920,7 +8861,7 @@ msgstr "" #: editor/plugins/theme_editor_preview.cpp msgid "Has,Many,Options" -msgstr "" +msgstr "Ir,Daudz,Opcijas" #: editor/plugins/theme_editor_preview.cpp msgid "Invalid path, the PackedScene resource was probably moved or removed." @@ -8948,9 +8889,8 @@ msgstr "Salabot Nederīgās Flīzes" #: editor/plugins/tile_map_editor_plugin.cpp #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Cut Selection" -msgstr "Dzēst izvēlētos" +msgstr "Griezt izvēlēto" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Paint TileMap" @@ -9081,24 +9021,20 @@ msgid "Select the previous shape, subtile, or Tile." msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Region" -msgstr "Interpolācijas režīms" +msgstr "Reģions" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Collision" -msgstr "Interpolācijas režīms" +msgstr "Sadursme" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Occlusion" -msgstr "Izveidot" +msgstr "Šķērslis" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Navigation" -msgstr "Izveidot" +msgstr "Navigācija" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Bitmask" @@ -9110,21 +9046,19 @@ msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Icon" -msgstr "" +msgstr "Ikona" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Z Index" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Region Mode" -msgstr "Interpolācijas režīms" +msgstr "Reģiona režīms" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Collision Mode" -msgstr "Interpolācijas režīms" +msgstr "Sadursmes režīms" #: editor/plugins/tile_set_editor_plugin.cpp #, fuzzy @@ -9132,9 +9066,8 @@ msgid "Occlusion Mode" msgstr "Izveidot" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Navigation Mode" -msgstr "Izveidot" +msgstr "Navigācijas režīms" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Bitmask Mode" @@ -9169,23 +9102,20 @@ msgid "Create a new rectangle." msgstr "Izveidot jaunu taisnstūri." #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "New Rectangle" -msgstr "Izveidot jaunu taisnstūri." +msgstr "Jauns taisnstūris" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Create a new polygon." msgstr "Izveidot jaunu daudzstūri." #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "New Polygon" -msgstr "Izveidot" +msgstr "Jauns daudzstūris" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Delete Selected Shape" -msgstr "Izdzēst Izvēlēto(ās) Atslēgu(as)" +msgstr "Izdzēst izvēlēto formu" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Keep polygon inside region Rect." @@ -9222,9 +9152,8 @@ msgid "Merge from scene?" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Remove Texture" -msgstr "Noņemt Izvēlēto" +msgstr "Noņemt tekstūru" #: editor/plugins/tile_set_editor_plugin.cpp msgid "%s file(s) were not added because was already on the list." @@ -9282,9 +9211,8 @@ msgid "Set Tile Region" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Create Tile" -msgstr "Izveidot" +msgstr "Izveidot flīzi" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Set Tile Icon" @@ -9295,9 +9223,8 @@ msgid "Edit Tile Bitmask" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Edit Collision Polygon" -msgstr "Izveidot" +msgstr "Rediģēt sadursmes daudzstūri" #: editor/plugins/tile_set_editor_plugin.cpp #, fuzzy @@ -9305,14 +9232,12 @@ msgid "Edit Occlusion Polygon" msgstr "Izveidot" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Edit Navigation Polygon" -msgstr "Izveidot" +msgstr "Rediģēt navigācijas daudzstūri" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Paste Tile Bitmask" -msgstr "Ielīmēt celiņus" +msgstr "Ielīmēt flīzes bitmasku" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Clear Tile Bitmask" @@ -9323,14 +9248,12 @@ msgid "Make Polygon Concave" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Make Polygon Convex" -msgstr "Izveidot" +msgstr "Izveidot dadzstūra izliekumu" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Remove Tile" -msgstr "Noņemt" +msgstr "Noņemt flīzi" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Remove Collision Polygon" @@ -9353,19 +9276,16 @@ msgid "Edit Tile Z Index" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Make Convex" -msgstr "Izveidot" +msgstr "Izveidot izliekumu" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Make Concave" -msgstr "Izveidot" +msgstr "Izveidot ieliekumu" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Create Collision Polygon" -msgstr "Izveidot" +msgstr "Izveidot sadursmes daudzstūri" #: editor/plugins/tile_set_editor_plugin.cpp #, fuzzy @@ -9413,47 +9333,40 @@ msgid "Staging area" msgstr "" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Detect new changes" -msgstr "Izveidot Jaunu %s" +msgstr "Atrast jaunas izmaiņas" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Changes" -msgstr "Nomainīt" +msgstr "Maiņas" #: editor/plugins/version_control_editor_plugin.cpp msgid "Modified" msgstr "" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Renamed" -msgstr "Pārsaukt Audio Kopni" +msgstr "Pārsaukts" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Deleted" -msgstr "Izdzēst" +msgstr "Dzēsts" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Typechange" -msgstr "Nomainīt" +msgstr "Tipa maiņa" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Stage Selected" -msgstr "Mēroga Izvēle" +msgstr "Posma izvēle" #: editor/plugins/version_control_editor_plugin.cpp msgid "Stage All" msgstr "" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Commit Changes" -msgstr "Nomainīt" +msgstr "Pielietot izmaiņas" #: editor/plugins/version_control_editor_plugin.cpp msgid "View file diffs before committing them to the latest version" @@ -9500,9 +9413,8 @@ msgid "Add output port" msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Change input port type" -msgstr "Nomainīt %s Tipu" +msgstr "Mainīt ienākoša porta tipu" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Change output port type" @@ -9517,14 +9429,12 @@ msgid "Change output port name" msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Remove input port" -msgstr "Noņemt Izvēlēto" +msgstr "Noņemt ienākošo portu" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Remove output port" -msgstr "Noņemt Izvēlēto" +msgstr "Noņemt izejas portu" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Set expression" @@ -9547,14 +9457,12 @@ msgid "Add Node to Visual Shader" msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Node(s) Moved" -msgstr "Mezgls Noņemts" +msgstr "Mezgls(-i) pārvietots(-i)" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Duplicate Nodes" -msgstr "Dublicēt atslēgvietnes" +msgstr "Dubliēt mezglus" #: editor/plugins/visual_shader_editor_plugin.cpp #: modules/visual_script/visual_script_editor.cpp @@ -9562,9 +9470,8 @@ msgid "Paste Nodes" msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Delete Nodes" -msgstr "Izdzēst" +msgstr "Dzēst mezglus" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Visual Shader Input Type Changed" @@ -9591,9 +9498,8 @@ msgid "Show resulted shader code." msgstr "Attēlot rezultējošo ēnotāja kodu." #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Create Shader Node" -msgstr "Izveidot Jaunu %s" +msgstr "Izveidot ēnotāja mezglu" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Color function." @@ -10282,9 +10188,8 @@ msgid "VisualShader" msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Edit Visual Property:" -msgstr "Ieslēgtie Mainīgie:" +msgstr "Rediģēt vizuālo mainīgo:" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Visual Shader Mode Changed" @@ -10451,7 +10356,7 @@ msgstr "" #: editor/project_export.cpp msgid "Manage Export Templates" -msgstr "" +msgstr "Pārvaldīt Eksporta Šablonus" #: editor/project_export.cpp msgid "Export With Debug" @@ -10462,9 +10367,8 @@ msgid "The path specified doesn't exist." msgstr "" #: editor/project_manager.cpp -#, fuzzy msgid "Error opening package file (it's not in ZIP format)." -msgstr "Kļūme atverot arhīvu failu, nav ZIP formātā." +msgstr "Kļūme atverot paketes failu (tā nav ZIP formātā)." #: editor/project_manager.cpp msgid "" @@ -10485,16 +10389,15 @@ msgstr "" #: editor/project_manager.cpp msgid "New Game Project" -msgstr "" +msgstr "Jauns Spēles Projekts" #: editor/project_manager.cpp msgid "Imported Project" msgstr "" #: editor/project_manager.cpp -#, fuzzy msgid "Invalid project name." -msgstr "Nederīgs grupas nosaukums." +msgstr "Nederīgs projekta nosaukums." #: editor/project_manager.cpp msgid "Couldn't create folder." @@ -10540,7 +10443,7 @@ msgstr "Pakete instalēta sekmīgi!" #: editor/project_manager.cpp msgid "Rename Project" -msgstr "" +msgstr "Pārsaukt Projektu" #: editor/project_manager.cpp msgid "Import Existing Project" @@ -10564,7 +10467,7 @@ msgstr "" #: editor/project_manager.cpp msgid "Install & Edit" -msgstr "" +msgstr "Instalēt & Rediģēt" #: editor/project_manager.cpp msgid "Project Name:" @@ -10616,7 +10519,7 @@ msgstr "" #: editor/project_manager.cpp msgid "Unnamed Project" -msgstr "" +msgstr "Nenosaukts Projekts" #: editor/project_manager.cpp msgid "Missing Project" @@ -10714,60 +10617,52 @@ msgid "Project Manager" msgstr "" #: editor/project_manager.cpp -#, fuzzy msgid "Local Projects" -msgstr "Projekta Dibinātāji" +msgstr "Lokālie projekti" #: editor/project_manager.cpp -#, fuzzy msgid "Loading, please wait..." -msgstr "Ielādēt..." +msgstr "Ielādē, lūdzu uzgaidi..." #: editor/project_manager.cpp msgid "Last Modified" msgstr "" #: editor/project_manager.cpp -#, fuzzy msgid "Edit Project" -msgstr "Projekta Dibinātāji" +msgstr "Rediģēt Projektu" #: editor/project_manager.cpp -#, fuzzy msgid "Run Project" -msgstr "Projekta Dibinātāji" +msgstr "Palaist Projektu" #: editor/project_manager.cpp msgid "Scan" -msgstr "" +msgstr "Skenēt" #: editor/project_manager.cpp -#, fuzzy msgid "Scan Projects" -msgstr "Projekta Dibinātāji" +msgstr "Skenēt Projektu" #: editor/project_manager.cpp msgid "Select a Folder to Scan" -msgstr "" +msgstr "Norādīt mapi kuru skenēt" #: editor/project_manager.cpp msgid "New Project" -msgstr "" +msgstr "Jauns Projekts" #: editor/project_manager.cpp -#, fuzzy msgid "Import Project" -msgstr "Projekta Dibinātāji" +msgstr "Importēt Projektu" #: editor/project_manager.cpp -#, fuzzy msgid "Remove Project" -msgstr "Noņemt Punktu" +msgstr "Noņemt Projektu" #: editor/project_manager.cpp -#, fuzzy msgid "Remove Missing" -msgstr "Noņemt" +msgstr "Noņemt trūkstošo" #: editor/project_manager.cpp msgid "About" @@ -10779,7 +10674,7 @@ msgstr "" #: editor/project_manager.cpp msgid "Restart Now" -msgstr "" +msgstr "Restartēt tagad" #: editor/project_manager.cpp msgid "Remove All" @@ -10791,7 +10686,7 @@ msgstr "" #: editor/project_manager.cpp msgid "Can't run project" -msgstr "" +msgstr "Nevar palaist projektu" #: editor/project_manager.cpp msgid "" @@ -10800,9 +10695,8 @@ msgid "" msgstr "" #: editor/project_manager.cpp -#, fuzzy msgid "Filter projects" -msgstr "Projekta Dibinātāji" +msgstr "Filtrēt projektus" #: editor/project_manager.cpp msgid "" @@ -10812,12 +10706,12 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" -msgstr "" +msgid "Key " +msgstr "Atslēga " #: editor/project_settings_editor.cpp msgid "Joy Button" @@ -11004,9 +10898,8 @@ msgid "Override for Feature" msgstr "" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Add %d Translations" -msgstr "Pievienot Pāreju" +msgstr "Pievienot %d tulkojumus" #: editor/project_settings_editor.cpp msgid "Remove Translation" @@ -11065,9 +10958,8 @@ msgid "Action:" msgstr "" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Action" -msgstr "Visa Izvēle" +msgstr "Darbība" #: editor/project_settings_editor.cpp msgid "Deadzone" @@ -11135,16 +11027,15 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "Plugins" -msgstr "" +msgstr "Sparudņi" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Import Defaults" -msgstr "Ielādēt Noklusējumu" +msgstr "Importēt noklusējumus" #: editor/property_editor.cpp msgid "Preset..." -msgstr "" +msgstr "Priekš-iestatījums..." #: editor/property_editor.cpp msgid "Zero" @@ -11203,9 +11094,8 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -#, fuzzy msgid "Replace:" -msgstr "Aizvietot: " +msgstr "Aizvietot:" #: editor/rename_dialog.cpp msgid "Prefix:" @@ -11316,9 +11206,8 @@ msgid "To Uppercase" msgstr "" #: editor/rename_dialog.cpp -#, fuzzy msgid "Reset" -msgstr "Atiestatīt tālummaiņu" +msgstr "Atiestatīt" #: editor/rename_dialog.cpp msgid "Regular Expression Error:" @@ -11370,7 +11259,7 @@ msgstr "" #: editor/scene_tree_dock.cpp msgid "Error loading scene from %s" -msgstr "" +msgstr "Kļūda ielādējot ainu no %s" #: editor/scene_tree_dock.cpp msgid "" @@ -11395,14 +11284,12 @@ msgid "Can't paste root node into the same scene." msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Paste Node(s)" -msgstr "Dublicēt atslēgvietnes" +msgstr "Ielīmēt mezglu(s)" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Detach Script" -msgstr "Galvenais Skripts:" +msgstr "Atvienot skriptu" #: editor/scene_tree_dock.cpp msgid "This operation can't be done on the tree root." @@ -11437,9 +11324,8 @@ msgid "Make node as Root" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Delete %d nodes and any children?" -msgstr "Izdzēst %d mezglus?" +msgstr "Dzēst %d mezglus un to bērnus?" #: editor/scene_tree_dock.cpp msgid "Delete %d nodes?" @@ -11485,7 +11371,7 @@ msgstr "" #: editor/scene_tree_dock.cpp msgid "Save New Scene As..." -msgstr "" +msgstr "Saglabāt jaunu ainu kā..." #: editor/scene_tree_dock.cpp msgid "" @@ -11524,9 +11410,8 @@ msgid "User Interface" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Other Node" -msgstr "Izdzēst" +msgstr "Cits mezgls" #: editor/scene_tree_dock.cpp msgid "Can't operate on nodes from a foreign scene!" @@ -11545,9 +11430,8 @@ msgid "Attach Script" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Cut Node(s)" -msgstr "Dublicēt atslēgvietnes" +msgstr "Izgriezt mezglu(s)" #: editor/scene_tree_dock.cpp msgid "Remove Node(s)" @@ -11607,9 +11491,8 @@ msgid "Change Type" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Reparent to New Node" -msgstr "Izveidot Jaunu %s" +msgstr "Pakļaut zem jauna mezgla" #: editor/scene_tree_dock.cpp msgid "Make Scene Root" @@ -11621,7 +11504,7 @@ msgstr "" #: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp msgid "Save Branch as Scene" -msgstr "" +msgstr "Saglabāt zaru kā ainu" #: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp msgid "Copy Node Path" @@ -11643,7 +11526,7 @@ msgstr "" #: editor/scene_tree_dock.cpp msgid "Attach a new or existing script to the selected node." -msgstr "" +msgstr "Pievienot jaunu vai eksistējošu skriptu izvēlētajam mezglam." #: editor/scene_tree_dock.cpp msgid "Detach the script from the selected node." @@ -11705,6 +11588,8 @@ msgid "" "Node is in %s group(s).\n" "Click to show groups dock." msgstr "" +"Mezgls ir %s grupās.\n" +"Klikšķini, lai parādītu grupu doku." #: editor/scene_tree_editor.cpp msgid "Open Script:" @@ -11765,9 +11650,8 @@ msgid "Path is not local." msgstr "" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Invalid base path." -msgstr "Nederīgs nosaukums." +msgstr "Nederīgs bāzes ceļš." #: editor/script_create_dialog.cpp msgid "A directory with the same name exists." @@ -11778,9 +11662,8 @@ msgid "File does not exist." msgstr "" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Invalid extension." -msgstr "Nederīgs fonta izmērs." +msgstr "Nederīgs paplašinājums." #: editor/script_create_dialog.cpp msgid "Wrong extension chosen." @@ -11823,9 +11706,8 @@ msgid "Invalid path." msgstr "Nederīgs ceļš." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Invalid class name." -msgstr "Nederīgs nosaukums." +msgstr "Nederīgs klases nosaukums." #: editor/script_create_dialog.cpp msgid "Invalid inherited parent name or path." @@ -11848,9 +11730,8 @@ msgid "Will create a new script file." msgstr "Izveidos jaunu skripta failu." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Will load an existing script file." -msgstr "Ielādēt eksistējošu Kopnes Izkārtojumu." +msgstr "Ielādēs eksistējošu skriptu." #: editor/script_create_dialog.cpp msgid "Script file already exists." @@ -11877,9 +11758,8 @@ msgid "Template:" msgstr "" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Built-in Script:" -msgstr "Savieno Signālu:" +msgstr "Iebūvēts skripts:" #: editor/script_create_dialog.cpp msgid "Attach Node Script" @@ -11898,9 +11778,8 @@ msgid "Warning:" msgstr "" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "Error:" -msgstr "Kļūme lādējot:" +msgstr "Kļūda:" #: editor/script_editor_debugger.cpp msgid "C++ Error" @@ -11911,9 +11790,8 @@ msgid "C++ Error:" msgstr "" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "C++ Source" -msgstr "Resurs" +msgstr "C++ avots" #: editor/script_editor_debugger.cpp msgid "Source:" @@ -11948,9 +11826,8 @@ msgid "Video RAM" msgstr "" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "Skip Breakpoints" -msgstr "Izveidot" +msgstr "Izlaist pārrāvumpunktus" #: editor/script_editor_debugger.cpp msgid "Inspect Previous Instance" @@ -12281,23 +12158,20 @@ msgid "GridMap Delete Selection" msgstr "" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "GridMap Fill Selection" -msgstr "Visa Izvēle" +msgstr "Režģkartes pildīšanas izvēle" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "GridMap Paste Selection" -msgstr "Visa Izvēle" +msgstr "Režģkartes ielīmēšanas izvēle" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "GridMap Paint" msgstr "" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "GridMap Selection" -msgstr "Visa Izvēle" +msgstr "Režģkartes izvēle" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" @@ -12360,18 +12234,16 @@ msgid "Cursor Clear Rotation" msgstr "" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Paste Selects" -msgstr "Visa Izvēle" +msgstr "Ielīmēt izvēlnes" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Clear Selection" msgstr "" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Fill Selection" -msgstr "Visa Izvēle" +msgstr "Aizpildīt izvēlni" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "GridMap Settings" @@ -12422,9 +12294,8 @@ msgid "Class name can't be a reserved keyword" msgstr "" #: modules/mono/csharp_script.cpp -#, fuzzy msgid "Build Solution" -msgstr "Visa Izvēle" +msgstr "Būvēt risinājumu" #: modules/mono/mono_gd/gd_mono_utils.cpp msgid "End of inner exception stack trace" @@ -12488,7 +12359,7 @@ msgstr "" #: modules/recast/navigation_mesh_generator.cpp msgid "Done!" -msgstr "" +msgstr "Darīts!" #: modules/visual_script/visual_script.cpp msgid "" @@ -12549,21 +12420,16 @@ msgid "Add Output Port" msgstr "Pievienot Izejas Pieslēgvietu" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Change Port Type" -msgstr "Nomainīt %s Tipu" +msgstr "Mainīt porta tipu" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Change Port Name" -msgstr "Izmainīt masīva vērtību" +msgstr "Mainīt porta nosaukumu" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Override an existing built-in function." -msgstr "" -"Nederīgs nosaukums. Nedrīkst sadurties ar eksistējošu iebūvēto tipa " -"nosaukumu." +msgstr "Pārrakstīt eksistējošu iebūvēto funkciju." #: modules/visual_script/visual_script_editor.cpp msgid "Create a new function." @@ -12579,7 +12445,7 @@ msgstr "Izveidot jaunu mainīgo." #: modules/visual_script/visual_script_editor.cpp msgid "Signals:" -msgstr "" +msgstr "Signāli:" #: modules/visual_script/visual_script_editor.cpp msgid "Create a new signal." @@ -12610,9 +12476,8 @@ msgid "Add Function" msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Delete input port" -msgstr "Noņemt Izvēlēto" +msgstr "Dzēst ienākošo portu" #: modules/visual_script/visual_script_editor.cpp msgid "Add Variable" @@ -12623,14 +12488,12 @@ msgid "Add Signal" msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Remove Input Port" -msgstr "Noņemt Izvēlēto" +msgstr "Noņemt ienākošo portu" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Remove Output Port" -msgstr "Noņemt Izvēlēto" +msgstr "Noņemt izejas portu" #: modules/visual_script/visual_script_editor.cpp msgid "Change Expression" @@ -12673,9 +12536,8 @@ msgid "Add Preload Node" msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Add Node(s)" -msgstr "Pievienot Mezglus..." +msgstr "Pievienot Mezglu(s)" #: modules/visual_script/visual_script_editor.cpp msgid "Add Node(s) From Tree" @@ -12712,9 +12574,8 @@ msgid "Connect Nodes" msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Disconnect Nodes" -msgstr "Savienot" +msgstr "Atvienot mezglus" #: modules/visual_script/visual_script_editor.cpp msgid "Connect Node Data" @@ -12761,9 +12622,8 @@ msgid "Try to only have one sequence input in selection." msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Create Function" -msgstr "Izveidot Jaunu %s" +msgstr "Izveidot funkciju" #: modules/visual_script/visual_script_editor.cpp msgid "Remove Function" @@ -12940,14 +12800,12 @@ msgid "Exporting APK..." msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Uninstalling..." -msgstr "Instalēt..." +msgstr "Atinstalē..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Installing to device, please wait..." -msgstr "Ielādēt..." +msgstr "Instalē ierīcē, lūdzu uzgaidi..." #: platform/android/export/export_plugin.cpp msgid "Could not install to device: %s" @@ -13146,9 +13004,8 @@ msgid "" msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Package not found: %s" -msgstr "Animācija netika atrasta: '%s'" +msgstr "Paka nav atrasta: %s" #: platform/android/export/export_plugin.cpp msgid "Creating APK..." @@ -13169,9 +13026,8 @@ msgid "" msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Adding files..." -msgstr "Pievienot Mezglus..." +msgstr "Failu pievienošana..." #: platform/android/export/export_plugin.cpp msgid "Could not export project files" @@ -13246,9 +13102,8 @@ msgid "Error starting HTTP server:" msgstr "" #: platform/osx/export/export.cpp -#, fuzzy msgid "Invalid bundle identifier:" -msgstr "Nederīgs Identifikators:" +msgstr "Nederīgs bunduļa identifikators:" #: platform/osx/export/export.cpp msgid "Notarization: code signing required." @@ -13267,34 +13122,28 @@ msgid "Notarization: Apple ID password not specified." msgstr "" #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid package short name." -msgstr "Nederīgs nosaukums." +msgstr "Nederīgs paketes īsais nosaukums." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid package unique name." -msgstr "Nederīgs nosaukums." +msgstr "Nederīgs paketes unikālais nosaukums." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid package publisher display name." -msgstr "Nederīgs nosaukums." +msgstr "Nederīgs paketes izdevēja displeja vārds." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid product GUID." -msgstr "Nederīgs nosaukums." +msgstr "Nederīgs produkta GUID." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid publisher GUID." -msgstr "Nederīgs fonta izmērs." +msgstr "Nederīgs izdevēja GUID." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid background color." -msgstr "Nederīgs nosaukums." +msgstr "Nederīga fona krāsa." #: platform/uwp/export/export.cpp msgid "Invalid Store Logo image dimensions (should be 50x50)." @@ -13849,12 +13698,11 @@ msgstr "" #: scene/animation/animation_tree.cpp msgid "In node '%s', invalid animation: '%s'." -msgstr "" +msgstr "Mezglā '%s', nederīga animācija: '%s'." #: scene/animation/animation_tree.cpp -#, fuzzy msgid "Invalid animation: '%s'." -msgstr "Nederīgs fonta izmērs." +msgstr "Nederīga animācija: '%s'." #: scene/animation/animation_tree.cpp msgid "Nothing connected to input '%s' of node '%s'." @@ -13878,7 +13726,7 @@ msgstr "" #: scene/animation/animation_tree_player.cpp msgid "This node has been deprecated. Use AnimationTree instead." -msgstr "" +msgstr "Šis mezgls ir novecojis. Tā vietā izmanto AnimationTree." #: scene/gui/color_picker.cpp msgid "" @@ -13889,7 +13737,7 @@ msgstr "" #: scene/gui/color_picker.cpp msgid "Pick a color from the editor window." -msgstr "" +msgstr "Izvēlēties krāsu no redaktora loga." #: scene/gui/color_picker.cpp msgid "HSV" @@ -13897,7 +13745,7 @@ msgstr "" #: scene/gui/color_picker.cpp msgid "Raw" -msgstr "" +msgstr "Jēls" #: scene/gui/color_picker.cpp msgid "Switch between hexadecimal and code values." @@ -13930,11 +13778,11 @@ msgstr "Lūdzu Apstipriniet..." #: scene/gui/file_dialog.cpp msgid "Must use a valid extension." -msgstr "" +msgstr "Jābūt derīgai galotnei." #: scene/gui/graph_edit.cpp msgid "Enable grid minimap." -msgstr "" +msgstr "Iespējot režģa minikarti." #: scene/gui/nine_patch_rect.cpp msgid "" @@ -13950,6 +13798,9 @@ msgid "" "functions. Making them visible for editing is fine, but they will hide upon " "running." msgstr "" +"Uznirstošie logi ir paslēpti pēc noklusējuma, lai tos parādītu, izmanto ." +"popup() vai jebkuru no to funkcijām. Padarīt tos redzamus rediģēšanai ir " +"labi, bet tie tiks paslēpti pēc palaišanas." #: scene/gui/range.cpp msgid "If \"Exp Edit\" is enabled, \"Min Value\" must be greater than 0." @@ -13971,6 +13822,8 @@ msgid "" "Default Environment as specified in Project Settings (Rendering -> " "Environment -> Default Environment) could not be loaded." msgstr "" +"Noklusējuma vide, kas norādīta projekta iestatījumos, nevar tikt ielādēta. " +"(Projekta iestatījumi -> Renderēšana -> vide -> noklusējuma vide)." #: scene/main/timer.cpp msgid "" @@ -14005,19 +13858,16 @@ msgid "" msgstr "" #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Invalid source for preview." -msgstr "Nederīgs fonta izmērs." +msgstr "Nederīgs avots priekšskatījumam." #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Invalid source for shader." -msgstr "Nederīgs fonta izmērs." +msgstr "Nederīgs fēnotāja avots." #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Invalid comparison function for that type." -msgstr "Nederīgs fonta izmērs." +msgstr "Nederīgs funkcijas salīdzinājums tās tipam." #: servers/visual/shader_language.cpp msgid "Varying may not be assigned in the '%s' function." @@ -14049,7 +13899,7 @@ msgstr "" #: servers/visual/shader_language.cpp msgid "Constants cannot be modified." -msgstr "" +msgstr "Konstantes nevar pārveidot." #~ msgid "Package Contents:" #~ msgstr "Paketes Saturs:" diff --git a/editor/translations/mi.po b/editor/translations/mi.po index b51c143856..0ca7a85100 100644 --- a/editor/translations/mi.po +++ b/editor/translations/mi.po @@ -10584,11 +10584,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/mk.po b/editor/translations/mk.po index d9663ce943..fb20cef0b9 100644 --- a/editor/translations/mk.po +++ b/editor/translations/mk.po @@ -10599,11 +10599,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/ml.po b/editor/translations/ml.po index 21a19ba01b..8f2b461e34 100644 --- a/editor/translations/ml.po +++ b/editor/translations/ml.po @@ -10609,11 +10609,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/mr.po b/editor/translations/mr.po index 0d02f7b34a..f81040488f 100644 --- a/editor/translations/mr.po +++ b/editor/translations/mr.po @@ -10601,11 +10601,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/ms.po b/editor/translations/ms.po index cc9f6f797b..ff7488d454 100644 --- a/editor/translations/ms.po +++ b/editor/translations/ms.po @@ -10969,11 +10969,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/nb.po b/editor/translations/nb.po index 660c01fed9..8924971039 100644 --- a/editor/translations/nb.po +++ b/editor/translations/nb.po @@ -18,13 +18,15 @@ # Patrick Sletvold <patricksletvold@hotmail.com>, 2021. # Kristoffer <kskau93@gmail.com>, 2021. # Lili Zoey <sayaks1@gmail.com>, 2021. +# slasken06 <ask.skivdal@gmail.com>, 2021. +# Daniel Skogly <daniel@klungo.no>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-08-12 21:32+0000\n" -"Last-Translator: Petter Reinholdtsen <pere-weblate@hungry.com>\n" +"PO-Revision-Date: 2021-11-03 13:15+0000\n" +"Last-Translator: Daniel Skogly <daniel@klungo.no>\n" "Language-Team: Norwegian Bokmål <https://hosted.weblate.org/projects/godot-" "engine/godot/nb_NO/>\n" "Language: nb\n" @@ -32,7 +34,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.8-dev\n" +"X-Generator: Weblate 4.9-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -11532,11 +11534,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/nl.po b/editor/translations/nl.po index abbf9a02bf..80c2ab188d 100644 --- a/editor/translations/nl.po +++ b/editor/translations/nl.po @@ -55,8 +55,8 @@ msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-10-04 13:31+0000\n" -"Last-Translator: Edgar <Edgar@anotherfoxguy.com>\n" +"PO-Revision-Date: 2021-10-24 20:52+0000\n" +"Last-Translator: Stijn Hinlopen <f.a.hinlopen@gmail.com>\n" "Language-Team: Dutch <https://hosted.weblate.org/projects/godot-engine/godot/" "nl/>\n" "Language: nl\n" @@ -990,9 +990,8 @@ msgid "Edit..." msgstr "Bewerken..." #: editor/connections_dialog.cpp -#, fuzzy msgid "Go to Method" -msgstr "Naar methode springen" +msgstr "Ga naar methode" #: editor/create_dialog.cpp msgid "Change %s Type" @@ -1814,13 +1813,12 @@ msgid "" msgstr "" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "(current)" -msgstr "(Huidig)" +msgstr "(huidig)" #: editor/editor_feature_profile.cpp msgid "(none)" -msgstr "" +msgstr "(geen)" #: editor/editor_feature_profile.cpp msgid "Remove currently selected profile, '%s'? Cannot be undone." @@ -11316,14 +11314,14 @@ msgstr "" "`/` karakter bevatten." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Toets " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Toets " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Controllerknop" diff --git a/editor/translations/or.po b/editor/translations/or.po index 00e5009221..eebe304b07 100644 --- a/editor/translations/or.po +++ b/editor/translations/or.po @@ -10590,11 +10590,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/pl.po b/editor/translations/pl.po index 5c55b0c86f..f4e73cb4ba 100644 --- a/editor/translations/pl.po +++ b/editor/translations/pl.po @@ -50,12 +50,14 @@ # Suchy Talerz <kacperkubis06@gmail.com>, 2021. # Bartosz Stasiak <bs97086@amu.edu.pl>, 2021. # Marek Malaria <to.tylko.dla.kont@gmail.com>, 2021. +# Mateusz Żak <matisgramy@gmail.com>, 2021. +# voltinus <voltinusmail@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-10-06 00:12+0000\n" +"PO-Revision-Date: 2021-10-31 22:17+0000\n" "Last-Translator: Tomek <kobewi4e@gmail.com>\n" "Language-Team: Polish <https://hosted.weblate.org/projects/godot-engine/" "godot/pl/>\n" @@ -2439,9 +2441,8 @@ msgstr "" "(instancjonowanie lub dziedziczenie) nie są spełnione." #: editor/editor_node.cpp -#, fuzzy msgid "Could not save one or more scenes!" -msgstr "Nie można zapisać zkonwertowanej tekstury:" +msgstr "Nie można zapisać jednej lub więcej scen!" #: editor/editor_node.cpp msgid "Save All Scenes" @@ -2585,7 +2586,7 @@ msgstr "Zapisać zmiany w \"%s\" przed zamknięciem?" #: editor/editor_node.cpp msgid "%s no longer exists! Please specify a new save location." -msgstr "" +msgstr "%s już nie istnieje! Określ nową lokalizację zapisu." #: editor/editor_node.cpp msgid "" @@ -4425,6 +4426,10 @@ msgid "" "Selecting another resource in the FileSystem dock without clicking Reimport " "first will discard changes made in the Import dock." msgstr "" +"Masz niezapisane zmiany, które nie zostały jeszcze zastosowane. Kliknij " +"Importuj ponownie, aby zastosować zmiany dokonane w ustawieniach importu.\n" +"Wybranie innego zasobu w systemie plików bez kliknięcia wpierw Importuj " +"ponownie odrzuci zmiany dokonane w imporcie." #: editor/import_dock.cpp msgid "Import As:" @@ -7398,12 +7403,10 @@ msgid "Move Down" msgstr "Przesuń w dół" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Next Script" msgstr "Następny skrypt" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Previous Script" msgstr "Poprzedni skrypt" @@ -7821,9 +7824,8 @@ msgid "Left Orthogonal" msgstr "Lewo ortogonalnie" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Left Perspective" -msgstr "Perspektywa" +msgstr "Perspektywa z Lewej" #: editor/plugins/spatial_editor_plugin.cpp msgid "Right Orthogonal" @@ -8182,24 +8184,23 @@ msgstr "Widok z prawej" #: editor/plugins/spatial_editor_plugin.cpp msgid "Orbit View Down" -msgstr "" +msgstr "Orbituj widok w dół" #: editor/plugins/spatial_editor_plugin.cpp msgid "Orbit View Left" -msgstr "" +msgstr "Orbituj widok w lewo" #: editor/plugins/spatial_editor_plugin.cpp msgid "Orbit View Right" -msgstr "" +msgstr "Orbituj widok w prawo" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Orbit View Up" -msgstr "Widok z przodu" +msgstr "Widok Orbitalny z Góry" #: editor/plugins/spatial_editor_plugin.cpp msgid "Orbit View 180" -msgstr "" +msgstr "Orbituj widok o 180" #: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" @@ -11120,14 +11121,14 @@ msgstr "" "przynajmniej jeden znak \"/\"." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Klawisz " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "Fizyczny klawisz" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Klawisz " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Przycisk joysticka" @@ -14508,6 +14509,10 @@ msgid "" "Consider using a script's process loop instead of relying on a Timer for " "very low wait times." msgstr "" +"Bardzo niskie czasy czekania (< 0,05 sekund) mogą zachowywać się znacząco " +"różnie w zależności od częstotliwości klatek renderowania lub fizyki\n" +"Rozważ użycie pętli procesowej w skrypcie zamiast polegać na Timerze dla " +"bardzo niskich czasów czekania." #: scene/main/viewport.cpp msgid "" @@ -14522,11 +14527,12 @@ msgstr "" "przyporządkuj jego teksturę dla któregoś węzła." #: scene/main/viewport.cpp -#, fuzzy msgid "" "The Viewport size must be greater than or equal to 2 pixels on both " "dimensions to render anything." -msgstr "Rozmiar węzła Viewport musi być większy niż 0, by coś wyrenderować." +msgstr "" +"Wielkość Viewportu musi być większa lub równa 2 piksele w obu wymiarach, by " +"cokolwiek renderować." #: scene/resources/occluder_shape.cpp msgid "OccluderShapeSphere Set Spheres" diff --git a/editor/translations/pr.po b/editor/translations/pr.po index 9ea671ae8f..363fb8def5 100644 --- a/editor/translations/pr.po +++ b/editor/translations/pr.po @@ -11005,11 +11005,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/pt.po b/editor/translations/pt.po index e78f560111..7b6e1eea53 100644 --- a/editor/translations/pt.po +++ b/editor/translations/pt.po @@ -11087,14 +11087,14 @@ msgstr "" "pelo menos um caráter `/`." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Tecla " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "Chave Física" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Tecla " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Botão do joystick" diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po index 9e7d53c52e..e32cf399c8 100644 --- a/editor/translations/pt_BR.po +++ b/editor/translations/pt_BR.po @@ -125,13 +125,15 @@ # Zenvasca <zenvasca@gmail.com>, 2021. # Wladimir Roberto Barbosa <wladrbarbosa@gmail.com>, 2021. # Mário Victor Ribeiro Silva <mariovictorrs@gmail.com>, 2021. +# jak3z <jose_renato06@outlook.com>, 2021. +# Henrique Darko <henridark00@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: 2016-05-30\n" -"PO-Revision-Date: 2021-10-21 10:31+0000\n" -"Last-Translator: Mário Victor Ribeiro Silva <mariovictorrs@gmail.com>\n" +"PO-Revision-Date: 2021-11-03 13:15+0000\n" +"Last-Translator: jak3z <jose_renato06@outlook.com>\n" "Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/" "godot-engine/godot/pt_BR/>\n" "Language: pt_BR\n" @@ -551,7 +553,7 @@ msgstr "Não é possível adicionar uma nova trilha sem uma raiz" #: editor/animation_track_editor.cpp msgid "Invalid track for Bezier (no suitable sub-properties)" -msgstr "Trilha inválida para Bézier (sem subpropriedades adequadas)" +msgstr "Trilha inválida para Bézier (sem sub-propriedades adequadas)" #: editor/animation_track_editor.cpp msgid "Add Bezier Track" @@ -576,7 +578,7 @@ msgstr "Adicionar Trilha Chave" #: editor/animation_track_editor.cpp msgid "Track path is invalid, so can't add a method key." msgstr "" -"Caminho da trilha é inválido,então não pode adicionar uma chave de método." +"Caminho da trilha é inválido, então não pode adicionar uma chave de método." #: editor/animation_track_editor.cpp msgid "Add Method Track Key" @@ -607,7 +609,8 @@ msgstr "Alterar Escala das Chaves na Anim" msgid "" "This option does not work for Bezier editing, as it's only a single track." msgstr "" -"Essa opção não funciona para edição por Bezier,pois é apenas uma faixa única." +"Essa opção não funciona para edição por Bézier, pois é apenas uma trilha " +"única." #: editor/animation_track_editor.cpp msgid "" @@ -3791,9 +3794,8 @@ msgid "There are no mirrors available." msgstr "Não há espelhos disponíveis." #: editor/export_template_manager.cpp -#, fuzzy msgid "Retrieving the mirror list..." -msgstr "Reconectando, por favor aguarde." +msgstr "Reconectando a lista de espelhos..." #: editor/export_template_manager.cpp msgid "Starting the download..." @@ -3853,7 +3855,6 @@ msgid "Error getting the list of mirrors." msgstr "Erro ao obter a lista de espelhos." #: editor/export_template_manager.cpp -#, fuzzy msgid "Error parsing JSON with the list of mirrors. Please report this issue!" msgstr "" "Erro ao analisar o JSON da lista de espelhos. Por favor, reporte este " @@ -3942,9 +3943,8 @@ msgid "Importing:" msgstr "Importando:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Remove templates for the version '%s'?" -msgstr "Remover versão '%s' do modelo?" +msgstr "Remover modelo para a versão '%s'?" #: editor/export_template_manager.cpp msgid "Uncompressing Android Build Sources" @@ -3982,9 +3982,8 @@ msgid "Uninstall" msgstr "Desinstalar" #: editor/export_template_manager.cpp -#, fuzzy msgid "Uninstall templates for the current version." -msgstr "Valor inicial para o contador" +msgstr "Desinstalar modelos da versão atual." #: editor/export_template_manager.cpp msgid "Download from:" @@ -3995,9 +3994,8 @@ msgid "Open in Web Browser" msgstr "Abrir no Navegador" #: editor/export_template_manager.cpp -#, fuzzy msgid "Copy Mirror URL" -msgstr "Copiar Erro" +msgstr "Copiar URL do Espelho" #: editor/export_template_manager.cpp msgid "Download and Install" @@ -4022,9 +4020,8 @@ msgid "Install from File" msgstr "Instalar a Partir do Arquivo" #: editor/export_template_manager.cpp -#, fuzzy msgid "Install templates from a local file." -msgstr "Importar Modelos de um Arquivo ZIP" +msgstr "Importar modelos de um arquivo local." #: editor/export_template_manager.cpp editor/find_in_files.cpp #: editor/progress_dialog.cpp scene/gui/dialogs.cpp @@ -4034,7 +4031,7 @@ msgstr "Cancelar" #: editor/export_template_manager.cpp #, fuzzy msgid "Cancel the download of the templates." -msgstr "Não se pôde abrir zip dos modelos de exportação." +msgstr "Cancelar download dos modelos." #: editor/export_template_manager.cpp msgid "Other Installed Versions:" @@ -4226,14 +4223,12 @@ msgid "Sort by Type (Descending)" msgstr "Ordenar por Tipo (Descendente)" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Sort by Last Modified" -msgstr "Ultima Modificação" +msgstr "Ordenar por Último Modificado" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Sort by First Modified" -msgstr "Ultima Modificação" +msgstr "Ordenar por Primeiro Modificado" #: editor/filesystem_dock.cpp msgid "Duplicate..." @@ -4532,6 +4527,11 @@ msgid "" "Selecting another resource in the FileSystem dock without clicking Reimport " "first will discard changes made in the Import dock." msgstr "" +"Você tem mudanças pendentes que não foram aplicadas ainda. Clique em " +"Reimportar para aplicar as mudanças feitas nas opções de importação.\n" +"Selecionado outro recurso no painel do Sistema de Arquivos sem ter clicado " +"em Reimportar primeiro ira descartar as mudanças feitas no painel de " +"Importar." #: editor/import_dock.cpp msgid "Import As:" @@ -4592,21 +4592,18 @@ msgid "Save As..." msgstr "Salvar Como..." #: editor/inspector_dock.cpp -#, fuzzy msgid "Extra resource options." -msgstr "Não está no caminho de recursos." +msgstr "Opções de recursos extras." #: editor/inspector_dock.cpp -#, fuzzy msgid "Edit Resource from Clipboard" -msgstr "Editar Área de Transferência de Recursos" +msgstr "Editar Recursos da Área de Transferência" #: editor/inspector_dock.cpp msgid "Copy Resource" msgstr "Copiar Recurso" #: editor/inspector_dock.cpp -#, fuzzy msgid "Make Resource Built-In" msgstr "Tornar Embutido" @@ -4635,9 +4632,8 @@ msgid "Filter properties" msgstr "Filtrar propriedades" #: editor/inspector_dock.cpp -#, fuzzy msgid "Manage object properties." -msgstr "Propriedades do objeto." +msgstr "Gerenciar propriedades do objeto." #: editor/inspector_dock.cpp msgid "Changes may be lost!" @@ -5676,13 +5672,13 @@ msgstr "" "Salve sua cena e tente novamente." #: editor/plugins/baked_lightmap_editor_plugin.cpp -#, fuzzy msgid "" "No meshes to bake. Make sure they contain an UV2 channel and that the 'Use " "In Baked Light' and 'Generate Lightmap' flags are on." msgstr "" -"Não há malhas para preparar. Certifique-se de que elas possuem um canal UV2 " -"e que a propriedade \"Preparar Luz\" está habilitada." +"Não há malhas para pré-calcular. Certifique-se de que elas possuem um canal " +"UV2 e que as propriedades \"Use In Baked Light\" e \"Generate Lightmap\" " +"está habilitada." #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "Failed creating lightmap images, make sure path is writable." @@ -5826,15 +5822,13 @@ msgstr "Mover CanvaItem \"%s\" para (%d, %d)" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Locked" msgstr "Fixar Seleção" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Grouped" -msgstr "Grupo" +msgstr "Agrupado" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -5938,13 +5932,13 @@ msgstr "Alterar Âncoras" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "" "Project Camera Override\n" "Overrides the running project's camera with the editor viewport camera." msgstr "" -"Sobrepor Câmera de Jogo\n" -"Sobrepõe a câmera de jogo com a janela de exibição da câmera." +"Sobrepor câmera do projeto.\n" +"Sobrepõe a câmera do projeto em execução com a câmera da janela de exibição " +"do editor." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5953,6 +5947,9 @@ msgid "" "No project instance running. Run the project from the editor to use this " "feature." msgstr "" +"Sobrepor câmera do projeto.\n" +"Sem instâncias do projeto em execução. Execute o projeto pelo editor para " +"usar essa funcionalidade." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -6020,25 +6017,23 @@ msgstr "Modo de Seleção" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Drag: Rotate selected node around pivot." -msgstr "Remover nó ou trilha selecionada." +msgstr "Arrastar: Gire nó em tono do pivô." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Alt+Drag: Move selected node." msgstr "Alt+Arrastar: Mover nó selecionado." #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "V: Set selected node's pivot position." -msgstr "Remover nó ou trilha selecionada." +msgstr "V: Define a posição do pivô do nó selecionado." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Alt+RMB: Show list of all nodes at position clicked, including locked." msgstr "" -"Alt+BDM: Mostra uma lista de todos os nodes na posição clicada, incluindo " -"os bloqueados." +"Alt+Botão Esquerdo do Mouse: Mostrar a lista de todos os nós na posição " +"clicada, incluindo os bloqueados." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "RMB: Add node at position clicked." @@ -6582,9 +6577,8 @@ msgid "Couldn't create a single convex collision shape." msgstr "Não foi possível criar uma forma de colisão convexa simples." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Simplified Convex Shape" -msgstr "Criar Forma(s) Convexa(s) Simples" +msgstr "Criar Forma(s) Convexa(s) Simplificadas" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Single Convex Shape" @@ -6619,9 +6613,8 @@ msgid "No mesh to debug." msgstr "Nenhuma malha para depurar." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Mesh has no UV in layer %d." -msgstr "Modelo não tem uma UV nesta camada" +msgstr "Modelo não tem UV na camada %d." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "MeshInstance lacks a Mesh!" @@ -6686,9 +6679,8 @@ msgstr "" "Esta é a opção mais rápida (mas menos precisa) para detecção de colisão." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Simplified Convex Collision Sibling" -msgstr "Criar um irmão de Colisão Convexa" +msgstr "Criar Colisão Convexa Simplificada Irmã" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "" @@ -6705,14 +6697,14 @@ msgid "Create Multiple Convex Collision Siblings" msgstr "Criar Múltipla Colisão Convexa Irmã(s)" #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "" "Creates a polygon-based collision shape.\n" "This is a performance middle-ground between a single convex collision and a " "polygon-based collision." msgstr "" -"Cria um polígono base de colisão forma.\n" -"Este é um meio-termo entre as duas opções acima." +"Cria uma forma de colisão baseada em polígonos.\n" +"Este é um meio-termo em desempenho entre uma única colisão convexa e uma " +"colisão baseada em polígono." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." @@ -6779,14 +6771,12 @@ msgid "Remove Selected Item" msgstr "Remover Item Selecionado" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Ignore Transforms)" -msgstr "Importar da Cena" +msgstr "Importar da Cena (Ignora Transforms)" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Apply Transforms)" -msgstr "Importar da Cena" +msgstr "Importar da Cena (Aplica Transforms)" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Update from Scene" @@ -7365,24 +7355,20 @@ msgid "ResourcePreloader" msgstr "ResourcePreloader" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Flip Portals" msgstr "Inverter Horizontalmente" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Room Generate Points" -msgstr "Gerar Contagem de Pontos:" +msgstr "Gerar Contagem de Pontos" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Generate Points" -msgstr "Gerar Contagem de Pontos:" +msgstr "Gerar Pontos" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Flip Portal" -msgstr "Inverter Horizontalmente" +msgstr "Virar Portal" #: editor/plugins/room_manager_editor_plugin.cpp #, fuzzy @@ -7894,14 +7880,12 @@ msgid "Skeleton2D" msgstr "Esqueleto2D" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Reset to Rest Pose" -msgstr "Definir os ossos para descansar Pose" +msgstr "Redefinir para Pose de Descanso" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Overwrite Rest Pose" -msgstr "Sobrescrever Cena Existente" +msgstr "Sobrescrever Pose de Descanso" #: editor/plugins/skeleton_editor_plugin.cpp msgid "Create physical bones" @@ -7928,74 +7912,62 @@ msgid "Perspective" msgstr "Perspectiva" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Topo" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Perspective" -msgstr "Perspectiva" +msgstr "Perspectiva Topo" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Baixo" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Perspective" -msgstr "Perspectiva" +msgstr "Perspectiva Baixo" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Left Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Esquerda" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Left Perspective" -msgstr "Perspectiva" +msgstr "Perspectiva Esquerda" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Right Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Direita" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Right Perspective" -msgstr "Perspectiva" +msgstr "Perspectiva Direita" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Dianteira" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Perspective" -msgstr "Perspectiva" +msgstr "Perspectiva Dianteira" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Traseira" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Perspective" -msgstr "Perspectiva" +msgstr "Perspectiva Traseira" #. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled. #: editor/plugins/spatial_editor_plugin.cpp msgid " [auto]" -msgstr "" +msgstr " [automático]" #. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled. #: editor/plugins/spatial_editor_plugin.cpp msgid " [portals active]" -msgstr "" +msgstr " [portais ativados]" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Aborted." @@ -8057,9 +8029,8 @@ msgid "Animation Key Inserted." msgstr "Chave de Animação Inserida." #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Pitch:" -msgstr "Tom" +msgstr "Tom:" #: editor/plugins/spatial_editor_plugin.cpp msgid "Yaw:" @@ -8253,9 +8224,8 @@ msgstr "" "Ele não deve ser usado como indicação confiável de desempenho do jogo." #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Convert Rooms" -msgstr "Converter Para %s" +msgstr "Converter Salas" #: editor/plugins/spatial_editor_plugin.cpp msgid "XForm Dialog" @@ -8277,9 +8247,8 @@ msgstr "" "x\")." #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Snap Nodes to Floor" -msgstr "Encaixar Nó(s) no Chão" +msgstr "Atrair Nó(s) ao Chão" #: editor/plugins/spatial_editor_plugin.cpp msgid "Couldn't find a solid floor to snap the selection to." @@ -8295,7 +8264,7 @@ msgstr "Use Encaixar" #: editor/plugins/spatial_editor_plugin.cpp msgid "Converts rooms for portal culling." -msgstr "" +msgstr "Converter salas para portal culling." #: editor/plugins/spatial_editor_plugin.cpp msgid "Bottom View" @@ -8741,19 +8710,16 @@ msgid "TextureRegion" msgstr "Região da Textura" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Colors" -msgstr "Cor" +msgstr "Cores" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Fonts" -msgstr "Fonte" +msgstr "Fontes" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Icons" -msgstr "Ícone" +msgstr "Ícones" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -8762,7 +8728,7 @@ msgstr "StyleBox" #: editor/plugins/theme_editor_plugin.cpp msgid "{num} color(s)" -msgstr "" +msgstr "{num} cor(es)" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -8770,9 +8736,8 @@ msgid "No colors found." msgstr "Nenhum sub-recurso encontrado." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "{num} constant(s)" -msgstr "Constantes" +msgstr "{num} constante(s)" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -8781,21 +8746,19 @@ msgstr "Cor constante." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} font(s)" -msgstr "" +msgstr "{num} fonte(s)" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "No fonts found." -msgstr "Não encontrado!" +msgstr "Fontes não encontradas." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} icon(s)" -msgstr "" +msgstr "{num} ícone(s)" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "No icons found." -msgstr "Não encontrado!" +msgstr "Ícones não encontrados." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} stylebox(es)" @@ -8821,36 +8784,31 @@ msgstr "Importar Tema" #: editor/plugins/theme_editor_plugin.cpp msgid "Importing items {n}/{n}" -msgstr "" +msgstr "Importando itens {n}/{n}" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Updating the editor" -msgstr "Sair do editor?" +msgstr "Atualizando o editor" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Finalizing" -msgstr "Analisando" +msgstr "Finalizando" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Filter:" -msgstr "Filtro: " +msgstr "Filtro:" #: editor/plugins/theme_editor_plugin.cpp msgid "With Data" -msgstr "" +msgstr "Com Dados" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select by data type:" -msgstr "Selecione um Nó" +msgstr "Selecione por tipo de dados:" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible color items." -msgstr "Selecione um item de configuração primeiro!" +msgstr "Selecione todos os itens de cor visíveis." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible color items and their data." @@ -8861,9 +8819,8 @@ msgid "Deselect all visible color items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible constant items." -msgstr "Selecione um item de configuração primeiro!" +msgstr "Selecione todos os itens constantes visíveis." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible constant items and their data." @@ -8874,9 +8831,8 @@ msgid "Deselect all visible constant items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible font items." -msgstr "Selecione um item de configuração primeiro!" +msgstr "Selecione todos os itens de fonte visíveis." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible font items and their data." @@ -8887,19 +8843,16 @@ msgid "Deselect all visible font items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible icon items." -msgstr "Selecione um item de configuração primeiro!" +msgstr "Selecione todos os itens de ícones visíveis." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible icon items and their data." -msgstr "Selecione um item de configuração primeiro!" +msgstr "Selecione todos os itens de ícones visíveis e seus dados." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Deselect all visible icon items." -msgstr "Selecione um item de configuração primeiro!" +msgstr "Desmarque todos os itens de ícones visíveis." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible stylebox items." @@ -8955,9 +8908,8 @@ msgid "Deselect all Theme items." msgstr "Desselecionar todos os itens do Tema." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Import Selected" -msgstr "Importar Cena" +msgstr "Importar Selecionado" #: editor/plugins/theme_editor_plugin.cpp msgid "" @@ -8981,9 +8933,8 @@ msgid "Remove All Color Items" msgstr "Remover Todos os Itens" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Rename Item" -msgstr "Remover Item" +msgstr "Renomear Item" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9093,9 +9044,8 @@ msgid "Add Type:" msgstr "Tipo:" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Item:" -msgstr "Adicionar Item" +msgstr "Adicionar Item:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9103,9 +9053,8 @@ msgid "Add StyleBox Item" msgstr "Adicionar Todos os Itens" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Items:" -msgstr "Remover Item" +msgstr "Remover Itens:" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove Class Items" @@ -9191,9 +9140,8 @@ msgid "Add Item Type" msgstr "Adicionar Item" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Node Types:" -msgstr "Tipo de nó" +msgstr "Tipos de Nó:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9214,9 +9162,8 @@ msgid "Override all default type items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Theme:" -msgstr "Tema" +msgstr "Tema:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -10744,9 +10691,8 @@ msgid "VisualShader" msgstr "VisualShader" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Edit Visual Property:" -msgstr "Editar Propriedade Visual" +msgstr "Editar Propriedade Visual:" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Visual Shader Mode Changed" @@ -11199,12 +11145,11 @@ msgstr "Tem certeza de que quer executar %d projetos ao mesmo tempo?" #: editor/project_manager.cpp #, fuzzy msgid "Remove %d projects from the list?" -msgstr "Selecione um dispositivo da lista" +msgstr "Remover projetos %d da lista?" #: editor/project_manager.cpp -#, fuzzy msgid "Remove this project from the list?" -msgstr "Selecione um dispositivo da lista" +msgstr "Remover esse projeto da lista?" #: editor/project_manager.cpp msgid "" @@ -11342,14 +11287,14 @@ msgstr "" "conter pelo menos um caractere `/`." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Tecla " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Tecla " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Botão do Joystick" @@ -13521,7 +13466,7 @@ msgstr "Carregando, por favor aguarde." #: platform/android/export/export_plugin.cpp #, fuzzy msgid "Could not install to device: %s" -msgstr "Não foi possível instanciar cena!" +msgstr "Não foi possível instalar para o dispositivo: %s" #: platform/android/export/export_plugin.cpp msgid "Running on device..." @@ -13657,7 +13602,7 @@ msgstr "Assinando lançamento %s..." #: platform/android/export/export_plugin.cpp #, fuzzy msgid "Could not find keystore, unable to export." -msgstr "Não foi possível abrir o modelo para exportar:" +msgstr "Não foi possível encontrar a keystore, incapaz de exportar." #: platform/android/export/export_plugin.cpp msgid "'apksigner' returned with error #%d" @@ -13723,9 +13668,8 @@ msgstr "" "Não foi possível exportar os arquivos do projeto ao projeto do gradle\n" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not write expansion package file!" -msgstr "Não foi possível escrever o arquivo:" +msgstr "Não foi possível escrever o arquivo do pacote de expansão!" #: platform/android/export/export_plugin.cpp msgid "Building Android Project (gradle)" @@ -13782,9 +13726,8 @@ msgid "Adding files..." msgstr "Adicionando arquivos..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not export project files" -msgstr "Não foi possível escrever o arquivo:" +msgstr "Não foi possível exportar os arquivos do projeto" #: platform/android/export/export_plugin.cpp msgid "Aligning APK..." @@ -13857,7 +13800,7 @@ msgstr "Não foi possível criar a pasta." #: platform/javascript/export/export.cpp #, fuzzy msgid "Error starting HTTP server:" -msgstr "Erro ao salvar cena." +msgstr "Erro iniciando servidor HTTP:" #: platform/osx/export/export.cpp #, fuzzy diff --git a/editor/translations/ro.po b/editor/translations/ro.po index 12102e12dc..1ffd38d5a0 100644 --- a/editor/translations/ro.po +++ b/editor/translations/ro.po @@ -11270,11 +11270,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/ru.po b/editor/translations/ru.po index df2c3c1cdf..668cfb6afa 100644 --- a/editor/translations/ru.po +++ b/editor/translations/ru.po @@ -11177,14 +11177,14 @@ msgstr "" "хотя бы один символ `/`." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Клавиша " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "Физическая клавиша" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Клавиша " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Кнопка геймпада" diff --git a/editor/translations/si.po b/editor/translations/si.po index c19727905b..698dc3040d 100644 --- a/editor/translations/si.po +++ b/editor/translations/si.po @@ -10693,11 +10693,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/sk.po b/editor/translations/sk.po index 93e2cf40ab..59ddcb9fc1 100644 --- a/editor/translations/sk.po +++ b/editor/translations/sk.po @@ -11161,11 +11161,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/sl.po b/editor/translations/sl.po index dc381b7d0a..0d0acd817d 100644 --- a/editor/translations/sl.po +++ b/editor/translations/sl.po @@ -11477,11 +11477,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/sq.po b/editor/translations/sq.po index 2cf0327ec4..d6e23ddbe6 100644 --- a/editor/translations/sq.po +++ b/editor/translations/sq.po @@ -11106,11 +11106,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/sr_Cyrl.po b/editor/translations/sr_Cyrl.po index 53a3dc6761..0301c5f380 100644 --- a/editor/translations/sr_Cyrl.po +++ b/editor/translations/sr_Cyrl.po @@ -12346,15 +12346,15 @@ msgstr "" "карактер." #: editor/project_settings_editor.cpp +msgid "Physical Key" +msgstr "" + +#: editor/project_settings_editor.cpp #, fuzzy msgid "Key " msgstr "Кључ" #: editor/project_settings_editor.cpp -msgid "Physical Key" -msgstr "" - -#: editor/project_settings_editor.cpp #, fuzzy msgid "Joy Button" msgstr "Џојс дугмиж" diff --git a/editor/translations/sr_Latn.po b/editor/translations/sr_Latn.po index 668ee7d7de..66f5d9574f 100644 --- a/editor/translations/sr_Latn.po +++ b/editor/translations/sr_Latn.po @@ -10795,11 +10795,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/sv.po b/editor/translations/sv.po index f22e9500e1..3b674ce0e3 100644 --- a/editor/translations/sv.po +++ b/editor/translations/sv.po @@ -23,13 +23,14 @@ # Marcus Toftedahl <marcus.toftedahl@his.se>, 2020. # Alex25820 <Alexander_sjogren@hotmail.se>, 2021. # Leon <joel.lundborg@gmail.com>, 2021. +# Kent Jofur <kent.jofur@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-10-21 10:31+0000\n" -"Last-Translator: Christoffer Sundbom <christoffer_karlsson@live.se>\n" +"PO-Revision-Date: 2021-11-03 13:15+0000\n" +"Last-Translator: Kent Jofur <kent.jofur@gmail.com>\n" "Language-Team: Swedish <https://hosted.weblate.org/projects/godot-engine/" "godot/sv/>\n" "Language: sv\n" @@ -385,15 +386,13 @@ msgstr "Anim Infoga" #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp -#, fuzzy msgid "node '%s'" -msgstr "Kan inte öppna '%s'." +msgstr "nod '%s'" #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp -#, fuzzy msgid "animation" -msgstr "Animation" +msgstr "animering" #: editor/animation_track_editor.cpp msgid "AnimationPlayer can't animate itself, only other players." @@ -402,9 +401,8 @@ msgstr "" #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp -#, fuzzy msgid "property '%s'" -msgstr "Egenskaper" +msgstr "egenskapen '%s'" #: editor/animation_track_editor.cpp msgid "Anim Create & Insert" @@ -874,9 +872,8 @@ msgstr "" "vilotid." #: editor/connections_dialog.cpp -#, fuzzy msgid "Oneshot" -msgstr "Oneshot" +msgstr "Ett skott" #: editor/connections_dialog.cpp msgid "Disconnects the signal after its first emission." @@ -1304,9 +1301,8 @@ msgid "(and %s more files)" msgstr "(och %s fler filer)" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Asset \"%s\" installed successfully!" -msgstr "Paketet installerades!" +msgstr "Paketet \"%s\" har installerats!" #: editor/editor_asset_installer.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -1830,9 +1826,8 @@ msgid "Enable Contextual Editor" msgstr "Aktivera kontextuell redigerare" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Class Properties:" -msgstr "Expandera alla" +msgstr "Klassegenskaper:" #: editor/editor_feature_profile.cpp #, fuzzy @@ -2176,7 +2171,7 @@ msgstr "" #: editor/editor_help.cpp msgid "Method Descriptions" -msgstr "Metodbeskrivningar" +msgstr "Metodbeskrivning" #: editor/editor_help.cpp msgid "" @@ -2606,13 +2601,15 @@ msgstr "Spara ändringar i '%s' innan stängning?" #: editor/editor_node.cpp msgid "%s no longer exists! Please specify a new save location." -msgstr "" +msgstr "%s finns inte längre! Vänligen ange en ny lagringsplats." #: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." msgstr "" +"Den aktuella scenen har ingen rotnod, men %d modifierade externa resurser " +"sparades ändå." #: editor/editor_node.cpp #, fuzzy @@ -2651,29 +2648,27 @@ msgstr "Nuvarande scen inte sparad. Öppna ändå?" #: editor/editor_node.cpp msgid "Can't undo while mouse buttons are pressed." -msgstr "" +msgstr "Det går inte att ångra medan musknapparna är nedtryckta." #: editor/editor_node.cpp msgid "Nothing to undo." -msgstr "" +msgstr "Inget att ångra." #: editor/editor_node.cpp -#, fuzzy msgid "Undo: %s" -msgstr "Ångra" +msgstr "Ångra: %s" #: editor/editor_node.cpp msgid "Can't redo while mouse buttons are pressed." -msgstr "" +msgstr "Det går inte att göra om medan musknapparna är nedtryckta." #: editor/editor_node.cpp msgid "Nothing to redo." -msgstr "" +msgstr "Inget att göra om." #: editor/editor_node.cpp -#, fuzzy msgid "Redo: %s" -msgstr "Återställ" +msgstr "Gör om: %s" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." @@ -3278,9 +3273,8 @@ msgid "Inspector" msgstr "Inspektör" #: editor/editor_node.cpp -#, fuzzy msgid "Expand Bottom Panel" -msgstr "Expandera alla" +msgstr "Expandera Nedre Panel" #: editor/editor_node.cpp msgid "Output" @@ -3452,9 +3446,8 @@ msgid "Update" msgstr "Uppdatera" #: editor/editor_plugin_settings.cpp -#, fuzzy msgid "Version" -msgstr "Version:" +msgstr "Version" #: editor/editor_plugin_settings.cpp #, fuzzy @@ -3721,9 +3714,8 @@ msgid "Error requesting URL:" msgstr "Fel vid laddning:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Connecting to the mirror..." -msgstr "Anslut Till Node:" +msgstr "Ansluter till spegeln..." #: editor/export_template_manager.cpp msgid "Can't resolve the requested address." @@ -3749,9 +3741,8 @@ msgid "Request ended up in a redirect loop." msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Request failed:" -msgstr "Förfrågning Misslyckades." +msgstr "Förfrågning misslyckades:" #: editor/export_template_manager.cpp msgid "Download complete; extracting templates..." @@ -3902,9 +3893,8 @@ msgid "Uninstall templates for the current version." msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Download from:" -msgstr "Ladda ner" +msgstr "Ladda ner från:" #: editor/export_template_manager.cpp #, fuzzy @@ -4405,19 +4395,19 @@ msgstr "Genererar Lightmaps" #: editor/import/resource_importer_scene.cpp msgid "Generating for Mesh: " -msgstr "" +msgstr "Generera för mesh: " #: editor/import/resource_importer_scene.cpp msgid "Running Custom Script..." -msgstr "" +msgstr "Kör anpassat skript..." #: editor/import/resource_importer_scene.cpp msgid "Couldn't load post-import script:" -msgstr "" +msgstr "Det gick inte att läsa in skript efter import:" #: editor/import/resource_importer_scene.cpp msgid "Invalid/broken script for post-import (check console):" -msgstr "" +msgstr "Ogiltigt/felaktigt skript för efterimport (kontrollera konsolen):" #: editor/import/resource_importer_scene.cpp msgid "Error running post-import script:" @@ -4432,22 +4422,20 @@ msgid "Saving..." msgstr "Sparar..." #: editor/import_defaults_editor.cpp -#, fuzzy msgid "Select Importer" -msgstr "Välj Node" +msgstr "Välj Importör" #: editor/import_defaults_editor.cpp msgid "Importer:" msgstr "Importör:" #: editor/import_defaults_editor.cpp -#, fuzzy msgid "Reset to Defaults" -msgstr "Ladda Standard" +msgstr "Återställ till standardvärden" #: editor/import_dock.cpp msgid "Keep File (No Import)" -msgstr "" +msgstr "Behåll fil (ingen import)" #: editor/import_dock.cpp msgid "%d Files" @@ -4472,6 +4460,10 @@ msgid "" "Selecting another resource in the FileSystem dock without clicking Reimport " "first will discard changes made in the Import dock." msgstr "" +"Du har väntande ändringar som inte har tillämpats ännu. Klicka på " +"Återimportera för att tillämpa ändringar som gjorts i importalternativen.\n" +"Om du väljer en annan resurs i FilSystem-dockan utan att först klicka på " +"Återimportera kommer ändringar som gjorts i importdockan att ignoreras." #: editor/import_dock.cpp msgid "Import As:" @@ -4484,16 +4476,18 @@ msgstr "Återställ Zoom" #: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" -msgstr "" +msgstr "Spara scener, återimportera och starta om" #: editor/import_dock.cpp msgid "Changing the type of an imported file requires editor restart." -msgstr "" +msgstr "Att ändra typen av en importerad fil kräver omstart av editorn." #: editor/import_dock.cpp msgid "" "WARNING: Assets exist that use this resource, they may stop loading properly." msgstr "" +"VARNING: Det finns tillgångar som använder den här resursen, de kan sluta " +"laddas in korrekt." #: editor/inspector_dock.cpp msgid "Failed to load resource." @@ -4519,7 +4513,7 @@ msgstr "Skapa en ny resurs i minnet och ändra den." #: editor/inspector_dock.cpp msgid "Load an existing resource from disk and edit it." -msgstr "" +msgstr "Ladda en befintlig resurs från disken och redigera den." #: editor/inspector_dock.cpp msgid "Save the currently edited resource." @@ -4835,9 +4829,8 @@ msgid "Blend:" msgstr "" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Parameter Changed:" -msgstr "Uppdatera Ändringar" +msgstr "Parameter ändrad:" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp @@ -5469,9 +5462,8 @@ msgid "Request failed, timeout" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Timeout." -msgstr "Tid:" +msgstr "Tidsgräns." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Failed:" @@ -8028,9 +8020,8 @@ msgid "Translate" msgstr "Översättningar" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Scale" -msgstr "Skala:" +msgstr "Skala" #: editor/plugins/spatial_editor_plugin.cpp msgid "Scaling: " @@ -8062,28 +8053,24 @@ msgid "Yaw:" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Size:" -msgstr "Storlek: " +msgstr "Storlek:" #: editor/plugins/spatial_editor_plugin.cpp msgid "Objects Drawn:" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Material Changes:" -msgstr "Uppdatera Ändringar" +msgstr "Materialförändringar:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Shader Changes:" -msgstr "Ändra" +msgstr "Shader Ändringar:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Surface Changes:" -msgstr "Ändra" +msgstr "Ytförändringar:" #: editor/plugins/spatial_editor_plugin.cpp msgid "Draw Calls:" @@ -8838,9 +8825,8 @@ msgid "Importing items {n}/{n}" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Updating the editor" -msgstr "Stäng redigeraren?" +msgstr "Uppdaterar editorn" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -8857,9 +8843,8 @@ msgid "With Data" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select by data type:" -msgstr "Välj en Node" +msgstr "Välj efter datatyp:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9101,9 +9086,8 @@ msgid "Add StyleBox Item" msgstr "Stil" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Items:" -msgstr "Ta Bort Mall" +msgstr "Ta bort objekt:" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove Class Items" @@ -9143,9 +9127,8 @@ msgid "Editor Theme" msgstr "Redigera Tema" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select Another Theme Resource:" -msgstr "Ta bort Resurs" +msgstr "Välj en annan temaresurs:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9201,18 +9184,16 @@ msgid "Show default type items alongside items that have been overridden." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Override All" -msgstr "skriv över:" +msgstr "Åsidosätt Alla" #: editor/plugins/theme_editor_plugin.cpp msgid "Override all default type items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Theme:" -msgstr "Tema" +msgstr "Tema:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9234,9 +9215,8 @@ msgid "Default Preview" msgstr "Förhandsgranska" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select UI Scene:" -msgstr "Återställ Scen" +msgstr "Välj UI-scen:" #: editor/plugins/theme_editor_preview.cpp msgid "" @@ -9386,9 +9366,8 @@ msgid "Erase TileMap" msgstr "" #: editor/plugins/tile_map_editor_plugin.cpp -#, fuzzy msgid "Find Tile" -msgstr "Hitta Nästa" +msgstr "Hitta Bricka" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Transpose" @@ -9559,9 +9538,8 @@ msgid "Navigation Mode" msgstr "Animations-Node" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Bitmask Mode" -msgstr "Raw-Läge" +msgstr "Bitmaskläge" #: editor/plugins/tile_set_editor_plugin.cpp #, fuzzy @@ -9569,9 +9547,8 @@ msgid "Priority Mode" msgstr "Exportera Projekt" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Icon Mode" -msgstr "Växla Läge" +msgstr "Icon Läge" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Z Index Mode" @@ -9857,9 +9834,8 @@ msgid "Detect new changes" msgstr "Skapa Ny" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Changes" -msgstr "Ändra" +msgstr "Ändringar" #: editor/plugins/version_control_editor_plugin.cpp msgid "Modified" @@ -10723,9 +10699,8 @@ msgid "VisualShader" msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Edit Visual Property:" -msgstr "Redigera Filter" +msgstr "Redigera Visuell Egenskap:" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Visual Shader Mode Changed" @@ -11147,14 +11122,12 @@ msgid "Are you sure to run %d projects at once?" msgstr "" #: editor/project_manager.cpp -#, fuzzy msgid "Remove %d projects from the list?" -msgstr "Välj enhet från listan" +msgstr "Ta bort %d projekt från listan?" #: editor/project_manager.cpp -#, fuzzy msgid "Remove this project from the list?" -msgstr "Välj enhet från listan" +msgstr "Vill du ta bort det här projektet från listan?" #: editor/project_manager.cpp msgid "" @@ -11279,14 +11252,14 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Nyckel " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Nyckel " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "" @@ -13584,9 +13557,8 @@ msgstr "" "Snälla Vänta..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not find keystore, unable to export." -msgstr "Kunde inte öppna mall för export:" +msgstr "Det gick inte att hitta nyckellager, det gick inte att exportera." #: platform/android/export/export_plugin.cpp msgid "'apksigner' returned with error #%d" @@ -13646,9 +13618,8 @@ msgid "Could not export project files to gradle project\n" msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not write expansion package file!" -msgstr "Kunde inte skriva till filen:" +msgstr "Kunde inte skriva expansionspaketfil!" #: platform/android/export/export_plugin.cpp msgid "Building Android Project (gradle)" @@ -13701,9 +13672,8 @@ msgid "Adding files..." msgstr "Lägger till %s..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not export project files" -msgstr "Kunde inte skriva till filen:" +msgstr "Kunde inte exportera projektfiler" #: platform/android/export/export_plugin.cpp msgid "Aligning APK..." @@ -13768,14 +13738,12 @@ msgid "Could not read HTML shell:" msgstr "Kunde inte skriva till filen:" #: platform/javascript/export/export.cpp -#, fuzzy msgid "Could not create HTTP server directory:" -msgstr "Kunde inte skapa mapp." +msgstr "Kunde inte skapa HTTP-serverkatalog:" #: platform/javascript/export/export.cpp -#, fuzzy msgid "Error starting HTTP server:" -msgstr "Fel vid sparande av scenen." +msgstr "Fel vid start av HTTP-server:" #: platform/osx/export/export.cpp #, fuzzy @@ -14574,9 +14542,8 @@ msgid "Invalid source for shader." msgstr "Ogiltig teckenstorlek." #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Invalid comparison function for that type." -msgstr "Ogiltig teckenstorlek." +msgstr "Ogiltig jämförelsefunktion för den typen." #: servers/visual/shader_language.cpp msgid "Varying may not be assigned in the '%s' function." @@ -14607,8 +14574,9 @@ msgid "Assignment to uniform." msgstr "" #: servers/visual/shader_language.cpp +#, fuzzy msgid "Constants cannot be modified." -msgstr "" +msgstr "Konstanter kan inte ändras." #~ msgid "Bottom" #~ msgstr "Botten" diff --git a/editor/translations/ta.po b/editor/translations/ta.po index d9114adc60..ac91117100 100644 --- a/editor/translations/ta.po +++ b/editor/translations/ta.po @@ -10697,11 +10697,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/te.po b/editor/translations/te.po index 39cda33625..6735d08c71 100644 --- a/editor/translations/te.po +++ b/editor/translations/te.po @@ -10595,11 +10595,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/th.po b/editor/translations/th.po index ef1bb3b2bb..602f593f13 100644 --- a/editor/translations/th.po +++ b/editor/translations/th.po @@ -11110,14 +11110,14 @@ msgstr "" "แบบสอบถามต้องมีอักขระ `/` อย่างน้อยหนึ่งตัวเพื่อกรองตามชื่อโครงการและที่อยู่แบบเต็ม" #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "ปุ่ม " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "ปุ่ม " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "ปุ่มจอย" diff --git a/editor/translations/tr.po b/editor/translations/tr.po index 5f8a365768..73896955e3 100644 --- a/editor/translations/tr.po +++ b/editor/translations/tr.po @@ -11177,14 +11177,14 @@ msgstr "" "` karakteri içermesi gereklidir." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Anahtar " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "Fiziksel Anahtar" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Anahtar " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Oyun Kolu Düğmesi" diff --git a/editor/translations/tt.po b/editor/translations/tt.po index fc5064a395..0f92208d1e 100644 --- a/editor/translations/tt.po +++ b/editor/translations/tt.po @@ -10593,11 +10593,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/tzm.po b/editor/translations/tzm.po index 1911f0fde6..1b9404a393 100644 --- a/editor/translations/tzm.po +++ b/editor/translations/tzm.po @@ -10591,11 +10591,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/uk.po b/editor/translations/uk.po index db324bbc2c..215937ed55 100644 --- a/editor/translations/uk.po +++ b/editor/translations/uk.po @@ -11131,14 +11131,14 @@ msgstr "" "бути принаймні один символ «/»." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Клавіша " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "Фізична клавіша" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Клавіша " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Кнопка джойстика" diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po index b192d4b651..7918638d9c 100644 --- a/editor/translations/ur_PK.po +++ b/editor/translations/ur_PK.po @@ -10910,11 +10910,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/vi.po b/editor/translations/vi.po index e1aa97d317..ceb4d7948e 100644 --- a/editor/translations/vi.po +++ b/editor/translations/vi.po @@ -11117,14 +11117,14 @@ msgstr "" "một ký tự '/'." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Khoá " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Khoá " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "" diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po index 82159d534e..6fef2d2f01 100644 --- a/editor/translations/zh_CN.po +++ b/editor/translations/zh_CN.po @@ -10934,14 +10934,14 @@ msgstr "" "如果要根据名称和完整路径筛选,搜索内容应至少包含一个“/”字符。" #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "按键 " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "物理按键" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "按键 " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "手柄按键" diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po index b3ac6dcf79..c04f392c13 100644 --- a/editor/translations/zh_HK.po +++ b/editor/translations/zh_HK.po @@ -11395,11 +11395,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po index 6ec9a2671a..c699fc48fb 100644 --- a/editor/translations/zh_TW.po +++ b/editor/translations/zh_TW.po @@ -11092,14 +11092,14 @@ msgstr "" "若要以名稱與完整路徑來過濾專案,搜尋內容應至少包含一個「/」字元。" #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "按鍵 " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "按鍵 " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "控制器按鈕" |