diff options
Diffstat (limited to 'editor')
219 files changed, 13027 insertions, 7545 deletions
diff --git a/editor/SCsub b/editor/SCsub index d149cc6273..6b18eeae93 100644 --- a/editor/SCsub +++ b/editor/SCsub @@ -5,7 +5,6 @@ Import("env") env.editor_sources = [] import os -import os.path import glob import editor_builders @@ -59,7 +58,7 @@ if env["tools"]: else: docs += Glob(d + "/*.xml") # Custom. - _make_doc_data_class_path(os.path.join(env.Dir("#").abspath, "editor")) + _make_doc_data_class_path(env.Dir("#editor").abspath) docs = sorted(docs) env.Depends("#editor/doc_data_compressed.gen.h", docs) @@ -69,10 +68,17 @@ if env["tools"]: env.Run(editor_builders.make_doc_header, "Generating documentation header."), ) - path = env.Dir(".").abspath + # Editor interface and class reference translations incur a significant size + # cost for the editor binary (see godot-proposals#3421). + # To limit it, we only include translations with a high enough completion + # ratio (30% for the editor UI, 10% for the class reference). + # Generated with `make include-list` for each resource. # Editor translations - tlist = glob.glob(path + "/translations/*.po") + 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" + ).split(",") + tlist = [env.Dir("#editor/translations").abspath + "/" + f + ".po" for f in to_include] env.Depends("#editor/editor_translations.gen.h", tlist) env.CommandNoCache( "#editor/editor_translations.gen.h", @@ -81,7 +87,8 @@ if env["tools"]: ) # Documentation translations - tlist = glob.glob(env.Dir("#doc").abspath + "/translations/*.po") + to_include = "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( "#editor/doc_translations.gen.h", @@ -90,8 +97,8 @@ if env["tools"]: ) # Fonts - flist = glob.glob(path + "/../thirdparty/fonts/*.ttf") - flist.extend(glob.glob(path + "/../thirdparty/fonts/*.otf")) + flist = glob.glob(env.Dir("#thirdparty").abspath + "/fonts/*.ttf") + flist.extend(glob.glob(env.Dir("#thirdparty").abspath + "/fonts/*.otf")) flist.sort() env.Depends("#editor/builtin_fonts.gen.h", flist) env.CommandNoCache( @@ -101,6 +108,7 @@ if env["tools"]: ) env.add_source_files(env.editor_sources, "*.cpp") + env.add_source_files(env.editor_sources, "register_exporters.gen.cpp") SConscript("debugger/SCsub") SConscript("fileserver/SCsub") diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp index 38db48a4d4..363d542fd5 100644 --- a/editor/action_map_editor.cpp +++ b/editor/action_map_editor.cpp @@ -126,28 +126,30 @@ void InputEventConfigurationDialog::_set_event(const Ref<InputEvent> &p_event) { while (category) { TreeItem *input_item = category->get_first_child(); - // has_type this should be always true, unless the tree structure has been misconfigured. - bool has_type = input_item->get_parent()->has_meta("__type"); - int input_type = input_item->get_parent()->get_meta("__type"); - if (!has_type) { - return; - } + if (input_item != nullptr) { + // has_type this should be always true, unless the tree structure has been misconfigured. + bool has_type = input_item->get_parent()->has_meta("__type"); + int input_type = input_item->get_parent()->get_meta("__type"); + if (!has_type) { + return; + } - // If event type matches input types of this category. - if ((k.is_valid() && input_type == INPUT_KEY) || (joyb.is_valid() && input_type == INPUT_JOY_BUTTON) || (joym.is_valid() && input_type == INPUT_JOY_MOTION) || (mb.is_valid() && input_type == INPUT_MOUSE_BUTTON)) { - // Loop through all items of this category until one matches. - while (input_item) { - bool key_match = k.is_valid() && (Variant(k->get_keycode()) == input_item->get_meta("__keycode") || Variant(k->get_physical_keycode()) == input_item->get_meta("__keycode")); - bool joyb_match = joyb.is_valid() && Variant(joyb->get_button_index()) == input_item->get_meta("__index"); - bool joym_match = joym.is_valid() && Variant(joym->get_axis()) == input_item->get_meta("__axis") && joym->get_axis_value() == (float)input_item->get_meta("__value"); - bool mb_match = mb.is_valid() && Variant(mb->get_button_index()) == input_item->get_meta("__index"); - if (key_match || joyb_match || joym_match || mb_match) { - category->set_collapsed(false); - input_item->select(0); - input_list_tree->ensure_cursor_is_visible(); - return; + // If event type matches input types of this category. + if ((k.is_valid() && input_type == INPUT_KEY) || (joyb.is_valid() && input_type == INPUT_JOY_BUTTON) || (joym.is_valid() && input_type == INPUT_JOY_MOTION) || (mb.is_valid() && input_type == INPUT_MOUSE_BUTTON)) { + // Loop through all items of this category until one matches. + while (input_item) { + bool key_match = k.is_valid() && (Variant(k->get_keycode()) == input_item->get_meta("__keycode") || Variant(k->get_physical_keycode()) == input_item->get_meta("__keycode")); + bool joyb_match = joyb.is_valid() && Variant(joyb->get_button_index()) == input_item->get_meta("__index"); + bool joym_match = joym.is_valid() && Variant(joym->get_axis()) == input_item->get_meta("__axis") && joym->get_axis_value() == (float)input_item->get_meta("__value"); + bool mb_match = mb.is_valid() && Variant(mb->get_button_index()) == input_item->get_meta("__index"); + if (key_match || joyb_match || joym_match || mb_match) { + category->set_collapsed(false); + input_item->select(0); + input_list_tree->ensure_cursor_is_visible(); + return; + } + input_item = input_item->get_next(); } - input_item = input_item->get_next(); } } diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp index 28642f1bb4..02b4a12b92 100644 --- a/editor/animation_bezier_editor.cpp +++ b/editor/animation_bezier_editor.cpp @@ -398,17 +398,17 @@ void AnimationBezierTrackEdit::_notification(int p_what) { float scale = timeline->get_zoom_scale(); Ref<Texture2D> point = get_theme_icon(SNAME("KeyValue"), SNAME("EditorIcons")); - for (Map<int, Color>::Element *E = subtrack_colors.front(); E; E = E->next()) { - _draw_track(E->key(), E->get()); + for (const KeyValue<int, Color> &E : subtrack_colors) { + _draw_track(E.key, E.value); - for (int i = 0; i < animation->track_get_key_count(E->key()); i++) { - float offset = animation->track_get_key_time(E->key(), i); - float value = animation->bezier_track_get_key_value(E->key(), i); + for (int i = 0; i < animation->track_get_key_count(E.key); i++) { + float offset = animation->track_get_key_time(E.key, i); + float value = animation->bezier_track_get_key_value(E.key, i); Vector2 pos((offset - timeline->get_value()) * scale + limit, _bezier_h_to_pixel(value)); if (pos.x >= limit && pos.x <= right_limit) { - draw_texture(point, pos - point->get_size() / 2, E->get()); + draw_texture(point, pos - point->get_size() / 2, E.value); } } } @@ -680,9 +680,9 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) { emit_signal(SNAME("close_request")); return; } - for (Map<int, Rect2>::Element *E = subtracks.front(); E; E = E->next()) { - if (E->get().has_point(mb->get_position())) { - set_animation_and_track(animation, E->key()); + for (const KeyValue<int, Rect2> &E : subtracks) { + if (E.value.has_point(mb->get_position())) { + set_animation_and_track(animation, E.key); _clear_selection(); return; } diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 324237ff82..7f118532c9 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -165,21 +165,40 @@ public: } switch (animation->track_get_type(track)) { - case Animation::TYPE_TRANSFORM3D: { - Dictionary d_old = animation->track_get_key_value(track, key); - Dictionary d_new = d_old.duplicate(); - d_new[p_name] = p_value; - setting = true; - undo_redo->create_action(TTR("Anim Change Transform")); - undo_redo->add_do_method(animation.ptr(), "track_set_key_value", track, key, d_new); - undo_redo->add_undo_method(animation.ptr(), "track_set_key_value", track, key, d_old); - undo_redo->add_do_method(this, "_update_obj", animation); - undo_redo->add_undo_method(this, "_update_obj", animation); - undo_redo->commit_action(); + case Animation::TYPE_POSITION_3D: + case Animation::TYPE_ROTATION_3D: + case Animation::TYPE_SCALE_3D: { + if (name == "position" || name == "rotation" || name == "scale") { + Variant old = animation->track_get_key_value(track, key); + setting = true; + String chan; + switch (animation->track_get_type(track)) { + case Animation::TYPE_POSITION_3D: + chan = "Position3D"; + break; + case Animation::TYPE_ROTATION_3D: + chan = "Rotation3D"; + break; + case Animation::TYPE_SCALE_3D: + chan = "Scale3D"; + break; + default: { + } + } + + undo_redo->create_action(vformat(TTR("Anim Change %s"), chan)); + undo_redo->add_do_method(animation.ptr(), "track_set_key_value", track, key, p_value); + undo_redo->add_undo_method(animation.ptr(), "track_set_key_value", track, key, old); + undo_redo->add_do_method(this, "_update_obj", animation); + undo_redo->add_undo_method(this, "_update_obj", animation); + undo_redo->commit_action(); + + setting = false; + return true; + } - setting = false; - return true; } break; + case Animation::TYPE_BLEND_SHAPE: case Animation::TYPE_VALUE: { if (name == "value") { Variant value = p_value; @@ -412,13 +431,15 @@ public: } switch (animation->track_get_type(track)) { - case Animation::TYPE_TRANSFORM3D: { - Dictionary d = animation->track_get_key_value(track, key); - ERR_FAIL_COND_V(!d.has(name), false); - r_ret = d[p_name]; - return true; - + case Animation::TYPE_POSITION_3D: + case Animation::TYPE_ROTATION_3D: + case Animation::TYPE_SCALE_3D: { + if (name == "position" || name == "rotation" || name == "scale") { + r_ret = animation->track_get_key_value(track, key); + return true; + } } break; + case Animation::TYPE_BLEND_SHAPE: case Animation::TYPE_VALUE: { if (name == "value") { r_ret = animation->track_get_key_value(track, key); @@ -523,11 +544,17 @@ public: } switch (animation->track_get_type(track)) { - case Animation::TYPE_TRANSFORM3D: { - p_list->push_back(PropertyInfo(Variant::VECTOR3, "location")); - p_list->push_back(PropertyInfo(Variant::QUATERNION, "rotation")); + case Animation::TYPE_POSITION_3D: { + p_list->push_back(PropertyInfo(Variant::VECTOR3, "position")); + } break; + case Animation::TYPE_ROTATION_3D: { + p_list->push_back(PropertyInfo(Variant::VECTOR3, "rotation")); + } break; + case Animation::TYPE_SCALE_3D: { p_list->push_back(PropertyInfo(Variant::VECTOR3, "scale")); - + } break; + case Animation::TYPE_BLEND_SHAPE: { + p_list->push_back(PropertyInfo(Variant::FLOAT, "value")); } break; case Animation::TYPE_VALUE: { Variant v = animation->track_get_key_value(track, key); @@ -541,7 +568,7 @@ public: String hint_string; if (v.get_type() == Variant::OBJECT) { - //could actually check the object property if exists..? yes i will! + // Could actually check the object property if exists..? Yes I will! Ref<Resource> res = v; if (res.is_valid()) { hint = PROPERTY_HINT_RESOURCE_TYPE; @@ -700,16 +727,15 @@ public: return; } - for (Map<int, List<float>>::Element *E = key_ofs_map.front(); E; E = E->next()) { + for (const KeyValue<int, List<float>> &E : key_ofs_map) { int key = 0; - for (float &F : E->value()) { - float key_ofs = F; + for (const float &key_ofs : E.value) { if (from != key_ofs) { key++; continue; } - int track = E->key(); + int track = E.key; key_ofs_map[track][key] = to; if (setting) { @@ -726,10 +752,9 @@ public: bool _set(const StringName &p_name, const Variant &p_value) { bool update_obj = false; bool change_notify_deserved = false; - for (Map<int, List<float>>::Element *E = key_ofs_map.front(); E; E = E->next()) { - int track = E->key(); - for (float &F : E->value()) { - float key_ofs = F; + for (const KeyValue<int, List<float>> &E : key_ofs_map) { + int track = E.key; + for (const float &key_ofs : E.value) { int key = animation->track_find_key(track, key_ofs, true); ERR_FAIL_COND_V(key == -1, false); @@ -781,19 +806,34 @@ public: } switch (animation->track_get_type(track)) { - case Animation::TYPE_TRANSFORM3D: { - Dictionary d_old = animation->track_get_key_value(track, key); - Dictionary d_new = d_old.duplicate(); - d_new[p_name] = p_value; - + case Animation::TYPE_POSITION_3D: + case Animation::TYPE_ROTATION_3D: + case Animation::TYPE_SCALE_3D: { + Variant old = animation->track_get_key_value(track, key); if (!setting) { + String chan; + switch (animation->track_get_type(track)) { + case Animation::TYPE_POSITION_3D: + chan = "Position3D"; + break; + case Animation::TYPE_ROTATION_3D: + chan = "Rotation3D"; + break; + case Animation::TYPE_SCALE_3D: + chan = "Scale3D"; + break; + default: { + } + } + setting = true; - undo_redo->create_action(TTR("Anim Multi Change Transform")); + undo_redo->create_action(vformat(TTR("Anim Multi Change %s"), chan)); } - undo_redo->add_do_method(animation.ptr(), "track_set_key_value", track, key, d_new); - undo_redo->add_undo_method(animation.ptr(), "track_set_key_value", track, key, d_old); + undo_redo->add_do_method(animation.ptr(), "track_set_key_value", track, key, p_value); + undo_redo->add_undo_method(animation.ptr(), "track_set_key_value", track, key, old); update_obj = true; } break; + case Animation::TYPE_BLEND_SHAPE: case Animation::TYPE_VALUE: { if (name == "value") { Variant value = p_value; @@ -984,10 +1024,9 @@ public: } bool _get(const StringName &p_name, Variant &r_ret) const { - for (Map<int, List<float>>::Element *E = key_ofs_map.front(); E; E = E->next()) { - int track = E->key(); - for (float &F : E->value()) { - float key_ofs = F; + for (const KeyValue<int, List<float>> &E : key_ofs_map) { + int track = E.key; + for (const float &key_ofs : E.value) { int key = animation->track_find_key(track, key_ofs, true); ERR_CONTINUE(key == -1); @@ -1012,13 +1051,16 @@ public: } switch (animation->track_get_type(track)) { - case Animation::TYPE_TRANSFORM3D: { - Dictionary d = animation->track_get_key_value(track, key); - ERR_FAIL_COND_V(!d.has(name), false); - r_ret = d[p_name]; - return true; + case Animation::TYPE_POSITION_3D: + case Animation::TYPE_ROTATION_3D: + case Animation::TYPE_SCALE_3D: { + if (name == "position" || name == "rotation" || name == "scale") { + r_ret = animation->track_get_key_value(track, key); + return true; + } } break; + case Animation::TYPE_BLEND_SHAPE: case Animation::TYPE_VALUE: { if (name == "value") { r_ret = animation->track_get_key_value(track, key); @@ -1119,15 +1161,15 @@ public: bool show_time = true; bool same_track_type = true; bool same_key_type = true; - for (Map<int, List<float>>::Element *E = key_ofs_map.front(); E; E = E->next()) { - int track = E->key(); + for (const KeyValue<int, List<float>> &E : key_ofs_map) { + int track = E.key; ERR_FAIL_INDEX(track, animation->get_track_count()); if (first_track < 0) { first_track = track; } - if (show_time && E->value().size() > 1) { + if (show_time && E.value.size() > 1) { show_time = false; } @@ -1137,7 +1179,7 @@ public: same_key_type = false; } - for (float &F : E->value()) { + for (const float &F : E.value) { int key = animation->track_find_key(track, F, true); ERR_FAIL_COND(key == -1); if (first_key < 0) { @@ -1162,11 +1204,18 @@ public: if (same_track_type) { switch (animation->track_get_type(first_track)) { - case Animation::TYPE_TRANSFORM3D: { - p_list->push_back(PropertyInfo(Variant::VECTOR3, "location")); - p_list->push_back(PropertyInfo(Variant::QUATERNION, "rotation")); + case Animation::TYPE_POSITION_3D: { + p_list->push_back(PropertyInfo(Variant::VECTOR3, "position")); + } break; + case Animation::TYPE_ROTATION_3D: { + p_list->push_back(PropertyInfo(Variant::QUATERNION, "scale")); + } break; + case Animation::TYPE_SCALE_3D: { p_list->push_back(PropertyInfo(Variant::VECTOR3, "scale")); } break; + case Animation::TYPE_BLEND_SHAPE: { + p_list->push_back(PropertyInfo(Variant::FLOAT, "value")); + } break; case Animation::TYPE_VALUE: { if (same_key_type) { Variant v = animation->track_get_key_value(first_track, first_key); @@ -1180,7 +1229,7 @@ public: String hint_string; if (v.get_type() == Variant::OBJECT) { - //could actually check the object property if exists..? yes i will! + // Could actually check the object property if exists..? Yes I will! Ref<Resource> res = v; if (res.is_valid()) { hint = PROPERTY_HINT_RESOURCE_TYPE; @@ -1362,7 +1411,10 @@ void AnimationTimelineEdit::_notification(int p_what) { add_track->get_popup()->clear(); add_track->get_popup()->add_icon_item(get_theme_icon(SNAME("KeyValue"), SNAME("EditorIcons")), TTR("Property Track")); - add_track->get_popup()->add_icon_item(get_theme_icon(SNAME("KeyXform"), SNAME("EditorIcons")), TTR("3D Transform Track")); + add_track->get_popup()->add_icon_item(get_theme_icon(SNAME("KeyXPosition"), SNAME("EditorIcons")), TTR("3D Position Track")); + add_track->get_popup()->add_icon_item(get_theme_icon(SNAME("KeyXRotation"), SNAME("EditorIcons")), TTR("3D Rotation Track")); + add_track->get_popup()->add_icon_item(get_theme_icon(SNAME("KeyXScale"), SNAME("EditorIcons")), TTR("3D Scale Track")); + add_track->get_popup()->add_icon_item(get_theme_icon(SNAME("KeyBlendShape"), SNAME("EditorIcons")), TTR("Blend Shape Track")); add_track->get_popup()->add_icon_item(get_theme_icon(SNAME("KeyCall"), SNAME("EditorIcons")), TTR("Call Method Track")); add_track->get_popup()->add_icon_item(get_theme_icon(SNAME("KeyBezier"), SNAME("EditorIcons")), TTR("Bezier Curve Track")); add_track->get_popup()->add_icon_item(get_theme_icon(SNAME("KeyAudio"), SNAME("EditorIcons")), TTR("Audio Playback Track")); @@ -1391,7 +1443,7 @@ void AnimationTimelineEdit::_notification(int p_what) { float l = animation->get_length(); if (l <= 0) { - l = 0.001; //avoid crashor + l = 0.001; // Avoid crashor. } Ref<Texture2D> hsize_icon = get_theme_icon(SNAME("Hsize"), SNAME("EditorIcons")); @@ -1404,18 +1456,12 @@ void AnimationTimelineEdit::_notification(int p_what) { for (int i = 0; i < animation->get_track_count(); i++) { if (animation->track_get_key_count(i) > 0) { float beg = animation->track_get_key_time(i, 0); - /*if (animation->track_get_type(i) == Animation::TYPE_BEZIER) { - beg += animation->bezier_track_get_key_in_handle(i, 0).x; - }* not worth it since they have no use */ if (beg < time_min) { time_min = beg; } float end = animation->track_get_key_time(i, animation->track_get_key_count(i) - 1); - /*if (animation->track_get_type(i) == Animation::TYPE_BEZIER) { - end += animation->bezier_track_get_key_out_handle(i, animation->track_get_key_count(i) - 1).x; - } not worth it since they have no use */ if (end > time_max) { time_max = end; @@ -1425,8 +1471,6 @@ void AnimationTimelineEdit::_notification(int p_what) { float extra = (zoomw / scale) * 0.5; - //if (time_min < -0.001) - // time_min -= extra; time_max += extra; set_min(time_min); set_max(time_max); @@ -1839,9 +1883,12 @@ void AnimationTrackEdit::_notification(int p_what) { Ref<Font> font = get_theme_font(SNAME("font"), SNAME("Label")); int font_size = get_theme_font_size(SNAME("font_size"), SNAME("Label")); Color color = get_theme_color(SNAME("font_color"), SNAME("Label")); - Ref<Texture2D> type_icons[6] = { + Ref<Texture2D> type_icons[9] = { get_theme_icon(SNAME("KeyValue"), SNAME("EditorIcons")), - get_theme_icon(SNAME("KeyXform"), SNAME("EditorIcons")), + get_theme_icon(SNAME("KeyTrackPosition"), SNAME("EditorIcons")), + get_theme_icon(SNAME("KeyTrackRotation"), SNAME("EditorIcons")), + get_theme_icon(SNAME("KeyTrackScale"), SNAME("EditorIcons")), + get_theme_icon(SNAME("KeyTrackBlendShape"), SNAME("EditorIcons")), get_theme_icon(SNAME("KeyCall"), SNAME("EditorIcons")), get_theme_icon(SNAME("KeyBezier"), SNAME("EditorIcons")), get_theme_icon(SNAME("KeyAudio"), SNAME("EditorIcons")), @@ -1856,7 +1903,7 @@ void AnimationTrackEdit::_notification(int p_what) { { Ref<Texture2D> check = animation->track_is_enabled(track) ? get_theme_icon(SNAME("checked"), SNAME("CheckBox")) : get_theme_icon(SNAME("unchecked"), SNAME("CheckBox")); - int ofs = in_group ? check->get_width() : 0; //not the best reference for margin but.. + int ofs = in_group ? check->get_width() : 0; // Not the best reference for margin but.. check_rect = Rect2(Point2(ofs, int(get_size().height - check->get_height()) / 2), check->get_size()); draw_texture(check, check_rect.position); @@ -1974,7 +2021,7 @@ void AnimationTrackEdit::_notification(int p_what) { ofs += hsep; { - //callmode + // Callmode. Animation::UpdateMode update_mode; @@ -1993,7 +2040,7 @@ void AnimationTrackEdit::_notification(int p_what) { if (animation->track_get_type(track) == Animation::TYPE_VALUE) { draw_texture(update_icon, update_mode_rect.position); } - //make it easier to click + // Make it easier to click. update_mode_rect.position.y = 0; update_mode_rect.size.y = get_size().height; @@ -2022,7 +2069,7 @@ void AnimationTrackEdit::_notification(int p_what) { } { - //interp + // Interp. Animation::InterpolationType interp_mode = animation->track_get_interpolation_type(track); @@ -2032,17 +2079,17 @@ void AnimationTrackEdit::_notification(int p_what) { interp_mode_rect.position.y = int(get_size().height - icon->get_height()) / 2; interp_mode_rect.size = icon->get_size(); - if (animation->track_get_type(track) == Animation::TYPE_VALUE || animation->track_get_type(track) == Animation::TYPE_TRANSFORM3D) { + if (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, interp_mode_rect.position); } - //make it easier to click + // Make it easier to click. interp_mode_rect.position.y = 0; interp_mode_rect.size.y = get_size().height; ofs += icon->get_width() + hsep; interp_mode_rect.size.x += hsep; - if (animation->track_get_type(track) == Animation::TYPE_VALUE || animation->track_get_type(track) == Animation::TYPE_TRANSFORM3D) { + if (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)); interp_mode_rect.size.x += down_icon->get_width(); } else { @@ -2055,7 +2102,7 @@ void AnimationTrackEdit::_notification(int p_what) { } { - //loop + // Loop. bool loop_wrap = animation->track_get_interpolation_loop_wrap(track); @@ -2065,7 +2112,7 @@ void AnimationTrackEdit::_notification(int p_what) { loop_mode_rect.position.y = int(get_size().height - icon->get_height()) / 2; loop_mode_rect.size = icon->get_size(); - if (animation->track_get_type(track) == Animation::TYPE_VALUE || animation->track_get_type(track) == Animation::TYPE_TRANSFORM3D) { + if (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); } @@ -2075,7 +2122,7 @@ void AnimationTrackEdit::_notification(int p_what) { ofs += icon->get_width() + hsep; loop_mode_rect.size.x += hsep; - if (animation->track_get_type(track) == Animation::TYPE_VALUE || animation->track_get_type(track) == Animation::TYPE_TRANSFORM3D) { + if (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(); } else { @@ -2088,7 +2135,7 @@ void AnimationTrackEdit::_notification(int p_what) { } { - //erase + // Erase. Ref<Texture2D> icon = get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")); @@ -2135,7 +2182,7 @@ Rect2 AnimationTrackEdit::get_key_rect(int p_index, float p_pixels_sec) { } Rect2 rect = Rect2(-type_icon->get_width() / 2, 0, type_icon->get_width(), get_size().height); - //make it a big easier to click + // Make it a big easier to click. rect.position.x -= rect.size.x * 0.5; rect.size.x *= 2; return rect; @@ -2224,7 +2271,7 @@ void AnimationTrackEdit::draw_key(int p_index, float p_pixels_sec, int p_x, bool draw_texture(icon_to_draw, ofs); } -//helper +// Helper. void AnimationTrackEdit::draw_rect_clipped(const Rect2 &p_rect, const Color &p_color, bool p_filled) { int clip_left = timeline->get_name_limit(); int clip_right = get_size().width - timeline->get_buttons_width(); @@ -2249,7 +2296,7 @@ void AnimationTrackEdit::draw_texture_region_clipped(const Ref<Texture2D> &p_tex int clip_left = timeline->get_name_limit(); int clip_right = get_size().width - timeline->get_buttons_width(); - //clip left and right + // Clip left and right. if (clip_left > p_rect.position.x + p_rect.size.x) { return; } @@ -2295,9 +2342,12 @@ void AnimationTrackEdit::set_animation_and_track(const Ref<Animation> &p_animati track = p_track; update(); - Ref<Texture2D> type_icons[6] = { + Ref<Texture2D> type_icons[9] = { get_theme_icon(SNAME("KeyValue"), SNAME("EditorIcons")), - get_theme_icon(SNAME("KeyXform"), SNAME("EditorIcons")), + get_theme_icon(SNAME("KeyXPosition"), SNAME("EditorIcons")), + get_theme_icon(SNAME("KeyXRotation"), SNAME("EditorIcons")), + get_theme_icon(SNAME("KeyXScale"), SNAME("EditorIcons")), + get_theme_icon(SNAME("KeyBlendShape"), SNAME("EditorIcons")), get_theme_icon(SNAME("KeyCall"), SNAME("EditorIcons")), get_theme_icon(SNAME("KeyBezier"), SNAME("EditorIcons")), get_theme_icon(SNAME("KeyAudio"), SNAME("EditorIcons")), @@ -2458,7 +2508,7 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const { key_distance = distance; } } else { - //first one does it + // First one does it. break; } } @@ -2467,17 +2517,21 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const { if (key_idx != -1) { String text = TTR("Time (s): ") + rtos(animation->track_get_key_time(track, key_idx)) + "\n"; switch (animation->track_get_type(track)) { - case Animation::TYPE_TRANSFORM3D: { - Dictionary d = animation->track_get_key_value(track, key_idx); - if (d.has("location")) { - text += "Pos: " + String(d["location"]) + "\n"; - } - if (d.has("rotation")) { - text += "Rot: " + String(d["rotation"]) + "\n"; - } - if (d.has("scale")) { - text += "Scale: " + String(d["scale"]) + "\n"; - } + case Animation::TYPE_POSITION_3D: { + Vector3 t = animation->track_get_key_value(track, key_idx); + text += "Position: " + String(t) + "\n"; + } break; + case Animation::TYPE_ROTATION_3D: { + Quaternion t = animation->track_get_key_value(track, key_idx); + text += "Rotation: " + String(t) + "\n"; + } break; + case Animation::TYPE_SCALE_3D: { + Vector3 t = animation->track_get_key_value(track, key_idx); + text += "Scale: " + String(t) + "\n"; + } break; + case Animation::TYPE_BLEND_SHAPE: { + float t = animation->track_get_key_value(track, key_idx); + text += "Blend Shape: " + itos(t) + "\n"; } break; case Animation::TYPE_VALUE: { const Variant &v = animation->track_get_key_value(track, key_idx); @@ -3004,7 +3058,7 @@ AnimationTrackEdit::AnimationTrackEdit() { play_position->set_anchors_and_offsets_preset(PRESET_WIDE); play_position->connect("draw", callable_mp(this, &AnimationTrackEdit::_play_position_draw)); set_focus_mode(FOCUS_CLICK); - set_mouse_filter(MOUSE_FILTER_PASS); //scroll has to work too for selection + set_mouse_filter(MOUSE_FILTER_PASS); // Scroll has to work too for selection. } ////////////////////////////////////// @@ -3332,39 +3386,31 @@ static bool track_type_is_resettable(Animation::TrackType p_type) { switch (p_type) { case Animation::TYPE_VALUE: [[fallthrough]]; + case Animation::TYPE_BLEND_SHAPE: + [[fallthrough]]; case Animation::TYPE_BEZIER: [[fallthrough]]; - case Animation::TYPE_TRANSFORM3D: + case Animation::TYPE_POSITION_3D: + [[fallthrough]]; + case Animation::TYPE_ROTATION_3D: + [[fallthrough]]; + case Animation::TYPE_SCALE_3D: return true; default: return false; } } -void AnimationTrackEditor::_query_insert(const InsertData &p_id) { - if (insert_frame != Engine::get_singleton()->get_frames_drawn()) { - //clear insert list for the frame if frame changed - if (insert_confirm->is_visible()) { - return; //do nothing - } - insert_data.clear(); - insert_query = false; - } - insert_frame = Engine::get_singleton()->get_frames_drawn(); - - for (const InsertData &E : insert_data) { - //prevent insertion of multiple tracks - if (E.path == p_id.path) { - return; //already inserted a track for this on this frame - } - } - - insert_data.push_back(p_id); +void AnimationTrackEditor::make_insert_queue() { + insert_data.clear(); + insert_queue = true; +} +void AnimationTrackEditor::commit_insert_queue() { bool reset_allowed = true; - AnimationPlayer *player = AnimationPlayerEditor::singleton->get_player(); + AnimationPlayer *player = AnimationPlayerEditor::get_singleton()->get_player(); if (player->has_animation("RESET") && player->get_animation("RESET") == animation) { - // Avoid messing with the reset animation itself + // Avoid messing with the reset animation itself. reset_allowed = false; } else { bool some_resettable = false; @@ -3379,74 +3425,82 @@ void AnimationTrackEditor::_query_insert(const InsertData &p_id) { } } - if (p_id.track_idx == -1) { - int num_tracks = 0; - bool all_bezier = true; - for (int i = 0; i < insert_data.size(); i++) { - if (insert_data[i].type != Animation::TYPE_VALUE && insert_data[i].type != Animation::TYPE_BEZIER) { - all_bezier = false; - } - - if (insert_data[i].track_idx == -1) { - ++num_tracks; - } + // Organize insert data. + int num_tracks = 0; + String last_track_query; + bool all_bezier = true; + for (int i = 0; i < insert_data.size(); i++) { + if (insert_data[i].type != Animation::TYPE_VALUE && insert_data[i].type != Animation::TYPE_BEZIER) { + all_bezier = false; + } - if (insert_data[i].type != Animation::TYPE_VALUE) { - continue; - } + if (insert_data[i].track_idx == -1) { + ++num_tracks; + last_track_query = insert_data[i].query; + } - switch (insert_data[i].value.get_type()) { - case Variant::INT: - case Variant::FLOAT: - case Variant::VECTOR2: - case Variant::VECTOR3: - case Variant::QUATERNION: - case Variant::PLANE: - case Variant::COLOR: { - // Valid. - } break; - default: { - all_bezier = false; - } - } + if (insert_data[i].type != Animation::TYPE_VALUE) { + continue; } - if (bool(EDITOR_DEF("editors/animation/confirm_insert_track", true))) { - //potential new key, does not exist - if (num_tracks == 1) { - // TRANSLATORS: %s will be replaced by a phrase describing the target of track. - insert_confirm_text->set_text(vformat(TTR("Create new track for %s and insert key?"), p_id.query)); - } else { - insert_confirm_text->set_text(vformat(TTR("Create %d new tracks and insert keys?"), num_tracks)); + switch (insert_data[i].value.get_type()) { + case Variant::INT: + case Variant::FLOAT: + case Variant::VECTOR2: + case Variant::VECTOR3: + case Variant::QUATERNION: + case Variant::PLANE: + case Variant::COLOR: { + // Valid. + } break; + default: { + all_bezier = false; } + } + } - insert_confirm_bezier->set_visible(all_bezier); - insert_confirm_reset->set_visible(reset_allowed); - - insert_confirm->get_ok_button()->set_text(TTR("Create")); - insert_confirm->popup_centered(); - insert_query = true; + if (bool(EDITOR_DEF("editors/animation/confirm_insert_track", true)) && num_tracks > 0) { + // Potentially a new key, does not exist. + if (num_tracks == 1) { + // TRANSLATORS: %s will be replaced by a phrase describing the target of track. + insert_confirm_text->set_text(vformat(TTR("Create new track for %s and insert key?"), last_track_query)); } else { - call_deferred(SNAME("_insert_delay"), reset_allowed && EDITOR_GET("editors/animation/default_create_reset_tracks"), all_bezier && EDITOR_GET("editors/animation/default_create_bezier_tracks")); - insert_queue = true; + insert_confirm_text->set_text(vformat(TTR("Create %d new tracks and insert keys?"), num_tracks)); } + insert_confirm_bezier->set_visible(all_bezier); + insert_confirm_reset->set_visible(reset_allowed); + + insert_confirm->get_ok_button()->set_text(TTR("Create")); + insert_confirm->popup_centered(); } else { - if (!insert_query && !insert_queue) { - // Create Beziers wouldn't make sense in this case, where no tracks are being created - call_deferred(SNAME("_insert_delay"), reset_allowed && EDITOR_GET("editors/animation/default_create_reset_tracks"), false); - insert_queue = true; - } + _insert_track(reset_allowed && EDITOR_GET("editors/animation/default_create_reset_tracks"), all_bezier && EDITOR_GET("editors/animation/default_create_bezier_tracks")); } + + insert_queue = false; } -void AnimationTrackEditor::_insert_delay(bool p_create_reset, bool p_create_beziers) { - if (insert_query) { - //discard since it's entered into query mode - insert_queue = false; - return; +void AnimationTrackEditor::_query_insert(const InsertData &p_id) { + if (!insert_queue) { + insert_data.clear(); + } + + for (const InsertData &E : insert_data) { + // Prevent insertion of multiple tracks. + if (E.path == p_id.path) { + return; // Already inserted a track this frame. + } + } + + insert_data.push_back(p_id); + + // Without queue, commit immediately. + if (!insert_queue) { + commit_insert_queue(); } +} +void AnimationTrackEditor::_insert_track(bool p_create_reset, bool p_create_beziers) { undo_redo->create_action(TTR("Anim Insert")); Ref<Animation> reset_anim; @@ -3481,7 +3535,6 @@ void AnimationTrackEditor::_insert_delay(bool p_create_reset, bool p_create_bezi set_anim_pos(pos); emit_signal(SNAME("timeline_changed"), pos, true); } - insert_queue = false; } void AnimationTrackEditor::insert_transform_key(Node3D *p_node, const String &p_sub, const Transform3D &p_xform) { @@ -3493,7 +3546,7 @@ void AnimationTrackEditor::insert_transform_key(Node3D *p_node, const String &p_ } ERR_FAIL_COND(!root); - //let's build a node path + // Let's build a node path. String path = root->get_path_to(p_node); if (p_sub != "") { path += ":" + p_sub; @@ -3501,45 +3554,86 @@ void AnimationTrackEditor::insert_transform_key(Node3D *p_node, const String &p_ NodePath np = path; - int track_idx = -1; + int position_idx = -1; + int rotation_idx = -1; + int scale_idx = -1; for (int i = 0; i < animation->get_track_count(); i++) { - if (animation->track_get_type(i) != Animation::TYPE_TRANSFORM3D) { - continue; - } if (animation->track_get_path(i) != np) { continue; } - track_idx = i; - break; + if (animation->track_get_type(i) == Animation::TYPE_POSITION_3D) { + position_idx = i; + } + if (animation->track_get_type(i) == Animation::TYPE_ROTATION_3D) { + rotation_idx = i; + } + if (animation->track_get_type(i) == Animation::TYPE_SCALE_3D) { + scale_idx = i; + } } InsertData id; - Dictionary val; - id.path = np; - id.track_idx = track_idx; - id.value = p_xform; - id.type = Animation::TYPE_TRANSFORM3D; // TRANSLATORS: This describes the target of new animation track, will be inserted into another string. id.query = vformat(TTR("node '%s'"), p_node->get_name()); id.advance = false; - //dialog insert + { + id.track_idx = position_idx; + id.value = p_xform.origin; + id.type = Animation::TYPE_POSITION_3D; + _query_insert(id); + } + { + id.track_idx = rotation_idx; + id.value = p_xform.basis.get_rotation_quaternion(); + id.type = Animation::TYPE_ROTATION_3D; + _query_insert(id); + } + { + id.track_idx = scale_idx; + id.value = p_xform.basis.get_scale(); + id.type = Animation::TYPE_SCALE_3D; + _query_insert(id); + } +} + +bool AnimationTrackEditor::has_transform_track(Node3D *p_node, const String &p_sub) { + if (!keying) { + return false; + } + if (!animation.is_valid()) { + return false; + } + if (!root) { + return false; + } - _query_insert(id); + //let's build a node path + String path = root->get_path_to(p_node); + if (p_sub != "") { + path += ":" + p_sub; + } + int track_id = animation->find_track(path); + if (track_id >= 0) { + if (animation->track_get_type(track_id) == Animation::TYPE_POSITION_3D || animation->track_get_type(track_id) == Animation::TYPE_ROTATION_3D || animation->track_get_type(track_id) == Animation::TYPE_SCALE_3D) { + return true; + } + } + return false; } void AnimationTrackEditor::_insert_animation_key(NodePath p_path, const Variant &p_value) { String path = p_path; - //animation property is a special case, always creates an animation track + // Animation property is a special case, always creates an animation track. for (int i = 0; i < animation->get_track_count(); i++) { String np = animation->track_get_path(i); if (path == np && animation->track_get_type(i) == Animation::TYPE_ANIMATION) { - //exists + // Exists. InsertData id; id.path = path; id.track_idx = i; @@ -3548,7 +3642,7 @@ void AnimationTrackEditor::_insert_animation_key(NodePath p_path, const Variant // TRANSLATORS: This describes the target of new animation track, will be inserted into another string. id.query = TTR("animation"); id.advance = false; - //dialog insert + // Dialog insert. _query_insert(id); return; } @@ -3561,20 +3655,20 @@ void AnimationTrackEditor::_insert_animation_key(NodePath p_path, const Variant id.type = Animation::TYPE_ANIMATION; id.query = TTR("animation"); id.advance = false; - //dialog insert + // Dialog insert. _query_insert(id); } void AnimationTrackEditor::insert_node_value_key(Node *p_node, const String &p_property, const Variant &p_value, bool p_only_if_exists) { ERR_FAIL_COND(!root); - //let's build a node path + // Let's build a node path. Node *node = p_node; String path = root->get_path_to(node); if (Object::cast_to<AnimationPlayer>(node) && p_property == "current_animation") { - if (node == AnimationPlayerEditor::singleton->get_player()) { + if (node == AnimationPlayerEditor::get_singleton()->get_player()) { EditorNode::get_singleton()->show_warning(TTR("AnimationPlayer can't animate itself, only other players.")); return; } @@ -3593,7 +3687,7 @@ void AnimationTrackEditor::insert_node_value_key(Node *p_node, const String &p_p NodePath np = path; - //locate track + // Locate track. bool inserted = false; @@ -3611,14 +3705,14 @@ void AnimationTrackEditor::insert_node_value_key(Node *p_node, const String &p_p // TRANSLATORS: This describes the target of new animation track, will be inserted into another string. id.query = vformat(TTR("property '%s'"), p_property); id.advance = false; - //dialog insert + // Dialog insert. _query_insert(id); inserted = true; } else if (animation->track_get_type(i) == Animation::TYPE_BEZIER) { Variant value; String track_path = animation->track_get_path(i); if (track_path == np) { - value = p_value; //all good + value = p_value; // All good. } else { int sep = track_path.rfind(":"); if (sep != -1) { @@ -3641,7 +3735,7 @@ void AnimationTrackEditor::insert_node_value_key(Node *p_node, const String &p_p id.type = Animation::TYPE_BEZIER; id.query = vformat(TTR("property '%s'"), p_property); id.advance = false; - //dialog insert + // Dialog insert. _query_insert(id); inserted = true; } @@ -3657,7 +3751,7 @@ void AnimationTrackEditor::insert_node_value_key(Node *p_node, const String &p_p id.type = Animation::TYPE_VALUE; id.query = vformat(TTR("property '%s'"), p_property); id.advance = false; - //dialog insert + // Dialog insert. _query_insert(id); } @@ -3665,7 +3759,7 @@ void AnimationTrackEditor::insert_value_key(const String &p_property, const Vari EditorHistory *history = EditorNode::get_singleton()->get_editor_history(); ERR_FAIL_COND(!root); - //let's build a node path + // Let's build a node path. ERR_FAIL_COND(history->get_path_size() == 0); Object *obj = ObjectDB::get_instance(history->get_path_object(0)); ERR_FAIL_COND(!Object::cast_to<Node>(obj)); @@ -3675,7 +3769,7 @@ void AnimationTrackEditor::insert_value_key(const String &p_property, const Vari String path = root->get_path_to(node); if (Object::cast_to<AnimationPlayer>(node) && p_property == "current_animation") { - if (node == AnimationPlayerEditor::singleton->get_player()) { + if (node == AnimationPlayerEditor::get_singleton()->get_player()) { EditorNode::get_singleton()->show_warning(TTR("AnimationPlayer can't animate itself, only other players.")); return; } @@ -3693,10 +3787,11 @@ void AnimationTrackEditor::insert_value_key(const String &p_property, const Vari NodePath np = path; - //locate track + // Locate track. bool inserted = false; + make_insert_queue(); for (int i = 0; i < animation->get_track_count(); i++) { if (animation->track_get_type(i) == Animation::TYPE_VALUE) { if (animation->track_get_path(i) != np) { @@ -3710,13 +3805,13 @@ void AnimationTrackEditor::insert_value_key(const String &p_property, const Vari id.type = Animation::TYPE_VALUE; id.query = vformat(TTR("property '%s'"), p_property); id.advance = p_advance; - //dialog insert + // Dialog insert. _query_insert(id); inserted = true; } else if (animation->track_get_type(i) == Animation::TYPE_BEZIER) { Variant value; if (animation->track_get_path(i) == np) { - value = p_value; //all good + value = p_value; // All good. } else { String tpath = animation->track_get_path(i); int index = tpath.rfind(":"); @@ -3735,11 +3830,12 @@ void AnimationTrackEditor::insert_value_key(const String &p_property, const Vari id.type = Animation::TYPE_BEZIER; id.query = vformat(TTR("property '%s'"), p_property); id.advance = p_advance; - //dialog insert + // Dialog insert. _query_insert(id); inserted = true; } } + commit_insert_queue(); if (!inserted) { InsertData id; @@ -3749,13 +3845,13 @@ void AnimationTrackEditor::insert_value_key(const String &p_property, const Vari id.type = Animation::TYPE_VALUE; id.query = vformat(TTR("property '%s'"), p_property); id.advance = p_advance; - //dialog insert + // Dialog insert. _query_insert(id); } } Ref<Animation> AnimationTrackEditor::_create_and_get_reset_animation() { - AnimationPlayer *player = AnimationPlayerEditor::singleton->get_player(); + AnimationPlayer *player = AnimationPlayerEditor::get_singleton()->get_player(); if (player->has_animation("RESET")) { return player->get_animation("RESET"); } else { @@ -3763,9 +3859,9 @@ Ref<Animation> AnimationTrackEditor::_create_and_get_reset_animation() { reset_anim.instantiate(); reset_anim->set_length(ANIM_MIN_LENGTH); undo_redo->add_do_method(player, "add_animation", "RESET", reset_anim); - undo_redo->add_do_method(AnimationPlayerEditor::singleton, "_animation_player_changed", player); + undo_redo->add_do_method(AnimationPlayerEditor::get_singleton(), "_animation_player_changed", player); undo_redo->add_undo_method(player, "remove_animation", "RESET"); - undo_redo->add_undo_method(AnimationPlayerEditor::singleton, "_animation_player_changed", player); + undo_redo->add_undo_method(AnimationPlayerEditor::get_singleton(), "_animation_player_changed", player); return reset_anim; } } @@ -3932,7 +4028,7 @@ AnimationTrackEditor::TrackIndices AnimationTrackEditor::_confirm_insert(InsertD animation->add_track(p_id.type); animation->track_set_path(animation->get_track_count() - 1, p_id.path); PropertyInfo h = _find_hint_for_track(animation->get_track_count() - 1, np); - animation->remove_track(animation->get_track_count() - 1); //hack + animation->remove_track(animation->get_track_count() - 1); // Hack. if (h.type == Variant::FLOAT || h.type == Variant::VECTOR2 || @@ -3969,18 +4065,14 @@ AnimationTrackEditor::TrackIndices AnimationTrackEditor::_confirm_insert(InsertD Variant value; switch (p_id.type) { + case Animation::TYPE_POSITION_3D: + case Animation::TYPE_ROTATION_3D: + case Animation::TYPE_SCALE_3D: + case Animation::TYPE_BLEND_SHAPE: case Animation::TYPE_VALUE: { value = p_id.value; } break; - case Animation::TYPE_TRANSFORM3D: { - Transform3D tr = p_id.value; - Dictionary d; - d["location"] = tr.origin; - d["scale"] = tr.basis.get_scale(); - d["rotation"] = Quaternion(tr.basis); - value = d; - } break; case Animation::TYPE_BEZIER: { Array array; array.resize(5); @@ -4081,7 +4173,7 @@ void AnimationTrackEditor::_update_tracks() { for (int i = 0; i < animation->get_track_count(); i++) { AnimationTrackEdit *track_edit = nullptr; - //find hint and info for plugin + // Find hint and info for plugin. if (use_filter) { NodePath path = animation->track_get_path(i); @@ -4089,10 +4181,10 @@ void AnimationTrackEditor::_update_tracks() { if (root && root->has_node(path)) { Node *node = root->get_node(path); if (!node) { - continue; // no node, no filter + continue; // No node, no filter. } if (!EditorNode::get_singleton()->get_editor_selection()->is_selected(node)) { - continue; //skip track due to not selected + continue; // Skip track due to not selected. } } } @@ -4154,7 +4246,7 @@ void AnimationTrackEditor::_update_tracks() { } if (track_edit == nullptr) { - //no valid plugin_found + // No valid plugin_found. track_edit = memnew(AnimationTrackEdit); } @@ -4229,11 +4321,11 @@ void AnimationTrackEditor::_update_tracks() { void AnimationTrackEditor::_animation_changed() { if (animation_changing_awaiting_update) { - return; //all will be updated, don't bother with anything + return; // All will be updated, don't bother with anything. } if (key_edit && key_edit->setting) { - //if editing a key, just update the edited track, makes refresh less costly + // If editing a key, just update the edited track, makes refresh less costly. if (key_edit->track < track_edits.size()) { if (animation->track_get_type(key_edit->track) == Animation::TYPE_BEZIER) { bezier_edit->update(); @@ -4287,7 +4379,7 @@ void AnimationTrackEditor::_animation_update() { } if (track_edits.size() == animation->get_track_count()) { - //check tracks are the same + // Check tracks are the same. for (int i = 0; i < track_edits.size(); i++) { if (track_edits[i]->get_path() != animation->track_get_path(i)) { @@ -4396,8 +4488,13 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) { ERR_FAIL_COND(!node); NodePath path_to = root->get_path_to(node); - if (adding_track_type == Animation::TYPE_TRANSFORM3D && !node->is_class("Node3D")) { - EditorNode::get_singleton()->show_warning(TTR("Transform3D tracks only apply to 3D-based nodes.")); + if (adding_track_type == Animation::TYPE_BLEND_SHAPE && !node->is_class("MeshInstance3D")) { + EditorNode::get_singleton()->show_warning(TTR("Blend Shape tracks only apply to MeshInstance3D nodes.")); + return; + } + + if ((adding_track_type == Animation::TYPE_POSITION_3D || adding_track_type == Animation::TYPE_ROTATION_3D || adding_track_type == Animation::TYPE_SCALE_3D) && !node->is_class("Node3D")) { + EditorNode::get_singleton()->show_warning(TTR("Position/Rotation/Scale 3D tracks only apply to 3D-based nodes.")); return; } @@ -4407,7 +4504,16 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) { prop_selector->set_type_filter(Vector<Variant::Type>()); prop_selector->select_property_from_instance(node); } break; - case Animation::TYPE_TRANSFORM3D: + case Animation::TYPE_BLEND_SHAPE: { + adding_track_path = path_to; + Vector<Variant::Type> filter; + filter.push_back(Variant::FLOAT); + prop_selector->set_type_filter(filter); + prop_selector->select_property_from_instance(node); + } break; + case Animation::TYPE_POSITION_3D: + case Animation::TYPE_ROTATION_3D: + case Animation::TYPE_SCALE_3D: case Animation::TYPE_METHOD: { undo_redo->create_action(TTR("Add Track")); undo_redo->add_do_method(animation.ptr(), "add_track", adding_track_type); @@ -4449,7 +4555,7 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) { return; } - if (node == AnimationPlayerEditor::singleton->get_player()) { + if (node == AnimationPlayerEditor::get_singleton()->get_player()) { EditorNode::get_singleton()->show_warning(TTR("AnimationPlayer can't animate itself, only other players.")); return; } @@ -4481,12 +4587,12 @@ void AnimationTrackEditor::_new_track_property_selected(String p_name) { if (adding_track_type == Animation::TYPE_VALUE) { Animation::UpdateMode update_mode = Animation::UPDATE_DISCRETE; { - //hack + // Hack. NodePath np; animation->add_track(Animation::TYPE_VALUE); animation->track_set_path(animation->get_track_count() - 1, full_path); PropertyInfo h = _find_hint_for_track(animation->get_track_count() - 1, np); - animation->remove_track(animation->get_track_count() - 1); //hack + animation->remove_track(animation->get_track_count() - 1); // Hack. if (h.type == Variant::FLOAT || h.type == Variant::VECTOR2 || h.type == Variant::RECT2 || @@ -4514,12 +4620,12 @@ void AnimationTrackEditor::_new_track_property_selected(String p_name) { } else { Vector<String> subindices; { - //hack + // Hack. NodePath np; animation->add_track(Animation::TYPE_VALUE); animation->track_set_path(animation->get_track_count() - 1, full_path); PropertyInfo h = _find_hint_for_track(animation->get_track_count() - 1, np); - animation->remove_track(animation->get_track_count() - 1); //hack + animation->remove_track(animation->get_track_count() - 1); // Hack. bool valid; subindices = _get_bezier_subindices_for_type(h.type, &valid); if (!valid) { @@ -4571,12 +4677,12 @@ void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) { if (snap->is_pressed() && step->get_value() != 0) { p_ofs = snap_time(p_ofs); } - while (animation->track_find_key(p_track, p_ofs, true) != -1) { //make sure insertion point is valid + while (animation->track_find_key(p_track, p_ofs, true) != -1) { // Make sure insertion point is valid. p_ofs += 0.001; } switch (animation->track_get_type(p_track)) { - case Animation::TYPE_TRANSFORM3D: { + case Animation::TYPE_POSITION_3D: { if (!root->has_node(animation->track_get_path(p_track))) { EditorNode::get_singleton()->show_warning(TTR("Track path is invalid, so can't add a key.")); return; @@ -4588,18 +4694,55 @@ void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) { return; } - Transform3D xf = base->get_transform(); + Vector3 pos = base->get_position(); + + undo_redo->create_action(TTR("Add Position Key")); + undo_redo->add_do_method(animation.ptr(), "position_track_insert_key", p_track, p_ofs, pos); + undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", p_track, p_ofs); + undo_redo->commit_action(); - Vector3 loc = xf.get_origin(); - Vector3 scale = xf.basis.get_scale_local(); - Quaternion rot = xf.basis; + } break; + case Animation::TYPE_ROTATION_3D: { + if (!root->has_node(animation->track_get_path(p_track))) { + EditorNode::get_singleton()->show_warning(TTR("Track path is invalid, so can't add a key.")); + return; + } + Node3D *base = Object::cast_to<Node3D>(root->get_node(animation->track_get_path(p_track))); - undo_redo->create_action(TTR("Add Transform Track Key")); - undo_redo->add_do_method(animation.ptr(), "transform_track_insert_key", p_track, p_ofs, loc, rot, scale); + if (!base) { + EditorNode::get_singleton()->show_warning(TTR("Track is not of type Node3D, can't insert key")); + return; + } + + Quaternion rot = base->get_transform().basis.operator Quaternion(); + + undo_redo->create_action(TTR("Add Rotation Key")); + undo_redo->add_do_method(animation.ptr(), "rotation_track_insert_key", p_track, p_ofs, rot); undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", p_track, p_ofs); undo_redo->commit_action(); } break; + case Animation::TYPE_SCALE_3D: { + if (!root->has_node(animation->track_get_path(p_track))) { + EditorNode::get_singleton()->show_warning(TTR("Track path is invalid, so can't add a key.")); + return; + } + Node3D *base = Object::cast_to<Node3D>(root->get_node(animation->track_get_path(p_track))); + + if (!base) { + EditorNode::get_singleton()->show_warning(TTR("Track is not of type Node3D, can't insert key")); + return; + } + + Vector3 scale = base->get_scale(); + + undo_redo->create_action(TTR("Add Scale Key")); + undo_redo->add_do_method(animation.ptr(), "scale_track_insert_key", p_track, p_ofs, scale); + undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", p_track, p_ofs); + undo_redo->commit_action(); + + } break; + case Animation::TYPE_BLEND_SHAPE: case Animation::TYPE_VALUE: { NodePath bp; Variant value; @@ -4766,16 +4909,16 @@ struct _AnimMoveRestore { Variant key; float transition = 0; }; -//used for undo/redo +// Used for undo/redo. void AnimationTrackEditor::_clear_key_edit() { if (key_edit) { - //if key edit is the object being inspected, remove it first + // If key edit is the object being inspected, remove it first. if (EditorNode::get_singleton()->get_inspector()->get_edited_object() == key_edit) { EditorNode::get_singleton()->push_item(nullptr); } - //then actually delete it + // Then actually delete it. memdelete(key_edit); key_edit = nullptr; } @@ -4831,8 +4974,8 @@ void AnimationTrackEditor::_update_key_edit() { Map<int, List<float>> key_ofs_map; Map<int, NodePath> base_map; int first_track = -1; - for (Map<SelectedKey, KeyInfo>::Element *E = selection.front(); E; E = E->next()) { - int track = E->key().track; + for (const KeyValue<SelectedKey, KeyInfo> &E : selection) { + int track = E.key.track; if (first_track < 0) { first_track = track; } @@ -4842,7 +4985,7 @@ void AnimationTrackEditor::_update_key_edit() { base_map[track] = NodePath(); } - key_ofs_map[track].push_back(animation->track_get_key_time(track, E->key().key)); + key_ofs_map[track].push_back(animation->track_get_key_time(track, E.key.key)); } multi_key_edit->key_ofs_map = key_ofs_map; multi_key_edit->base_map = base_map; @@ -4889,11 +5032,11 @@ void AnimationTrackEditor::_move_selection_commit() { List<_AnimMoveRestore> to_restore; float motion = moving_selection_offset; - // 1 - remove the keys + // 1 - remove the keys. for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { undo_redo->add_do_method(animation.ptr(), "track_remove_key", E->key().track, E->key().key); } - // 2 - remove overlapped keys + // 2 - Remove overlapped keys. for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float newtime = snap_time(E->get().pos + motion); int idx = animation->track_find_key(E->key().track, newtime, true); @@ -4904,7 +5047,7 @@ void AnimationTrackEditor::_move_selection_commit() { sk.key = idx; sk.track = E->key().track; if (selection.has(sk)) { - continue; //already in selection, don't save + continue; // Already in selection, don't save. } undo_redo->add_do_method(animation.ptr(), "track_remove_key_at_time", E->key().track, newtime); @@ -4918,24 +5061,24 @@ void AnimationTrackEditor::_move_selection_commit() { to_restore.push_back(amr); } - // 3 - move the keys (re insert them) + // 3 - Move the keys (Reinsert them). for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float newpos = snap_time(E->get().pos + motion); undo_redo->add_do_method(animation.ptr(), "track_insert_key", E->key().track, newpos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key)); } - // 4 - (undo) remove inserted keys + // 4 - (Undo) Remove inserted keys. for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float newpos = snap_time(E->get().pos + motion); undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", E->key().track, newpos); } - // 5 - (undo) reinsert keys + // 5 - (Undo) Reinsert keys. for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { undo_redo->add_undo_method(animation.ptr(), "track_insert_key", E->key().track, E->get().pos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key)); } - // 6 - (undo) reinsert overlapped keys + // 6 - (Undo) Reinsert overlapped keys. for (_AnimMoveRestore &amr : to_restore) { undo_redo->add_undo_method(animation.ptr(), "track_insert_key", amr.track, amr.time, amr.key, amr.transition); } @@ -4943,7 +5086,7 @@ void AnimationTrackEditor::_move_selection_commit() { undo_redo->add_do_method(this, "_clear_selection_for_anim", animation); undo_redo->add_undo_method(this, "_clear_selection_for_anim", animation); - // 7 - reselect + // 7 - Reselect. for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float oldpos = E->get().pos; float newpos = snap_time(oldpos + motion); @@ -5013,18 +5156,18 @@ void AnimationTrackEditor::_scroll_input(const Ref<InputEvent> &p_event) { box_select_rect = Rect2(); } else if (box_selecting) { if (box_selection->is_visible_in_tree()) { - //only if moved + // Only if moved. for (int i = 0; i < track_edits.size(); i++) { Rect2 local_rect = box_select_rect; local_rect.position -= track_edits[i]->get_global_position(); track_edits[i]->append_to_selection(local_rect, mb->is_command_pressed()); } - if (_get_track_selected() == -1 && track_edits.size() > 0) { //minimal hack to make shortcuts work + if (_get_track_selected() == -1 && track_edits.size() > 0) { // Minimal hack to make shortcuts work. track_edits[track_edits.size() - 1]->grab_focus(); } } else { - _clear_selection(); //clear it + _clear_selection(); // Clear it. } box_selection->hide(); @@ -5040,7 +5183,7 @@ void AnimationTrackEditor::_scroll_input(const Ref<InputEvent> &p_event) { if (mm.is_valid() && box_selecting) { if (!(mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT)) { - //no longer + // No longer. box_selection->hide(); box_selecting = false; return; @@ -5080,16 +5223,16 @@ void AnimationTrackEditor::_cancel_bezier_edit() { } void AnimationTrackEditor::_bezier_edit(int p_for_track) { - _clear_selection(); //bezier probably wants to use a separate selection mode + _clear_selection(); // Bezier probably wants to use a separate selection mode. bezier_edit->set_root(root); bezier_edit->set_animation_and_track(animation, p_for_track); scroll->hide(); bezier_edit->show(); - //search everything within the track and curve- edit it + // Search everything within the track and curve - edit it. } void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) { - //duplicait! + // Duplicait! if (selection.size() && animation.is_valid() && (!transpose || (_get_track_selected() >= 0 && _get_track_selected() < animation->get_track_count()))) { int top_track = 0x7FFFFFFF; float top_time = 1e10; @@ -5147,7 +5290,7 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) { undo_redo->commit_action(); - //reselect duplicated + // Reselect duplicated. Map<SelectedKey, KeyInfo> new_selection; for (const Pair<int, float> &E : new_selection_values) { @@ -5176,7 +5319,7 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) { } void AnimationTrackEditor::_edit_menu_about_to_popup() { - AnimationPlayer *player = AnimationPlayerEditor::singleton->get_player(); + AnimationPlayer *player = AnimationPlayerEditor::get_singleton()->get_player(); edit->get_popup()->set_item_disabled(edit->get_popup()->get_item_index(EDIT_APPLY_RESET), !player->can_apply_reset()); } @@ -5259,7 +5402,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { text += sn[j]; } - path = NodePath(node->get_path().get_names(), path.get_subnames(), true); //store full path instead for copying + path = NodePath(node->get_path().get_names(), path.get_subnames(), true); // Store full path instead for copying. } else { text = path; int sep = text.find(":"); @@ -5269,8 +5412,17 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { } switch (animation->track_get_type(i)) { - case Animation::TYPE_TRANSFORM3D: - text += " (Transform)"; + case Animation::TYPE_POSITION_3D: + text += " (Position)"; + break; + case Animation::TYPE_ROTATION_3D: + text += " (Rotation)"; + break; + case Animation::TYPE_SCALE_3D: + text += " (Scale)"; + break; + case Animation::TYPE_BLEND_SHAPE: + text += " (BlendShape)"; break; case Animation::TYPE_METHOD: text += " (Methods)"; @@ -5386,8 +5538,8 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { float len = -1e20; float pivot = 0; - for (Map<SelectedKey, KeyInfo>::Element *E = selection.front(); E; E = E->next()) { - float t = animation->track_get_key_time(E->key().track, E->key().key); + for (const KeyValue<SelectedKey, KeyInfo> &E : selection) { + float t = animation->track_get_key_time(E.key.track, E.key.key); if (t < from_t) { from_t = t; } @@ -5413,11 +5565,11 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { List<_AnimMoveRestore> to_restore; - // 1-remove the keys + // 1 - Remove the keys. for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { undo_redo->add_do_method(animation.ptr(), "track_remove_key", E->key().track, E->key().key); } - // 2- remove overlapped keys + // 2 - Remove overlapped keys. for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float newtime = (E->get().pos - from_t) * s + from_t; int idx = animation->track_find_key(E->key().track, newtime, true); @@ -5428,7 +5580,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { sk.key = idx; sk.track = E->key().track; if (selection.has(sk)) { - continue; //already in selection, don't save + continue; // Already in selection, don't save. } undo_redo->add_do_method(animation.ptr(), "track_remove_key_at_time", E->key().track, newtime); @@ -5443,24 +5595,24 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { } #define _NEW_POS(m_ofs) (((s > 0) ? m_ofs : from_t + (len - (m_ofs - from_t))) - pivot) * ABS(s) + from_t - // 3-move the keys (re insert them) + // 3 - Move the keys (re insert them). for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float newpos = _NEW_POS(E->get().pos); undo_redo->add_do_method(animation.ptr(), "track_insert_key", E->key().track, newpos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key)); } - // 4-(undo) remove inserted keys + // 4 - (Undo) Remove inserted keys. for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float newpos = _NEW_POS(E->get().pos); undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", E->key().track, newpos); } - // 5-(undo) reinsert keys + // 5 - (Undo) Reinsert keys. for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { undo_redo->add_undo_method(animation.ptr(), "track_insert_key", E->key().track, E->get().pos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key)); } - // 6-(undo) reinsert overlapped keys + // 6 - (Undo) Reinsert overlapped keys. for (_AnimMoveRestore &amr : to_restore) { undo_redo->add_undo_method(animation.ptr(), "track_insert_key", amr.track, amr.time, amr.key, amr.transition); } @@ -5468,7 +5620,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { undo_redo->add_do_method(this, "_clear_selection_for_anim", animation); undo_redo->add_undo_method(this, "_clear_selection_for_anim", animation); - // 7-reselect + // 7-reselect. for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float oldpos = E->get().pos; float newpos = _NEW_POS(oldpos); @@ -5520,7 +5672,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { goto_prev_step(false); } break; case EDIT_APPLY_RESET: { - AnimationPlayerEditor::singleton->get_player()->apply_reset(true); + AnimationPlayerEditor::get_singleton()->get_player()->apply_reset(true); } break; case EDIT_OPTIMIZE_ANIMATION: { @@ -5540,9 +5692,9 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { case EDIT_CLEAN_UP_ANIMATION_CONFIRM: { if (cleanup_all->is_pressed()) { List<StringName> names; - AnimationPlayerEditor::singleton->get_player()->get_animation_list(&names); + AnimationPlayerEditor::get_singleton()->get_player()->get_animation_list(&names); for (const StringName &E : names) { - _cleanup_animation(AnimationPlayerEditor::singleton->get_player()->get_animation(E)); + _cleanup_animation(AnimationPlayerEditor::get_singleton()->get_player()->get_animation(E)); } } else { _cleanup_animation(animation); @@ -5617,7 +5769,7 @@ bool AnimationTrackEditor::is_grouping_tracks() { void AnimationTrackEditor::_selection_changed() { if (selected_filter->is_pressed()) { - _update_tracks(); //needs updatin + _update_tracks(); // Needs updatin. } else { for (int i = 0; i < track_edits.size(); i++) { track_edits[i]->update(); @@ -5686,7 +5838,6 @@ void AnimationTrackEditor::_bind_methods() { ClassDB::bind_method("_animation_update", &AnimationTrackEditor::_animation_update); ClassDB::bind_method("_track_grab_focus", &AnimationTrackEditor::_track_grab_focus); ClassDB::bind_method("_update_tracks", &AnimationTrackEditor::_update_tracks); - ClassDB::bind_method("_insert_delay", &AnimationTrackEditor::_insert_delay); ClassDB::bind_method("_clear_selection_for_anim", &AnimationTrackEditor::_clear_selection_for_anim); ClassDB::bind_method("_select_at_anim", &AnimationTrackEditor::_select_at_anim); @@ -5772,7 +5923,7 @@ AnimationTrackEditor::AnimationTrackEditor() { undo_redo = EditorNode::get_singleton()->get_undo_redo(); main_panel = memnew(PanelContainer); - main_panel->set_focus_mode(FOCUS_ALL); // allow panel to have focus so that shortcuts work as expected. + main_panel->set_focus_mode(FOCUS_ALL); // Allow panel to have focus so that shortcuts work as expected. add_child(main_panel); main_panel->set_v_size_flags(SIZE_EXPAND_FILL); HBoxContainer *timeline_scroll = memnew(HBoxContainer); @@ -5808,7 +5959,7 @@ AnimationTrackEditor::AnimationTrackEditor() { scroll->set_v_size_flags(SIZE_EXPAND_FILL); VScrollBar *sb = scroll->get_v_scrollbar(); scroll->remove_child(sb); - timeline_scroll->add_child(sb); //move here so timeline and tracks are always aligned + timeline_scroll->add_child(sb); // Move here so timeline and tracks are always aligned. scroll->connect("gui_input", callable_mp(this, &AnimationTrackEditor::_scroll_input)); bezier_edit = memnew(AnimationBezierTrackEdit); @@ -5849,7 +6000,7 @@ AnimationTrackEditor::AnimationTrackEditor() { selected_filter = memnew(Button); selected_filter->set_flat(true); - selected_filter->connect("pressed", callable_mp(this, &AnimationTrackEditor::_view_group_toggle)); //same function works the same + selected_filter->connect("pressed", callable_mp(this, &AnimationTrackEditor::_view_group_toggle)); // Same function works the same. selected_filter->set_toggle_mode(true); selected_filter->set_tooltip(TTR("Only show tracks from nodes selected in tree.")); @@ -5950,9 +6101,6 @@ AnimationTrackEditor::AnimationTrackEditor() { add_child(method_selector); method_selector->connect("selected", callable_mp(this, &AnimationTrackEditor::_add_method_key)); - inserting = false; - insert_query = false; - insert_frame = 0; insert_queue = false; insert_confirm = memnew(ConfirmationDialog); @@ -5985,13 +6133,13 @@ AnimationTrackEditor::AnimationTrackEditor() { box_selection->connect("draw", callable_mp(this, &AnimationTrackEditor::_box_selection_draw)); box_selecting = false; - //default plugins + // Default Plugins. Ref<AnimationTrackEditDefaultPlugin> def_plugin; def_plugin.instantiate(); add_track_edit_plugin(def_plugin); - //dialogs + // Dialogs. optimize_dialog = memnew(ConfirmationDialog); add_child(optimize_dialog); diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h index 4da708dd1c..2555901557 100644 --- a/editor/animation_track_editor.h +++ b/editor/animation_track_editor.h @@ -35,7 +35,7 @@ #include "editor/editor_spin_slider.h" #include "editor/property_editor.h" #include "editor/property_selector.h" -#include "scene/animation/animation_cache.h" + #include "scene/gui/control.h" #include "scene/gui/file_dialog.h" #include "scene/gui/menu_button.h" @@ -352,10 +352,7 @@ class AnimationTrackEditor : public VBoxContainer { CheckBox *insert_confirm_reset; ConfirmationDialog *insert_confirm; bool insert_queue; - bool inserting; - bool insert_query; List<InsertData> insert_data; - uint64_t insert_frame; void _query_insert(const InsertData &p_id); Ref<Animation> _create_and_get_reset_animation(); @@ -370,7 +367,7 @@ class AnimationTrackEditor : public VBoxContainer { } }; TrackIndices _confirm_insert(InsertData p_id, TrackIndices p_next_tracks, bool p_create_reset, Ref<Animation> p_reset_anim, bool p_create_beziers); - void _insert_delay(bool p_create_reset, bool p_create_beziers); + void _insert_track(bool p_create_reset, bool p_create_beziers); void _root_removed(Node *p_root); @@ -531,6 +528,9 @@ public: void insert_node_value_key(Node *p_node, const String &p_property, const Variant &p_value, bool p_only_if_exists = false); void insert_value_key(const String &p_property, const Variant &p_value, bool p_advance); void insert_transform_key(Node3D *p_node, const String &p_sub, const Transform3D &p_xform); + bool has_transform_track(Node3D *p_node, const String &p_sub); + void make_insert_queue(); + void commit_insert_queue(); void show_select_node_warning(bool p_show); diff --git a/editor/audio_stream_preview.cpp b/editor/audio_stream_preview.cpp index f7f4988873..2efcdcda31 100644 --- a/editor/audio_stream_preview.cpp +++ b/editor/audio_stream_preview.cpp @@ -216,15 +216,15 @@ AudioStreamPreviewGenerator *AudioStreamPreviewGenerator::singleton = nullptr; void AudioStreamPreviewGenerator::_notification(int p_what) { if (p_what == NOTIFICATION_PROCESS) { List<ObjectID> to_erase; - for (Map<ObjectID, Preview>::Element *E = previews.front(); E; E = E->next()) { - if (!E->get().generating.is_set()) { - if (E->get().thread) { - E->get().thread->wait_to_finish(); - memdelete(E->get().thread); - E->get().thread = nullptr; + for (KeyValue<ObjectID, Preview> &E : previews) { + if (!E.value.generating.is_set()) { + if (E.value.thread) { + E.value.thread->wait_to_finish(); + memdelete(E.value.thread); + E.value.thread = nullptr; } - if (!ObjectDB::get_instance(E->key())) { //no longer in use, get rid of preview - to_erase.push_back(E->key()); + if (!ObjectDB::get_instance(E.key)) { //no longer in use, get rid of preview + to_erase.push_back(E.key); } } } diff --git a/editor/debugger/debug_adapter/debug_adapter_parser.cpp b/editor/debugger/debug_adapter/debug_adapter_parser.cpp index fbd3aaa409..485d58f4a3 100644 --- a/editor/debugger/debug_adapter/debug_adapter_parser.cpp +++ b/editor/debugger/debug_adapter/debug_adapter_parser.cpp @@ -306,8 +306,8 @@ Dictionary DebugAdapterParser::req_stackTrace(const Dictionary &p_params) const Array arr; DebugAdapterProtocol *dap = DebugAdapterProtocol::get_singleton(); - for (Map<DAP::StackFrame, List<int>>::Element *E = dap->stackframe_list.front(); E; E = E->next()) { - DAP::StackFrame sf = E->key(); + for (const KeyValue<DAP::StackFrame, List<int>> &E : dap->stackframe_list) { + DAP::StackFrame sf = E.key; if (!lines_at_one) { sf.line--; } diff --git a/editor/debugger/editor_debugger_inspector.cpp b/editor/debugger/editor_debugger_inspector.cpp index a1eb71235c..e53f66e72e 100644 --- a/editor/debugger/editor_debugger_inspector.cpp +++ b/editor/debugger/editor_debugger_inspector.cpp @@ -200,12 +200,12 @@ ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) { } void EditorDebuggerInspector::clear_cache() { - for (Map<ObjectID, EditorDebuggerRemoteObject *>::Element *E = remote_objects.front(); E; E = E->next()) { + for (const KeyValue<ObjectID, EditorDebuggerRemoteObject *> &E : remote_objects) { EditorNode *editor = EditorNode::get_singleton(); - if (editor->get_editor_history()->get_current() == E->value()->get_instance_id()) { + if (editor->get_editor_history()->get_current() == E.value->get_instance_id()) { editor->push_item(nullptr); } - memdelete(E->value()); + memdelete(E.value); } remote_objects.clear(); remote_dependencies.clear(); diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp index be84e8dec5..188f5708aa 100644 --- a/editor/debugger/editor_debugger_node.cpp +++ b/editor/debugger/editor_debugger_node.cpp @@ -328,9 +328,9 @@ void EditorDebuggerNode::_notification(int p_what) { debugger->set_editor_remote_tree(remote_scene_tree); debugger->start(server->take_connection()); // Send breakpoints. - for (Map<Breakpoint, bool>::Element *E = breakpoints.front(); E; E = E->next()) { - const Breakpoint &bp = E->key(); - debugger->set_breakpoint(bp.source, bp.line, E->get()); + for (const KeyValue<Breakpoint, bool> &E : breakpoints) { + const Breakpoint &bp = E.key; + debugger->set_breakpoint(bp.source, bp.line, E.value); } // Will arrive too late, how does the regular run work? debugger->update_live_edit_root(); @@ -497,8 +497,8 @@ void EditorDebuggerNode::set_breakpoints(const String &p_path, Array p_lines) { set_breakpoint(p_path, p_lines[i], true); } - for (Map<Breakpoint, bool>::Element *E = breakpoints.front(); E; E = E->next()) { - Breakpoint b = E->key(); + for (const KeyValue<Breakpoint, bool> &E : breakpoints) { + Breakpoint b = E.key; if (b.source == p_path && !p_lines.has(b.line)) { set_breakpoint(p_path, b.line, false); } diff --git a/editor/debugger/editor_network_profiler.cpp b/editor/debugger/editor_network_profiler.cpp index 9479fbd5d4..d4385630be 100644 --- a/editor/debugger/editor_network_profiler.cpp +++ b/editor/debugger/editor_network_profiler.cpp @@ -56,18 +56,18 @@ void EditorNetworkProfiler::_update_frame() { TreeItem *root = counters_display->create_item(); - for (Map<ObjectID, DebuggerMarshalls::MultiplayerNodeInfo>::Element *E = nodes_data.front(); E; E = E->next()) { + for (const KeyValue<ObjectID, DebuggerMarshalls::MultiplayerNodeInfo> &E : nodes_data) { TreeItem *node = counters_display->create_item(root); for (int j = 0; j < counters_display->get_columns(); ++j) { node->set_text_align(j, j > 0 ? TreeItem::ALIGN_RIGHT : TreeItem::ALIGN_LEFT); } - node->set_text(0, E->get().node_path); - node->set_text(1, E->get().incoming_rpc == 0 ? "-" : itos(E->get().incoming_rpc)); - node->set_text(2, E->get().incoming_rset == 0 ? "-" : itos(E->get().incoming_rset)); - node->set_text(3, E->get().outgoing_rpc == 0 ? "-" : itos(E->get().outgoing_rpc)); - node->set_text(4, E->get().outgoing_rset == 0 ? "-" : itos(E->get().outgoing_rset)); + node->set_text(0, E.value.node_path); + node->set_text(1, E.value.incoming_rpc == 0 ? "-" : itos(E.value.incoming_rpc)); + node->set_text(2, E.value.incoming_rset == 0 ? "-" : itos(E.value.incoming_rset)); + node->set_text(3, E.value.outgoing_rpc == 0 ? "-" : itos(E.value.outgoing_rpc)); + node->set_text(4, E.value.outgoing_rset == 0 ? "-" : itos(E.value.outgoing_rset)); } } diff --git a/editor/debugger/editor_profiler.cpp b/editor/debugger/editor_profiler.cpp index fa9c9f61f5..2fe7cd7886 100644 --- a/editor/debugger/editor_profiler.cpp +++ b/editor/debugger/editor_profiler.cpp @@ -515,11 +515,11 @@ Vector<Vector<String>> EditorProfiler::get_data_as_csv() const { if (!m.valid) { continue; } - for (Map<StringName, Metric::Category *>::Element *E = m.category_ptrs.front(); E; E = E->next()) { - possible_signatures.insert(E->key()); + for (const KeyValue<StringName, Metric::Category *> &E : m.category_ptrs) { + possible_signatures.insert(E.key); } - for (Map<StringName, Metric::Category::Item *>::Element *E = m.item_ptrs.front(); E; E = E->next()) { - possible_signatures.insert(E->key()); + for (const KeyValue<StringName, Metric::Category::Item *> &E : m.item_ptrs) { + possible_signatures.insert(E.key); } } @@ -557,11 +557,11 @@ Vector<Vector<String>> EditorProfiler::get_data_as_csv() const { values.clear(); values.resize(possible_signatures.size()); - for (Map<StringName, Metric::Category *>::Element *E = m.category_ptrs.front(); E; E = E->next()) { - values.write[sig_map[E->key()]] = String::num_real(E->value()->total_time); + for (const KeyValue<StringName, Metric::Category *> &E : m.category_ptrs) { + values.write[sig_map[E.key]] = String::num_real(E.value->total_time); } - for (Map<StringName, Metric::Category::Item *>::Element *E = m.item_ptrs.front(); E; E = E->next()) { - values.write[sig_map[E->key()]] = String::num_real(E->value()->total); + for (const KeyValue<StringName, Metric::Category::Item *> &E : m.item_ptrs) { + values.write[sig_map[E.key]] = String::num_real(E.value->total); } res.push_back(values); diff --git a/editor/debugger/editor_visual_profiler.cpp b/editor/debugger/editor_visual_profiler.cpp index f17ad0d36c..f25f18b7e4 100644 --- a/editor/debugger/editor_visual_profiler.cpp +++ b/editor/debugger/editor_visual_profiler.cpp @@ -370,8 +370,8 @@ void EditorVisualProfiler::_update_frame(bool p_focus_selected) { float total_gpu = E->get_metadata(2); total_cpu += cpu_time; total_gpu += gpu_time; - E->set_metadata(1, cpu_time); - E->set_metadata(2, gpu_time); + E->set_metadata(1, total_cpu); + E->set_metadata(2, total_gpu); } category->set_icon(0, track_icon); diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp index d6650c3319..a312c161a8 100644 --- a/editor/debugger/script_editor_debugger.cpp +++ b/editor/debugger/script_editor_debugger.cpp @@ -1238,7 +1238,7 @@ void ScriptEditorDebugger::update_live_edit_root() { Array msg; msg.push_back(np); if (editor->get_edited_scene()) { - msg.push_back(editor->get_edited_scene()->get_filename()); + msg.push_back(editor->get_edited_scene()->get_scene_file_path()); } else { msg.push_back(""); } diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp index a9d8cb219c..d07d77c112 100644 --- a/editor/dependency_editor.cpp +++ b/editor/dependency_editor.cpp @@ -74,16 +74,16 @@ void DependencyEditor::_fix_and_find(EditorFileSystemDirectory *efsd, Map<String String path = efsd->get_file_path(i); - for (Map<String, String>::Element *E = candidates[file].front(); E; E = E->next()) { - if (E->get() == String()) { - E->get() = path; + for (KeyValue<String, String> &E : candidates[file]) { + if (E.value == String()) { + E.value = path; continue; } //must match the best, using subdirs - String existing = E->get().replace_first("res://", ""); + String existing = E.value.replace_first("res://", ""); String current = path.replace_first("res://", ""); - String lost = E->key().replace_first("res://", ""); + String lost = E.key.replace_first("res://", ""); Vector<String> existingv = existing.split("/"); existingv.reverse(); @@ -107,7 +107,7 @@ void DependencyEditor::_fix_and_find(EditorFileSystemDirectory *efsd, Map<String if (current_score > existing_score) { //if it was the same, could track distance to new path but.. - E->get() = path; //replace by more accurate + E.value = path; //replace by more accurate } } } @@ -133,10 +133,10 @@ void DependencyEditor::_fix_all() { Map<String, String> remaps; - for (Map<String, Map<String, String>>::Element *E = candidates.front(); E; E = E->next()) { - for (Map<String, String>::Element *F = E->get().front(); F; F = F->next()) { - if (F->get() != String()) { - remaps[F->key()] = F->get(); + for (KeyValue<String, Map<String, String>> &E : candidates) { + for (const KeyValue<String, String> &F : E.value) { + if (F.value != String()) { + remaps[F.key] = F.value; } } } diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp index ec162231e9..beead74c53 100644 --- a/editor/doc_tools.cpp +++ b/editor/doc_tools.cpp @@ -44,8 +44,8 @@ #include "modules/modules_enabled.gen.h" void DocTools::merge_from(const DocTools &p_data) { - for (Map<String, DocData::ClassDoc>::Element *E = class_list.front(); E; E = E->next()) { - DocData::ClassDoc &c = E->get(); + for (KeyValue<String, DocData::ClassDoc> &E : class_list) { + DocData::ClassDoc &c = E.value; if (!p_data.class_list.has(c.name)) { continue; @@ -185,9 +185,9 @@ void DocTools::merge_from(const DocTools &p_data) { } void DocTools::remove_from(const DocTools &p_data) { - for (Map<String, DocData::ClassDoc>::Element *E = p_data.class_list.front(); E; E = E->next()) { - if (class_list.has(E->key())) { - class_list.erase(E->key()); + for (const KeyValue<String, DocData::ClassDoc> &E : p_data.class_list) { + if (class_list.has(E.key)) { + class_list.erase(E.key); } } } @@ -1227,8 +1227,8 @@ static void _write_method_doc(FileAccess *f, const String &p_name, Vector<DocDat } Error DocTools::save_classes(const String &p_default_path, const Map<String, String> &p_class_path) { - for (Map<String, DocData::ClassDoc>::Element *E = class_list.front(); E; E = E->next()) { - DocData::ClassDoc &c = E->get(); + for (KeyValue<String, DocData::ClassDoc> &E : class_list) { + DocData::ClassDoc &c = E.value; String save_path; if (p_class_path.has(c.name)) { diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp index fcf79a80a7..0840c3b6a8 100644 --- a/editor/editor_autoload_settings.cpp +++ b/editor/editor_autoload_settings.cpp @@ -473,8 +473,8 @@ void EditorAutoloadSettings::update_autoload() { } // Remove deleted/changed autoloads - for (Map<String, AutoLoadInfo>::Element *E = to_remove.front(); E; E = E->next()) { - AutoLoadInfo &info = E->get(); + for (KeyValue<String, AutoLoadInfo> &E : to_remove) { + AutoLoadInfo &info = E.value; if (info.is_singleton) { for (int i = 0; i < ScriptServer::get_language_count(); i++) { ScriptServer::get_language(i)->remove_named_global_constant(info.name); diff --git a/editor/editor_command_palette.cpp b/editor/editor_command_palette.cpp index e69ced8522..71e9fac219 100644 --- a/editor/editor_command_palette.cpp +++ b/editor/editor_command_palette.cpp @@ -212,6 +212,12 @@ void EditorCommandPalette::_add_command(String p_command_name, String p_key_name command.callable = p_binded_action; command.shortcut = p_shortcut_text; + // Commands added from plugins don't exist yet when the history is loaded, so we assign the last use time here if it was recorded. + Dictionary command_history = EditorSettings::get_singleton()->get_project_metadata("command_palette", "command_history", Dictionary()); + if (command_history.has(p_key_name)) { + command.last_used = command_history[p_key_name]; + } + commands[p_key_name] = command; } @@ -242,7 +248,9 @@ void EditorCommandPalette::register_shortcuts_as_command() { Array history_entries = command_history.keys(); for (int i = 0; i < history_entries.size(); i++) { const String &history_key = history_entries[i]; - commands[history_key].last_used = command_history[history_key]; + if (commands.has(history_key)) { + commands[history_key].last_used = command_history[history_key]; + } } } diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index 5e50835ef2..aee9c21007 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -554,7 +554,7 @@ void EditorData::remove_scene(int p_idx) { ERR_FAIL_INDEX(p_idx, edited_scene.size()); if (edited_scene[p_idx].root) { for (int i = 0; i < editor_plugins.size(); i++) { - editor_plugins[i]->notify_scene_closed(edited_scene[p_idx].root->get_filename()); + editor_plugins[i]->notify_scene_closed(edited_scene[p_idx].root->get_scene_file_path()); } memdelete(edited_scene[p_idx].root); @@ -583,7 +583,7 @@ bool EditorData::_find_updated_instances(Node *p_root, Node *p_node, Set<String> if (p_node == p_root) { ss = p_node->get_scene_inherited_state(); - } else if (p_node->get_filename() != String()) { + } else if (p_node->get_scene_file_path() != String()) { ss = p_node->get_scene_instance_state(); } @@ -643,12 +643,12 @@ bool EditorData::check_and_update_scene(int p_idx) { } } - new_scene->set_filename(edited_scene[p_idx].root->get_filename()); + new_scene->set_scene_file_path(edited_scene[p_idx].root->get_scene_file_path()); memdelete(edited_scene[p_idx].root); edited_scene.write[p_idx].root = new_scene; - if (new_scene->get_filename() != "") { - edited_scene.write[p_idx].path = new_scene->get_filename(); + if (new_scene->get_scene_file_path() != "") { + edited_scene.write[p_idx].path = new_scene->get_scene_file_path(); } edited_scene.write[p_idx].selection = new_selection; @@ -682,10 +682,10 @@ void EditorData::set_edited_scene_root(Node *p_root) { ERR_FAIL_INDEX(current_edited_scene, edited_scene.size()); edited_scene.write[current_edited_scene].root = p_root; if (p_root) { - if (p_root->get_filename() != "") { - edited_scene.write[current_edited_scene].path = p_root->get_filename(); + if (p_root->get_scene_file_path() != "") { + edited_scene.write[current_edited_scene].path = p_root->get_scene_file_path(); } else { - p_root->set_filename(edited_scene[current_edited_scene].path); + p_root->set_scene_file_path(edited_scene[current_edited_scene].path); } } @@ -764,7 +764,7 @@ Ref<Script> EditorData::get_scene_root_script(int p_idx) const { Ref<Script> s = edited_scene[p_idx].root->get_script(); if (!s.is_valid() && edited_scene[p_idx].root->get_child_count()) { Node *n = edited_scene[p_idx].root->get_child(0); - while (!s.is_valid() && n && n->get_filename() == String()) { + while (!s.is_valid() && n && n->get_scene_file_path() == String()) { s = n->get_script(); n = n->get_parent(); } @@ -777,11 +777,11 @@ String EditorData::get_scene_title(int p_idx, bool p_always_strip_extension) con if (!edited_scene[p_idx].root) { return TTR("[empty]"); } - if (edited_scene[p_idx].root->get_filename() == "") { + if (edited_scene[p_idx].root->get_scene_file_path() == "") { return TTR("[unsaved]"); } - const String filename = edited_scene[p_idx].root->get_filename().get_file(); + const String filename = edited_scene[p_idx].root->get_scene_file_path().get_file(); const String basename = filename.get_basename(); if (p_always_strip_extension) { @@ -795,7 +795,7 @@ String EditorData::get_scene_title(int p_idx, bool p_always_strip_extension) con continue; } - if (edited_scene[i].root && basename == edited_scene[i].root->get_filename().get_file().get_basename()) { + if (edited_scene[i].root && basename == edited_scene[i].root->get_scene_file_path().get_file().get_basename()) { return filename; } } @@ -811,17 +811,17 @@ void EditorData::set_scene_path(int p_idx, const String &p_path) { if (!edited_scene[p_idx].root) { return; } - edited_scene[p_idx].root->set_filename(p_path); + edited_scene[p_idx].root->set_scene_file_path(p_path); } String EditorData::get_scene_path(int p_idx) const { ERR_FAIL_INDEX_V(p_idx, edited_scene.size(), String()); if (edited_scene[p_idx].root) { - if (edited_scene[p_idx].root->get_filename() == "") { - edited_scene[p_idx].root->set_filename(edited_scene[p_idx].path); + if (edited_scene[p_idx].root->get_scene_file_path() == "") { + edited_scene[p_idx].root->set_scene_file_path(edited_scene[p_idx].path); } else { - return edited_scene[p_idx].root->get_filename(); + return edited_scene[p_idx].root->get_scene_file_path(); } } @@ -1105,8 +1105,8 @@ Array EditorSelection::_get_transformable_selected_nodes() { TypedArray<Node> EditorSelection::get_selected_nodes() { TypedArray<Node> ret; - for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) { - ret.push_back(E->key()); + for (const KeyValue<Node *, Object *> &E : selection) { + ret.push_back(E.key); } return ret; @@ -1133,8 +1133,8 @@ void EditorSelection::_update_nl() { selected_node_list.clear(); - for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) { - Node *parent = E->key(); + for (const KeyValue<Node *, Object *> &E : selection) { + Node *parent = E.key; parent = parent->get_parent(); bool skip = false; while (parent) { @@ -1148,7 +1148,7 @@ void EditorSelection::_update_nl() { if (skip) { continue; } - selected_node_list.push_back(E->key()); + selected_node_list.push_back(E.key); } nl_changed = true; @@ -1183,8 +1183,8 @@ List<Node *> &EditorSelection::get_selected_node_list() { List<Node *> EditorSelection::get_full_selected_node_list() { List<Node *> node_list; - for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) { - node_list.push_back(E->key()); + for (const KeyValue<Node *, Object *> &E : selection) { + node_list.push_back(E.key); } return node_list; diff --git a/editor/editor_dir_dialog.cpp b/editor/editor_dir_dialog.cpp index 5df392b91e..f91dedf25d 100644 --- a/editor/editor_dir_dialog.cpp +++ b/editor/editor_dir_dialog.cpp @@ -44,6 +44,7 @@ void EditorDirDialog::_update_dir(TreeItem *p_item, EditorFileSystemDirectory *p p_item->set_metadata(0, p_dir->get_path()); p_item->set_icon(0, tree->get_theme_icon(SNAME("Folder"), SNAME("EditorIcons"))); + p_item->set_icon_modulate(0, tree->get_theme_color(SNAME("folder_icon_modulate"), SNAME("FileDialog"))); if (!p_item->get_parent()) { p_item->set_text(0, "res://"); diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index 10ed76673e..2010ee01db 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -451,6 +451,9 @@ void EditorExportPlatform::_export_find_resources(EditorFileSystemDirectory *p_d } for (int i = 0; i < p_dir->get_file_count(); i++) { + if (p_dir->get_file_type(i) == "TextFile") { + continue; + } p_paths.insert(p_dir->get_file_path(i)); } } @@ -1043,17 +1046,19 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> & return err; } } - if (FileAccess::exists(ResourceUID::CACHE_FILE)) { - Vector<uint8_t> array = FileAccess::get_file_as_array(ResourceUID::CACHE_FILE); - err = p_func(p_udata, ResourceUID::CACHE_FILE, array, idx, total, enc_in_filters, enc_ex_filters, key); + String resource_cache_file = ResourceUID::get_cache_file(); + if (FileAccess::exists(resource_cache_file)) { + Vector<uint8_t> array = FileAccess::get_file_as_array(resource_cache_file); + err = p_func(p_udata, resource_cache_file, array, idx, total, enc_in_filters, enc_ex_filters, key); if (err != OK) { return err; } } - if (FileAccess::exists(NativeExtension::EXTENSION_LIST_CONFIG_FILE)) { - Vector<uint8_t> array = FileAccess::get_file_as_array(NativeExtension::EXTENSION_LIST_CONFIG_FILE); - err = p_func(p_udata, NativeExtension::EXTENSION_LIST_CONFIG_FILE, array, idx, total, enc_in_filters, enc_ex_filters, key); + String extension_list_config_file = NativeExtension::get_extension_list_config_file(); + if (FileAccess::exists(extension_list_config_file)) { + Vector<uint8_t> array = FileAccess::get_file_as_array(extension_list_config_file); + err = p_func(p_udata, extension_list_config_file, array, idx, total, enc_in_filters, enc_ex_filters, key); if (err != OK) { return err; } @@ -1814,9 +1819,9 @@ bool EditorExportPlatformPC::can_export(const Ref<EditorExportPreset> &p_preset, List<String> EditorExportPlatformPC::get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const { List<String> list; - for (Map<String, String>::Element *E = extensions.front(); E; E = E->next()) { - if (p_preset->get(E->key())) { - list.push_back(extensions[E->key()]); + for (const KeyValue<String, String> &E : extensions) { + if (p_preset->get(E.key)) { + list.push_back(extensions[E.key]); return list; } } diff --git a/editor/editor_feature_profile.cpp b/editor/editor_feature_profile.cpp index 84a9237a96..2222a5e5d3 100644 --- a/editor/editor_feature_profile.cpp +++ b/editor/editor_feature_profile.cpp @@ -179,9 +179,9 @@ Error EditorFeatureProfile::save_to_file(const String &p_path) { Array dis_props; - for (Map<StringName, Set<StringName>>::Element *E = disabled_properties.front(); E; E = E->next()) { - for (Set<StringName>::Element *F = E->get().front(); F; F = F->next()) { - dis_props.push_back(String(E->key()) + ":" + String(F->get())); + for (KeyValue<StringName, Set<StringName>> &E : disabled_properties) { + for (Set<StringName>::Element *F = E.value.front(); F; F = F->next()) { + dis_props.push_back(String(E.key) + ":" + String(F->get())); } } diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index 8956983646..675234959a 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -588,7 +588,7 @@ void EditorFileDialog::_item_list_item_rmb_selected(int p_item, const Vector2 &p continue; } Dictionary item_meta = item_list->get_item_metadata(i); - if (String(item_meta["path"]).begins_with("res://.godot")) { + if (String(item_meta["path"]).begins_with(ProjectSettings::get_singleton()->get_project_data_path())) { allow_delete = false; break; } diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 8523833d52..767856f939 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -862,6 +862,9 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess } else { //new or modified time fi->type = ResourceLoader::get_resource_type(path); + if (fi->type == "" && textfile_extensions.has(ext)) { + fi->type = "TextFile"; + } fi->uid = ResourceLoader::get_resource_uid(path); fi->script_class_name = _get_global_script_class(fi->type, path, &fi->script_class_extends, &fi->script_class_icon_path); fi->deps = _get_dependencies(path); @@ -984,6 +987,9 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const fi->modified_time = FileAccess::get_modified_time(path); fi->import_modified_time = 0; fi->type = ResourceLoader::get_resource_type(path); + if (fi->type == "" && textfile_extensions.has(ext)) { + fi->type = "TextFile"; + } fi->script_class_name = _get_global_script_class(fi->type, path, &fi->script_class_extends, &fi->script_class_icon_path); fi->import_valid = ResourceLoader::is_import_valid(path); fi->import_group_file = ResourceLoader::get_import_group_file(path); @@ -1072,8 +1078,8 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const } for (int i = 0; i < p_dir->subdirs.size(); i++) { - if (updated_dir && !p_dir->subdirs[i]->verified) { - //this directory was removed, add action to remove it + if ((updated_dir && !p_dir->subdirs[i]->verified) || _should_skip_directory(p_dir->subdirs[i]->get_path())) { + //this directory was removed or ignored, add action to remove it ItemAction ia; ia.action = ItemAction::ACTION_DIR_REMOVE; ia.dir = p_dir->subdirs[i]; @@ -1539,6 +1545,9 @@ void EditorFileSystem::update_file(const String &p_file) { } String type = ResourceLoader::get_resource_type(p_file); + if (type == "" && textfile_extensions.has(p_file.get_extension())) { + type = "TextFile"; + } ResourceUID::ID uid = ResourceLoader::get_resource_uid(p_file); if (cpos == -1) { @@ -1556,7 +1565,7 @@ void EditorFileSystem::update_file(const String &p_file) { EditorFileSystemDirectory::FileInfo *fi = memnew(EditorFileSystemDirectory::FileInfo); fi->file = file_name; fi->import_modified_time = 0; - fi->import_valid = ResourceLoader::is_import_valid(p_file); + fi->import_valid = type == "TextFile" ? true : ResourceLoader::is_import_valid(p_file); if (idx == fs->files.size()) { fs->files.push_back(fi); @@ -1577,7 +1586,7 @@ void EditorFileSystem::update_file(const String &p_file) { fs->files[cpos]->import_group_file = ResourceLoader::get_import_group_file(p_file); fs->files[cpos]->modified_time = FileAccess::get_modified_time(p_file); fs->files[cpos]->deps = _get_dependencies(p_file); - fs->files[cpos]->import_valid = ResourceLoader::is_import_valid(p_file); + fs->files[cpos]->import_valid = type == "TextFile" ? true : ResourceLoader::is_import_valid(p_file); if (uid != ResourceUID::INVALID_ID) { if (ResourceUID::get_singleton()->has_id(uid)) { @@ -1654,8 +1663,8 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector Error err = importer->import_group_file(p_group_file, source_file_options, base_paths); //all went well, overwrite config files with proper remaps and md5s - for (Map<String, Map<StringName, Variant>>::Element *E = source_file_options.front(); E; E = E->next()) { - const String &file = E->key(); + for (const KeyValue<String, Map<StringName, Variant>> &E : source_file_options) { + const String &file = E.key; String base_path = ResourceFormatImporter::get_singleton()->get_import_base_path(file); FileAccessRef f = FileAccess::open(file + ".import", FileAccess::WRITE); ERR_FAIL_COND_V_MSG(!f, ERR_FILE_CANT_OPEN, "Cannot open import file '" + file + ".import'."); @@ -1740,6 +1749,9 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector fs->files[cpos]->import_modified_time = FileAccess::get_modified_time(file + ".import"); fs->files[cpos]->deps = _get_dependencies(file); fs->files[cpos]->type = importer->get_resource_type(); + if (fs->files[cpos]->type == "" && textfile_extensions.has(file.get_extension())) { + fs->files[cpos]->type = "TextFile"; + } fs->files[cpos]->import_valid = err == OK; //if file is currently up, maybe the source it was loaded from changed, so import math must be updated for it @@ -2121,10 +2133,10 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) { if (groups_to_reimport.size()) { Map<String, Vector<String>> group_files; _find_group_files(filesystem, group_files, groups_to_reimport); - for (Map<String, Vector<String>>::Element *E = group_files.front(); E; E = E->next()) { - Error err = _reimport_group(E->key(), E->get()); + for (const KeyValue<String, Vector<String>> &E : group_files) { + Error err = _reimport_group(E.key, E.value); if (err == OK) { - _reimport_file(E->key()); + _reimport_file(E.key); } } } @@ -2151,6 +2163,10 @@ Error EditorFileSystem::_resource_import(const String &p_path) { } bool EditorFileSystem::_should_skip_directory(const String &p_path) { + if (p_path.begins_with(ProjectSettings::get_singleton()->get_project_data_path())) { + return true; + } + if (FileAccess::exists(p_path.plus_file("project.godot"))) { // skip if another project inside this return true; @@ -2216,7 +2232,7 @@ void EditorFileSystem::move_group_file(const String &p_path, const String &p_new } ResourceUID::ID EditorFileSystem::_resource_saver_get_resource_id_for_path(const String &p_path, bool p_generate) { - if (!p_path.is_resource_file() || p_path.begins_with("res://.godot")) { + if (!p_path.is_resource_file() || p_path.begins_with(ProjectSettings::get_singleton()->get_project_data_path())) { //saved externally (configuration file) or internal file, do not assign an ID. return ResourceUID::INVALID_ID; } @@ -2274,17 +2290,18 @@ bool EditorFileSystem::_scan_extensions() { } } + String extension_list_config_file = NativeExtension::get_extension_list_config_file(); if (extensions.size()) { if (extensions_added.size() || extensions_removed.size()) { //extensions were added or removed - FileAccessRef f = FileAccess::open(NativeExtension::EXTENSION_LIST_CONFIG_FILE, FileAccess::WRITE); + FileAccessRef f = FileAccess::open(extension_list_config_file, FileAccess::WRITE); for (const String &E : extensions) { f->store_line(E); } } } else { - if (loaded_extensions.size() || FileAccess::exists(NativeExtension::EXTENSION_LIST_CONFIG_FILE)) { //extensions were removed + if (loaded_extensions.size() || FileAccess::exists(extension_list_config_file)) { //extensions were removed DirAccessRef da = DirAccess::create(DirAccess::ACCESS_RESOURCES); - da->remove(NativeExtension::EXTENSION_LIST_CONFIG_FILE); + da->remove(extension_list_config_file); } } @@ -2329,6 +2346,7 @@ void EditorFileSystem::_bind_methods() { void EditorFileSystem::_update_extensions() { valid_extensions.clear(); import_extensions.clear(); + textfile_extensions.clear(); List<String> extensionsl; ResourceLoader::get_recognized_extensions_for_type("", &extensionsl); @@ -2336,6 +2354,15 @@ void EditorFileSystem::_update_extensions() { valid_extensions.insert(E); } + const Vector<String> textfile_ext = ((String)(EditorSettings::get_singleton()->get("docks/filesystem/textfile_extensions"))).split(",", false); + for (const String &E : textfile_ext) { + if (valid_extensions.has(E)) { + continue; + } + valid_extensions.insert(E); + textfile_extensions.insert(E); + } + extensionsl.clear(); ResourceFormatImporter::get_singleton()->get_recognized_extensions(&extensionsl); for (const String &E : extensionsl) { diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h index b47cf5523a..feadd0f2b2 100644 --- a/editor/editor_file_system.h +++ b/editor/editor_file_system.h @@ -190,6 +190,7 @@ class EditorFileSystem : public Node { void _delete_internal_files(String p_file); + Set<String> textfile_extensions; Set<String> valid_extensions; Set<String> import_extensions; diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index fff9e5e908..c049db8ef6 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -394,8 +394,8 @@ void EditorHelp::_update_doc() { bool prev = false; class_desc->push_font(doc_font); - for (Map<String, DocData::ClassDoc>::Element *E = doc->class_list.front(); E; E = E->next()) { - if (E->get().inherits == cd.name) { + for (const KeyValue<String, DocData::ClassDoc> &E : doc->class_list) { + if (E.value.inherits == cd.name) { if (!found) { class_desc->push_color(title_color); class_desc->add_text(TTR("Inherited by:") + " "); @@ -406,7 +406,7 @@ void EditorHelp::_update_doc() { class_desc->add_text(" , "); } - _add_type(E->get().name); + _add_type(E.value.name); prev = true; } } @@ -876,14 +876,14 @@ void EditorHelp::_update_doc() { class_desc->add_newline(); - for (Map<String, Vector<DocData::ConstantDoc>>::Element *E = enums.front(); E; E = E->next()) { - enum_line[E->key()] = class_desc->get_line_count() - 2; + for (KeyValue<String, Vector<DocData::ConstantDoc>> &E : enums) { + enum_line[E.key] = class_desc->get_line_count() - 2; class_desc->push_font(doc_code_font); class_desc->push_color(title_color); class_desc->add_text("enum "); class_desc->pop(); - String e = E->key(); + String e = E.key; if ((e.get_slice_count(".") > 1) && (e.get_slice(".", 0) == edited_class)) { e = e.get_slice(".", 1); } @@ -913,10 +913,10 @@ void EditorHelp::_update_doc() { } class_desc->push_indent(1); - Vector<DocData::ConstantDoc> enum_list = E->get(); + Vector<DocData::ConstantDoc> enum_list = E.value; Map<String, int> enumValuesContainer; - int enumStartingLine = enum_line[E->key()]; + int enumStartingLine = enum_line[E.key]; for (int i = 0; i < enum_list.size(); i++) { if (cd.name == "@GlobalScope") { @@ -955,7 +955,7 @@ void EditorHelp::_update_doc() { } if (cd.name == "@GlobalScope") { - enum_values_line[E->key()] = enumValuesContainer; + enum_values_line[E.key] = enumValuesContainer; } class_desc->pop(); @@ -1922,7 +1922,7 @@ void FindBar::_update_results_count() { return; } - String full_text = rich_text_label->get_text(); + String full_text = rich_text_label->get_parsed_text(); int from_pos = 0; diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 4832cd6994..9f049a0e58 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -245,13 +245,15 @@ void EditorProperty::_notification(int p_what) { } Color color; - if (draw_red) { - color = get_theme_color(is_read_only() ? SNAME("readonly_error_color") : SNAME("error_color")); + if (draw_warning) { + color = get_theme_color(is_read_only() ? SNAME("readonly_warning_color") : SNAME("warning_color")); } else { color = get_theme_color(is_read_only() ? SNAME("readonly_color") : SNAME("property_color")); } if (label.find(".") != -1) { - color.a = 0.5; //this should be un-hacked honestly, as it's used for editor overrides + // FIXME: Move this to the project settings editor, as this is only used + // for project settings feature tag overrides. + color.a = 0.5; } int ofs = get_theme_constant(SNAME("font_offset")); @@ -625,8 +627,8 @@ bool EditorProperty::is_checked() const { return checked; } -void EditorProperty::set_draw_red(bool p_draw_red) { - draw_red = p_draw_red; +void EditorProperty::set_draw_warning(bool p_draw_warning) { + draw_warning = p_draw_warning; update(); } @@ -650,8 +652,8 @@ bool EditorProperty::is_keying() const { return keying; } -bool EditorProperty::is_draw_red() const { - return draw_red; +bool EditorProperty::is_draw_warning() const { + return draw_warning; } void EditorProperty::_focusable_focused(int p_index) { @@ -842,10 +844,10 @@ void EditorProperty::set_bottom_editor(Control *p_control) { bool EditorProperty::is_cache_valid() const { if (object) { - for (Map<StringName, Variant>::Element *E = cache.front(); E; E = E->next()) { + for (const KeyValue<StringName, Variant> &E : cache) { bool valid; - Variant value = object->get(E->key(), &valid); - if (!valid || value != E->get()) { + Variant value = object->get(E.key, &valid); + if (!valid || value != E.value) { return false; } } @@ -969,8 +971,8 @@ void EditorProperty::_bind_methods() { ClassDB::bind_method(D_METHOD("set_checked", "checked"), &EditorProperty::set_checked); ClassDB::bind_method(D_METHOD("is_checked"), &EditorProperty::is_checked); - ClassDB::bind_method(D_METHOD("set_draw_red", "draw_red"), &EditorProperty::set_draw_red); - ClassDB::bind_method(D_METHOD("is_draw_red"), &EditorProperty::is_draw_red); + ClassDB::bind_method(D_METHOD("set_draw_warning", "draw_warning"), &EditorProperty::set_draw_warning); + ClassDB::bind_method(D_METHOD("is_draw_warning"), &EditorProperty::is_draw_warning); ClassDB::bind_method(D_METHOD("set_keying", "keying"), &EditorProperty::set_keying); ClassDB::bind_method(D_METHOD("is_keying"), &EditorProperty::is_keying); @@ -993,7 +995,7 @@ void EditorProperty::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "read_only"), "set_read_only", "is_read_only"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "checkable"), "set_checkable", "is_checkable"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "checked"), "set_checked", "is_checked"); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "draw_red"), "set_draw_red", "is_draw_red"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "draw_warning"), "set_draw_warning", "is_draw_warning"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "keying"), "set_keying", "is_keying"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "deletable"), "set_deletable", "is_deletable"); ADD_SIGNAL(MethodInfo("property_changed", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT))); @@ -1018,7 +1020,7 @@ EditorProperty::EditorProperty() { read_only = false; checkable = false; checked = false; - draw_red = false; + draw_warning = false; keying = false; deletable = false; keying_hover = false; @@ -2393,14 +2395,15 @@ void EditorInspector::update_tree() { valid_plugins.push_back(inspector_plugins[i]); } - // Decide if properties should be drawn in red. - bool draw_red = false; + // Decide if properties should be drawn with the warning color (yellow). + bool draw_warning = false; if (is_inside_tree()) { Node *nod = Object::cast_to<Node>(object); Node *es = EditorNode::get_singleton()->get_edited_scene(); if (nod && es != nod && nod->get_owner() != es) { - // Draw in red edited nodes that are not in the currently edited scene. - draw_red = true; + // Draw in warning color edited nodes that are not in the currently edited scene, + // as changes may be lost in the future. + draw_warning = true; } } @@ -2855,7 +2858,7 @@ void EditorInspector::update_tree() { editor_property_map[prop].push_back(ep); } } - ep->set_draw_red(draw_red); + ep->set_draw_warning(draw_warning); ep->set_use_folding(use_folding); ep->set_checkable(checkable); ep->set_checked(checked); @@ -3029,8 +3032,8 @@ void EditorInspector::collapse_all_folding() { E->fold(); } - for (Map<StringName, List<EditorProperty *>>::Element *F = editor_property_map.front(); F; F = F->next()) { - for (EditorProperty *E : F->get()) { + for (const KeyValue<StringName, List<EditorProperty *>> &F : editor_property_map) { + for (EditorProperty *E : F.value) { E->collapse_all_folding(); } } @@ -3040,8 +3043,8 @@ void EditorInspector::expand_all_folding() { for (EditorInspectorSection *E : sections) { E->unfold(); } - for (Map<StringName, List<EditorProperty *>>::Element *F = editor_property_map.front(); F; F = F->next()) { - for (EditorProperty *E : F->get()) { + for (const KeyValue<StringName, List<EditorProperty *>> &F : editor_property_map) { + for (EditorProperty *E : F.value) { E->expand_all_folding(); } } @@ -3306,11 +3309,11 @@ void EditorInspector::_property_selected(const String &p_path, int p_focusable) property_selected = p_path; property_focusable = p_focusable; //deselect the others - for (Map<StringName, List<EditorProperty *>>::Element *F = editor_property_map.front(); F; F = F->next()) { - if (F->key() == property_selected) { + for (const KeyValue<StringName, List<EditorProperty *>> &F : editor_property_map) { + if (F.key == property_selected) { continue; } - for (EditorProperty *E : F->get()) { + for (EditorProperty *E : F.value) { if (E->is_selected()) { E->deselect(); } @@ -3368,8 +3371,8 @@ void EditorInspector::_notification(int p_what) { if (refresh_countdown > 0) { refresh_countdown -= get_process_delta_time(); if (refresh_countdown <= 0) { - for (Map<StringName, List<EditorProperty *>>::Element *F = editor_property_map.front(); F; F = F->next()) { - for (EditorProperty *E : F->get()) { + for (const KeyValue<StringName, List<EditorProperty *>> &F : editor_property_map) { + for (EditorProperty *E : F.value) { if (!E->is_cache_valid()) { E->update_property(); E->update_reload_status(); diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h index b71efe8f19..06af8566ff 100644 --- a/editor/editor_inspector.h +++ b/editor/editor_inspector.h @@ -74,7 +74,7 @@ private: bool read_only; bool checkable; bool checked; - bool draw_red; + bool draw_warning; bool keying; bool deletable; @@ -150,8 +150,8 @@ public: void set_checked(bool p_checked); bool is_checked() const; - void set_draw_red(bool p_draw_red); - bool is_draw_red() const; + void set_draw_warning(bool p_draw_warning); + bool is_draw_warning() const; void set_keying(bool p_keying); bool is_keying() const; diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp index f91cb7f607..251e1c2385 100644 --- a/editor/editor_log.cpp +++ b/editor/editor_log.cpp @@ -37,7 +37,7 @@ #include "scene/gui/center_container.h" #include "scene/resources/font.h" -void EditorLog::_error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, ErrorHandlerType p_type) { +void EditorLog::_error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, bool p_editor_notify, ErrorHandlerType p_type) { EditorLog *self = (EditorLog *)p_self; if (self->current != Thread::get_caller_id()) { return; @@ -50,6 +50,10 @@ void EditorLog::_error_handler(void *p_self, const char *p_func, const char *p_f err_str = String(p_file) + ":" + itos(p_line) + " - " + String(p_error); } + if (p_editor_notify) { + err_str += " (User)"; + } + if (p_type == ERR_HANDLER_WARNING) { self->add_message(err_str, MSG_TYPE_WARNING); } else { @@ -116,8 +120,8 @@ void EditorLog::_save_state() { config->load(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg")); const String section = "editor_log"; - for (Map<MessageType, LogFilter *>::Element *E = type_filter_map.front(); E; E = E->next()) { - config->set_value(section, "log_filter_" + itos(E->key()), E->get()->is_active()); + for (const KeyValue<MessageType, LogFilter *> &E : type_filter_map) { + config->set_value(section, "log_filter_" + itos(E.key), E.value->is_active()); } config->set_value(section, "collapse", collapse); @@ -135,8 +139,8 @@ void EditorLog::_load_state() { // Run the below code even if config->load returns an error, since we want the defaults to be set even if the file does not exist yet. const String section = "editor_log"; - for (Map<MessageType, LogFilter *>::Element *E = type_filter_map.front(); E; E = E->next()) { - E->get()->set_active(config->get_value(section, "log_filter_" + itos(E->key()), true)); + for (const KeyValue<MessageType, LogFilter *> &E : type_filter_map) { + E.value->set_active(config->get_value(section, "log_filter_" + itos(E.key), true)); } collapse = config->get_value(section, "collapse", false); @@ -306,8 +310,8 @@ void EditorLog::_search_changed(const String &p_text) { } void EditorLog::_reset_message_counts() { - for (Map<MessageType, LogFilter *>::Element *E = type_filter_map.front(); E; E = E->next()) { - E->value()->set_message_count(0); + for (const KeyValue<MessageType, LogFilter *> &E : type_filter_map) { + E.value->set_message_count(0); } } @@ -441,7 +445,7 @@ void EditorLog::deinit() { } EditorLog::~EditorLog() { - for (Map<MessageType, LogFilter *>::Element *E = type_filter_map.front(); E; E = E->next()) { - memdelete(E->get()); + for (const KeyValue<MessageType, LogFilter *> &E : type_filter_map) { + memdelete(E.value); } } diff --git a/editor/editor_log.h b/editor/editor_log.h index 6cbf4bedee..43cc5680bd 100644 --- a/editor/editor_log.h +++ b/editor/editor_log.h @@ -136,7 +136,7 @@ private: bool is_loading_state = false; // Used to disable saving requests while loading (some signals from buttons will try trigger a save, which happens during loading). Timer *save_state_timer; - static void _error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, ErrorHandlerType p_type); + static void _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); ErrorHandlerList eh; diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index e719797e03..891705da98 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -49,6 +49,7 @@ #include "core/version.h" #include "core/version_hash.gen.h" #include "main/main.h" +#include "scene/3d/importer_mesh_instance_3d.h" #include "scene/gui/center_container.h" #include "scene/gui/control.h" #include "scene/gui/dialogs.h" @@ -58,8 +59,8 @@ #include "scene/gui/panel.h" #include "scene/gui/panel_container.h" #include "scene/gui/split_container.h" +#include "scene/gui/tab_bar.h" #include "scene/gui/tab_container.h" -#include "scene/gui/tabs.h" #include "scene/gui/texture_progress_bar.h" #include "scene/main/window.h" #include "scene/resources/packed_scene.h" @@ -94,6 +95,7 @@ #include "editor/editor_settings.h" #include "editor/editor_spin_slider.h" #include "editor/editor_themes.h" +#include "editor/editor_toaster.h" #include "editor/editor_translation_parser.h" #include "editor/export_template_manager.h" #include "editor/filesystem_dock.h" @@ -113,7 +115,6 @@ #include "editor/import/resource_importer_texture_atlas.h" #include "editor/import/resource_importer_wav.h" #include "editor/import/scene_import_settings.h" -#include "editor/import/scene_importer_mesh_node_3d.h" #include "editor/import_dock.h" #include "editor/multi_node_edit.h" #include "editor/node_dock.h" @@ -394,7 +395,7 @@ void EditorNode::_version_control_menu_option(int p_idx) { void EditorNode::_update_title() { const String appname = ProjectSettings::get_singleton()->get("application/config/name"); String title = (appname.is_empty() ? "Unnamed Project" : appname) + String(" - ") + VERSION_NAME; - const String edited = editor_data.get_edited_scene_root() ? editor_data.get_edited_scene_root()->get_filename() : String(); + const String edited = editor_data.get_edited_scene_root() ? editor_data.get_edited_scene_root()->get_scene_file_path() : String(); if (!edited.is_empty()) { // Display the edited scene name before the program name so that it can be seen in the OS task bar. title = vformat("%s - %s", edited.get_file(), title); @@ -657,7 +658,7 @@ void EditorNode::_notification(int p_what) { } break; case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { - scene_tabs->set_tab_close_display_policy((bool(EDITOR_GET("interface/scene_tabs/always_show_close_button")) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY)); + scene_tabs->set_tab_close_display_policy((bool(EDITOR_GET("interface/scene_tabs/always_show_close_button")) ? TabBar::CLOSE_BUTTON_SHOW_ALWAYS : TabBar::CLOSE_BUTTON_SHOW_ACTIVE_ONLY)); theme = create_custom_theme(theme_base->get_theme()); theme_base->set_theme(theme); @@ -741,6 +742,21 @@ void EditorNode::_notification(int p_what) { main_editor_buttons.write[i]->add_theme_font_size_override("font_size", gui_base->get_theme_font_size(SNAME("main_button_font_size"), SNAME("EditorFonts"))); } + Set<String> updated_textfile_extensions; + bool extensions_match = true; + const Vector<String> textfile_ext = ((String)(EditorSettings::get_singleton()->get("docks/filesystem/textfile_extensions"))).split(",", false); + for (const String &E : textfile_ext) { + updated_textfile_extensions.insert(E); + if (extensions_match && !textfile_extensions.has(E)) { + extensions_match = false; + } + } + + if (!extensions_match || updated_textfile_extensions.size() < textfile_extensions.size()) { + textfile_extensions = updated_textfile_extensions; + EditorFileSystem::get_singleton()->scan(); + } + _update_update_spinner(); } break; @@ -822,7 +838,7 @@ void EditorNode::_resources_changed(const Vector<String> &p_resources) { } if (res->get_import_path() != String()) { - //this is an imported resource, will be reloaded if reimported via the _resources_reimported() callback + // this is an imported resource, will be reloaded if reimported via the _resources_reimported() callback continue; } @@ -926,21 +942,21 @@ void EditorNode::_fs_changed() { } void EditorNode::_resources_reimported(const Vector<String> &p_resources) { - List<String> scenes; //will load later + List<String> scenes; // will load later int current_tab = scene_tabs->get_current_tab(); for (int i = 0; i < p_resources.size(); i++) { String file_type = ResourceLoader::get_resource_type(p_resources[i]); if (file_type == "PackedScene") { scenes.push_back(p_resources[i]); - //reload later if needed, first go with normal resources + // reload later if needed, first go with normal resources continue; } if (!ResourceCache::has(p_resources[i])) { - continue; //not loaded, no need to reload + continue; // not loaded, no need to reload } - //reload normally + // reload normally Resource *resource = ResourceCache::get(p_resources[i]); if (resource) { resource->reload_from_file(); @@ -1114,11 +1130,17 @@ Error EditorNode::load_resource(const String &p_resource, bool p_ignore_broken_d dependency_errors.clear(); Error err; - RES res = ResourceLoader::load(p_resource, "", ResourceFormatLoader::CACHE_MODE_REUSE, &err); + + RES res; + if (ResourceLoader::exists(p_resource, "")) { + res = ResourceLoader::load(p_resource, "", ResourceFormatLoader::CACHE_MODE_REUSE, &err); + } else if (textfile_extensions.has(p_resource.get_extension())) { + res = ScriptEditor::get_singleton()->open_file(p_resource); + } ERR_FAIL_COND_V(!res.is_valid(), ERR_CANT_OPEN); if (!p_ignore_broken_deps && dependency_errors.has(p_resource)) { - //current_option = -1; + // current_option = -1; Vector<String> errors; for (Set<String>::Element *E = dependency_errors[p_resource].front(); E; E = E->next()) { errors.push_back(E->get()); @@ -1175,7 +1197,7 @@ void EditorNode::save_resource_as(const Ref<Resource> &p_resource, const String int srpos = path.find("::"); if (srpos != -1) { String base = path.substr(0, srpos); - if (!get_edited_scene() || get_edited_scene()->get_filename() != base) { + if (!get_edited_scene() || get_edited_scene()->get_scene_file_path() != base) { show_warning(TTR("This resource can't be saved because it does not belong to the edited scene. Make it unique first.")); return; } @@ -1194,7 +1216,7 @@ void EditorNode::save_resource_as(const Ref<Resource> &p_resource, const String List<String> preferred; for (const String &E : extensions) { if (p_resource->is_class("Script") && (E == "tres" || E == "res")) { - //this serves no purpose and confused people + // this serves no purpose and confused people continue; } file->add_filter("*." + E + " ; " + E.to_upper()); @@ -1303,7 +1325,7 @@ void EditorNode::_get_scene_metadata(const String &p_file) { Error err = cf->load(path); if (err != OK || !cf->has_section("editor_states")) { - return; //must not exist + return; // must not exist } List<String> esl; @@ -1327,7 +1349,7 @@ void EditorNode::_set_scene_metadata(const String &p_file, int p_idx) { return; } - scene->set_meta("__editor_run_settings__", Variant()); //clear it (no point in keeping it) + scene->set_meta("__editor_run_settings__", Variant()); // clear it (no point in keeping it) scene->set_meta("__editor_plugin_states__", Variant()); String path = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(p_file.get_file() + "-editstate-" + p_file.md5_text() + ".cfg"); @@ -1370,10 +1392,10 @@ bool EditorNode::_find_and_save_resource(RES p_res, Map<RES, bool> &processed, i if (p_res->get_path().is_resource_file()) { if (changed || subchanged) { - //save + // save ResourceSaver::save(p_res->get_path(), p_res, flags); } - processed[p_res] = false; //because it's a file + processed[p_res] = false; // because it's a file return false; } else { processed[p_res] = changed; @@ -1471,7 +1493,7 @@ void EditorNode::_save_scene_with_preview(String p_file, int p_idx) { _find_node_types(editor_data.get_edited_scene_root(), c2d, c3d); save.step(TTR("Creating Thumbnail"), 1); - //current view? + // current view? Ref<Image> img; // If neither 3D or 2D nodes are present, make a 1x1 black texture. @@ -1524,12 +1546,12 @@ void EditorNode::_save_scene_with_preview(String p_file, int p_idx) { } img->convert(Image::FORMAT_RGB8); - //save thumbnail directly, as thumbnailer may not update due to actual scene not changing md5 + // save thumbnail directly, as thumbnailer may not update due to actual scene not changing md5 String temp_path = EditorPaths::get_singleton()->get_cache_dir(); String cache_base = ProjectSettings::get_singleton()->globalize_path(p_file).md5_text(); cache_base = temp_path.plus_file("resthumb-" + cache_base); - //does not have it, try to load a cached thumbnail + // does not have it, try to load a cached thumbnail String file = cache_base + ".png"; @@ -1549,7 +1571,7 @@ void EditorNode::_save_scene_with_preview(String p_file, int p_idx) { bool EditorNode::_validate_scene_recursive(const String &p_filename, Node *p_node) { for (int i = 0; i < p_node->get_child_count(); i++) { Node *child = p_node->get_child(i); - if (child->get_filename() == p_filename) { + if (child->get_scene_file_path() == p_filename) { return true; } @@ -1577,7 +1599,7 @@ static bool _find_edited_resources(const Ref<Resource> &p_resource, Set<Ref<Reso if (res.is_null()) { continue; } - if (res->get_path().is_resource_file()) { //not a subresource, continue + if (res->get_path().is_resource_file()) { // not a subresource, continue continue; } if (_find_edited_resources(res, edited_resources)) { @@ -1590,7 +1612,7 @@ static bool _find_edited_resources(const Ref<Resource> &p_resource, Set<Ref<Reso } int EditorNode::_save_external_resources() { - //save external resources and its subresources if any was modified + // save external resources and its subresources if any was modified int flg = 0; if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) { @@ -1606,7 +1628,7 @@ int EditorNode::_save_external_resources() { if (!res->get_path().is_resource_file()) { continue; } - //not only check if this resource is edited, check contained subresources too + // not only check if this resource is edited, check contained subresources too if (_find_edited_resources(res, edited_subresources)) { ResourceSaver::save(res->get_path(), res, flg); saved++; @@ -1645,7 +1667,7 @@ void EditorNode::_save_scene(String p_file, int idx) { return; } - if (scene->get_filename() != String() && _validate_scene_recursive(scene->get_filename(), scene)) { + if (scene->get_scene_file_path() != String() && _validate_scene_recursive(scene->get_scene_file_path(), scene)) { show_accept(TTR("This scene can't be saved because there is a cyclic instancing inclusion.\nPlease resolve it and then attempt to save again."), TTR("OK")); return; } @@ -1699,7 +1721,7 @@ void EditorNode::_save_scene(String p_file, int idx) { } if (err == OK) { - scene->set_filename(ProjectSettings::get_singleton()->localize_path(p_file)); + scene->set_scene_file_path(ProjectSettings::get_singleton()->localize_path(p_file)); if (idx < 0 || idx == editor_data.get_edited_scene()) { set_current_version(editor_data.get_undo_redo().get_version()); } else { @@ -1727,8 +1749,8 @@ void EditorNode::save_scene_list(Vector<String> p_scene_filenames) { for (int i = 0; i < editor_data.get_edited_scene_count(); i++) { Node *scene = editor_data.get_edited_scene_root(i); - if (scene && (p_scene_filenames.find(scene->get_filename()) >= 0)) { - _save_scene(scene->get_filename(), i); + if (scene && (p_scene_filenames.find(scene->get_scene_file_path()) >= 0)) { + _save_scene(scene->get_scene_file_path(), i); } } } @@ -1738,7 +1760,7 @@ void EditorNode::restart_editor() { String to_reopen; if (get_tree()->get_edited_scene_root()) { - to_reopen = get_tree()->get_edited_scene_root()->get_filename(); + to_reopen = get_tree()->get_edited_scene_root()->get_scene_file_path(); } _exit_editor(); @@ -1755,17 +1777,25 @@ void EditorNode::restart_editor() { } void EditorNode::_save_all_scenes() { + bool all_saved = true; for (int i = 0; i < editor_data.get_edited_scene_count(); i++) { Node *scene = editor_data.get_edited_scene_root(i); - if (scene && scene->get_filename() != "") { - if (i != editor_data.get_edited_scene()) { - _save_scene(scene->get_filename(), i); + if (scene) { + if (scene->get_scene_file_path() != "" && DirAccess::exists(scene->get_scene_file_path().get_base_dir())) { + if (i != editor_data.get_edited_scene()) { + _save_scene(scene->get_scene_file_path(), i); + } else { + _save_scene_with_preview(scene->get_scene_file_path()); + } } else { - _save_scene_with_preview(scene->get_filename()); + all_saved = false; } - } // else: ignore new scenes + } } + if (!all_saved) { + show_warning(TTR("Could not save one or more scenes!"), TTR("Save All Scenes")); + } _save_default_environment(); } @@ -1776,7 +1806,7 @@ void EditorNode::_mark_unsaved_scenes() { continue; } - String path = node->get_filename(); + String path = node->get_scene_file_path(); if (!(path == String() || FileAccess::exists(path))) { if (i == editor_data.get_edited_scene()) { set_current_version(-1); @@ -1807,7 +1837,7 @@ void EditorNode::_dialog_action(String p_file) { case SETTINGS_PICK_MAIN_SCENE: { ProjectSettings::get_singleton()->set("application/run/main_scene", p_file); ProjectSettings::get_singleton()->save(); - //would be nice to show the project manager opened with the highlighted field.. + // would be nice to show the project manager opened with the highlighted field.. if (pick_main_scene->has_meta("from_native") && (bool)pick_main_scene->get_meta("from_native")) { run_native->resume_run_native(); @@ -1950,7 +1980,7 @@ void EditorNode::_dialog_action(String p_file) { } } break; - default: { //save scene? + default: { // save scene? if (file->get_file_mode() == EditorFileDialog::FILE_MODE_SAVE_FILE) { _save_scene_with_preview(p_file); @@ -2111,7 +2141,7 @@ void EditorNode::_edit_current() { bool is_resource = current_obj->is_class("Resource"); bool is_node = current_obj->is_class("Node"); - String editable_warning; //none by default + String editable_warning; // none by default if (is_resource) { Resource *current_res = Object::cast_to<Resource>(current_obj); @@ -2128,7 +2158,7 @@ void EditorNode::_edit_current() { if (FileAccess::exists(base_path + ".import")) { editable_warning = TTR("This resource belongs to a scene that was imported, so it's not editable.\nPlease read the documentation relevant to importing scenes to better understand this workflow."); } else { - if ((!get_edited_scene() || get_edited_scene()->get_filename() != base_path) && ResourceLoader::get_resource_type(base_path) == "PackedScene") { + if ((!get_edited_scene() || get_edited_scene()->get_scene_file_path() != base_path) && ResourceLoader::get_resource_type(base_path) == "PackedScene") { editable_warning = TTR("This resource belongs to a scene that was instantiated or inherited.\nChanges to it won't be kept when saving the current scene."); } } @@ -2152,8 +2182,8 @@ void EditorNode::_edit_current() { inspector_dock->update(nullptr); } - if (get_edited_scene() && get_edited_scene()->get_filename() != String()) { - String source_scene = get_edited_scene()->get_filename(); + if (get_edited_scene() && get_edited_scene()->get_scene_file_path() != String()) { + String source_scene = get_edited_scene()->get_scene_file_path(); if (FileAccess::exists(source_scene + ".import")) { editable_warning = TTR("This scene was imported, so changes to it won't be kept.\nInstancing it or inheriting will allow making changes to it.\nPlease read the documentation relevant to importing scenes to better understand this workflow."); } @@ -2213,7 +2243,7 @@ void EditorNode::_edit_current() { for (; plugin_index < editor_table.size(); plugin_index++) { if (editor_table[plugin_index] == main_plugin) { if (!main_editor_buttons[plugin_index]->is_visible()) { - main_plugin = nullptr; //if button is not visible, then no plugin active + main_plugin = nullptr; // if button is not visible, then no plugin active } break; @@ -2276,7 +2306,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) { String args; bool skip_breakpoints; - if (p_current || (editor_data.get_edited_scene_root() && p_custom != String() && p_custom == editor_data.get_edited_scene_root()->get_filename())) { + if (p_current || (editor_data.get_edited_scene_root() && p_custom != String() && p_custom == editor_data.get_edited_scene_root()->get_scene_file_path())) { Node *scene = editor_data.get_edited_scene_root(); if (!scene) { @@ -2284,7 +2314,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) { return; } - if (scene->get_filename() == "") { + if (scene->get_scene_file_path() == "") { current_option = -1; _menu_option(FILE_SAVE_AS_SCENE); // Set the option to save and run so when the dialog is accepted, the scene runs. @@ -2293,13 +2323,13 @@ void EditorNode::_run(bool p_current, const String &p_custom) { return; } - run_filename = scene->get_filename(); + run_filename = scene->get_scene_file_path(); } else if (p_custom != "") { run_filename = p_custom; } if (run_filename == "") { - //evidently, run the scene + // evidently, run the scene if (!ensure_main_scene(false)) { return; } @@ -2309,8 +2339,8 @@ void EditorNode::_run(bool p_current, const String &p_custom) { if (unsaved_cache) { Node *scene = editor_data.get_edited_scene_root(); - if (scene && scene->get_filename() != "") { // Only autosave if there is a scene and if it has a path. - _save_scene_with_preview(scene->get_filename()); + if (scene && scene->get_scene_file_path() != "") { // Only autosave if there is a scene and if it has a path. + _save_scene_with_preview(scene->get_scene_file_path()); } } _menu_option(FILE_SAVE_ALL_SCENES); @@ -2382,7 +2412,7 @@ void EditorNode::_android_build_source_selected(const String &p_file) { export_template_manager->install_android_template_from_file(p_file); } void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { - if (!p_confirmed) { //this may be a hack.. + if (!p_confirmed) { // this may be a hack.. current_option = (MenuOptions)p_option; } @@ -2403,7 +2433,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { Node *scene = editor_data.get_edited_scene_root(); if (scene) { - file->set_current_path(scene->get_filename()); + file->set_current_path(scene->get_scene_file_path()); }; file->set_title(p_option == FILE_OPEN_SCENE ? TTR("Open Scene") : TTR("Open Base Scene")); file->popup_file_dialog(); @@ -2465,7 +2495,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { if (unsaved_cache || p_option == FILE_CLOSE_ALL_AND_QUIT || p_option == FILE_CLOSE_ALL_AND_RUN_PROJECT_MANAGER) { Node *scene_root = editor_data.get_edited_scene_root(tab_closing); if (scene_root) { - String scene_filename = scene_root->get_filename(); + String scene_filename = scene_root->get_scene_file_path(); save_confirmation->get_ok_button()->set_text(TTR("Save & Close")); save_confirmation->set_text(vformat(TTR("Save changes to '%s' before closing?"), scene_filename != "" ? scene_filename : "unsaved scene")); save_confirmation->popup_centered(); @@ -2484,20 +2514,22 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { case SCENE_TAB_CLOSE: case FILE_SAVE_SCENE: { int scene_idx = (p_option == FILE_SAVE_SCENE) ? -1 : tab_closing; - Node *scene = editor_data.get_edited_scene_root(scene_idx); - if (scene && scene->get_filename() != "") { - if (scene_idx != editor_data.get_edited_scene()) { - _save_scene_with_preview(scene->get_filename(), scene_idx); - } else { - _save_scene_with_preview(scene->get_filename()); - } + if (scene && scene->get_scene_file_path() != "") { + if (DirAccess::exists(scene->get_scene_file_path().get_base_dir())) { + if (scene_idx != editor_data.get_edited_scene()) { + _save_scene_with_preview(scene->get_scene_file_path(), scene_idx); + } else { + _save_scene_with_preview(scene->get_scene_file_path()); + } - if (scene_idx != -1) { - _discard_changes(); + if (scene_idx != -1) { + _discard_changes(); + } + save_layout(); + } else { + show_save_accept(vformat(TTR("%s no longer exists! Please specify a new save location."), scene->get_scene_file_path().get_base_dir()), TTR("OK")); } - save_layout(); - break; } [[fallthrough]]; @@ -2539,8 +2571,8 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { file->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper()); } - if (scene->get_filename() != "") { - String path = scene->get_filename(); + if (scene->get_scene_file_path() != "") { + String path = scene->get_scene_file_path(); file->set_current_path(path); if (extensions.size()) { String ext = path.get_extension().to_lower(); @@ -2638,7 +2670,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { break; } - String filename = scene->get_filename(); + String filename = scene->get_scene_file_path(); if (filename == String()) { show_warning(TTR("Can't reload a scene that was never saved.")); @@ -2760,7 +2792,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { String unsaved_scenes; int i = _next_unsaved_scene(true, 0); while (i != -1) { - unsaved_scenes += "\n " + editor_data.get_edited_scene_root(i)->get_filename(); + unsaved_scenes += "\n " + editor_data.get_edited_scene_root(i)->get_scene_file_path(); i = _next_unsaved_scene(true, ++i); } @@ -2835,7 +2867,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { Node *scene = editor_data.get_edited_scene_root(); if (scene) { - file->set_current_path(scene->get_filename()); + file->set_current_path(scene->get_scene_file_path()); }; file->set_title(TTR("Pick a Main Scene")); file->popup_file_dialog(); @@ -2937,7 +2969,7 @@ int EditorNode::_next_unsaved_scene(bool p_valid_filename, int p_start) { int current = editor_data.get_edited_scene(); bool unsaved = (i == current) ? saved_version != editor_data.get_undo_redo().get_version() : editor_data.get_scene_version(i) != 0; if (unsaved) { - String scene_filename = editor_data.get_edited_scene_root(i)->get_filename(); + String scene_filename = editor_data.get_edited_scene_root(i)->get_scene_file_path(); if (p_valid_filename && scene_filename.length() == 0) { continue; } @@ -2949,7 +2981,7 @@ int EditorNode::_next_unsaved_scene(bool p_valid_filename, int p_start) { void EditorNode::_exit_editor() { exiting = true; - resource_preview->stop(); //stop early to avoid crashes + resource_preview->stop(); // stop early to avoid crashes _save_docks(); // Dim the editor window while it's quitting to make it clearer that it's busy @@ -2969,7 +3001,7 @@ void EditorNode::_discard_changes(const String &p_str) { case SCENE_TAB_CLOSE: { Node *scene = editor_data.get_edited_scene_root(tab_closing); if (scene != nullptr) { - String scene_filename = scene->get_filename(); + String scene_filename = scene->get_scene_file_path(); if (scene_filename != "") { previous_scenes.push_back(scene_filename); } @@ -3055,7 +3087,7 @@ void EditorNode::_editor_select(int p_which) { ERR_FAIL_INDEX(p_which, editor_table.size()); - if (!main_editor_buttons[p_which]->is_visible()) { //button hidden, no editor + if (!main_editor_buttons[p_which]->is_visible()) { // button hidden, no editor return; } @@ -3177,8 +3209,8 @@ void EditorNode::_update_addon_config() { Vector<String> enabled_addons; - for (Map<String, EditorPlugin *>::Element *E = plugin_addons.front(); E; E = E->next()) { - enabled_addons.push_back(E->key()); + for (const KeyValue<String, EditorPlugin *> &E : plugin_addons) { + enabled_addons.push_back(E.key); } if (enabled_addons.size() == 0) { @@ -3197,7 +3229,7 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled, if (!p_enabled) { EditorPlugin *addon = plugin_addons[p_addon]; remove_editor_plugin(addon, p_config_changed); - memdelete(addon); //bye + memdelete(addon); // bye plugin_addons.erase(p_addon); _update_addon_config(); return; @@ -3289,10 +3321,10 @@ void EditorNode::_remove_edited_scene(bool p_change_tab) { void EditorNode::_remove_scene(int index, bool p_change_tab) { if (editor_data.get_edited_scene() == index) { - //Scene to remove is current scene + // Scene to remove is current scene _remove_edited_scene(p_change_tab); } else { - //Scene to remove is not active scene + // Scene to remove is not active scene editor_data.remove_scene(index); } } @@ -3306,7 +3338,7 @@ void EditorNode::set_edited_scene(Node *p_scene) { get_editor_data().set_edited_scene_root(p_scene); if (Object::cast_to<Popup>(p_scene)) { - Object::cast_to<Popup>(p_scene)->show(); //show popups + Object::cast_to<Popup>(p_scene)->show(); // show popups } scene_tree_dock->set_edited_scene(p_scene); if (get_tree()) { @@ -3342,7 +3374,7 @@ Dictionary EditorNode::_get_main_scene_state() { void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) { if (get_edited_scene() != p_for_scene && p_for_scene != nullptr) { - return; //not for this scene + return; // not for this scene } changing_scene = false; @@ -3357,7 +3389,7 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) { if (p_state.has("editor_index")) { int index = p_state["editor_index"]; - if (current < 2) { //if currently in spatial/2d, only switch to spatial/2d. if currently in script, stay there + if (current < 2) { // if currently in spatial/2d, only switch to spatial/2d. if currently in script, stay there if (index < 2 || !get_edited_scene()) { _editor_select(index); } @@ -3366,7 +3398,7 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) { if (get_edited_scene()) { if (current < 2) { - //use heuristic instead + // use heuristic instead int n2d = 0, n3d = 0; _find_node_types(get_edited_scene(), n2d, n3d); if (n2d > n3d) { @@ -3388,7 +3420,7 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) { scene_tree_dock->set_filter(p_state["node_filter"]); } - //this should only happen at the very end + // this should only happen at the very end EditorDebuggerNode::get_singleton()->update_live_edit_root(); ScriptEditor::get_singleton()->set_scene_root_script(editor_data.get_scene_root_script(editor_data.get_edited_scene())); @@ -3409,7 +3441,7 @@ void EditorNode::_clear_undo_history() { } void EditorNode::set_current_scene(int p_idx) { - //Save the folding in case the scene gets reloaded. + // Save the folding in case the scene gets reloaded. if (editor_data.get_scene_path(p_idx) != "" && editor_data.get_edited_scene_root(p_idx)) { editor_folding.save_scene_folding(editor_data.get_edited_scene_root(p_idx), editor_data.get_scene_path(p_idx)); } @@ -3437,7 +3469,7 @@ void EditorNode::set_current_scene(int p_idx) { Node *new_scene = editor_data.get_edited_scene_root(); if (Object::cast_to<Popup>(new_scene)) { - Object::cast_to<Popup>(new_scene)->show(); //show popups + Object::cast_to<Popup>(new_scene)->show(); // show popups } scene_tree_dock->set_edited_scene(new_scene); @@ -3456,7 +3488,7 @@ void EditorNode::set_current_scene(int p_idx) { _update_title(); - call_deferred(SNAME("_set_main_scene_state"), state, get_edited_scene()); //do after everything else is done setting up + call_deferred(SNAME("_set_main_scene_state"), state, get_edited_scene()); // do after everything else is done setting up } bool EditorNode::is_scene_open(const String &p_path) { @@ -3558,18 +3590,18 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b return ERR_FILE_MISSING_DEPENDENCIES; } - dependency_errors.erase(lpath); //at least not self path + dependency_errors.erase(lpath); // at least not self path - for (Map<String, Set<String>>::Element *E = dependency_errors.front(); E; E = E->next()) { - String txt = vformat(TTR("Scene '%s' has broken dependencies:"), E->key()) + "\n"; - for (Set<String>::Element *F = E->get().front(); F; F = F->next()) { + for (KeyValue<String, Set<String>> &E : dependency_errors) { + String txt = vformat(TTR("Scene '%s' has broken dependencies:"), E.key) + "\n"; + for (Set<String>::Element *F = E.value.front(); F; F = F->next()) { txt += "\t" + F->get() + "\n"; } add_io_error(txt); } if (ResourceCache::has(lpath)) { - //used from somewhere else? no problem! update state and replace sdata + // used from somewhere else? no problem! update state and replace sdata Ref<PackedScene> ps = Ref<PackedScene>(Object::cast_to<PackedScene>(ResourceCache::get(lpath))); if (ps.is_valid()) { ps->replace_state(sdata->get_state()); @@ -3578,7 +3610,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b } } else { - sdata->set_path(lpath, true); //take over path + sdata->set_path(lpath, true); // take over path } Node *new_scene = sdata->instantiate(PackedScene::GEN_EDIT_STATE_MAIN); @@ -3598,7 +3630,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b Ref<SceneState> state = sdata->get_state(); state->set_path(lpath); new_scene->set_scene_inherited_state(state); - new_scene->set_filename(String()); + new_scene->set_scene_file_path(String()); } new_scene->set_scene_instance_state(Ref<SceneState>()); @@ -3771,7 +3803,7 @@ void EditorNode::_load_error_notify(void *p_ud, const String &p_text) { } bool EditorNode::_find_scene_in_use(Node *p_node, const String &p_path) const { - if (p_node->get_filename() == p_path) { + if (p_node->get_scene_file_path() == p_path) { return true; } @@ -3817,7 +3849,8 @@ void EditorNode::register_editor_types() { GDREGISTER_VIRTUAL_CLASS(EditorInterface); GDREGISTER_CLASS(EditorExportPlugin); GDREGISTER_CLASS(EditorResourceConversionPlugin); - GDREGISTER_CLASS(EditorSceneImporter); + GDREGISTER_CLASS(EditorSceneFormatImporter); + GDREGISTER_CLASS(EditorScenePostImportPlugin); GDREGISTER_CLASS(EditorInspector); GDREGISTER_CLASS(EditorInspectorPlugin); GDREGISTER_CLASS(EditorProperty); @@ -3827,8 +3860,6 @@ void EditorNode::register_editor_types() { GDREGISTER_CLASS(EditorSpinSlider); GDREGISTER_CLASS(EditorResourcePicker); GDREGISTER_CLASS(EditorScriptPicker); - GDREGISTER_CLASS(EditorSceneImporterMesh); - GDREGISTER_CLASS(EditorSceneImporterMeshNode3D); GDREGISTER_VIRTUAL_CLASS(FileSystemDock); @@ -3949,7 +3980,7 @@ void EditorNode::_pick_main_scene_custom_action(const String &p_custom_action_na pick_main_scene->hide(); current_option = SETTINGS_PICK_MAIN_SCENE; - _dialog_action(scene->get_filename()); + _dialog_action(scene->get_scene_file_path()); } } @@ -4025,8 +4056,8 @@ Ref<Texture2D> EditorNode::get_class_icon(const String &p_class, const String &p } const Map<String, Vector<EditorData::CustomType>> &p_map = EditorNode::get_editor_data().get_custom_types(); - for (const Map<String, Vector<EditorData::CustomType>>::Element *E = p_map.front(); E; E = E->next()) { - const Vector<EditorData::CustomType> &ct = E->value(); + for (const KeyValue<String, Vector<EditorData::CustomType>> &E : p_map) { + const Vector<EditorData::CustomType> &ct = E.value; for (int i = 0; i < ct.size(); ++i) { if (ct[i].name == p_class) { if (ct[i].icon.is_valid()) { @@ -4150,6 +4181,13 @@ void EditorNode::show_accept(const String &p_text, const String &p_title) { accept->popup_centered(); } +void EditorNode::show_save_accept(const String &p_text, const String &p_title) { + current_option = -1; + save_accept->get_ok_button()->set_text(p_title); + save_accept->set_text(p_text); + save_accept->popup_centered(); +} + void EditorNode::show_warning(const String &p_text, const String &p_title) { if (warning->is_inside_tree()) { warning->set_text(p_text); @@ -4186,7 +4224,7 @@ void EditorNode::_dock_make_float() { ERR_FAIL_COND(!dock); const Size2i borders = Size2i(4, 4) * EDSCALE; - Size2 dock_size = dock->get_size() + borders * 2; //remember size + Size2 dock_size = dock->get_size() + borders * 2; // remember size Point2 dock_screen_pos = dock->get_global_position() + get_tree()->get_root()->get_position() - borders; print_line("dock pos: " + dock->get_global_position() + " window pos: " + get_tree()->get_root()->get_position()); @@ -4426,7 +4464,7 @@ void EditorNode::_dock_select_draw() { void EditorNode::_save_docks() { if (waiting_for_first_scan) { - return; //scanning, do not touch docks + return; // scanning, do not touch docks } Ref<ConfigFile> config; config.instantiate(); @@ -4497,7 +4535,7 @@ void EditorNode::_load_docks() { config.instantiate(); Error err = config->load(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg")); if (err != OK) { - //no config + // no config if (overridden_default_layout >= 0) { _layout_menu_option(overridden_default_layout); } @@ -4610,7 +4648,7 @@ void EditorNode::_load_docks_from_config(Ref<ConfigFile> p_layout, const String for (int j = 0; j < names.size(); j++) { String name = names[j]; - //find it, in a horribly inefficient way + // find it, in a horribly inefficient way int atidx = -1; Control *node = nullptr; for (int k = 0; k < DOCK_SLOT_MAX; k++) { @@ -4624,7 +4662,7 @@ void EditorNode::_load_docks_from_config(Ref<ConfigFile> p_layout, const String atidx = k; break; } - if (atidx == -1) { //well, it's not anywhere + if (atidx == -1) { // well, it's not anywhere continue; } @@ -4740,7 +4778,7 @@ bool EditorNode::has_scenes_in_session() { } bool EditorNode::ensure_main_scene(bool p_from_native) { - pick_main_scene->set_meta("from_native", p_from_native); //whether from play button or native run + pick_main_scene->set_meta("from_native", p_from_native); // whether from play button or native run String main_scene = GLOBAL_DEF("application/run/main_scene", ""); if (main_scene == "") { @@ -4861,7 +4899,7 @@ void EditorNode::_update_layouts_menu() { config.instantiate(); Error err = config->load(EditorSettings::get_singleton()->get_editor_layouts_config()); if (err != OK) { - return; //no config + return; // no config } List<String> layouts; @@ -4902,7 +4940,7 @@ void EditorNode::_layout_menu_option(int p_id) { config.instantiate(); Error err = config->load(EditorSettings::get_singleton()->get_editor_layouts_config()); if (err != OK) { - return; //no config + return; // no config } _load_docks_from_config(config, editor_layouts->get_item_text(p_id)); @@ -4932,7 +4970,7 @@ void EditorNode::_scene_tab_closed(int p_tab, int option) { editor_data.get_scene_version(p_tab) != 0; if (unsaved) { save_confirmation->get_ok_button()->set_text(TTR("Save & Close")); - save_confirmation->set_text(vformat(TTR("Save changes to '%s' before closing?"), scene->get_filename() != "" ? scene->get_filename() : "unsaved scene")); + save_confirmation->set_text(vformat(TTR("Save changes to '%s' before closing?"), scene->get_scene_file_path() != "" ? scene->get_scene_file_path() : "unsaved scene")); save_confirmation->popup_centered(); } else { _discard_changes(); @@ -5043,7 +5081,7 @@ void EditorNode::_scene_tab_changed(int p_tab) { bool unsaved = (saved_version != editor_data.get_undo_redo().get_version()); if (p_tab == editor_data.get_edited_scene()) { - return; //pointless + return; // pointless } uint64_t next_scene_version = editor_data.get_scene_version(p_tab); @@ -5246,11 +5284,11 @@ Variant EditorNode::drag_resource(const Ref<Resource> &p_res, Control *p_from) { Ref<Texture2D> preview; { - //todo make proper previews + // todo make proper previews Ref<ImageTexture> texture = gui_base->get_theme_icon(SNAME("FileBigThumb"), SNAME("EditorIcons")); Ref<Image> img = texture->get_image(); img = img->duplicate(); - img->resize(48, 48); //meh + img->resize(48, 48); // meh Ref<ImageTexture> resized_pic = Ref<ImageTexture>(memnew(ImageTexture)); resized_pic->create_from_image(img); preview = resized_pic; @@ -5268,7 +5306,7 @@ Variant EditorNode::drag_resource(const Ref<Resource> &p_res, Control *p_from) { drag_control->add_child(label); - p_from->set_drag_preview(drag_control); //wait until it enters scene + p_from->set_drag_preview(drag_control); // wait until it enters scene label->set_position(Point2((preview->get_width() - label->get_minimum_size().width) / 2, preview->get_height())); @@ -5322,7 +5360,7 @@ Variant EditorNode::drag_files_and_dirs(const Vector<String> &p_paths, Control * } vbox->add_child(label); } - p_from->set_drag_preview(vbox); //wait until it enters scene + p_from->set_drag_preview(vbox); // wait until it enters scene Dictionary drag_data; drag_data["type"] = has_folder ? "files_and_dirs" : "files"; @@ -5439,7 +5477,7 @@ void EditorNode::reload_scene(const String &p_path) { if (scene_idx == -1) { if (get_edited_scene()) { - //scene is not open, so at it might be instantiated. We'll refresh the whole scene later. + // scene is not open, so at it might be instantiated. We'll refresh the whole scene later. editor_data.get_undo_redo().clear_history(); } return; @@ -5450,17 +5488,17 @@ void EditorNode::reload_scene(const String &p_path) { _set_scene_metadata(p_path); } - //remove scene + // remove scene _remove_scene(scene_idx, false); - //reload scene + // reload scene load_scene(p_path, true, false, true, true); - //adjust index so tab is back a the previous position + // adjust index so tab is back a the previous position editor_data.move_edited_scene_to_index(scene_idx); get_undo_redo()->clear_history(); - //recover the tab + // recover the tab scene_tabs->set_current_tab(current_tab); } @@ -5560,7 +5598,7 @@ void EditorNode::_update_video_driver_color() { void EditorNode::_video_driver_selected(int p_which) { String driver = video_driver->get_item_metadata(p_which); - String current = ""; //OS::get_singleton()->get_video_driver_name(OS::get_singleton()->get_current_video_driver()); + String current = ""; // OS::get_singleton()->get_video_driver_name(OS::get_singleton()->get_current_video_driver()); if (driver == current) { return; @@ -5749,9 +5787,9 @@ EditorNode::EditorNode() { PhysicsServer2D::get_singleton()->set_active(false); // no physics by default if editor ScriptServer::set_scripting_enabled(false); // no scripting by default if editor - EditorHelp::generate_doc(); //before any editor classes are created + EditorHelp::generate_doc(); // before any editor classes are created SceneState::set_disable_placeholders(true); - ResourceLoader::clear_translation_remaps(); //no remaps using during editor + ResourceLoader::clear_translation_remaps(); // no remaps using during editor ResourceLoader::clear_path_remaps(); Input *id = Input::get_singleton(); @@ -5765,8 +5803,8 @@ EditorNode::EditorNode() { } if (!found_touchscreen && Input::get_singleton()) { - //only if no touchscreen ui hint, set emulation - id->set_emulate_touch_from_mouse(false); //just disable just in case + // only if no touchscreen ui hint, set emulation + id->set_emulate_touch_from_mouse(false); // just disable just in case } DisplayServer::get_singleton()->cursor_set_custom_image(RES()); } @@ -5833,7 +5871,7 @@ EditorNode::EditorNode() { ResourceLoader::set_error_notify_func(this, _load_error_notify); ResourceLoader::set_dependency_error_notify_func(this, _dependency_error_report); - { //register importers at the beginning, so dialogs are created with the right extensions + { // register importers at the beginning, so dialogs are created with the right extensions Ref<ResourceImporterTexture> import_texture; import_texture.instantiate(); ResourceFormatImporter::get_singleton()->add_importer(import_texture); @@ -5899,7 +5937,7 @@ EditorNode::EditorNode() { ResourceFormatImporter::get_singleton()->add_importer(import_scene); { - Ref<EditorSceneImporterCollada> import_collada; + Ref<EditorSceneFormatImporterCollada> import_collada; import_collada.instantiate(); import_scene->add_importer(import_collada); @@ -5907,7 +5945,7 @@ EditorNode::EditorNode() { import_obj2.instantiate(); import_scene->add_importer(import_obj2); - Ref<EditorSceneImporterESCN> import_escn; + Ref<EditorSceneFormatImporterESCN> import_escn; import_escn.instantiate(); import_scene->add_importer(import_escn); } @@ -5936,7 +5974,7 @@ EditorNode::EditorNode() { EditorFileSystem *efs = memnew(EditorFileSystem); add_child(efs); - //used for previews + // used for previews FileDialog::get_icon_func = _file_dialog_get_icon; FileDialog::register_func = _file_dialog_register; FileDialog::unregister_func = _file_dialog_unregister; @@ -5955,7 +5993,7 @@ EditorNode::EditorNode() { ClassDB::set_class_enabled("RootMotionView", true); - //defs here, use EDITOR_GET in logic + // defs here, use EDITOR_GET in logic EDITOR_DEF_RST("interface/scene_tabs/always_show_close_button", false); EDITOR_DEF_RST("interface/scene_tabs/resize_if_many_tabs", true); EDITOR_DEF_RST("interface/scene_tabs/minimum_width", 50); @@ -5984,6 +6022,11 @@ EditorNode::EditorNode() { EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "interface/inspector/default_color_picker_shape", PROPERTY_HINT_ENUM, "HSV Rectangle,HSV Rectangle Wheel,VHS Circle", PROPERTY_USAGE_DEFAULT)); EDITOR_DEF("run/auto_save/save_before_running", true); + const Vector<String> textfile_ext = ((String)(EditorSettings::get_singleton()->get("docks/filesystem/textfile_extensions"))).split(",", false); + for (const String &E : textfile_ext) { + textfile_extensions.insert(E); + } + theme_base = memnew(Control); add_child(theme_base); theme_base->set_anchors_and_offsets_preset(Control::PRESET_WIDE); @@ -6174,22 +6217,22 @@ EditorNode::EditorNode() { tab_preview->set_position(Point2(2, 2) * EDSCALE); tab_preview_panel->add_child(tab_preview); - scene_tabs = memnew(Tabs); + scene_tabs = memnew(TabBar); scene_tabs->add_theme_style_override("tab_selected", gui_base->get_theme_stylebox(SNAME("SceneTabFG"), SNAME("EditorStyles"))); scene_tabs->add_theme_style_override("tab_unselected", gui_base->get_theme_stylebox(SNAME("SceneTabBG"), SNAME("EditorStyles"))); scene_tabs->set_select_with_rmb(true); scene_tabs->add_tab("unsaved"); - scene_tabs->set_tab_align(Tabs::ALIGN_LEFT); - scene_tabs->set_tab_close_display_policy((bool(EDITOR_DEF("interface/scene_tabs/always_show_close_button", false)) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY)); + scene_tabs->set_tab_align(TabBar::ALIGN_LEFT); + scene_tabs->set_tab_close_display_policy((bool(EDITOR_DEF("interface/scene_tabs/always_show_close_button", false)) ? TabBar::CLOSE_BUTTON_SHOW_ALWAYS : TabBar::CLOSE_BUTTON_SHOW_ACTIVE_ONLY)); scene_tabs->set_min_width(int(EDITOR_DEF("interface/scene_tabs/minimum_width", 50)) * EDSCALE); scene_tabs->set_drag_to_rearrange_enabled(true); scene_tabs->connect("tab_changed", callable_mp(this, &EditorNode::_scene_tab_changed)); - scene_tabs->connect("right_button_pressed", callable_mp(this, &EditorNode::_scene_tab_script_edited)); + 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_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)); - scene_tabs->connect("reposition_active_tab_request", callable_mp(this, &EditorNode::_reposition_active_tab)); + scene_tabs->connect("active_tab_rearranged", callable_mp(this, &EditorNode::_reposition_active_tab)); scene_tabs->connect("resized", callable_mp(this, &EditorNode::_update_scene_tabs)); tabbar_container = memnew(HBoxContainer); @@ -6263,6 +6306,10 @@ EditorNode::EditorNode() { gui_base->add_child(accept); accept->connect("confirmed", callable_mp(this, &EditorNode::_menu_confirm_current)); + save_accept = memnew(AcceptDialog); + gui_base->add_child(save_accept); + save_accept->connect("confirmed", callable_mp(this, &EditorNode::_menu_option), make_binds((int)MenuOptions::FILE_SAVE_AS_SCENE)); + project_export = memnew(ProjectExportDialog); gui_base->add_child(project_export); @@ -6702,6 +6749,9 @@ EditorNode::EditorNode() { bottom_panel_hb_editors->set_h_size_flags(Control::SIZE_EXPAND_FILL); bottom_panel_hb->add_child(bottom_panel_hb_editors); + editor_toaster = memnew(EditorToaster); + bottom_panel_hb->add_child(editor_toaster); + VBoxContainer *version_info_vbc = memnew(VBoxContainer); bottom_panel_hb->add_child(version_info_vbc); @@ -6874,7 +6924,7 @@ EditorNode::EditorNode() { EditorAudioBuses *audio_bus_editor = EditorAudioBuses::register_editor(); - ScriptTextEditor::register_editor(); //register one for text scripts + ScriptTextEditor::register_editor(); // register one for text scripts TextEditor::register_editor(); if (StreamPeerSSL::is_available()) { @@ -6883,13 +6933,13 @@ EditorNode::EditorNode() { WARN_PRINT("Asset Library not available, as it requires SSL to work."); } - //add interface before adding plugins + // add interface before adding plugins editor_interface = memnew(EditorInterface); add_child(editor_interface); - //more visually meaningful to have this later - raise_bottom_panel_item(AnimationPlayerEditor::singleton); + // more visually meaningful to have this later + raise_bottom_panel_item(AnimationPlayerEditor::get_singleton()); add_editor_plugin(VersionControlEditorPlugin::get_singleton()); add_editor_plugin(memnew(ShaderEditorPlugin(this))); @@ -7163,20 +7213,24 @@ bool EditorPluginList::forward_gui_input(const Ref<InputEvent> &p_event) { return discard; } -bool EditorPluginList::forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event, bool serve_when_force_input_enabled) { - bool discard = false; +EditorPlugin::AfterGUIInput EditorPluginList::forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event, bool serve_when_force_input_enabled) { + EditorPlugin::AfterGUIInput after = EditorPlugin::AFTER_GUI_INPUT_PASS; for (int i = 0; i < plugins_list.size(); i++) { if ((!serve_when_force_input_enabled) && plugins_list[i]->is_input_event_forwarding_always_enabled()) { continue; } - if (plugins_list[i]->forward_spatial_gui_input(p_camera, p_event)) { - discard = true; + EditorPlugin::AfterGUIInput current_after = plugins_list[i]->forward_spatial_gui_input(p_camera, p_event); + if (current_after == EditorPlugin::AFTER_GUI_INPUT_STOP) { + after = EditorPlugin::AFTER_GUI_INPUT_STOP; + } + if (after != EditorPlugin::AFTER_GUI_INPUT_STOP && current_after == EditorPlugin::AFTER_GUI_INPUT_DESELECT) { + after = EditorPlugin::AFTER_GUI_INPUT_DESELECT; } } - return discard; + return after; } void EditorPluginList::forward_canvas_draw_over_viewport(Control *p_overlay) { diff --git a/editor/editor_node.h b/editor/editor_node.h index 2e8b850c7b..348db1cb7d 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -37,6 +37,7 @@ #include "editor/editor_folding.h" #include "editor/editor_native_shader_source_visualizer.h" #include "editor/editor_run.h" +#include "editor/editor_toaster.h" #include "editor/inspector_dock.h" #include "editor/property_editor.h" #include "editor/scene_tree_dock.h" @@ -84,7 +85,7 @@ class ProjectSettingsEditor; class RunSettingsDialog; class ScriptCreateDialog; class TabContainer; -class Tabs; +class TabBar; class TextureProgressBar; class Button; class VSplitContainer; @@ -215,7 +216,7 @@ private: TOOL_MENU_BASE = 1000 }; - SubViewport *scene_root; //root of the scene being edited + SubViewport *scene_root; // root of the scene being edited PanelContainer *scene_root_parent; Control *theme_base; @@ -249,7 +250,7 @@ private: // Main tabs - Tabs *scene_tabs; + TabBar *scene_tabs; PopupMenu *scene_tabs_context_menu; Panel *tab_preview_panel; TextureRect *tab_preview; @@ -308,6 +309,7 @@ private: ConfirmationDialog *pick_main_scene; Button *select_current_scene_button; AcceptDialog *accept; + AcceptDialog *save_accept; EditorAbout *about; AcceptDialog *warning; @@ -322,7 +324,7 @@ private: EditorSettingsDialog *settings_config_dialog; ProjectSettingsEditor *project_settings; - bool settings_changed = true; //make it update settings on first frame + bool settings_changed = true; // make it update settings on first frame void _update_from_settings(); PopupMenu *vcs_actions_menu; @@ -437,6 +439,7 @@ private: HBoxContainer *bottom_panel_hb; HBoxContainer *bottom_panel_hb_editors; VBoxContainer *bottom_panel_vb; + EditorToaster *editor_toaster; LinkButton *version_btn; Button *bottom_panel_raise; @@ -541,6 +544,7 @@ private: String import_reload_fn; + Set<String> textfile_extensions; Set<FileDialog *> file_dialogs; Set<EditorFileDialog *> editor_file_dialogs; @@ -771,7 +775,7 @@ public: Node *get_edited_scene() { return editor_data.get_edited_scene_root(); } - SubViewport *get_scene_root() { return scene_root; } //root of the scene being edited + SubViewport *get_scene_root() { return scene_root; } // root of the scene being edited void fix_dependencies(const String &p_for_file); void clear_scene() { _cleanup_scene(); } @@ -814,6 +818,7 @@ public: Ref<Texture2D> get_class_icon(const String &p_class, const String &p_fallback = "Object") const; void show_accept(const String &p_text, const String &p_title); + void show_save_accept(const String &p_text, const String &p_title); void show_warning(const String &p_text, const String &p_title = TTR("Warning!")); void _copy_warning(const String &p_str); @@ -939,7 +944,7 @@ public: bool forward_gui_input(const Ref<InputEvent> &p_event); void forward_canvas_draw_over_viewport(Control *p_overlay); void forward_canvas_force_draw_over_viewport(Control *p_overlay); - bool forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event, bool serve_when_force_input_enabled); + EditorPlugin::AfterGUIInput forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event, bool serve_when_force_input_enabled); void forward_spatial_draw_over_viewport(Control *p_overlay); void forward_spatial_force_draw_over_viewport(Control *p_overlay); void add_plugin(EditorPlugin *p_plugin); diff --git a/editor/editor_paths.cpp b/editor/editor_paths.cpp index c9817190dd..5b48cc2638 100644 --- a/editor/editor_paths.cpp +++ b/editor/editor_paths.cpp @@ -87,6 +87,8 @@ void EditorPaths::_bind_methods() { EditorPaths::EditorPaths() { singleton = this; + project_data_dir = ProjectSettings::get_singleton()->get_project_data_path(); + // Self-contained mode if a `._sc_` or `_sc_` file is present in executable dir. String exe_path = OS::get_singleton()->get_executable_path().get_base_dir(); { @@ -183,7 +185,7 @@ EditorPaths::EditorPaths() { } } - // Validate or create project-specific editor data dir (`res://.godot`), + // Validate or create project-specific editor data dir, // including shader cache subdir. if (Main::is_project_manager() || Main::is_cmdline_tool()) { @@ -198,6 +200,20 @@ EditorPaths::EditorPaths() { paths_valid = false; } } + + // Check that the project data directory '.gdignore' file exists + String project_data_gdignore_file_path = project_data_dir.plus_file(".gdignore"); + if (!FileAccess::exists(project_data_gdignore_file_path)) { + // Add an empty .gdignore file to avoid scan. + FileAccessRef f = FileAccess::open(project_data_gdignore_file_path, FileAccess::WRITE); + if (f) { + f->store_line(""); + f->close(); + } else { + ERR_PRINT("Failed to create file " + project_data_gdignore_file_path); + } + } + Engine::get_singleton()->set_shader_cache_path(project_data_dir); // Editor metadata dir. @@ -205,8 +221,9 @@ EditorPaths::EditorPaths() { dir_res->make_dir("editor"); } // Imported assets dir. - if (!dir_res->dir_exists(ProjectSettings::IMPORTED_FILES_PATH)) { - dir_res->make_dir(ProjectSettings::IMPORTED_FILES_PATH); + String imported_files_path = ProjectSettings::get_singleton()->get_imported_files_path(); + if (!dir_res->dir_exists(imported_files_path)) { + dir_res->make_dir(imported_files_path); } } } diff --git a/editor/editor_paths.h b/editor/editor_paths.h index 2c156b7c96..cf94ed797a 100644 --- a/editor/editor_paths.h +++ b/editor/editor_paths.h @@ -41,7 +41,7 @@ class EditorPaths : public Object { String data_dir; // Editor data (templates, shader cache, etc.). String config_dir; // Editor config (settings, profiles, themes, etc.). String cache_dir; // Editor cache (thumbnails, tmp generated files). - String project_data_dir = "res://.godot"; // Project-specific data (metadata, shader cache, etc.). + String project_data_dir; // Project-specific data (metadata, shader cache, etc.). bool self_contained = false; // Self-contained means everything goes to `editor_data` dir. String self_contained_file; // Self-contained file with configuration. diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index 99b917107e..61c01993ae 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -219,7 +219,7 @@ Array EditorInterface::get_open_scenes() const { if (scenes[idx_scn].root == nullptr) { continue; } - ret.push_back(scenes[idx_scn].root->get_filename()); + ret.push_back(scenes[idx_scn].root->get_scene_file_path()); } return ret; } @@ -291,11 +291,11 @@ Error EditorInterface::save_scene() { if (!get_edited_scene_root()) { return ERR_CANT_CREATE; } - if (get_edited_scene_root()->get_filename() == String()) { + if (get_edited_scene_root()->get_scene_file_path() == String()) { return ERR_CANT_CREATE; } - save_scene_as(get_edited_scene_root()->get_filename()); + save_scene_as(get_edited_scene_root()->get_scene_file_path()); return OK; } @@ -593,14 +593,14 @@ int EditorPlugin::update_overlays() const { } } -bool EditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) { - bool success; +EditorPlugin::AfterGUIInput EditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) { + int success; if (GDVIRTUAL_CALL(_forward_3d_gui_input, p_camera, p_event, success)) { - return success; + return static_cast<EditorPlugin::AfterGUIInput>(success); } - return false; + return EditorPlugin::AFTER_GUI_INPUT_PASS; } void EditorPlugin::forward_spatial_draw_over_viewport(Control *p_overlay) { @@ -762,16 +762,23 @@ void EditorPlugin::remove_inspector_plugin(const Ref<EditorInspectorPlugin> &p_p EditorInspector::remove_inspector_plugin(p_plugin); } -void EditorPlugin::add_scene_import_plugin(const Ref<EditorSceneImporter> &p_importer) { +void EditorPlugin::add_scene_format_importer_plugin(const Ref<EditorSceneFormatImporter> &p_importer) { ERR_FAIL_COND(!p_importer.is_valid()); ResourceImporterScene::get_singleton()->add_importer(p_importer); } -void EditorPlugin::remove_scene_import_plugin(const Ref<EditorSceneImporter> &p_importer) { +void EditorPlugin::remove_scene_format_importer_plugin(const Ref<EditorSceneFormatImporter> &p_importer) { ERR_FAIL_COND(!p_importer.is_valid()); ResourceImporterScene::get_singleton()->remove_importer(p_importer); } +void EditorPlugin::add_scene_post_import_plugin(const Ref<EditorScenePostImportPlugin> &p_plugin) { + ResourceImporterScene::get_singleton()->add_post_importer_plugin(p_plugin); +} +void EditorPlugin::remove_scene_post_import_plugin(const Ref<EditorScenePostImportPlugin> &p_plugin) { + ResourceImporterScene::get_singleton()->remove_post_importer_plugin(p_plugin); +} + int find(const PackedStringArray &a, const String &v) { const String *r = a.ptr(); for (int j = 0; j < a.size(); ++j) { @@ -879,8 +886,10 @@ void EditorPlugin::_bind_methods() { ClassDB::bind_method(D_METHOD("remove_translation_parser_plugin", "parser"), &EditorPlugin::remove_translation_parser_plugin); ClassDB::bind_method(D_METHOD("add_import_plugin", "importer"), &EditorPlugin::add_import_plugin); ClassDB::bind_method(D_METHOD("remove_import_plugin", "importer"), &EditorPlugin::remove_import_plugin); - ClassDB::bind_method(D_METHOD("add_scene_import_plugin", "scene_importer"), &EditorPlugin::add_scene_import_plugin); - ClassDB::bind_method(D_METHOD("remove_scene_import_plugin", "scene_importer"), &EditorPlugin::remove_scene_import_plugin); + ClassDB::bind_method(D_METHOD("add_scene_format_importer_plugin", "scene_format_importer"), &EditorPlugin::add_scene_format_importer_plugin); + ClassDB::bind_method(D_METHOD("remove_scene_format_importer_plugin", "scene_format_importer"), &EditorPlugin::remove_scene_format_importer_plugin); + ClassDB::bind_method(D_METHOD("add_scene_post_import_plugin", "scene_import_plugin"), &EditorPlugin::add_scene_post_import_plugin); + ClassDB::bind_method(D_METHOD("remove_scene_post_import_plugin", "scene_import_plugin"), &EditorPlugin::remove_scene_post_import_plugin); ClassDB::bind_method(D_METHOD("add_export_plugin", "plugin"), &EditorPlugin::add_export_plugin); ClassDB::bind_method(D_METHOD("remove_export_plugin", "plugin"), &EditorPlugin::remove_export_plugin); ClassDB::bind_method(D_METHOD("add_spatial_gizmo_plugin", "plugin"), &EditorPlugin::add_spatial_gizmo_plugin); diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h index 169106d901..278059f8c4 100644 --- a/editor/editor_plugin.h +++ b/editor/editor_plugin.h @@ -151,7 +151,7 @@ protected: GDVIRTUAL1R(bool, _forward_canvas_gui_input, Ref<InputEvent>) GDVIRTUAL1(_forward_canvas_draw_over_viewport, Control *) GDVIRTUAL1(_forward_canvas_force_draw_over_viewport, Control *) - GDVIRTUAL2R(bool, _forward_3d_gui_input, Camera3D *, Ref<InputEvent>) + GDVIRTUAL2R(int, _forward_3d_gui_input, Camera3D *, Ref<InputEvent>) GDVIRTUAL1(_forward_3d_draw_over_viewport, Control *) GDVIRTUAL1(_forward_3d_force_draw_over_viewport, Control *) GDVIRTUAL0RC(String, _get_plugin_name) @@ -200,6 +200,12 @@ public: DOCK_SLOT_MAX }; + enum AfterGUIInput { + AFTER_GUI_INPUT_PASS, + AFTER_GUI_INPUT_STOP, + AFTER_GUI_INPUT_DESELECT + }; + //TODO: send a resource for editing to the editor node? void add_control_to_container(CustomControlContainer p_location, Control *p_control); @@ -228,7 +234,7 @@ public: virtual void forward_canvas_draw_over_viewport(Control *p_overlay); virtual void forward_canvas_force_draw_over_viewport(Control *p_overlay); - virtual bool forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event); + virtual EditorPlugin::AfterGUIInput forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event); virtual void forward_spatial_draw_over_viewport(Control *p_overlay); virtual void forward_spatial_force_draw_over_viewport(Control *p_overlay); @@ -282,8 +288,11 @@ public: void add_inspector_plugin(const Ref<EditorInspectorPlugin> &p_plugin); void remove_inspector_plugin(const Ref<EditorInspectorPlugin> &p_plugin); - void add_scene_import_plugin(const Ref<EditorSceneImporter> &p_importer); - void remove_scene_import_plugin(const Ref<EditorSceneImporter> &p_importer); + void add_scene_format_importer_plugin(const Ref<EditorSceneFormatImporter> &p_importer); + void remove_scene_format_importer_plugin(const Ref<EditorSceneFormatImporter> &p_importer); + + void add_scene_post_import_plugin(const Ref<EditorScenePostImportPlugin> &p_importer); + void remove_scene_post_import_plugin(const Ref<EditorScenePostImportPlugin> &p_importer); void add_autoload_singleton(const String &p_name, const String &p_path); void remove_autoload_singleton(const String &p_name); diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index c0dadc4484..2d4a3ac788 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -3574,7 +3574,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_ case Variant::PACKED_COLOR_ARRAY: { EditorPropertyArray *editor = memnew(EditorPropertyArray); editor->setup(Variant::PACKED_COLOR_ARRAY); - + return editor; } break; default: { } diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp index 9cecb62c66..9b5dc8851c 100644 --- a/editor/editor_properties_array_dict.cpp +++ b/editor/editor_properties_array_dict.cpp @@ -429,6 +429,12 @@ void EditorPropertyArray::_button_draw() { bool EditorPropertyArray::_is_drop_valid(const Dictionary &p_drag_data) const { String allowed_type = Variant::get_type_name(subtype); + // When the subtype is of type Object, an additional subtype may be specified in the hint string + // (e.g. Resource, Texture2D, ShaderMaterial, etc). We want the allowed type to be that, not just "Object". + if (subtype == Variant::OBJECT && subtype_hint_string != "") { + allowed_type = subtype_hint_string; + } + Dictionary drag_data = p_drag_data; if (drag_data.has("type") && String(drag_data["type"]) == "files") { diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp index 8fc1345f3e..8783fe4fc0 100644 --- a/editor/editor_resource_preview.cpp +++ b/editor/editor_resource_preview.cpp @@ -439,7 +439,7 @@ void EditorResourcePreview::stop() { preview_sem.post(); while (!exited.is_set()) { OS::get_singleton()->delay_usec(10000); - RenderingServer::get_singleton()->sync(); //sync pending stuff, as thread may be blocked on visual server + RenderingServer::get_singleton()->sync(); //sync pending stuff, as thread may be blocked on rendering server } thread.wait_to_finish(); } diff --git a/editor/editor_run_native.cpp b/editor/editor_run_native.cpp index 5828549bdc..74ebffc404 100644 --- a/editor/editor_run_native.cpp +++ b/editor/editor_run_native.cpp @@ -66,9 +66,9 @@ void EditorRunNative::_notification(int p_what) { bool changed = EditorExport::get_singleton()->poll_export_platforms() || first; if (changed) { - for (Map<int, MenuButton *>::Element *E = menus.front(); E; E = E->next()) { - Ref<EditorExportPlatform> eep = EditorExport::get_singleton()->get_export_platform(E->key()); - MenuButton *mb = E->get(); + for (KeyValue<int, MenuButton *> &E : menus) { + Ref<EditorExportPlatform> eep = EditorExport::get_singleton()->get_export_platform(E.key); + MenuButton *mb = E.value; int dc = eep->get_options_count(); if (dc == 0) { diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 70f43e01cf..1da9213b89 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -73,14 +73,15 @@ bool EditorSettings::_set_only(const StringName &p_name, const Variant &p_value) if (p_name == "shortcuts") { Array arr = p_value; - ERR_FAIL_COND_V(arr.size() && arr.size() & 1, true); - for (int i = 0; i < arr.size(); i += 2) { - String name = arr[i]; - Ref<InputEvent> shortcut = arr[i + 1]; + for (int i = 0; i < arr.size(); i++) { + Dictionary dict = arr[i]; + String name = dict["name"]; + + Array shortcut_events = dict["shortcuts"]; Ref<Shortcut> sc; sc.instantiate(); - sc->set_event(shortcut); + sc->set_events(shortcut_events); add_shortcut(name, sc); } @@ -138,47 +139,75 @@ bool EditorSettings::_get(const StringName &p_name, Variant &r_ret) const { _THREAD_SAFE_METHOD_ if (p_name == "shortcuts") { - Array arr; - for (const Map<String, Ref<Shortcut>>::Element *E = shortcuts.front(); E; E = E->next()) { - Ref<Shortcut> sc = E->get(); + Array save_array; + const OrderedHashMap<String, List<Ref<InputEvent>>> &builtin_list = InputMap::get_singleton()->get_builtins(); + for (const KeyValue<String, Ref<Shortcut>> &shortcut_definition : shortcuts) { + Ref<Shortcut> sc = shortcut_definition.value; - if (builtin_action_overrides.has(E->key())) { + if (builtin_list.has(shortcut_definition.key)) { // This shortcut was auto-generated from built in actions: don't save. + // If the builtin is overriden, it will be saved in the "builtin_action_overrides" section below. continue; } - if (optimize_save) { - if (!sc->has_meta("original")) { - continue; //this came from settings but is not any longer used - } + Array shortcut_events = sc->get_events(); - Ref<InputEvent> original = sc->get_meta("original"); - if (sc->matches_event(original) || (original.is_null() && sc->get_event().is_null())) { - continue; //not changed from default, don't save - } + Dictionary dict; + dict["name"] = shortcut_definition.key; + dict["shortcuts"] = shortcut_events; + + if (!sc->has_meta("original")) { + // Getting the meta when it doesn't exist will return an empty array. If the 'shortcut_events' have been cleared, + // we still want save the shortcut in this case so that shortcuts that the user has customised are not reset, + // even if the 'original' has not been populated yet. This can happen when calling save() from the Project Manager. + save_array.push_back(dict); + continue; } - arr.push_back(E->key()); - arr.push_back(sc->get_event()); + Array original_events = sc->get_meta("original"); + + bool is_same = Shortcut::is_event_array_equal(original_events, shortcut_events); + if (is_same) { + continue; // Not changed from default; don't save. + } + + save_array.push_back(dict); } - r_ret = arr; + r_ret = save_array; return true; } else if (p_name == "builtin_action_overrides") { Array actions_arr; - for (Map<String, List<Ref<InputEvent>>>::Element *E = builtin_action_overrides.front(); E; E = E->next()) { - List<Ref<InputEvent>> events = E->get(); + for (const KeyValue<String, List<Ref<InputEvent>>> &action_override : builtin_action_overrides) { + List<Ref<InputEvent>> events = action_override.value; - // TODO: skip actions which are the same as the builtin. Dictionary action_dict; - action_dict["name"] = E->key(); + action_dict["name"] = action_override.key; + // Convert the list to an array, and only keep key events as this is for the editor. Array events_arr; - for (List<Ref<InputEvent>>::Element *I = events.front(); I; I = I->next()) { - events_arr.push_back(I->get()); + for (const Ref<InputEvent> &ie : events) { + Ref<InputEventKey> iek = ie; + if (iek.is_valid()) { + events_arr.append(iek); + } } - action_dict["events"] = events_arr; + Array defaults_arr; + List<Ref<InputEvent>> defaults = InputMap::get_singleton()->get_builtins()[action_override.key]; + for (const Ref<InputEvent> &default_input_event : defaults) { + if (default_input_event.is_valid()) { + defaults_arr.append(default_input_event); + } + } + + bool same = Shortcut::is_event_array_equal(events_arr, defaults_arr); + + // Don't save if same as default. + if (same) { + continue; + } + action_dict["events"] = events_arr; actions_arr.push_back(action_dict); } @@ -413,6 +442,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { _initial_set("interface/editor/hide_console_window", false); _initial_set("interface/editor/mouse_extra_buttons_navigate_history", true); _initial_set("interface/editor/save_each_scene_on_quit", true); // Regression + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/show_internal_errors_in_toast_notifications", 0, "Auto,Enabled,Disabled") // Inspector EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "interface/inspector/max_array_dictionary_items_per_page", 20, "10,100,1") @@ -456,10 +486,12 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { // SceneTree _initial_set("docks/scene_tree/start_create_dialog_fully_expanded", false); + _initial_set("docks/scene_tree/auto_expand_to_selected", true); // FileSystem EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "docks/filesystem/thumbnail_size", 64, "32,128,16") _initial_set("docks/filesystem/always_show_folders", true); + _initial_set("docks/filesystem/textfile_extensions", "txt,md,cfg,ini,log,json,yml,yaml,toml"); // Property editor _initial_set("docks/property_editor/auto_refresh_interval", 0.2); //update 5 times per second by default @@ -1404,7 +1436,7 @@ Ref<Shortcut> EditorSettings::get_shortcut(const String &p_name) const { const Map<String, List<Ref<InputEvent>>>::Element *builtin_override = builtin_action_overrides.find(p_name); if (builtin_override) { sc.instantiate(); - sc->set_event(builtin_override->get().front()->get()); + sc->set_events_list(&builtin_override->get()); sc->set_name(InputMap::get_singleton()->get_builtin_display_name(p_name)); } @@ -1413,7 +1445,7 @@ Ref<Shortcut> EditorSettings::get_shortcut(const String &p_name) const { const OrderedHashMap<String, List<Ref<InputEvent>>>::ConstElement builtin_default = InputMap::get_singleton()->get_builtins_with_feature_overrides_applied().find(p_name); if (builtin_default) { sc.instantiate(); - sc->set_event(builtin_default.get().front()->get()); + sc->set_events_list(&builtin_default.get()); sc->set_name(InputMap::get_singleton()->get_builtin_display_name(p_name)); } } @@ -1428,8 +1460,8 @@ Ref<Shortcut> EditorSettings::get_shortcut(const String &p_name) const { } void EditorSettings::get_shortcut_list(List<String> *r_shortcuts) { - for (const Map<String, Ref<Shortcut>>::Element *E = shortcuts.front(); E; E = E->next()) { - r_shortcuts->push_back(E->key()); + for (const KeyValue<String, Ref<Shortcut>> &E : shortcuts) { + r_shortcuts->push_back(E.key); } } @@ -1449,52 +1481,91 @@ void ED_SHORTCUT_OVERRIDE(const String &p_path, const String &p_feature, Key p_k Ref<Shortcut> sc = EditorSettings::get_singleton()->get_shortcut(p_path); ERR_FAIL_COND_MSG(!sc.is_valid(), "Used ED_SHORTCUT_OVERRIDE with invalid shortcut: " + p_path + "."); + PackedInt32Array arr; + arr.push_back(p_keycode); + + ED_SHORTCUT_OVERRIDE_ARRAY(p_path, p_feature, arr); +} + +void ED_SHORTCUT_OVERRIDE_ARRAY(const String &p_path, const String &p_feature, const PackedInt32Array &p_keycodes) { + Ref<Shortcut> sc = EditorSettings::get_singleton()->get_shortcut(p_path); + ERR_FAIL_COND_MSG(!sc.is_valid(), "Used ED_SHORTCUT_OVERRIDE_ARRAY with invalid shortcut: " + p_path + "."); + // Only add the override if the OS supports the provided feature. - if (OS::get_singleton()->has_feature(p_feature)) { - Ref<InputEventKey> ie; - if (p_keycode) { - ie = InputEventKey::create_reference(p_keycode); + if (!OS::get_singleton()->has_feature(p_feature)) { + return; + } + + Array events; + + for (int i = 0; i < p_keycodes.size(); i++) { + Key keycode = (Key)p_keycodes[i]; + +#ifdef OSX_ENABLED + // Use Cmd+Backspace as a general replacement for Delete shortcuts on macOS + if (keycode == KEY_DELETE) { + keycode = KEY_MASK_CMD | KEY_BACKSPACE; } +#endif - // Directly override the existing shortcut. - sc->set_event(ie); - sc->set_meta("original", ie); + Ref<InputEventKey> ie; + if (keycode) { + ie = InputEventKey::create_reference(keycode); + events.push_back(ie); + } } + + // Directly override the existing shortcut. + sc->set_events(events); + sc->set_meta("original", events.duplicate(true)); } Ref<Shortcut> ED_SHORTCUT(const String &p_path, const String &p_name, Key p_keycode) { + PackedInt32Array arr; + arr.push_back(p_keycode); + return ED_SHORTCUT_ARRAY(p_path, p_name, arr); +} + +Ref<Shortcut> ED_SHORTCUT_ARRAY(const String &p_path, const String &p_name, const PackedInt32Array &p_keycodes) { + Array events; + + for (int i = 0; i < p_keycodes.size(); i++) { + Key keycode = (Key)p_keycodes[i]; + #ifdef OSX_ENABLED - // Use Cmd+Backspace as a general replacement for Delete shortcuts on macOS - if (p_keycode == KEY_DELETE) { - p_keycode = KEY_MASK_CMD | KEY_BACKSPACE; - } + // Use Cmd+Backspace as a general replacement for Delete shortcuts on macOS + if (keycode == KEY_DELETE) { + keycode = KEY_MASK_CMD | KEY_BACKSPACE; + } #endif - Ref<InputEventKey> ie; - if (p_keycode) { - ie = InputEventKey::create_reference(p_keycode); + Ref<InputEventKey> ie; + if (keycode) { + ie = InputEventKey::create_reference(keycode); + events.push_back(ie); + } } if (!EditorSettings::get_singleton()) { Ref<Shortcut> sc; sc.instantiate(); sc->set_name(p_name); - sc->set_event(ie); - sc->set_meta("original", ie); + sc->set_events(events); + sc->set_meta("original", events.duplicate(true)); return sc; } Ref<Shortcut> sc = EditorSettings::get_singleton()->get_shortcut(p_path); if (sc.is_valid()) { sc->set_name(p_name); //keep name (the ones that come from disk have no name) - sc->set_meta("original", ie); //to compare against changes + sc->set_meta("original", events.duplicate(true)); //to compare against changes return sc; } sc.instantiate(); sc->set_name(p_name); - sc->set_event(ie); - sc->set_meta("original", ie); //to compare against changes + sc->set_events(events); + sc->set_meta("original", events.duplicate(true)); //to compare against changes EditorSettings::get_singleton()->add_shortcut(p_path, sc); return sc; @@ -1549,7 +1620,7 @@ void EditorSettings::set_builtin_action_override(const String &p_name, const Arr // Update the shortcut (if it is used somewhere in the editor) to be the first event of the new list. if (shortcuts.has(p_name)) { - shortcuts[p_name]->set_event(event_list.front()->get()); + shortcuts[p_name]->set_events_list(&event_list); } } diff --git a/editor/editor_settings.h b/editor/editor_settings.h index 9067539e29..04e227bc5c 100644 --- a/editor/editor_settings.h +++ b/editor/editor_settings.h @@ -201,7 +201,9 @@ Variant _EDITOR_GET(const String &p_setting); #define ED_IS_SHORTCUT(p_name, p_ev) (EditorSettings::get_singleton()->is_shortcut(p_name, p_ev)) Ref<Shortcut> ED_SHORTCUT(const String &p_path, const String &p_name, Key p_keycode = KEY_NONE); +Ref<Shortcut> ED_SHORTCUT_ARRAY(const String &p_path, const String &p_name, const PackedInt32Array &p_keycodes); void ED_SHORTCUT_OVERRIDE(const String &p_path, const String &p_feature, Key p_keycode = KEY_NONE); +void ED_SHORTCUT_OVERRIDE_ARRAY(const String &p_path, const String &p_feature, const PackedInt32Array &p_keycodes); Ref<Shortcut> ED_GET_SHORTCUT(const String &p_path); #endif // EDITOR_SETTINGS_H diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp index afeba4f6fb..ec90af1bcc 100644 --- a/editor/editor_spin_slider.cpp +++ b/editor/editor_spin_slider.cpp @@ -191,6 +191,59 @@ void EditorSpinSlider::_grabber_gui_input(const Ref<InputEvent> &p_event) { } } +void EditorSpinSlider::_value_input_gui_input(const Ref<InputEvent> &p_event) { + Ref<InputEventKey> k = p_event; + if (k.is_valid() && k->is_pressed()) { + double step = get_step(); + double real_step = step; + if (step < 1) { + double divisor = 1.0 / get_step(); + + if (trunc(divisor) == divisor) { + step = 1.0; + } + } + + if (k->is_ctrl_pressed()) { + step *= 100.0; + } else if (k->is_shift_pressed()) { + step *= 10.0; + } else if (k->is_alt_pressed()) { + step *= 0.1; + } + + uint32_t code = k->get_keycode(); + switch (code) { + case KEY_UP: { + _evaluate_input_text(); + + double last_value = get_value(); + set_value(last_value + step); + double new_value = get_value(); + + if (new_value < CLAMP(last_value + step, get_min(), get_max())) { + set_value(last_value + real_step); + } + + value_input->set_text(get_text_value()); + } break; + case KEY_DOWN: { + _evaluate_input_text(); + + double last_value = get_value(); + set_value(last_value - step); + double new_value = get_value(); + + if (new_value > CLAMP(last_value - step, get_min(), get_max())) { + set_value(last_value - real_step); + } + + value_input->set_text(get_text_value()); + } break; + } + } +} + void EditorSpinSlider::_update_value_input_stylebox() { if (!value_input) { return; @@ -277,9 +330,8 @@ void EditorSpinSlider::_draw_spin_slider() { float text_start = rtl ? Math::round(sb->get_offset().x) : Math::round(sb->get_offset().x + label_width + sep); Vector2 text_ofs = rtl ? Vector2(text_start + (number_width - TS->shaped_text_get_width(num_rid)), vofs) : Vector2(text_start, vofs); - const Vector<TextServer::Glyph> visual = TS->shaped_text_get_glyphs(num_rid); - int v_size = visual.size(); - const TextServer::Glyph *glyphs = visual.ptr(); + int v_size = TS->shaped_text_get_glyph_count(num_rid); + const Glyph *glyphs = TS->shaped_text_get_glyphs(num_rid); for (int i = 0; i < v_size; i++) { for (int j = 0; j < glyphs[i].repeat; j++) { if (text_ofs.x >= text_start && (text_ofs.x + glyphs[i].advance) <= (text_start + number_width)) { @@ -585,11 +637,13 @@ void EditorSpinSlider::_ensure_input_popup() { value_input_popup->connect("popup_hide", callable_mp(this, &EditorSpinSlider::_value_input_closed)); value_input->connect("text_submitted", callable_mp(this, &EditorSpinSlider::_value_input_submitted)); value_input->connect("focus_exited", callable_mp(this, &EditorSpinSlider::_value_focus_exited)); + value_input->connect("gui_input", callable_mp(this, &EditorSpinSlider::_value_input_gui_input)); if (is_inside_tree()) { _update_value_input_stylebox(); } } + EditorSpinSlider::EditorSpinSlider() { flat = false; grabbing_spinner_attempt = false; diff --git a/editor/editor_spin_slider.h b/editor/editor_spin_slider.h index 1bf8e8eef9..7e10764491 100644 --- a/editor/editor_spin_slider.h +++ b/editor/editor_spin_slider.h @@ -71,6 +71,7 @@ class EditorSpinSlider : public Range { void _value_input_closed(); void _value_input_submitted(const String &); void _value_focus_exited(); + void _value_input_gui_input(const Ref<InputEvent> &p_event); bool hide_slider; bool flat; diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 6e5b94dc07..fdcc0438ae 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -213,6 +213,7 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme = exceptions.insert("EditorPivot"); exceptions.insert("EditorHandle"); exceptions.insert("Editor3DHandle"); + exceptions.insert("EditorBoneHandle"); exceptions.insert("Godot"); exceptions.insert("Sky"); exceptions.insert("EditorControlAnchor"); @@ -292,7 +293,8 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme = Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { Ref<Theme> theme = Ref<Theme>(memnew(Theme)); - const float default_contrast = 0.3; + // Controls may rely on the scale for their internal drawing logic. + theme->set_default_theme_base_scale(EDSCALE); // Theme settings Color accent_color = EDITOR_GET("interface/theme/accent_color"); @@ -310,6 +312,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { Color preset_base_color; float preset_contrast = 0; + const float default_contrast = 0.3; + // Please use alphabetical order if you're adding a new theme here // (after "Custom") @@ -399,7 +403,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { float prev_icon_saturation = theme->has_color("icon_saturation", "Editor") ? theme->get_color("icon_saturation", "Editor").r : 1.0; - theme->set_color("icon_saturation", "Editor", Color(icon_saturation, icon_saturation, icon_saturation)); //can't save single float in theme, so using color + theme->set_color("icon_saturation", "Editor", Color(icon_saturation, icon_saturation, icon_saturation)); // can't save single float in theme, so using color theme->set_color("accent_color", "Editor", accent_color); theme->set_color("highlight_color", "Editor", highlight_color); theme->set_color("disabled_highlight_color", "Editor", disabled_highlight_color); @@ -427,7 +431,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { Color error_color = Color(1, 0.47, 0.42); Color property_color = font_color.lerp(Color(0.5, 0.5, 0.5), 0.5); Color readonly_color = property_color.lerp(dark_theme ? Color(0, 0, 0) : Color(1, 1, 1), 0.5); - Color readonly_error_color = error_color.lerp(dark_theme ? Color(0, 0, 0) : Color(1, 1, 1), 0.5); + Color readonly_warning_color = error_color.lerp(dark_theme ? Color(0, 0, 0) : Color(1, 1, 1), 0.5); if (!dark_theme) { // Darken some colors to be readable on a light background @@ -441,7 +445,6 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("error_color", "Editor", error_color); theme->set_color("property_color", "Editor", property_color); theme->set_color("readonly_color", "Editor", readonly_color); - theme->set_color("readonly_error_color", "EditorProperty", readonly_error_color); if (!dark_theme) { theme->set_color("vulkan_color", "Editor", Color::hex(0xad1128ff)); @@ -545,7 +548,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { Ref<StyleBoxEmpty> style_empty = make_empty_stylebox(default_margin_size, default_margin_size, default_margin_size, default_margin_size); - // Tabs + // TabBar Ref<StyleBoxFlat> style_tab_selected = style_widget->duplicate(); @@ -815,10 +818,10 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_stylebox("bg_selected", "EditorProperty", style_property_bg); theme->set_stylebox("bg", "EditorProperty", Ref<StyleBoxEmpty>(memnew(StyleBoxEmpty))); theme->set_constant("vseparation", "EditorProperty", (extra_spacing + default_margin_size) * EDSCALE); - theme->set_color("error_color", "EditorProperty", error_color); + theme->set_color("warning_color", "EditorProperty", warning_color); theme->set_color("property_color", "EditorProperty", property_color); theme->set_color("readonly_color", "EditorProperty", readonly_color); - theme->set_color("readonly_error_color", "EditorProperty", readonly_error_color); + theme->set_color("readonly_warning_color", "EditorProperty", readonly_warning_color); Color inspector_section_color = font_color.lerp(Color(0.5, 0.5, 0.5), 0.35); theme->set_color("font_color", "EditorInspectorSection", inspector_section_color); @@ -946,33 +949,33 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_constant("icon_margin", "ItemList", 6 * EDSCALE); theme->set_constant("line_separation", "ItemList", 3 * EDSCALE); - // Tabs & TabContainer + // TabBar & TabContainer theme->set_stylebox("tab_selected", "TabContainer", style_tab_selected); theme->set_stylebox("tab_unselected", "TabContainer", style_tab_unselected); theme->set_stylebox("tab_disabled", "TabContainer", style_tab_disabled); - theme->set_stylebox("tab_selected", "Tabs", style_tab_selected); - theme->set_stylebox("tab_unselected", "Tabs", style_tab_unselected); - theme->set_stylebox("tab_disabled", "Tabs", style_tab_disabled); + theme->set_stylebox("tab_selected", "TabBar", style_tab_selected); + theme->set_stylebox("tab_unselected", "TabBar", style_tab_unselected); + theme->set_stylebox("tab_disabled", "TabBar", style_tab_disabled); theme->set_color("font_selected_color", "TabContainer", font_color); theme->set_color("font_unselected_color", "TabContainer", font_disabled_color); - theme->set_color("font_selected_color", "Tabs", font_color); - theme->set_color("font_unselected_color", "Tabs", font_disabled_color); + theme->set_color("font_selected_color", "TabBar", font_color); + theme->set_color("font_unselected_color", "TabBar", font_disabled_color); theme->set_icon("menu", "TabContainer", theme->get_icon("GuiTabMenu", "EditorIcons")); theme->set_icon("menu_highlight", "TabContainer", theme->get_icon("GuiTabMenuHl", "EditorIcons")); theme->set_stylebox("SceneTabFG", "EditorStyles", style_tab_selected); theme->set_stylebox("SceneTabBG", "EditorStyles", style_tab_unselected); - theme->set_icon("close", "Tabs", theme->get_icon("GuiClose", "EditorIcons")); - theme->set_stylebox("button_pressed", "Tabs", style_menu); - theme->set_stylebox("button", "Tabs", style_menu); + theme->set_icon("close", "TabBar", theme->get_icon("GuiClose", "EditorIcons")); + theme->set_stylebox("close_bg_pressed", "TabBar", style_menu); + theme->set_stylebox("close_bg_highlight", "TabBar", style_menu); theme->set_icon("increment", "TabContainer", theme->get_icon("GuiScrollArrowRight", "EditorIcons")); theme->set_icon("decrement", "TabContainer", theme->get_icon("GuiScrollArrowLeft", "EditorIcons")); - theme->set_icon("increment", "Tabs", theme->get_icon("GuiScrollArrowRight", "EditorIcons")); - theme->set_icon("decrement", "Tabs", theme->get_icon("GuiScrollArrowLeft", "EditorIcons")); - theme->set_icon("increment_highlight", "Tabs", theme->get_icon("GuiScrollArrowRightHl", "EditorIcons")); - theme->set_icon("decrement_highlight", "Tabs", theme->get_icon("GuiScrollArrowLeftHl", "EditorIcons")); + theme->set_icon("increment", "TabBar", theme->get_icon("GuiScrollArrowRight", "EditorIcons")); + theme->set_icon("decrement", "TabBar", theme->get_icon("GuiScrollArrowLeft", "EditorIcons")); + theme->set_icon("increment_highlight", "TabBar", theme->get_icon("GuiScrollArrowRightHl", "EditorIcons")); + theme->set_icon("decrement_highlight", "TabBar", theme->get_icon("GuiScrollArrowLeftHl", "EditorIcons")); theme->set_icon("increment_highlight", "TabContainer", theme->get_icon("GuiScrollArrowRightHl", "EditorIcons")); theme->set_icon("decrement_highlight", "TabContainer", theme->get_icon("GuiScrollArrowLeftHl", "EditorIcons")); - theme->set_constant("hseparation", "Tabs", 4 * EDSCALE); + theme->set_constant("hseparation", "TabBar", 4 * EDSCALE); // Content of each tab Ref<StyleBoxFlat> style_content_panel = style_default->duplicate(); @@ -1084,6 +1087,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_icon("folded", "CodeEdit", theme->get_icon("GuiTreeArrowRight", "EditorIcons")); theme->set_icon("can_fold", "CodeEdit", theme->get_icon("GuiTreeArrowDown", "EditorIcons")); theme->set_icon("executing_line", "CodeEdit", theme->get_icon("MainPlay", "EditorIcons")); + theme->set_icon("breakpoint", "CodeEdit", theme->get_icon("Breakpoint", "EditorIcons")); theme->set_constant("line_spacing", "CodeEdit", EDITOR_DEF("text_editor/appearance/whitespace/line_spacing", 6)); // H/VSplitContainer diff --git a/editor/editor_toaster.cpp b/editor/editor_toaster.cpp new file mode 100644 index 0000000000..9de0ea40fe --- /dev/null +++ b/editor/editor_toaster.cpp @@ -0,0 +1,513 @@ +/*************************************************************************/ +/* editor_toaster.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 "editor/editor_node.h" +#include "editor/editor_scale.h" +#include "scene/gui/label.h" +#include "scene/gui/panel_container.h" + +#include "editor_toaster.h" + +EditorToaster *EditorToaster::singleton = nullptr; + +void EditorToaster::_notification(int p_what) { + switch (p_what) { + case NOTIFICATION_INTERNAL_PROCESS: { + double delta = get_process_delta_time(); + + // Check if one element is hovered, if so, don't elapse time. + bool hovered = false; + for (const KeyValue<Control *, Toast> &element : toasts) { + if (Rect2(Vector2(), element.key->get_size()).has_point(element.key->get_local_mouse_position())) { + hovered = true; + break; + } + } + + // Elapses the time and remove toasts if needed. + if (!hovered) { + for (const KeyValue<Control *, Toast> &element : toasts) { + if (!element.value.popped || element.value.duration <= 0) { + continue; + } + toasts[element.key].remaining_time -= delta; + if (toasts[element.key].remaining_time < 0) { + close(element.key); + } + element.key->update(); + } + } else { + // Reset the timers when hovered. + for (const KeyValue<Control *, Toast> &element : toasts) { + if (!element.value.popped || element.value.duration <= 0) { + continue; + } + toasts[element.key].remaining_time = element.value.duration; + element.key->update(); + } + } + + // Change alpha over time. + bool needs_update = false; + for (const KeyValue<Control *, Toast> &element : toasts) { + Color modulate = element.key->get_modulate(); + + // Change alpha over time. + if (element.value.popped && modulate.a < 1.0) { + modulate.a += delta * 3; + element.key->set_modulate(modulate); + } else if (!element.value.popped && modulate.a > 0.0) { + modulate.a -= delta * 2; + element.key->set_modulate(modulate); + } + + // Hide element if it is not visible anymore. + if (modulate.a <= 0) { + if (element.key->is_visible()) { + element.key->hide(); + needs_update = true; + } + } + } + + if (needs_update) { + _update_vbox_position(); + _update_disable_notifications_button(); + main_button->update(); + } + } break; + case NOTIFICATION_ENTER_TREE: + case NOTIFICATION_THEME_CHANGED: { + if (vbox_container->is_visible()) { + main_button->set_icon(get_theme_icon(SNAME("Notification"), SNAME("EditorIcons"))); + } else { + main_button->set_icon(get_theme_icon(SNAME("NotificationDisabled"), SNAME("EditorIcons"))); + } + disable_notifications_button->set_icon(get_theme_icon(SNAME("NotificationDisabled"), SNAME("EditorIcons"))); + + // Styleboxes background. + info_panel_style_background->set_bg_color(get_theme_color("base_color", "Editor")); + + warning_panel_style_background->set_bg_color(get_theme_color("base_color", "Editor")); + warning_panel_style_background->set_border_color(get_theme_color("warning_color", "Editor")); + + error_panel_style_background->set_bg_color(get_theme_color("base_color", "Editor")); + error_panel_style_background->set_border_color(get_theme_color("error_color", "Editor")); + + // Styleboxes progress. + info_panel_style_progress->set_bg_color(get_theme_color("base_color", "Editor").lightened(0.03)); + + warning_panel_style_progress->set_bg_color(get_theme_color("base_color", "Editor").lightened(0.03)); + warning_panel_style_progress->set_border_color(get_theme_color("warning_color", "Editor")); + + error_panel_style_progress->set_bg_color(get_theme_color("base_color", "Editor").lightened(0.03)); + error_panel_style_progress->set_border_color(get_theme_color("error_color", "Editor")); + + main_button->update(); + disable_notifications_button->update(); + } break; + case NOTIFICATION_TRANSFORM_CHANGED: { + _update_vbox_position(); + _update_disable_notifications_button(); + } break; + default: + break; + } +} + +void EditorToaster::_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) { + if (!EditorToaster::get_singleton() || !EditorToaster::get_singleton()->is_inside_tree()) { + return; + } + +#ifdef DEV_ENABLED + bool in_dev = true; +#else + bool in_dev = false; +#endif + + int show_all_setting = EDITOR_GET("interface/editor/show_internal_errors_in_toast_notifications"); + + 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; + } else { + err_str = String(p_error); + } + String tooltip_str = String(p_file) + ":" + itos(p_line); + + if (!p_editor_notify) { + if (p_type == ERR_HANDLER_WARNING) { + err_str = "INTERNAL WARNING: " + err_str; + } else { + err_str = "INTERNAL ERROR: " + err_str; + } + } + + if (p_type == ERR_HANDLER_WARNING) { + EditorToaster::get_singleton()->popup_str(err_str, SEVERITY_WARNING, tooltip_str); + } else { + EditorToaster::get_singleton()->popup_str(err_str, SEVERITY_ERROR, tooltip_str); + } + } +} + +void EditorToaster::_update_vbox_position() { + // This is kind of a workaround because it's hard to keep the VBox anchroed to the bottom. + vbox_container->set_size(Vector2()); + vbox_container->set_position(get_global_position() - vbox_container->get_size() + Vector2(get_size().x, -5 * EDSCALE)); +} + +void EditorToaster::_update_disable_notifications_button() { + bool any_visible = false; + for (KeyValue<Control *, Toast> element : toasts) { + if (element.key->is_visible()) { + any_visible = true; + break; + } + } + + if (!any_visible || !vbox_container->is_visible()) { + disable_notifications_panel->hide(); + } else { + disable_notifications_panel->show(); + disable_notifications_panel->set_position(get_global_position() + Vector2(5 * EDSCALE, -disable_notifications_panel->get_minimum_size().y) + Vector2(get_size().x, -5 * EDSCALE)); + } +} + +void EditorToaster::_auto_hide_or_free_toasts() { + // Hide or free old temporary items. + int visible_temporary = 0; + int temporary = 0; + LocalVector<Control *> to_delete; + for (int i = vbox_container->get_child_count() - 1; i >= 0; i--) { + Control *control = Object::cast_to<Control>(vbox_container->get_child(i)); + if (toasts[control].duration <= 0) { + continue; // Ignore non-temporary toasts. + } + + temporary++; + if (control->is_visible()) { + visible_temporary++; + } + + // Hide + if (visible_temporary > max_temporary_count) { + close(control); + } + + // Free + if (temporary > max_temporary_count * 2) { + to_delete.push_back(control); + } + } + + // Delete the control right away (removed as child) as it might cause issues otherwise when iterative over the vbox_container children. + for (unsigned int i = 0; i < to_delete.size(); i++) { + vbox_container->remove_child(to_delete[i]); + to_delete[i]->queue_delete(); + toasts.erase(to_delete[i]); + } +} + +void EditorToaster::_draw_button() { + bool has_one = false; + Severity highest_severity = SEVERITY_INFO; + for (const KeyValue<Control *, Toast> &element : toasts) { + if (!element.key->is_visible()) { + continue; + } + has_one = true; + if (element.value.severity > highest_severity) { + highest_severity = element.value.severity; + } + } + + if (!has_one) { + return; + } + + Color color; + real_t button_radius = main_button->get_size().x / 8; + switch (highest_severity) { + case SEVERITY_INFO: + color = get_theme_color("accent_color", "Editor"); + break; + case SEVERITY_WARNING: + color = get_theme_color("warning_color", "Editor"); + break; + case SEVERITY_ERROR: + color = get_theme_color("error_color", "Editor"); + break; + default: + break; + } + main_button->draw_circle(Vector2(button_radius * 2, button_radius * 2), button_radius, color); +} + +void EditorToaster::_draw_progress(Control *panel) { + if (toasts.has(panel) && toasts[panel].remaining_time > 0 && toasts[panel].duration > 0) { + Size2 size = panel->get_size(); + size.x *= MIN(1, Math::range_lerp(toasts[panel].remaining_time, 0, toasts[panel].duration, 0, 2)); + + Ref<StyleBoxFlat> stylebox; + switch (toasts[panel].severity) { + case SEVERITY_INFO: + stylebox = info_panel_style_progress; + break; + case SEVERITY_WARNING: + stylebox = warning_panel_style_progress; + break; + case SEVERITY_ERROR: + stylebox = error_panel_style_progress; + break; + default: + break; + } + panel->draw_style_box(stylebox, Rect2(Vector2(), size)); + } +} + +void EditorToaster::_set_notifications_enabled(bool p_enabled) { + vbox_container->set_visible(p_enabled); + if (p_enabled) { + main_button->set_icon(get_theme_icon(SNAME("Notification"), SNAME("EditorIcons"))); + } else { + main_button->set_icon(get_theme_icon(SNAME("NotificationDisabled"), SNAME("EditorIcons"))); + } + _update_disable_notifications_button(); +} + +void EditorToaster::_repop_old() { + // Repop olds, up to max_temporary_count + bool needs_update = false; + int visible = 0; + for (int i = vbox_container->get_child_count() - 1; i >= 0; i--) { + Control *control = Object::cast_to<Control>(vbox_container->get_child(i)); + if (!control->is_visible()) { + control->show(); + toasts[control].remaining_time = toasts[control].duration; + toasts[control].popped = true; + needs_update = true; + } + visible++; + if (visible >= max_temporary_count) { + break; + } + } + if (needs_update) { + _update_vbox_position(); + _update_disable_notifications_button(); + main_button->update(); + } +} + +Control *EditorToaster::popup(Control *p_control, Severity p_severity, double p_time, String p_tooltip) { + // Create the panel according to the severity. + PanelContainer *panel = memnew(PanelContainer); + panel->set_tooltip(p_tooltip); + switch (p_severity) { + case SEVERITY_INFO: + panel->add_theme_style_override("panel", info_panel_style_background); + break; + case SEVERITY_WARNING: + panel->add_theme_style_override("panel", warning_panel_style_background); + break; + case SEVERITY_ERROR: + panel->add_theme_style_override("panel", error_panel_style_background); + break; + default: + break; + } + panel->set_modulate(Color(1, 1, 1, 0)); + panel->connect("draw", callable_bind(callable_mp(this, &EditorToaster::_draw_progress), panel)); + + // Horizontal container. + HBoxContainer *hbox_container = memnew(HBoxContainer); + hbox_container->set_h_size_flags(SIZE_EXPAND_FILL); + panel->add_child(hbox_container); + + // Content control. + p_control->set_h_size_flags(SIZE_EXPAND_FILL); + hbox_container->add_child(p_control); + + // Close button. + if (p_time > 0.0) { + Button *close_button = memnew(Button); + close_button->set_flat(true); + close_button->set_icon(get_theme_icon("Close", "EditorIcons")); + close_button->connect("pressed", callable_bind(callable_mp(this, &EditorToaster::close), panel)); + hbox_container->add_child(close_button); + } + + toasts[panel].severity = p_severity; + if (p_time > 0.0) { + toasts[panel].duration = p_time; + toasts[panel].remaining_time = p_time; + } else { + toasts[panel].duration = -1.0; + } + toasts[panel].popped = true; + vbox_container->add_child(panel); + _auto_hide_or_free_toasts(); + _update_vbox_position(); + _update_disable_notifications_button(); + main_button->update(); + + return panel; +} + +void EditorToaster::popup_str(String p_message, Severity p_severity, String p_tooltip) { + // Check if we already have a popup with the given message. + Control *control = nullptr; + for (KeyValue<Control *, Toast> element : toasts) { + if (element.value.message == p_message && element.value.severity == p_severity && element.value.tooltip == p_tooltip) { + control = element.key; + break; + } + } + + // Create a new message if needed. + if (control == nullptr) { + Label *label = memnew(Label); + + control = popup(label, p_severity, default_message_duration, p_tooltip); + toasts[control].message = p_message; + toasts[control].tooltip = p_tooltip; + toasts[control].count = 1; + } else { + if (toasts[control].popped) { + toasts[control].count += 1; + } else { + toasts[control].count = 1; + } + toasts[control].remaining_time = toasts[control].duration; + toasts[control].popped = true; + control->show(); + vbox_container->move_child(control, vbox_container->get_child_count()); + _auto_hide_or_free_toasts(); + _update_vbox_position(); + _update_disable_notifications_button(); + main_button->update(); + } + + // Retrieve the label back then update the text. + Label *label = Object::cast_to<Label>(control->get_child(0)->get_child(0)); + ERR_FAIL_COND(!label); + if (toasts[control].count == 1) { + label->set_text(p_message); + } else { + label->set_text(vformat("%s (%d)", p_message, toasts[control].count)); + } +} + +void EditorToaster::close(Control *p_control) { + ERR_FAIL_COND(!toasts.has(p_control)); + toasts[p_control].remaining_time = -1.0; + toasts[p_control].popped = false; +} + +EditorToaster *EditorToaster::get_singleton() { + return singleton; +} + +EditorToaster::EditorToaster() { + set_notify_transform(true); + set_process_internal(true); + + // VBox. + vbox_container = memnew(VBoxContainer); + vbox_container->set_as_top_level(true); + vbox_container->connect("resized", callable_mp(this, &EditorToaster::_update_vbox_position)); + add_child(vbox_container); + + // Theming (background). + info_panel_style_background.instantiate(); + info_panel_style_background->set_corner_radius_all(stylebox_radius * EDSCALE); + + warning_panel_style_background.instantiate(); + warning_panel_style_background->set_border_width(SIDE_LEFT, stylebox_radius * EDSCALE); + warning_panel_style_background->set_corner_radius_all(stylebox_radius * EDSCALE); + + error_panel_style_background.instantiate(); + error_panel_style_background->set_border_width(SIDE_LEFT, stylebox_radius * EDSCALE); + error_panel_style_background->set_corner_radius_all(stylebox_radius * EDSCALE); + + Ref<StyleBoxFlat> boxes[] = { info_panel_style_background, warning_panel_style_background, error_panel_style_background }; + for (int i = 0; i < 3; i++) { + boxes[i]->set_default_margin(SIDE_LEFT, int(stylebox_radius * 2.5)); + boxes[i]->set_default_margin(SIDE_RIGHT, int(stylebox_radius * 2.5)); + boxes[i]->set_default_margin(SIDE_TOP, 3); + boxes[i]->set_default_margin(SIDE_BOTTOM, 3); + } + + // Theming (progress). + info_panel_style_progress.instantiate(); + info_panel_style_progress->set_corner_radius_all(stylebox_radius * EDSCALE); + + warning_panel_style_progress.instantiate(); + warning_panel_style_progress->set_border_width(SIDE_LEFT, stylebox_radius * EDSCALE); + warning_panel_style_progress->set_corner_radius_all(stylebox_radius * EDSCALE); + + error_panel_style_progress.instantiate(); + error_panel_style_progress->set_border_width(SIDE_LEFT, stylebox_radius * EDSCALE); + error_panel_style_progress->set_corner_radius_all(stylebox_radius * EDSCALE); + + // Main button. + main_button = memnew(Button); + main_button->set_flat(true); + main_button->connect("pressed", callable_mp(this, &EditorToaster::_set_notifications_enabled), varray(true)); + main_button->connect("pressed", callable_mp(this, &EditorToaster::_repop_old)); + main_button->connect("draw", callable_mp(this, &EditorToaster::_draw_button)); + add_child(main_button); + + // Disable notification button. + disable_notifications_panel = memnew(PanelContainer); + disable_notifications_panel->set_as_top_level(true); + disable_notifications_panel->add_theme_style_override("panel", info_panel_style_background); + add_child(disable_notifications_panel); + + disable_notifications_button = memnew(Button); + disable_notifications_button->set_flat(true); + disable_notifications_button->connect("pressed", callable_mp(this, &EditorToaster::_set_notifications_enabled), varray(false)); + disable_notifications_panel->add_child(disable_notifications_button); + + // Other + singleton = this; + + eh.errfunc = _error_handler; + add_error_handler(&eh); +}; + +EditorToaster::~EditorToaster() { + singleton = nullptr; + remove_error_handler(&eh); +} diff --git a/editor/editor_toaster.h b/editor/editor_toaster.h new file mode 100644 index 0000000000..aac80d8fb1 --- /dev/null +++ b/editor/editor_toaster.h @@ -0,0 +1,116 @@ +/*************************************************************************/ +/* editor_toaster.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 EDITOR_TOASTER_H +#define EDITOR_TOASTER_H + +#include "scene/gui/box_container.h" +#include "scene/gui/button.h" +#include "scene/gui/popup.h" + +#include "core/string/ustring.h" +#include "core/templates/local_vector.h" + +class EditorToaster : public HBoxContainer { + GDCLASS(EditorToaster, HBoxContainer); + +public: + enum Severity { + SEVERITY_INFO = 0, + SEVERITY_WARNING, + SEVERITY_ERROR, + }; + +private: + ErrorHandlerList eh; + + const int stylebox_radius = 3; + + Ref<StyleBoxFlat> info_panel_style_background; + Ref<StyleBoxFlat> warning_panel_style_background; + Ref<StyleBoxFlat> error_panel_style_background; + + Ref<StyleBoxFlat> info_panel_style_progress; + Ref<StyleBoxFlat> warning_panel_style_progress; + Ref<StyleBoxFlat> error_panel_style_progress; + + Button *main_button; + PanelContainer *disable_notifications_panel; + Button *disable_notifications_button; + + VBoxContainer *vbox_container; + const int max_temporary_count = 5; + struct Toast { + Severity severity = SEVERITY_INFO; + + // Timing. + real_t duration = -1.0; + real_t remaining_time = 0.0; + bool popped = false; + + // Messages + String message; + String tooltip; + int count = 0; + }; + Map<Control *, Toast> toasts; + + const double default_message_duration = 5.0; + + static void _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); + void _update_vbox_position(); + void _update_disable_notifications_button(); + void _auto_hide_or_free_toasts(); + + void _draw_button(); + void _draw_progress(Control *panel); + + void _set_notifications_enabled(bool p_enabled); + void _repop_old(); + +protected: + static EditorToaster *singleton; + + void _notification(int p_what); + +public: + static EditorToaster *get_singleton(); + + Control *popup(Control *p_control, Severity p_severity = SEVERITY_INFO, double p_time = 0.0, String p_tooltip = String()); + void popup_str(String p_message, Severity p_severity = SEVERITY_INFO, String p_tooltip = String()); + void close(Control *p_control); + + EditorToaster(); + ~EditorToaster(); +}; + +VARIANT_ENUM_CAST(EditorToaster::Severity); + +#endif // EDITOR_TOASTER_H diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp index b646b3361d..cb88e9d75e 100644 --- a/editor/export_template_manager.cpp +++ b/editor/export_template_manager.cpp @@ -743,7 +743,7 @@ void ExportTemplateManager::_notification(int p_what) { current_missing_label->add_theme_color_override("font_color", get_theme_color(SNAME("error_color"), SNAME("Editor"))); current_installed_label->add_theme_color_override("font_color", get_theme_color(SNAME("disabled_font_color"), SNAME("Editor"))); - mirror_options_button->set_icon(get_theme_icon(SNAME("GuiTabMenu"), SNAME("EditorIcons"))); + mirror_options_button->set_icon(get_theme_icon(SNAME("GuiTabMenuHl"), SNAME("EditorIcons"))); } break; case NOTIFICATION_VISIBILITY_CHANGED: { diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 5dd5c050e0..1d1976d7e5 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -106,7 +106,7 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory List<FileInfo> file_list; for (int i = 0; i < p_dir->get_file_count(); i++) { String file_type = p_dir->get_file_type(i); - if (_is_file_type_disabled_by_feature_profile(file_type)) { + if (file_type != "TextFile" && _is_file_type_disabled_by_feature_profile(file_type)) { // If type is disabled, file won't be displayed. continue; } @@ -1175,7 +1175,7 @@ void FileSystemDock::_try_move_item(const FileOrFolder &p_item, const String &p_ EditorData *ed = &editor->get_editor_data(); for (int j = 0; j < ed->get_edited_scene_count(); j++) { if (ed->get_scene_path(j) == file_changed_paths[i]) { - ed->get_edited_scene_root(j)->set_filename(new_item_path); + ed->get_edited_scene_root(j)->set_scene_file_path(new_item_path); editor->save_layout(); break; } @@ -1260,7 +1260,7 @@ void FileSystemDock::_update_resource_paths_after_move(const Map<String, String> continue; } - path = get_tree()->get_edited_scene_root()->get_filename(); + path = get_tree()->get_edited_scene_root()->get_scene_file_path(); } else { path = EditorNode::get_editor_data().get_scene_path(i); } @@ -1270,7 +1270,7 @@ void FileSystemDock::_update_resource_paths_after_move(const Map<String, String> } if (i == EditorNode::get_editor_data().get_edited_scene()) { - get_tree()->get_edited_scene_root()->set_filename(path); + get_tree()->get_edited_scene_root()->set_scene_file_path(path); } else { EditorNode::get_editor_data().set_scene_path(i, path); } @@ -1301,11 +1301,11 @@ void FileSystemDock::_update_dependencies_after_move(const Map<String, String> & void FileSystemDock::_update_project_settings_after_move(const Map<String, String> &p_renames) const { // Find all project settings of type FILE and replace them if needed. const Map<StringName, PropertyInfo> prop_info = ProjectSettings::get_singleton()->get_custom_property_info(); - for (const Map<StringName, PropertyInfo>::Element *E = prop_info.front(); E; E = E->next()) { - if (E->get().hint == PROPERTY_HINT_FILE) { - String old_path = GLOBAL_GET(E->key()); + for (const KeyValue<StringName, PropertyInfo> &E : prop_info) { + if (E.value.hint == PROPERTY_HINT_FILE) { + String old_path = GLOBAL_GET(E.key); if (p_renames.has(old_path)) { - ProjectSettings::get_singleton()->set_setting(E->key(), p_renames[old_path]); + ProjectSettings::get_singleton()->set_setting(E.key, p_renames[old_path]); } }; } @@ -1954,6 +1954,13 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected case FILE_NEW_RESOURCE: { new_resource_dialog->popup_create(true); } break; + case FILE_NEW_TEXTFILE: { + String fpath = path; + if (!fpath.ends_with("/")) { + fpath = fpath.get_base_dir(); + } + ScriptEditor::get_singleton()->open_text_file_create_dialog(fpath); + } break; } } @@ -2473,6 +2480,7 @@ void FileSystemDock::_file_and_folders_fill_popup(PopupMenu *p_popup, Vector<Str p_popup->add_icon_item(get_theme_icon(SNAME("PackedScene"), SNAME("EditorIcons")), TTR("New Scene..."), FILE_NEW_SCENE); p_popup->add_icon_item(get_theme_icon(SNAME("Script"), SNAME("EditorIcons")), TTR("New Script..."), FILE_NEW_SCRIPT); p_popup->add_icon_item(get_theme_icon(SNAME("Object"), SNAME("EditorIcons")), TTR("New Resource..."), FILE_NEW_RESOURCE); + p_popup->add_icon_item(get_theme_icon(SNAME("TextFile"), SNAME("EditorIcons")), TTR("New TextFile..."), FILE_NEW_TEXTFILE); p_popup->add_separator(); } @@ -2513,6 +2521,7 @@ void FileSystemDock::_tree_rmb_empty(const Vector2 &p_pos) { tree_popup->add_icon_item(get_theme_icon(SNAME("PackedScene"), SNAME("EditorIcons")), TTR("New Scene..."), FILE_NEW_SCENE); tree_popup->add_icon_item(get_theme_icon(SNAME("Script"), SNAME("EditorIcons")), TTR("New Script..."), FILE_NEW_SCRIPT); tree_popup->add_icon_item(get_theme_icon(SNAME("Object"), SNAME("EditorIcons")), TTR("New Resource..."), FILE_NEW_RESOURCE); + tree_popup->add_icon_item(get_theme_icon(SNAME("TextFile"), SNAME("EditorIcons")), TTR("New TextFile..."), FILE_NEW_TEXTFILE); tree_popup->set_position(tree->get_global_position() + p_pos); tree_popup->popup(); } @@ -2558,6 +2567,7 @@ void FileSystemDock::_file_list_rmb_pressed(const Vector2 &p_pos) { file_list_popup->add_icon_item(get_theme_icon(SNAME("PackedScene"), SNAME("EditorIcons")), TTR("New Scene..."), FILE_NEW_SCENE); file_list_popup->add_icon_item(get_theme_icon(SNAME("Script"), SNAME("EditorIcons")), TTR("New Script..."), FILE_NEW_SCRIPT); file_list_popup->add_icon_item(get_theme_icon(SNAME("Object"), SNAME("EditorIcons")), TTR("New Resource..."), FILE_NEW_RESOURCE); + file_list_popup->add_icon_item(get_theme_icon(SNAME("TextFile"), SNAME("EditorIcons")), TTR("New TextFile..."), FILE_NEW_TEXTFILE); file_list_popup->add_separator(); file_list_popup->add_icon_item(get_theme_icon(SNAME("Filesystem"), SNAME("EditorIcons")), TTR("Open in File Manager"), FILE_SHOW_IN_EXPLORER); file_list_popup->set_position(files->get_global_position() + p_pos); diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h index 21a7abe622..73bdd685b7 100644 --- a/editor/filesystem_dock.h +++ b/editor/filesystem_dock.h @@ -101,6 +101,7 @@ private: FILE_SHOW_IN_EXPLORER, FILE_COPY_PATH, FILE_NEW_RESOURCE, + FILE_NEW_TEXTFILE, FOLDER_EXPAND_ALL, FOLDER_COLLAPSE_ALL, }; diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp index 9444706fd2..b61f6e12eb 100644 --- a/editor/find_in_files.cpp +++ b/editor/find_in_files.cpp @@ -233,8 +233,9 @@ void FindInFiles::_scan_dir(String path, PackedStringArray &out_folders) { break; } - // Ignore special dirs (such as .git and .import) - if (file == "." || file == ".." || file.begins_with(".")) { + // Ignore special dirs (such as .git and project data directory) + String project_data_dir_name = ProjectSettings::get_singleton()->get_project_data_dir_name(); + if (file.begins_with(".") || file.begins_with(project_data_dir_name)) { continue; } if (dir->current_is_hidden()) { @@ -840,8 +841,8 @@ void FindInFilesPanel::_on_replace_all_clicked() { PackedStringArray modified_files; - for (Map<String, TreeItem *>::Element *E = _file_items.front(); E; E = E->next()) { - TreeItem *file_item = E->value(); + for (KeyValue<String, TreeItem *> &E : _file_items) { + TreeItem *file_item = E.value; String fpath = file_item->get_metadata(0); Vector<Result> locations; diff --git a/editor/icons/Breakpoint.svg b/editor/icons/Breakpoint.svg new file mode 100644 index 0000000000..b95c2b511e --- /dev/null +++ b/editor/icons/Breakpoint.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"><path d="m15 8c0 3.866-3.134 7-7 7s-7-3.134-7-7 3.134-7 7-7 7 3.134 7 7" fill="#e1e1e1"/><pathd="m12 8c0 2.209-1.791 4-4 4s-4-1.791-4-4 1.791-4 4-4 4 1.791 4 4" fill="#f6f6f6"/></svg> diff --git a/editor/icons/EditorBoneHandle.svg b/editor/icons/EditorBoneHandle.svg new file mode 100644 index 0000000000..a6d7c3f878 --- /dev/null +++ b/editor/icons/EditorBoneHandle.svg @@ -0,0 +1 @@ +<svg height="8" viewBox="0 0 8 8" width="8" xmlns="http://www.w3.org/2000/svg"><circle cx="4" cy="4" fill="#fff" r="4"/><circle cx="4" cy="4" fill="#000" r="2.5"/></svg> diff --git a/editor/icons/KeyBlendShape.svg b/editor/icons/KeyBlendShape.svg new file mode 100644 index 0000000000..42f7341942 --- /dev/null +++ b/editor/icons/KeyBlendShape.svg @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + height="10" + viewBox="0 0 10 10" + width="10" + version="1.1" + id="svg80" + sodipodi:docname="KeyBlendShape.svg" + inkscape:version="1.1 (1:1.1+202106031931+af4d65493e)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <defs + id="defs84" /> + <sodipodi:namedview + id="namedview82" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + inkscape:pagecheckerboard="0" + showgrid="false" + inkscape:zoom="84.4" + inkscape:cx="2.6599526" + inkscape:cy="5.0059242" + inkscape:window-width="1848" + inkscape:window-height="1016" + inkscape:window-x="72" + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:current-layer="svg80" /> + <rect + fill="#3cf34e" + height="6.1027" + ry=".76286" + transform="matrix(.70710678 -.70710678 .70710678 .70710678 0 -1042.4)" + width="6.1027" + x="-740.13947" + y="741.10779" + id="rect78" + style="fill:#5ad5c4;fill-opacity:1" /> +</svg> diff --git a/editor/icons/KeyTrackBlendShape.svg b/editor/icons/KeyTrackBlendShape.svg new file mode 100644 index 0000000000..e82f0d6a6f --- /dev/null +++ b/editor/icons/KeyTrackBlendShape.svg @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + height="10" + viewBox="0 0 10 10" + width="10" + version="1.1" + id="svg12" + sodipodi:docname="KeyTrackBlendShape.svg" + inkscape:version="1.1 (1:1.1+202106031931+af4d65493e)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <defs + id="defs16" /> + <sodipodi:namedview + id="namedview14" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + inkscape:pagecheckerboard="0" + showgrid="false" + inkscape:zoom="29.839906" + inkscape:cx="-3.5690461" + inkscape:cy="9.0985541" + inkscape:window-width="1848" + inkscape:window-height="1016" + inkscape:window-x="72" + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:current-layer="svg12" /> + <ellipse + style="fill:none;fill-opacity:0.401212;stroke:none;stroke-width:4.7811;stroke-linejoin:round" + id="path921" + cx="-0.88986981" + cy="6.0959954" + rx="1.2495773" + ry="1.0867468" /> + <path + id="path1910" + style="color:#000000;fill:#5ad5c4;stroke-linejoin:round;-inkscape-stroke:none" + d="m 4.5230825,1.1341567 c -2.1310744,0.017055 -3.86718737,1.7635044 -3.86718737,3.8984375 0,1.8778511 1.34348597,3.4523891 3.11718737,3.8164061 L 3.95277,7.5794693 C 2.7929991,7.3095662 1.9351921,6.2780435 1.9351921,5.0325942 c 0,-1.4262775 1.123493,-2.5732858 2.5390622,-2.6152344 v 0.017578 h 0.2011719 l 0.1796875,-1.28125 H 4.5230825 v -0.011719 c 0,-0.00263 -2.64e-5,-0.00518 0,-0.00781 z m 1.6816406,0.019531 -0.1796875,1.28125 h 1.3085937 c 0.078866,0 0.1230469,0.044181 0.1230469,0.1230469 v 4.9882815 c 0,0.07887 -0.044181,0.121093 -0.1230469,0.121094 H 5.2887075 L 5.10902,8.9486103 h 2.2246093 c 0.7663818,0 1.4042969,-0.635962 1.4042969,-1.402344 V 2.5579848 c 0,-0.7663818 -0.637915,-1.4042969 -1.4042969,-1.4042969 z" /> +</svg> diff --git a/editor/icons/KeyTrackPosition.svg b/editor/icons/KeyTrackPosition.svg new file mode 100644 index 0000000000..05c6e88841 --- /dev/null +++ b/editor/icons/KeyTrackPosition.svg @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + height="10" + viewBox="0 0 10 10" + width="10" + version="1.1" + id="svg12" + sodipodi:docname="KeyTrackPosition.svg" + inkscape:version="1.1 (1:1.1+202106031931+af4d65493e)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <defs + id="defs16" /> + <sodipodi:namedview + id="namedview14" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + inkscape:pagecheckerboard="0" + showgrid="false" + inkscape:zoom="42.2" + inkscape:cx="12.78436" + inkscape:cy="6.1729858" + inkscape:window-width="1848" + inkscape:window-height="1016" + inkscape:window-x="72" + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:current-layer="svg12" /> + <ellipse + style="fill:none;fill-opacity:0.401212;stroke:none;stroke-width:4.7811;stroke-linejoin:round" + id="path921" + cx="-0.88986981" + cy="6.0959954" + rx="1.2495773" + ry="1.0867468" /> + <path + d="M 4.949661,0.60426977 A 0.6444116,0.6444116 0 0 0 4.504153,0.79178767 L 3.215459,2.0804819 4.12663,2.9916532 4.95977,2.1585124 5.792911,2.9916532 6.704083,2.0804819 5.415388,0.79178767 A 0.6444116,0.6444116 0 0 0 4.949744,0.60426977 Z M 1.926771,3.3691634 0.638077,4.6578577 a 0.6444116,0.6444116 0 0 0 0,0.9111713 L 1.926771,6.8577233 2.837942,5.946552 2.004801,5.1134111 2.837942,4.2802702 1.926771,3.3690989 Z m 6.065948,0 -0.911171,0.9111713 0.83314,0.8331409 -0.83314,0.8331408 0.911171,0.9111714 1.288694,-1.2886944 a 0.6444116,0.6444116 0 0 0 0,-0.9111713 L 7.992719,3.3692278 Z M 4.959777,3.8247361 A 1.2886943,1.2886943 0 0 0 3.671083,5.1134305 1.2886943,1.2886943 0 0 0 4.959777,6.4021248 1.2886943,1.2886943 0 0 0 6.248471,5.1134305 1.2886943,1.2886943 0 0 0 4.959777,3.8247361 Z m -0.83314,3.4105296 -0.911172,0.9111715 1.288694,1.288694 a 0.6444116,0.6444116 0 0 0 0.911171,0 L 6.704025,8.1464372 5.792853,7.2352657 4.959712,8.0684062 4.126572,7.2352657 Z" + fill="#e0e0e0" + fill-opacity="0.99608" + id="path1400" + style="fill:#ea7940;fill-opacity:1;stroke-width:0.644347" /> +</svg> diff --git a/editor/icons/KeyTrackRotation.svg b/editor/icons/KeyTrackRotation.svg new file mode 100644 index 0000000000..d05e381eb2 --- /dev/null +++ b/editor/icons/KeyTrackRotation.svg @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + height="10" + viewBox="0 0 10 10" + width="10" + version="1.1" + id="svg12" + sodipodi:docname="KeyTrackRotation.svg" + inkscape:version="1.1 (1:1.1+202106031931+af4d65493e)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <defs + id="defs16" /> + <sodipodi:namedview + id="namedview14" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + inkscape:pagecheckerboard="0" + showgrid="false" + inkscape:zoom="42.2" + inkscape:cx="1.9075829" + inkscape:cy="5.8175355" + inkscape:window-width="1848" + inkscape:window-height="1016" + inkscape:window-x="72" + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:current-layer="svg12" /> + <ellipse + style="fill:none;fill-opacity:0.401212;stroke:none;stroke-width:4.7811;stroke-linejoin:round" + id="path921" + cx="-0.88986981" + cy="6.0959954" + rx="1.2495773" + ry="1.0867468" /> + <path + d="m 5.0711986,0.88214062 a 4.1086779,4.1086779 0 0 0 -0.178839,0.00115 4.1086779,4.1086779 0 0 0 -0.409265,0.033245 A 4.1086779,4.1086779 0 0 0 0.99001362,4.1883346 4.1086779,4.1086779 0 0 0 2.1467236,7.9244144 h -0.648877 v 1.1739077 h 2.347816 a 0.58701268,0.58701268 0 0 0 0.569756,-0.729119 l -0.586953,-2.3478164 -1.139514,0.2854534 0.165082,0.6580347 a 2.9347699,2.9347699 0 0 1 -0.769204,-1.9752178 2.9347699,2.9347699 0 0 1 2.93477,-2.93477 2.9347699,2.9347699 0 0 1 2.93477,2.93477 2.9347699,2.9347699 0 0 1 -0.860944,2.0738257 l 0.831127,0.8311266 A 4.1086779,4.1086779 0 0 0 8.7040866,3.1726236 4.1086779,4.1086779 0 0 0 5.0711336,0.88215292 Z m -0.05159,2.93359608 a 1.173908,1.173908 0 0 0 -1.173907,1.173908 1.173908,1.173908 0 0 0 1.173907,1.173908 1.173908,1.173908 0 0 0 1.173909,-1.173908 1.173908,1.173908 0 0 0 -1.173909,-1.173908 z" + fill="#e0e0e0" + fill-opacity="0.99608" + id="path1165" + style="fill:#ff2b88;fill-opacity:1;stroke-width:0.586954" /> +</svg> diff --git a/editor/icons/KeyTrackScale.svg b/editor/icons/KeyTrackScale.svg new file mode 100644 index 0000000000..9269ccbca2 --- /dev/null +++ b/editor/icons/KeyTrackScale.svg @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + height="10" + viewBox="0 0 10 10" + width="10" + version="1.1" + id="svg12" + sodipodi:docname="KeyTrackScale.svg" + inkscape:version="1.1 (1:1.1+202106031931+af4d65493e)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <defs + id="defs16" /> + <sodipodi:namedview + id="namedview14" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + inkscape:pagecheckerboard="0" + showgrid="false" + inkscape:zoom="42.2" + inkscape:cx="1.9075829" + inkscape:cy="5.8175355" + inkscape:window-width="1848" + inkscape:window-height="1016" + inkscape:window-x="72" + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:current-layer="svg12" /> + <ellipse + style="fill:none;fill-opacity:0.401212;stroke:none;stroke-width:4.7811;stroke-linejoin:round" + id="path921" + cx="-0.88986981" + cy="6.0959954" + rx="1.2495773" + ry="1.0867468" /> + <path + d="M 5.5742494,0.94786723 A 0.58774585,0.58774585 0 0 0 4.9865036,1.535613 0.58774585,0.58774585 0 0 0 5.5742494,2.1233589 h 1.519852 L 6.334146,2.8833142 7.1652774,3.7144456 7.9252328,2.9544903 V 4.4743422 A 0.58774585,0.58774585 0 0 0 8.5129787,5.0620881 0.58774585,0.58774585 0 0 0 9.1007245,4.4743422 V 1.535613 A 0.58780462,0.58780462 0 0 0 8.5129787,0.94786723 Z M 4.9865036,3.8865964 A 1.1754917,1.1754917 0 0 0 3.8110119,5.0620881 1.1754917,1.1754917 0 0 0 4.9865036,6.2375798 1.1754917,1.1754917 0 0 0 6.1619953,5.0620881 1.1754917,1.1754917 0 0 0 4.9865036,3.8865964 Z M 1.4600285,5.0620881 A 0.58774585,0.58774585 0 0 0 0.8722826,5.6498339 V 8.5885638 A 0.58780462,0.58780462 0 0 0 1.4600285,9.1763092 H 4.3987577 A 0.58774585,0.58774585 0 0 0 4.9865036,8.5885638 0.58774585,0.58774585 0 0 0 4.3987577,8.0008173 H 2.8789057 L 3.6388611,7.2408619 2.8077297,6.4097305 2.0477743,7.1696859 V 5.6498339 A 0.58774585,0.58774585 0 0 0 1.4600285,5.0620881 Z" + fill="#e0e0e0" + fill-opacity="0.99608" + id="path7" + style="fill:#eac840;fill-opacity:1;stroke-width:0.587745" /> +</svg> diff --git a/editor/icons/KeyXPosition.svg b/editor/icons/KeyXPosition.svg new file mode 100644 index 0000000000..5816a241c9 --- /dev/null +++ b/editor/icons/KeyXPosition.svg @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + height="10" + viewBox="0 0 10 10" + width="10" + version="1.1" + id="svg1678" + sodipodi:docname="KeyXPosition.svg" + inkscape:version="1.1 (1:1.1+202106031931+af4d65493e)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <defs + id="defs1682" /> + <sodipodi:namedview + id="namedview1680" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + inkscape:pagecheckerboard="0" + showgrid="false" + inkscape:zoom="84.4" + inkscape:cx="4.9940758" + inkscape:cy="5.0059242" + inkscape:window-width="1848" + inkscape:window-height="1016" + inkscape:window-x="72" + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:current-layer="svg1678" /> + <rect + fill="#ea7940" + height="6.1027" + ry=".76286" + transform="matrix(.70710678 -.70710678 .70710678 .70710678 0 -1042.4)" + width="6.1027" + x="-740.13947" + y="741.10779" + id="rect1676" /> +</svg> diff --git a/editor/icons/KeyXRotation.svg b/editor/icons/KeyXRotation.svg new file mode 100644 index 0000000000..6cd5a67ac0 --- /dev/null +++ b/editor/icons/KeyXRotation.svg @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + height="10" + viewBox="0 0 10 10" + width="10" + version="1.1" + id="svg1678" + sodipodi:docname="KeyXRotation.svg" + inkscape:version="1.1 (1:1.1+202106031931+af4d65493e)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <defs + id="defs1682" /> + <sodipodi:namedview + id="namedview1680" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + inkscape:pagecheckerboard="0" + showgrid="false" + inkscape:zoom="84.4" + inkscape:cx="0.32582938" + inkscape:cy="5.0059242" + inkscape:window-width="1848" + inkscape:window-height="1016" + inkscape:window-x="72" + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:current-layer="svg1678" /> + <rect + fill="#ea7940" + height="6.1027002" + ry="0.76286" + transform="rotate(-45,-1258.2881,-521.2)" + width="6.1030002" + x="-740.13947" + y="741.10779" + id="rect1676" + style="fill:#ee3c94;fill-opacity:1" /> +</svg> diff --git a/editor/icons/KeyXScale.svg b/editor/icons/KeyXScale.svg new file mode 100644 index 0000000000..588fa5d2f3 --- /dev/null +++ b/editor/icons/KeyXScale.svg @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + height="10" + viewBox="0 0 10 10" + width="10" + version="1.1" + id="svg1678" + sodipodi:docname="KeyXScale.svg" + inkscape:version="1.1 (1:1.1+202106031931+af4d65493e)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <defs + id="defs1682" /> + <sodipodi:namedview + id="namedview1680" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + inkscape:pagecheckerboard="0" + showgrid="false" + inkscape:zoom="84.4" + inkscape:cx="2.6658768" + inkscape:cy="5.0059242" + inkscape:window-width="1473" + inkscape:window-height="752" + inkscape:window-x="122" + inkscape:window-y="114" + inkscape:window-maximized="0" + inkscape:current-layer="svg1678" /> + <rect + fill="#ea7940" + height="6.1027002" + ry="0.76286" + transform="rotate(-45,-1258.2881,-521.2)" + width="6.1030002" + x="-740.13947" + y="741.10779" + id="rect1676" + style="fill:#dbbf4f;fill-opacity:1" /> +</svg> diff --git a/editor/icons/Notification.svg b/editor/icons/Notification.svg new file mode 100644 index 0000000000..1f1f9c3e15 --- /dev/null +++ b/editor/icons/Notification.svg @@ -0,0 +1 @@ +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m12.089506 1.2353795c-.498141-.2384823-1.095292-.027987-1.333775.4701537-.01372.028981-.02341.059557-.03428.089693-.01467.023016-.02777.046925-.04071.071459-.04899-.00527-.09728-.00862-.146087-.011473-1.4730257-.6255101-3.1777024.0153376-3.8738627 1.4563251l-1.7272425 3.6078572s-.3364181.7034345-.8079671 1.1268133c-.00105.0009371-.00239.00174-.00344.00268-.2721193.1337295-.5707545.185826-.8605632.0470816-.4981411-.2384824-1.0952924-.0279876-1.3337749.4701537-.01605.033526-.029907.066894-.041944.1011828-.018769.030371-.036749.06319-.052515.096122-.2384825.4981412-.027988 1.0952923.4701537 1.3337751l9.0196437 4.318106c.498141.238482 1.095292.02799 1.333775-.470154.01577-.03293.0301-.0675.04191-.1012.0192-.03086.0365-.06257.05255-.0961.238483-.498141.02799-1.095292-.470153-1.333775-.901965-.43181-.03834-2.235739-.03834-2.235739l1.727237-3.6078618c.715447-1.4944233.08396-3.2858776-1.410461-4.0013247.238482-.4981411.02799-1.0952926-.470154-1.333775zm-5.5145786 11.3714015c-.322341.673306-.037829 1.480435.6354753 1.802775.6733031.32234 1.4804334.03783 1.8027749-.635476z" fill="#e6e6e6"/></svg> diff --git a/editor/icons/NotificationDisabled.svg b/editor/icons/NotificationDisabled.svg new file mode 100644 index 0000000000..0e4465bee8 --- /dev/null +++ b/editor/icons/NotificationDisabled.svg @@ -0,0 +1 @@ +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m11.705078 1.1386719c-.389281-.0180576-.770356.1928007-.949219.5664062-.01372.028981-.024286.0597078-.035156.0898438-.01467.023016-.026122.0477316-.039062.0722656-.04899-.00527-.097678-.0088657-.146485-.0117187-1.4730253-.6255102-3.1788394.0160437-3.8749998 1.4570312l-1.7265624 3.6074219s-.3370448.7035743-.8085938 1.1269531l-.0019531.0019531c-.2721193.1337295-.5715196.1856194-.8613281.046875-.4981413-.2384824-1.0955019-.0274382-1.3339844.4707031-.01605.0335262-.0289787.0672737-.0410156.1015626-.0187691.0303709-.0369684.0627711-.0527344.0957031-.2384825.4981412-.0293917 1.0955019.46875 1.3339841l.3398437.16211 10.8984379-6.9394535c-.263272-.3070418-.592225-.5660832-.980469-.7519531.238482-.4981411.027441-1.0935489-.470703-1.3320313-.124536-.0596206-.255006-.091637-.384766-.0976562zm2.435547 2.8652343a.94188849 1 0 0 0 -.566406.1386719l-12.1171878 7.7148439a.94188849 1 0 0 0 -.3222656 1.373047.94188849 1 0 0 0 1.2910156.341797l12.1171878-7.7148441a.94188849 1 0 0 0 .322265-1.3710938.94188849 1 0 0 0 -.724609-.4824219zm-.509766 3.2753907-7.3867184 4.7050781 5.0781254 2.431641c.498141.238482 1.095501.027442 1.333984-.470704.01577-.03293.031159-.067862.042969-.101562.0192-.03086.036684-.062173.052734-.095703.238483-.498141.02744-1.095501-.470703-1.333985-.901965-.431809-.039063-2.236328-.039062-2.236328zm-7.0566402 5.3281251c-.322341.673306-.0365856 1.480394.6367187 1.802734.6733031.32234 1.4803929.036588 1.8027344-.636718z" fill="#e6e6e6"/></svg> diff --git a/editor/icons/Tabs.svg b/editor/icons/TabBar.svg index e20a1a0131..e20a1a0131 100644 --- a/editor/icons/Tabs.svg +++ b/editor/icons/TabBar.svg diff --git a/editor/icons/ToolBoneSelect.svg b/editor/icons/ToolBoneSelect.svg new file mode 100644 index 0000000000..cc12b69a82 --- /dev/null +++ b/editor/icons/ToolBoneSelect.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="m16 11.46-6.142-2.527-1.572-.647.647 1.572 2.527 6.142.913-2.72 1.815 1.817.91-.909-1.818-1.815z"/><path d="m7.784 11.008-.886-2.152c-.23-.56-.102-1.203.327-1.631.287-.287.67-.439 1.061-.439.192 0 .386.037.57.113l2.151.885.17-.17c.977.645 2.271.516 3.1-.311.964-.963.964-2.524 0-3.488-.377-.377-.867-.622-1.396-.697-.074-.529-.318-1.019-.695-1.397-.455-.453-1.067-.711-1.707-.721-.667-.01-1.309.25-1.782.72-.828.829-.96 2.126-.314 3.105l-3.558 3.561c-.978-.646-2.274-.515-3.103.312-.963.962-.963 2.524 0 3.487.378.377.868.621 1.396.695.075.529.319 1.02.696 1.396.963.964 2.525.964 3.488 0 .828-.828.96-2.125.314-3.104z"/></g></svg> diff --git a/editor/import/collada.cpp b/editor/import/collada.cpp index b6d0927ce6..4cd9066350 100644 --- a/editor/import/collada.cpp +++ b/editor/import/collada.cpp @@ -2095,19 +2095,19 @@ void Collada::_merge_skeletons(VisualScene *p_vscene, Node *p_node) { } void Collada::_merge_skeletons2(VisualScene *p_vscene) { - for (Map<String, SkinControllerData>::Element *E = state.skin_controller_data_map.front(); E; E = E->next()) { - SkinControllerData &cd = E->get(); + for (KeyValue<String, SkinControllerData> &E : state.skin_controller_data_map) { + SkinControllerData &cd = E.value; NodeSkeleton *skeleton = nullptr; - for (Map<String, Transform3D>::Element *F = cd.bone_rest_map.front(); F; F = F->next()) { + for (const KeyValue<String, Transform3D> &F : cd.bone_rest_map) { String name; - if (!state.sid_to_node_map.has(F->key())) { + if (!state.sid_to_node_map.has(F.key)) { continue; } - name = state.sid_to_node_map[F->key()]; + name = state.sid_to_node_map[F.key]; ERR_CONTINUE(!state.scene_map.has(name)); @@ -2248,9 +2248,9 @@ bool Collada::_move_geometry_to_skeletons(VisualScene *p_vscene, Node *p_node, L p_node->default_transform = skel_inv * (skin.bind_shape /* p_node->get_global_transform()*/); // i honestly have no idea what to do with a previous model xform.. most exporters ignore it //make rests relative to the skeleton (they seem to be always relative to world) - for (Map<String, Transform3D>::Element *E = skin.bone_rest_map.front(); E; E = E->next()) { - E->get() = skel_inv * E->get(); //make the bone rest local to the skeleton - state.bone_rest_map[E->key()] = E->get(); // make it remember where the bone is globally, now that it's relative + for (KeyValue<String, Transform3D> &E : skin.bone_rest_map) { + E.value = skel_inv * E.value; //make the bone rest local to the skeleton + state.bone_rest_map[E.key] = E.value; // make it remember where the bone is globally, now that it's relative } //but most exporters seem to work only if i do this.. @@ -2302,8 +2302,8 @@ void Collada::_find_morph_nodes(VisualScene *p_vscene, Node *p_node) { } void Collada::_optimize() { - for (Map<String, VisualScene>::Element *E = state.visual_scene_map.front(); E; E = E->next()) { - VisualScene &vs = E->get(); + for (KeyValue<String, VisualScene> &E : state.visual_scene_map) { + VisualScene &vs = E.value; for (int i = 0; i < vs.root_nodes.size(); i++) { _create_skeletons(&vs.root_nodes.write[i]); } diff --git a/editor/import/dynamicfont_import_settings.cpp b/editor/import/dynamicfont_import_settings.cpp index 9a8abfa5c6..474c9d5296 100644 --- a/editor/import/dynamicfont_import_settings.cpp +++ b/editor/import/dynamicfont_import_settings.cpp @@ -1011,9 +1011,10 @@ void DynamicFontImportSettings::_glyph_text_selected() { if (text_rid.is_valid()) { TS->shaped_text_add_string(text_rid, text_edit->get_text(), font_main->get_rids(), 16, ftrs, text_edit->get_language()); TS->shaped_text_shape(text_rid); - const Vector<TextServer::Glyph> &gl = TS->shaped_text_get_glyphs(text_rid); + const Glyph *gl = TS->shaped_text_get_glyphs(text_rid); + const int gl_size = TS->shaped_text_get_glyph_count(text_rid); - for (int i = 0; i < gl.size(); i++) { + for (int i = 0; i < gl_size; i++) { if (gl[i].font_rid.is_valid() && gl[i].index != 0) { selected_glyphs.insert(gl[i].index); } diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index 7ab80ac3b4..ac8adedf2f 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -33,8 +33,8 @@ #include "core/os/os.h" #include "editor/editor_node.h" #include "editor/import/collada.h" -#include "editor/import/scene_importer_mesh_node_3d.h" #include "scene/3d/camera_3d.h" +#include "scene/3d/importer_mesh_instance_3d.h" #include "scene/3d/light_3d.h" #include "scene/3d/mesh_instance_3d.h" #include "scene/3d/node_3d.h" @@ -42,6 +42,7 @@ #include "scene/3d/skeleton_3d.h" #include "scene/animation/animation_player.h" #include "scene/resources/animation.h" +#include "scene/resources/importer_mesh.h" #include "scene/resources/packed_scene.h" #include "scene/resources/surface_tool.h" @@ -68,7 +69,7 @@ struct ColladaImport { Map<String, NodeMap> node_map; //map from collada node to engine node Map<String, String> node_name_map; //map from collada node to engine node - Map<String, Ref<EditorSceneImporterMesh>> mesh_cache; + Map<String, Ref<ImporterMesh>> mesh_cache; Map<String, Ref<Curve3D>> curve_cache; Map<String, Ref<Material>> material_cache; Map<Collada::Node *, Skeleton3D *> skeleton_map; @@ -87,11 +88,11 @@ struct ColladaImport { Error _create_scene(Collada::Node *p_node, Node3D *p_parent); Error _create_resources(Collada::Node *p_node, bool p_use_compression); Error _create_material(const String &p_target); - Error _create_mesh_surfaces(bool p_optimize, Ref<EditorSceneImporterMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform3D &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<EditorSceneImporterMesh>> p_morph_meshes = Vector<Ref<EditorSceneImporterMesh>>(), bool p_use_compression = false, bool p_use_mesh_material = false); + Error _create_mesh_surfaces(bool p_optimize, Ref<ImporterMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform3D &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ImporterMesh>> p_morph_meshes = Vector<Ref<ImporterMesh>>(), bool p_use_compression = false, bool p_use_mesh_material = false); Error load(const String &p_path, int p_flags, bool p_force_make_tangents = false, bool p_use_compression = false); void _fix_param_animation_tracks(); - void create_animation(int p_clip, bool p_make_tracks_in_all_bones, bool p_import_value_tracks); - void create_animations(bool p_make_tracks_in_all_bones, bool p_import_value_tracks); + void create_animation(int p_clip, bool p_import_value_tracks); + void create_animations(bool p_import_value_tracks); Set<String> tracks_in_clips; Vector<String> missing_textures; @@ -119,6 +120,15 @@ Error ColladaImport::_populate_skeleton(Skeleton3D *p_skeleton, Collada::Node *p skeleton_bone_map[p_skeleton][joint->sid] = r_bone; + { + Transform3D xform = joint->compute_transform(collada); + xform = collada.fix_transform(xform) * joint->post_transform; + + p_skeleton->set_bone_pose_position(r_bone, xform.origin); + p_skeleton->set_bone_pose_rotation(r_bone, xform.basis.get_rotation_quaternion()); + p_skeleton->set_bone_pose_scale(r_bone, xform.basis.get_scale()); + } + if (collada.state.bone_rest_map.has(joint->sid)) { p_skeleton->set_bone_rest(r_bone, collada.fix_transform(collada.state.bone_rest_map[joint->sid])); //should map this bone to something for animation? @@ -282,8 +292,8 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Node3D *p_parent) { node = memnew(Path3D); } else { //mesh since nothing else - node = memnew(EditorSceneImporterMeshNode3D); - //Object::cast_to<EditorSceneImporterMeshNode3D>(node)->set_flag(GeometryInstance3D::FLAG_USE_BAKED_LIGHT, true); + node = memnew(ImporterMeshInstance3D); + //Object::cast_to<ImporterMeshInstance3D>(node)->set_flag(GeometryInstance3D::FLAG_USE_BAKED_LIGHT, true); } } break; case Collada::Node::TYPE_SKELETON: { @@ -457,7 +467,7 @@ Error ColladaImport::_create_material(const String &p_target) { return OK; } -Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<EditorSceneImporterMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform3D &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<EditorSceneImporterMesh>> p_morph_meshes, bool p_use_compression, bool p_use_mesh_material) { +Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ImporterMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform3D &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ImporterMesh>> p_morph_meshes, bool p_use_compression, bool p_use_mesh_material) { bool local_xform_mirror = p_local_xform.basis.determinant() < 0; if (p_morph_data) { @@ -1087,10 +1097,10 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres } } - if (Object::cast_to<EditorSceneImporterMeshNode3D>(node)) { + if (Object::cast_to<ImporterMeshInstance3D>(node)) { Collada::NodeGeometry *ng2 = static_cast<Collada::NodeGeometry *>(p_node); - EditorSceneImporterMeshNode3D *mi = Object::cast_to<EditorSceneImporterMeshNode3D>(node); + ImporterMeshInstance3D *mi = Object::cast_to<ImporterMeshInstance3D>(node); ERR_FAIL_COND_V(!mi, ERR_BUG); @@ -1099,7 +1109,7 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres String meshid; Transform3D apply_xform; Vector<int> bone_remap; - Vector<Ref<EditorSceneImporterMesh>> morphs; + Vector<Ref<ImporterMesh>> morphs; if (ng2->controller) { String ngsource = ng2->source; @@ -1168,10 +1178,10 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres for (int i = 0; i < names.size(); i++) { String meshid2 = names[i]; if (collada.state.mesh_data_map.has(meshid2)) { - Ref<EditorSceneImporterMesh> mesh = Ref<EditorSceneImporterMesh>(memnew(EditorSceneImporterMesh)); + Ref<ImporterMesh> mesh = Ref<ImporterMesh>(memnew(ImporterMesh)); const Collada::MeshData &meshdata = collada.state.mesh_data_map[meshid2]; mesh->set_name(meshdata.name); - Error err = _create_mesh_surfaces(false, mesh, ng2->material_map, meshdata, apply_xform, bone_remap, skin, nullptr, Vector<Ref<EditorSceneImporterMesh>>(), false); + Error err = _create_mesh_surfaces(false, mesh, ng2->material_map, meshdata, apply_xform, bone_remap, skin, nullptr, Vector<Ref<ImporterMesh>>(), false); ERR_FAIL_COND_V(err, err); morphs.push_back(mesh); @@ -1194,7 +1204,7 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres meshid = ng2->source; } - Ref<EditorSceneImporterMesh> mesh; + Ref<ImporterMesh> mesh; if (mesh_cache.has(meshid)) { mesh = mesh_cache[meshid]; } else { @@ -1202,7 +1212,7 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres //bleh, must ignore invalid ERR_FAIL_COND_V(!collada.state.mesh_data_map.has(meshid), ERR_INVALID_DATA); - mesh = Ref<EditorSceneImporterMesh>(memnew(EditorSceneImporterMesh)); + mesh = Ref<ImporterMesh>(memnew(ImporterMesh)); const Collada::MeshData &meshdata = collada.state.mesh_data_map[meshid]; String name = meshdata.name; if (name == "") { @@ -1314,8 +1324,8 @@ Error ColladaImport::load(const String &p_path, int p_flags, bool p_force_make_t } void ColladaImport::_fix_param_animation_tracks() { - for (Map<String, Collada::Node *>::Element *E = collada.state.scene_map.front(); E; E = E->next()) { - Collada::Node *n = E->get(); + for (KeyValue<String, Collada::Node *> &E : collada.state.scene_map) { + Collada::Node *n = E.value; switch (n->type) { case Collada::Node::TYPE_NODE: { // ? do nothing @@ -1363,7 +1373,7 @@ void ColladaImport::_fix_param_animation_tracks() { for (int rti = 0; rti < rt.size(); rti++) { Collada::AnimationTrack *at = &collada.state.animation_tracks.write[rt[rti]]; - at->target = E->key(); + at->target = E.key; at->param = "morph/" + collada.state.mesh_name_map[mesh_name]; at->property = true; //at->param @@ -1383,7 +1393,7 @@ void ColladaImport::_fix_param_animation_tracks() { } } -void ColladaImport::create_animations(bool p_make_tracks_in_all_bones, bool p_import_value_tracks) { +void ColladaImport::create_animations(bool p_import_value_tracks) { _fix_param_animation_tracks(); for (int i = 0; i < collada.state.animation_clips.size(); i++) { for (int j = 0; j < collada.state.animation_clips[i].tracks.size(); j++) { @@ -1416,13 +1426,13 @@ void ColladaImport::create_animations(bool p_make_tracks_in_all_bones, bool p_im } } - create_animation(-1, p_make_tracks_in_all_bones, p_import_value_tracks); + create_animation(-1, p_import_value_tracks); for (int i = 0; i < collada.state.animation_clips.size(); i++) { - create_animation(i, p_make_tracks_in_all_bones, p_import_value_tracks); + create_animation(i, p_import_value_tracks); } } -void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones, bool p_import_value_tracks) { +void ColladaImport::create_animation(int p_clip, bool p_import_value_tracks) { Ref<Animation> animation = Ref<Animation>(memnew(Animation)); if (p_clip == -1) { @@ -1431,11 +1441,11 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones animation->set_name(collada.state.animation_clips[p_clip].name); } - for (Map<String, NodeMap>::Element *E = node_map.front(); E; E = E->next()) { - if (E->get().bone < 0) { + for (const KeyValue<String, NodeMap> &E : node_map) { + if (E.value.bone < 0) { continue; } - bones_with_animation[E->key()] = false; + bones_with_animation[E.key] = false; } //store and validate tracks @@ -1521,10 +1531,55 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones continue; } - animation->add_track(Animation::TYPE_TRANSFORM3D); - int track = animation->get_track_count() - 1; - animation->track_set_path(track, path); - animation->track_set_imported(track, true); //helps merging later + bool has_position = false; + bool has_rotation = false; + bool has_scale = false; + + for (int i = 0; cn->xform_list.size(); i++) { + switch (cn->xform_list[i].op) { + case Collada::Node::XForm::OP_ROTATE: { + has_rotation = true; + } break; + case Collada::Node::XForm::OP_SCALE: { + has_scale = true; + } break; + case Collada::Node::XForm::OP_TRANSLATE: { + has_position = true; + } break; + case Collada::Node::XForm::OP_MATRIX: { + has_position = true; + has_rotation = true; + has_scale = true; + } break; + case Collada::Node::XForm::OP_VISIBILITY: { + } break; + } + } + + int base_track = animation->get_track_count(); + int position_idx = -1; + if (has_position) { + position_idx = animation->get_track_count(); + animation->add_track(Animation::TYPE_POSITION_3D); + animation->track_set_path(position_idx, path); + animation->track_set_imported(position_idx, true); //helps merging later + } + + int rotation_idx = -1; + if (has_rotation) { + rotation_idx = animation->get_track_count(); + animation->add_track(Animation::TYPE_ROTATION_3D); + animation->track_set_path(rotation_idx, path); + animation->track_set_imported(rotation_idx, true); //helps merging later + } + + int scale_idx = -1; + if (has_scale) { + scale_idx = animation->get_track_count(); + animation->add_track(Animation::TYPE_SCALE_3D); + animation->track_set_path(scale_idx, path); + animation->track_set_imported(scale_idx, true); //helps merging later + } Vector<real_t> snapshots = base_snapshots; @@ -1593,22 +1648,21 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones Transform3D xform = cn->compute_transform(collada); xform = collada.fix_transform(xform) * cn->post_transform; - if (nm.bone >= 0) { - //make bone transform relative to rest (in case of skeleton) - Skeleton3D *sk = Object::cast_to<Skeleton3D>(nm.node); - if (sk) { - xform = sk->get_bone_rest(nm.bone).affine_inverse() * xform; - } else { - ERR_PRINT("Collada: Invalid skeleton"); - } - } - 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; - animation->transform_track_insert_key(track, snapshots[i], l, q, s); + if (position_idx >= 0) { + animation->position_track_insert_key(position_idx, snapshots[i], l); + } + if (rotation_idx >= 0) { + animation->rotation_track_insert_key(rotation_idx, snapshots[i], q); + } + if (scale_idx >= 0) { + animation->scale_track_insert_key(scale_idx, snapshots[i], s); + } } if (nm.bone >= 0) { @@ -1620,48 +1674,15 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones if (found_anim) { tracks_found = true; } else { - animation->remove_track(track); - } - } - - if (p_make_tracks_in_all_bones) { - //some bones may lack animation, but since we don't store pose as a property, we must add keyframes! - for (Map<String, bool>::Element *E = bones_with_animation.front(); E; E = E->next()) { - if (E->get()) { - continue; + if (position_idx >= 0) { + animation->remove_track(base_track); } - - NodeMap &nm = node_map[E->key()]; - String path = scene->get_path_to(nm.node); - ERR_CONTINUE(nm.bone < 0); - Skeleton3D *sk = static_cast<Skeleton3D *>(nm.node); - String name = sk->get_bone_name(nm.bone); - path = path + ":" + name; - - Collada::Node *cn = collada.state.scene_map[E->key()]; - if (cn->ignore_anim) { - WARN_PRINT("Collada: Ignoring animation on node: " + path); - continue; + if (rotation_idx >= 0) { + animation->remove_track(base_track); + } + if (scale_idx >= 0) { + animation->remove_track(base_track); } - - animation->add_track(Animation::TYPE_TRANSFORM3D); - int track = animation->get_track_count() - 1; - animation->track_set_path(track, path); - animation->track_set_imported(track, true); //helps merging later - - Transform3D xform = cn->compute_transform(collada); - xform = collada.fix_transform(xform) * cn->post_transform; - - xform = sk->get_bone_rest(nm.bone).affine_inverse() * xform; - - 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(); - Vector3 l = xform.origin; - - animation->transform_track_insert_key(track, 0, l, q, s); - - tracks_found = true; } } @@ -1689,7 +1710,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones NodeMap &nm = node_map[at.target]; String path = scene->get_path_to(nm.node); - animation->add_track(Animation::TYPE_VALUE); + animation->add_track(Animation::TYPE_BLEND_SHAPE); int track = animation->get_track_count() - 1; path = path + ":" + at.param; @@ -1711,7 +1732,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones WARN_PRINT("Collada: Unexpected amount of value keys: " + itos(data.size())); } - animation->track_insert_key(track, time, value); + animation->blend_shape_track_insert_key(track, time, value); } tracks_found = true; @@ -1727,15 +1748,15 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones /*************************************** SCENE ***********************************/ /*********************************************************************************/ -uint32_t EditorSceneImporterCollada::get_import_flags() const { +uint32_t EditorSceneFormatImporterCollada::get_import_flags() const { return IMPORT_SCENE | IMPORT_ANIMATION; } -void EditorSceneImporterCollada::get_extensions(List<String> *r_extensions) const { +void EditorSceneFormatImporterCollada::get_extensions(List<String> *r_extensions) const { r_extensions->push_back("dae"); } -Node *EditorSceneImporterCollada::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { +Node *EditorSceneFormatImporterCollada::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { if (r_err) { *r_err = OK; } @@ -1748,7 +1769,7 @@ Node *EditorSceneImporterCollada::import_scene(const String &p_path, uint32_t p_ state.use_mesh_builtin_materials = true; state.bake_fps = p_bake_fps; - Error err = state.load(p_path, flags, p_flags & EditorSceneImporter::IMPORT_GENERATE_TANGENT_ARRAYS, false); + Error err = state.load(p_path, flags, p_flags & EditorSceneFormatImporter::IMPORT_GENERATE_TANGENT_ARRAYS, false); if (r_err) { *r_err = err; @@ -1772,7 +1793,7 @@ Node *EditorSceneImporterCollada::import_scene(const String &p_path, uint32_t p_ } if (p_flags & IMPORT_ANIMATION) { - state.create_animations(true, true); + state.create_animations(true); AnimationPlayer *ap = memnew(AnimationPlayer); for (int i = 0; i < state.animations.size(); i++) { String name; @@ -1791,15 +1812,15 @@ Node *EditorSceneImporterCollada::import_scene(const String &p_path, uint32_t p_ return state.scene; } -Ref<Animation> EditorSceneImporterCollada::import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) { +Ref<Animation> EditorSceneFormatImporterCollada::import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) { ColladaImport state; state.use_mesh_builtin_materials = false; - Error err = state.load(p_path, Collada::IMPORT_FLAG_ANIMATION, p_flags & EditorSceneImporter::IMPORT_GENERATE_TANGENT_ARRAYS); + Error err = state.load(p_path, Collada::IMPORT_FLAG_ANIMATION, p_flags & EditorSceneFormatImporter::IMPORT_GENERATE_TANGENT_ARRAYS); ERR_FAIL_COND_V_MSG(err != OK, RES(), "Cannot load animation from file '" + p_path + "'."); - state.create_animations(true, true); + state.create_animations(true); if (state.scene) { memdelete(state.scene); } @@ -1812,5 +1833,5 @@ Ref<Animation> EditorSceneImporterCollada::import_animation(const String &p_path return anim; } -EditorSceneImporterCollada::EditorSceneImporterCollada() { +EditorSceneFormatImporterCollada::EditorSceneFormatImporterCollada() { } diff --git a/editor/import/editor_import_collada.h b/editor/import/editor_import_collada.h index bf45322765..055a6fe178 100644 --- a/editor/import/editor_import_collada.h +++ b/editor/import/editor_import_collada.h @@ -33,8 +33,8 @@ #include "editor/import/resource_importer_scene.h" -class EditorSceneImporterCollada : public EditorSceneImporter { - GDCLASS(EditorSceneImporterCollada, EditorSceneImporter); +class EditorSceneFormatImporterCollada : public EditorSceneFormatImporter { + GDCLASS(EditorSceneFormatImporterCollada, EditorSceneFormatImporter); public: virtual uint32_t get_import_flags() const override; @@ -42,7 +42,7 @@ public: virtual Node *import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps = nullptr, Error *r_err = nullptr) override; virtual Ref<Animation> import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) override; - EditorSceneImporterCollada(); + EditorSceneFormatImporterCollada(); }; #endif diff --git a/editor/import/editor_importer_bake_reset.cpp b/editor/import/editor_importer_bake_reset.cpp deleted file mode 100644 index 00dce6850e..0000000000 --- a/editor/import/editor_importer_bake_reset.cpp +++ /dev/null @@ -1,234 +0,0 @@ -/*************************************************************************/ -/* editor_importer_bake_reset.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 "editor/import/editor_importer_bake_reset.h" - -#include "core/error/error_list.h" -#include "core/error/error_macros.h" -#include "core/math/transform_3d.h" -#include "editor/import/scene_importer_mesh_node_3d.h" -#include "resource_importer_scene.h" -#include "scene/3d/mesh_instance_3d.h" -#include "scene/3d/node_3d.h" -#include "scene/3d/skeleton_3d.h" -#include "scene/animation/animation_player.h" - -// Given that an engineering team has made a reference character, one wants ten animators to create animations. -// Currently, a tech artist needs to combine the ten files into one exported gltf2 to import into Godot Engine. -// We bake the RESET animation and then set it to identity, -// so that rigs with corresponding RESET animation can have their animations transferred with ease. -// -// The original algorithm for the code was used to change skeleton bone rolls to be parent to child. -// -// Reference https://github.com/godotengine/godot-proposals/issues/2961 -void BakeReset::_bake_animation_pose(Node *scene, const String &p_bake_anim) { - Map<StringName, BakeResetRestBone> r_rest_bones; - Vector<Node3D *> r_meshes; - List<Node *> queue; - queue.push_back(scene); - while (!queue.is_empty()) { - List<Node *>::Element *E = queue.front(); - Node *node = E->get(); - AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(node); - // Step 1: import scene with animations into the rest bones data structure. - _fetch_reset_animation(ap, r_rest_bones, p_bake_anim); - - int child_count = node->get_child_count(); - for (int i = 0; i < child_count; i++) { - queue.push_back(node->get_child(i)); - } - queue.pop_front(); - } - - queue.push_back(scene); - while (!queue.is_empty()) { - List<Node *>::Element *E = queue.front(); - Node *node = E->get(); - EditorSceneImporterMeshNode3D *editor_mesh_3d = scene->cast_to<EditorSceneImporterMeshNode3D>(node); - MeshInstance3D *mesh_3d = scene->cast_to<MeshInstance3D>(node); - if (scene->cast_to<Skeleton3D>(node)) { - Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(node); - - // Step 2: Bake the RESET animation from the RestBone to the skeleton. - _fix_skeleton(skeleton, r_rest_bones); - } - if (editor_mesh_3d) { - NodePath path = editor_mesh_3d->get_skeleton_path(); - if (!path.is_empty() && editor_mesh_3d->get_node_or_null(path) && Object::cast_to<Skeleton3D>(editor_mesh_3d->get_node_or_null(path))) { - r_meshes.push_back(editor_mesh_3d); - } - } else if (mesh_3d) { - NodePath path = mesh_3d->get_skeleton_path(); - if (!path.is_empty() && mesh_3d->get_node_or_null(path) && Object::cast_to<Skeleton3D>(mesh_3d->get_node_or_null(path))) { - r_meshes.push_back(mesh_3d); - } - } - int child_count = node->get_child_count(); - for (int i = 0; i < child_count; i++) { - queue.push_back(node->get_child(i)); - } - queue.pop_front(); - } - - queue.push_back(scene); - while (!queue.is_empty()) { - List<Node *>::Element *E = queue.front(); - Node *node = E->get(); - AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(node); - if (ap) { - // Step 3: Key all RESET animation frames to identity. - _align_animations(ap, r_rest_bones); - } - - int child_count = node->get_child_count(); - for (int i = 0; i < child_count; i++) { - queue.push_back(node->get_child(i)); - } - queue.pop_front(); - } -} - -void BakeReset::_align_animations(AnimationPlayer *p_ap, const Map<StringName, BakeResetRestBone> &r_rest_bones) { - ERR_FAIL_NULL(p_ap); - List<StringName> anim_names; - p_ap->get_animation_list(&anim_names); - for (List<StringName>::Element *anim_i = anim_names.front(); anim_i; anim_i = anim_i->next()) { - Ref<Animation> a = p_ap->get_animation(anim_i->get()); - ERR_CONTINUE(a.is_null()); - for (Map<StringName, BakeResetRestBone>::Element *rest_bone_i = r_rest_bones.front(); rest_bone_i; rest_bone_i = rest_bone_i->next()) { - int track = a->find_track(NodePath(rest_bone_i->key())); - if (track == -1) { - continue; - } - int new_track = a->add_track(Animation::TYPE_TRANSFORM3D); - NodePath new_path = NodePath(rest_bone_i->key()); - BakeResetRestBone rest_bone = rest_bone_i->get(); - a->track_set_path(new_track, new_path); - for (int key_i = 0; key_i < a->track_get_key_count(track); key_i++) { - Vector3 loc; - Quaternion rot; - Vector3 scale; - Error err = a->transform_track_get_key(track, key_i, &loc, &rot, &scale); - ERR_CONTINUE(err); - real_t time = a->track_get_key_time(track, key_i); - rot.normalize(); - loc = loc - rest_bone.loc; - rot = rest_bone.rest_delta.get_rotation_quaternion().inverse() * rot; - rot.normalize(); - scale = Vector3(1, 1, 1) - (rest_bone.rest_delta.get_scale() - scale); - // Apply the reverse of the rest changes to make the key be close to identity transform. - a->transform_track_insert_key(new_track, time, loc, rot, scale); - } - a->remove_track(track); - } - } -} - -void BakeReset::_fetch_reset_animation(AnimationPlayer *p_ap, Map<StringName, BakeResetRestBone> &r_rest_bones, const String &p_bake_anim) { - if (!p_ap) { - return; - } - List<StringName> anim_names; - p_ap->get_animation_list(&anim_names); - Node *root = p_ap->get_owner(); - ERR_FAIL_NULL(root); - if (!p_ap->has_animation(p_bake_anim)) { - return; - } - Ref<Animation> a = p_ap->get_animation(p_bake_anim); - if (a.is_null()) { - return; - } - for (int32_t track = 0; track < a->get_track_count(); track++) { - NodePath path = a->track_get_path(track); - String string_path = path; - Skeleton3D *skeleton = root->cast_to<Skeleton3D>(root->get_node(string_path.get_slice(":", 0))); - if (!skeleton) { - continue; - } - String bone_name = string_path.get_slice(":", 1); - for (int key_i = 0; key_i < a->track_get_key_count(track); key_i++) { - Vector3 loc; - Quaternion rot; - Vector3 scale; - Error err = a->transform_track_get_key(track, key_i, &loc, &rot, &scale); - if (err != OK) { - ERR_PRINT_ONCE("Reset animation baker can't get key."); - continue; - } - rot.normalize(); - Basis rot_basis = Basis(rot, scale); - BakeResetRestBone rest_bone; - rest_bone.rest_delta = rot_basis; - rest_bone.loc = loc; - // Store the animation into the RestBone. - r_rest_bones[StringName(String(skeleton->get_owner()->get_path_to(skeleton)) + ":" + bone_name)] = rest_bone; - break; - } - } -} - -void BakeReset::_fix_skeleton(Skeleton3D *p_skeleton, Map<StringName, BakeReset::BakeResetRestBone> &r_rest_bones) { - int bone_count = p_skeleton->get_bone_count(); - - // First iterate through all the bones and update the RestBone. - for (int j = 0; j < bone_count; j++) { - StringName final_path = String(p_skeleton->get_owner()->get_path_to(p_skeleton)) + String(":") + p_skeleton->get_bone_name(j); - BakeResetRestBone &rest_bone = r_rest_bones[final_path]; - rest_bone.rest_local = p_skeleton->get_bone_rest(j); - } - for (int i = 0; i < bone_count; i++) { - int parent_bone = p_skeleton->get_bone_parent(i); - String path = p_skeleton->get_owner()->get_path_to(p_skeleton); - StringName final_path = String(path) + String(":") + p_skeleton->get_bone_name(parent_bone); - if (parent_bone >= 0) { - r_rest_bones[path].children.push_back(i); - } - } - - // When we apply transform to a bone, we also have to move all of its children in the opposite direction. - for (int i = 0; i < bone_count; i++) { - StringName final_path = String(p_skeleton->get_owner()->get_path_to(p_skeleton)) + String(":") + p_skeleton->get_bone_name(i); - r_rest_bones[final_path].rest_local = r_rest_bones[final_path].rest_local * Transform3D(r_rest_bones[final_path].rest_delta, r_rest_bones[final_path].loc); - // Iterate through the children and move in the opposite direction. - for (int j = 0; j < r_rest_bones[final_path].children.size(); j++) { - int child_index = r_rest_bones[final_path].children[j]; - StringName children_path = String(p_skeleton->get_name()) + String(":") + p_skeleton->get_bone_name(child_index); - r_rest_bones[children_path].rest_local = Transform3D(r_rest_bones[final_path].rest_delta, r_rest_bones[final_path].loc).affine_inverse() * r_rest_bones[children_path].rest_local; - } - } - - for (int i = 0; i < bone_count; i++) { - StringName final_path = String(p_skeleton->get_owner()->get_path_to(p_skeleton)) + String(":") + p_skeleton->get_bone_name(i); - ERR_CONTINUE(!r_rest_bones.has(final_path)); - Transform3D rest_transform = r_rest_bones[final_path].rest_local; - p_skeleton->set_bone_rest(i, rest_transform); - } -} diff --git a/editor/import/editor_importer_bake_reset.h b/editor/import/editor_importer_bake_reset.h deleted file mode 100644 index e36ae86181..0000000000 --- a/editor/import/editor_importer_bake_reset.h +++ /dev/null @@ -1,54 +0,0 @@ -/*************************************************************************/ -/* editor_importer_bake_reset.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 RESOURCE_IMPORTER_BAKE_RESET_H -#define RESOURCE_IMPORTER_BAKE_RESET_H - -#include "scene/main/node.h" - -class Skeleton3D; -class AnimationPlayer; -class BakeReset { - struct BakeResetRestBone { - Transform3D rest_local; - Basis rest_delta; - Vector3 loc; - Vector<int> children; - }; - -public: - void _bake_animation_pose(Node *scene, const String &p_bake_anim); - -private: - void _fix_skeleton(Skeleton3D *p_skeleton, Map<StringName, BakeReset::BakeResetRestBone> &r_rest_bones); - void _align_animations(AnimationPlayer *p_ap, const Map<StringName, BakeResetRestBone> &r_rest_bones); - void _fetch_reset_animation(AnimationPlayer *p_ap, Map<StringName, BakeResetRestBone> &r_rest_bones, const String &p_bake_anim); -}; -#endif diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp index 34bc0a7d8d..4f75faedcb 100644 --- a/editor/import/resource_importer_obj.cpp +++ b/editor/import/resource_importer_obj.cpp @@ -32,10 +32,10 @@ #include "core/io/file_access.h" #include "core/io/resource_saver.h" -#include "editor/import/scene_importer_mesh.h" -#include "editor/import/scene_importer_mesh_node_3d.h" +#include "scene/3d/importer_mesh_instance_3d.h" #include "scene/3d/mesh_instance_3d.h" #include "scene/3d/node_3d.h" +#include "scene/resources/importer_mesh.h" #include "scene/resources/mesh.h" #include "scene/resources/surface_tool.h" @@ -439,13 +439,13 @@ Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, in Node3D *scene = memnew(Node3D); for (const Ref<Mesh> &m : meshes) { - Ref<EditorSceneImporterMesh> mesh; + Ref<ImporterMesh> mesh; mesh.instantiate(); for (int i = 0; i < m->get_surface_count(); i++) { mesh->add_surface(m->surface_get_primitive_type(i), m->surface_get_arrays(i), Array(), Dictionary(), m->surface_get_material(i)); } - EditorSceneImporterMeshNode3D *mi = memnew(EditorSceneImporterMeshNode3D); + ImporterMeshInstance3D *mi = memnew(ImporterMeshInstance3D); mi->set_mesh(mesh); mi->set_name(m->get_name()); scene->add_child(mi); diff --git a/editor/import/resource_importer_obj.h b/editor/import/resource_importer_obj.h index 1bb5ef33ce..d9f2f79903 100644 --- a/editor/import/resource_importer_obj.h +++ b/editor/import/resource_importer_obj.h @@ -33,8 +33,8 @@ #include "resource_importer_scene.h" -class EditorOBJImporter : public EditorSceneImporter { - GDCLASS(EditorOBJImporter, EditorSceneImporter); +class EditorOBJImporter : public EditorSceneFormatImporter { + GDCLASS(EditorOBJImporter, EditorSceneFormatImporter); public: virtual uint32_t get_import_flags() const override; diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index c48d9bb117..319e5ee25f 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -32,11 +32,11 @@ #include "core/io/resource_saver.h" #include "editor/editor_node.h" -#include "editor/import/editor_importer_bake_reset.h" + #include "editor/import/scene_import_settings.h" -#include "editor/import/scene_importer_mesh_node_3d.h" #include "scene/3d/area_3d.h" #include "scene/3d/collision_shape_3d.h" +#include "scene/3d/importer_mesh_instance_3d.h" #include "scene/3d/mesh_instance_3d.h" #include "scene/3d/navigation_region_3d.h" #include "scene/3d/physics_body_3d.h" @@ -44,6 +44,7 @@ #include "scene/animation/animation_player.h" #include "scene/resources/animation.h" #include "scene/resources/box_shape_3d.h" +#include "scene/resources/importer_mesh.h" #include "scene/resources/packed_scene.h" #include "scene/resources/resource_format_text.h" #include "scene/resources/separation_ray_shape_3d.h" @@ -51,7 +52,7 @@ #include "scene/resources/surface_tool.h" #include "scene/resources/world_boundary_shape_3d.h" -uint32_t EditorSceneImporter::get_import_flags() const { +uint32_t EditorSceneFormatImporter::get_import_flags() const { int ret; if (GDVIRTUAL_CALL(_get_import_flags, ret)) { return ret; @@ -60,7 +61,7 @@ uint32_t EditorSceneImporter::get_import_flags() const { ERR_FAIL_V(0); } -void EditorSceneImporter::get_extensions(List<String> *r_extensions) const { +void EditorSceneFormatImporter::get_extensions(List<String> *r_extensions) const { Vector<String> arr; if (GDVIRTUAL_CALL(_get_extensions, arr)) { for (int i = 0; i < arr.size(); i++) { @@ -72,7 +73,7 @@ void EditorSceneImporter::get_extensions(List<String> *r_extensions) const { ERR_FAIL(); } -Node *EditorSceneImporter::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { +Node *EditorSceneFormatImporter::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { Object *ret; if (GDVIRTUAL_CALL(_import_scene, p_path, p_flags, p_bake_fps, ret)) { return Object::cast_to<Node>(ret); @@ -81,7 +82,7 @@ Node *EditorSceneImporter::import_scene(const String &p_path, uint32_t p_flags, ERR_FAIL_V(nullptr); } -Ref<Animation> EditorSceneImporter::import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) { +Ref<Animation> EditorSceneFormatImporter::import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) { Ref<Animation> ret; if (GDVIRTUAL_CALL(_import_animation, p_path, p_flags, p_bake_fps, ret)) { return ret; @@ -93,17 +94,17 @@ Ref<Animation> EditorSceneImporter::import_animation(const String &p_path, uint3 //for documenters, these functions are useful when an importer calls an external conversion helper (like, fbx2gltf), //and you want to load the resulting file -Node *EditorSceneImporter::import_scene_from_other_importer(const String &p_path, uint32_t p_flags, int p_bake_fps) { +Node *EditorSceneFormatImporter::import_scene_from_other_importer(const String &p_path, uint32_t p_flags, int p_bake_fps) { return ResourceImporterScene::get_singleton()->import_scene_from_other_importer(this, p_path, p_flags, p_bake_fps); } -Ref<Animation> EditorSceneImporter::import_animation_from_other_importer(const String &p_path, uint32_t p_flags, int p_bake_fps) { +Ref<Animation> EditorSceneFormatImporter::import_animation_from_other_importer(const String &p_path, uint32_t p_flags, int p_bake_fps) { return ResourceImporterScene::get_singleton()->import_animation_from_other_importer(this, p_path, p_flags, p_bake_fps); } -void EditorSceneImporter::_bind_methods() { - ClassDB::bind_method(D_METHOD("import_scene_from_other_importer", "path", "flags", "bake_fps"), &EditorSceneImporter::import_scene_from_other_importer); - ClassDB::bind_method(D_METHOD("import_animation_from_other_importer", "path", "flags", "bake_fps"), &EditorSceneImporter::import_animation_from_other_importer); +void EditorSceneFormatImporter::_bind_methods() { + ClassDB::bind_method(D_METHOD("import_scene_from_other_importer", "path", "flags", "bake_fps"), &EditorSceneFormatImporter::import_scene_from_other_importer); + ClassDB::bind_method(D_METHOD("import_animation_from_other_importer", "path", "flags", "bake_fps"), &EditorSceneFormatImporter::import_animation_from_other_importer); GDVIRTUAL_BIND(_get_import_flags); GDVIRTUAL_BIND(_get_extensions); @@ -143,6 +144,105 @@ void EditorScenePostImport::init(const String &p_source_file) { EditorScenePostImport::EditorScenePostImport() { } +/////////////////////////////////////////////////////// + +Variant EditorScenePostImportPlugin::get_option_value(const StringName &p_name) const { + ERR_FAIL_COND_V_MSG(current_options == nullptr && current_options_dict == nullptr, Variant(), "get_option_value called from a function where option values are not available."); + ERR_FAIL_COND_V_MSG(current_options && !current_options->has(p_name), Variant(), "get_option_value called with unexisting option argument: " + String(p_name)); + ERR_FAIL_COND_V_MSG(current_options_dict && !current_options_dict->has(p_name), Variant(), "get_option_value called with unexisting option argument: " + String(p_name)); + if (current_options) { + (*current_options)[p_name]; + } + if (current_options_dict) { + (*current_options_dict)[p_name]; + } + return Variant(); +} +void EditorScenePostImportPlugin::add_import_option(const String &p_name, Variant p_default_value) { + ERR_FAIL_COND_MSG(current_option_list == nullptr, "add_import_option() can only be called from get_import_options()"); + add_import_option_advanced(p_default_value.get_type(), p_name, p_default_value); +} +void EditorScenePostImportPlugin::add_import_option_advanced(Variant::Type p_type, const String &p_name, Variant p_default_value, PropertyHint p_hint, const String &p_hint_string, int p_usage_flags) { + ERR_FAIL_COND_MSG(current_option_list == nullptr, "add_import_option_advanced() can only be called from get_import_options()"); + current_option_list->push_back(ResourceImporter::ImportOption(PropertyInfo(p_type, p_name, p_hint, p_hint_string, p_usage_flags), p_default_value)); +} + +void EditorScenePostImportPlugin::get_internal_import_options(InternalImportCategory p_category, List<ResourceImporter::ImportOption> *r_options) { + current_option_list = r_options; + GDVIRTUAL_CALL(_get_internal_import_options, p_category); + current_option_list = nullptr; +} +Variant EditorScenePostImportPlugin::get_internal_option_visibility(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const { + current_options = &p_options; + Variant ret; + GDVIRTUAL_CALL(_get_internal_option_visibility, p_category, p_option, ret); + current_options = nullptr; + return ret; +} +Variant EditorScenePostImportPlugin::get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const { + current_options = &p_options; + Variant ret; + GDVIRTUAL_CALL(_get_internal_option_update_view_required, p_category, p_option, ret); + current_options = nullptr; + return ret; +} + +void EditorScenePostImportPlugin::internal_process(InternalImportCategory p_category, Node *p_base_scene, Node *p_node, RES p_resource, const Dictionary &p_options) { + current_options_dict = &p_options; + GDVIRTUAL_CALL(_internal_process, p_category, p_base_scene, p_node, p_resource); + current_options_dict = nullptr; +} + +void EditorScenePostImportPlugin::get_import_options(List<ResourceImporter::ImportOption> *r_options) { + current_option_list = r_options; + GDVIRTUAL_CALL(_get_import_options); + current_option_list = nullptr; +} +Variant EditorScenePostImportPlugin::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { + current_options = &p_options; + Variant ret; + GDVIRTUAL_CALL(_get_option_visibility, p_option, ret); + current_options = nullptr; + return ret; +} + +void EditorScenePostImportPlugin::pre_process(Node *p_scene, const Map<StringName, Variant> &p_options) { + current_options = &p_options; + GDVIRTUAL_CALL(_pre_process, p_scene); + current_options = nullptr; +} +void EditorScenePostImportPlugin::post_process(Node *p_scene, const Map<StringName, Variant> &p_options) { + current_options = &p_options; + GDVIRTUAL_CALL(_post_process, p_scene); + current_options = nullptr; +} + +void EditorScenePostImportPlugin::_bind_methods() { + ClassDB::bind_method(D_METHOD("get_option_value", "name"), &EditorScenePostImportPlugin::get_option_value); + + ClassDB::bind_method(D_METHOD("add_import_option", "name", "value"), &EditorScenePostImportPlugin::add_import_option); + ClassDB::bind_method(D_METHOD("add_import_option_advanced", "type", "name", "default_value", "hint", "hint_string", "usage_flags"), &EditorScenePostImportPlugin::add_import_option_advanced, DEFVAL(PROPERTY_HINT_NONE), DEFVAL(""), DEFVAL(PROPERTY_USAGE_DEFAULT)); + + GDVIRTUAL_BIND(_get_internal_import_options, "category"); + GDVIRTUAL_BIND(_get_internal_option_visibility, "category", "option"); + GDVIRTUAL_BIND(_get_internal_option_update_view_required, "category", "option"); + GDVIRTUAL_BIND(_internal_process, "category", "base_node", "node", "resource"); + GDVIRTUAL_BIND(_get_import_options); + GDVIRTUAL_BIND(_get_option_visibility, "option"); + GDVIRTUAL_BIND(_pre_process, "scene"); + GDVIRTUAL_BIND(_post_process, "scene"); + + BIND_ENUM_CONSTANT(INTERNAL_IMPORT_CATEGORY_NODE); + BIND_ENUM_CONSTANT(INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE); + BIND_ENUM_CONSTANT(INTERNAL_IMPORT_CATEGORY_MESH); + BIND_ENUM_CONSTANT(INTERNAL_IMPORT_CATEGORY_MATERIAL); + BIND_ENUM_CONSTANT(INTERNAL_IMPORT_CATEGORY_ANIMATION); + BIND_ENUM_CONSTANT(INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE); + BIND_ENUM_CONSTANT(INTERNAL_IMPORT_CATEGORY_MAX); +} + +///////////////////////////////////////////////////////// + String ResourceImporterScene::get_importer_name() const { return "scene"; } @@ -152,7 +252,7 @@ String ResourceImporterScene::get_visible_name() const { } void ResourceImporterScene::get_recognized_extensions(List<String> *p_extensions) const { - for (Set<Ref<EditorSceneImporter>>::Element *E = importers.front(); E; E = E->next()) { + for (Set<Ref<EditorSceneFormatImporter>>::Element *E = importers.front(); E; E = E->next()) { E->get()->get_extensions(p_extensions); } } @@ -180,6 +280,13 @@ bool ResourceImporterScene::get_option_visibility(const String &p_option, const return false; } + for (int i = 0; i < post_importer_plugins.size(); i++) { + Variant ret = post_importer_plugins.write[i]->get_option_visibility(p_option, p_options); + if (ret.get_type() == Variant::BOOL) { + return ret; + } + } + return true; } @@ -233,7 +340,7 @@ static String _fixstr(const String &p_what, const String &p_str) { return what; } -static void _pre_gen_shape_list(Ref<EditorSceneImporterMesh> &mesh, Vector<Ref<Shape3D>> &r_shape_list, bool p_convex) { +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"); if (!p_convex) { Ref<Shape3D> shape = mesh->create_trimesh_shape(); @@ -249,7 +356,7 @@ static void _pre_gen_shape_list(Ref<EditorSceneImporterMesh> &mesh, Vector<Ref<S } } -Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<EditorSceneImporterMesh>, Vector<Ref<Shape3D>>> &collision_map) { +Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map) { // children first for (int i = 0; i < p_node->get_child_count(); i++) { Node *r = _pre_fix_node(p_node->get_child(i), p_root, collision_map); @@ -267,10 +374,10 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<E return nullptr; } - if (Object::cast_to<EditorSceneImporterMeshNode3D>(p_node)) { - EditorSceneImporterMeshNode3D *mi = Object::cast_to<EditorSceneImporterMeshNode3D>(p_node); + if (Object::cast_to<ImporterMeshInstance3D>(p_node)) { + ImporterMeshInstance3D *mi = Object::cast_to<ImporterMeshInstance3D>(p_node); - Ref<EditorSceneImporterMesh> m = mi->get_mesh(); + Ref<ImporterMesh> m = mi->get_mesh(); if (m.is_valid()) { for (int i = 0; i < m->get_surface_count(); i++) { @@ -331,9 +438,9 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<E if (isroot) { return p_node; } - EditorSceneImporterMeshNode3D *mi = Object::cast_to<EditorSceneImporterMeshNode3D>(p_node); + ImporterMeshInstance3D *mi = Object::cast_to<ImporterMeshInstance3D>(p_node); if (mi) { - Ref<EditorSceneImporterMesh> mesh = mi->get_mesh(); + Ref<ImporterMesh> mesh = mi->get_mesh(); if (mesh.is_valid()) { Vector<Ref<Shape3D>> shapes; @@ -398,13 +505,13 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<E colshape->set_owner(sb->get_owner()); } - } else if (_teststr(name, "rigid") && Object::cast_to<EditorSceneImporterMeshNode3D>(p_node)) { + } else if (_teststr(name, "rigid") && Object::cast_to<ImporterMeshInstance3D>(p_node)) { if (isroot) { return p_node; } - EditorSceneImporterMeshNode3D *mi = Object::cast_to<EditorSceneImporterMeshNode3D>(p_node); - Ref<EditorSceneImporterMesh> mesh = mi->get_mesh(); + ImporterMeshInstance3D *mi = Object::cast_to<ImporterMeshInstance3D>(p_node); + Ref<ImporterMesh> mesh = mi->get_mesh(); if (mesh.is_valid()) { Vector<Ref<Shape3D>> shapes; @@ -426,10 +533,10 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<E _add_shapes(rigid_body, shapes); } - } else if ((_teststr(name, "col") || (_teststr(name, "convcol"))) && Object::cast_to<EditorSceneImporterMeshNode3D>(p_node)) { - EditorSceneImporterMeshNode3D *mi = Object::cast_to<EditorSceneImporterMeshNode3D>(p_node); + } else if ((_teststr(name, "col") || (_teststr(name, "convcol"))) && Object::cast_to<ImporterMeshInstance3D>(p_node)) { + ImporterMeshInstance3D *mi = Object::cast_to<ImporterMeshInstance3D>(p_node); - Ref<EditorSceneImporterMesh> mesh = mi->get_mesh(); + Ref<ImporterMesh> mesh = mi->get_mesh(); if (mesh.is_valid()) { Vector<Ref<Shape3D>> shapes; @@ -465,14 +572,14 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<E } } - } else if (_teststr(name, "navmesh") && Object::cast_to<EditorSceneImporterMeshNode3D>(p_node)) { + } else if (_teststr(name, "navmesh") && Object::cast_to<ImporterMeshInstance3D>(p_node)) { if (isroot) { return p_node; } - EditorSceneImporterMeshNode3D *mi = Object::cast_to<EditorSceneImporterMeshNode3D>(p_node); + ImporterMeshInstance3D *mi = Object::cast_to<ImporterMeshInstance3D>(p_node); - Ref<EditorSceneImporterMesh> mesh = mi->get_mesh(); + Ref<ImporterMesh> mesh = mi->get_mesh(); ERR_FAIL_COND_V(mesh.is_null(), nullptr); NavigationRegion3D *nmi = memnew(NavigationRegion3D); @@ -484,12 +591,12 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<E memdelete(p_node); p_node = nmi; - } else if (Object::cast_to<EditorSceneImporterMeshNode3D>(p_node)) { + } else if (Object::cast_to<ImporterMeshInstance3D>(p_node)) { //last attempt, maybe collision inside the mesh data - EditorSceneImporterMeshNode3D *mi = Object::cast_to<EditorSceneImporterMeshNode3D>(p_node); + ImporterMeshInstance3D *mi = Object::cast_to<ImporterMeshInstance3D>(p_node); - Ref<EditorSceneImporterMesh> mesh = mi->get_mesh(); + Ref<ImporterMesh> mesh = mi->get_mesh(); if (!mesh.is_null()) { Vector<Ref<Shape3D>> shapes; if (collision_map.has(mesh)) { @@ -517,7 +624,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<E return p_node; } -Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref<EditorSceneImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Set<Ref<EditorSceneImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps) { +Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Set<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps) { // children first for (int i = 0; i < p_node->get_child_count(); i++) { Node *r = _post_fix_node(p_node->get_child(i), p_root, collision_map, r_scanned_meshes, p_node_data, p_material_data, p_animation_data, p_animation_fps); @@ -546,10 +653,30 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< return nullptr; } - if (Object::cast_to<EditorSceneImporterMeshNode3D>(p_node)) { - EditorSceneImporterMeshNode3D *mi = Object::cast_to<EditorSceneImporterMeshNode3D>(p_node); + { + ObjectID node_id = p_node->get_instance_id(); + for (int i = 0; i < post_importer_plugins.size(); i++) { + post_importer_plugins.write[i]->internal_process(EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_NODE, p_root, p_node, RES(), node_settings); + if (ObjectDB::get_instance(node_id) == nullptr) { //may have been erased, so do not continue + break; + } + } + } + + if (Object::cast_to<ImporterMeshInstance3D>(p_node)) { + ObjectID node_id = p_node->get_instance_id(); + for (int i = 0; i < post_importer_plugins.size(); i++) { + post_importer_plugins.write[i]->internal_process(EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE, p_root, p_node, RES(), node_settings); + if (ObjectDB::get_instance(node_id) == nullptr) { //may have been erased, so do not continue + break; + } + } + } - Ref<EditorSceneImporterMesh> m = mi->get_mesh(); + if (Object::cast_to<ImporterMeshInstance3D>(p_node)) { + ImporterMeshInstance3D *mi = Object::cast_to<ImporterMeshInstance3D>(p_node); + + Ref<ImporterMesh> m = mi->get_mesh(); if (m.is_valid()) { if (!r_scanned_meshes.has(m)) { @@ -565,6 +692,11 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< if (mat_id != String() && p_material_data.has(mat_id)) { Dictionary matdata = p_material_data[mat_id]; + + for (int j = 0; j < post_importer_plugins.size(); j++) { + post_importer_plugins.write[j]->internal_process(EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_MATERIAL, p_root, p_node, mat, matdata); + } + if (matdata.has("use_external/enabled") && bool(matdata["use_external/enabled"]) && matdata.has("use_external/path")) { String path = matdata["use_external/path"]; Ref<Material> external_mat = ResourceLoader::load(path); @@ -669,10 +801,10 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< } //navmesh (node may have changed type above) - if (Object::cast_to<EditorSceneImporterMeshNode3D>(p_node)) { - EditorSceneImporterMeshNode3D *mi = Object::cast_to<EditorSceneImporterMeshNode3D>(p_node); + if (Object::cast_to<ImporterMeshInstance3D>(p_node)) { + ImporterMeshInstance3D *mi = Object::cast_to<ImporterMeshInstance3D>(p_node); - Ref<EditorSceneImporterMesh> m = mi->get_mesh(); + Ref<ImporterMesh> m = mi->get_mesh(); if (m.is_valid()) { if (node_settings.has("generate/navmesh")) { @@ -714,6 +846,10 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< } } + for (int i = 0; i < post_importer_plugins.size(); i++) { + post_importer_plugins.write[i]->internal_process(EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE, p_root, p_node, RES(), node_settings); + } + bool use_optimizer = node_settings["optimizer/enabled"]; float anim_optimizer_linerr = node_settings["optimizer/max_linear_error"]; float anim_optimizer_angerr = node_settings["optimizer/max_angular_error"]; @@ -778,6 +914,41 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< } } } + + AnimationImportTracks import_tracks_mode[TRACK_CHANNEL_MAX] = { + AnimationImportTracks(int(node_settings["import_tracks/position"])), + AnimationImportTracks(int(node_settings["import_tracks/rotation"])), + AnimationImportTracks(int(node_settings["import_tracks/scale"])) + }; + + if (anims.size() > 1 && (import_tracks_mode[0] != ANIMATION_IMPORT_TRACKS_IF_PRESENT || import_tracks_mode[1] != ANIMATION_IMPORT_TRACKS_IF_PRESENT || import_tracks_mode[2] != ANIMATION_IMPORT_TRACKS_IF_PRESENT)) { + _optimize_track_usage(ap, import_tracks_mode); + } + } + + if (post_importer_plugins.size()) { + List<StringName> anims; + ap->get_animation_list(&anims); + for (const StringName &name : anims) { + if (p_animation_data.has(name)) { + Ref<Animation> anim = ap->get_animation(name); + Dictionary anim_settings = p_animation_data[name]; + { + //fill with default values + List<ImportOption> iopts; + get_internal_import_options(INTERNAL_IMPORT_CATEGORY_ANIMATION, &iopts); + for (const ImportOption &F : iopts) { + if (!anim_settings.has(F.option.name)) { + anim_settings[F.option.name] = F.default_value; + } + } + } + + for (int i = 0; i < post_importer_plugins.size(); i++) { + post_importer_plugins.write[i]->internal_process(EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_ANIMATION, p_root, p_node, anim, node_settings); + } + } + } } } @@ -850,44 +1021,71 @@ void ResourceImporterScene::_create_clips(AnimationPlayer *anim, const Array &p_ new_anim->track_set_path(dtrack, default_anim->track_get_path(j)); if (kt > (from + 0.01) && k > 0) { - if (default_anim->track_get_type(j) == Animation::TYPE_TRANSFORM3D) { - Quaternion q; + if (default_anim->track_get_type(j) == Animation::TYPE_POSITION_3D) { Vector3 p; + default_anim->position_track_interpolate(j, from, &p); + new_anim->position_track_insert_key(dtrack, 0, p); + } else if (default_anim->track_get_type(j) == Animation::TYPE_ROTATION_3D) { + Quaternion r; + default_anim->rotation_track_interpolate(j, from, &r); + new_anim->rotation_track_insert_key(dtrack, 0, r); + } else if (default_anim->track_get_type(j) == Animation::TYPE_SCALE_3D) { Vector3 s; - default_anim->transform_track_interpolate(j, from, &p, &q, &s); - new_anim->transform_track_insert_key(dtrack, 0, p, q, s); - } - if (default_anim->track_get_type(j) == Animation::TYPE_VALUE) { + default_anim->scale_track_interpolate(j, from, &s); + new_anim->scale_track_insert_key(dtrack, 0, s); + } else if (default_anim->track_get_type(j) == Animation::TYPE_VALUE) { Variant var = default_anim->value_track_interpolate(j, from); new_anim->track_insert_key(dtrack, 0, var); + } else if (default_anim->track_get_type(j) == Animation::TYPE_BLEND_SHAPE) { + float interp; + default_anim->blend_shape_track_interpolate(j, from, &interp); + new_anim->blend_shape_track_insert_key(dtrack, 0, interp); } } } - if (default_anim->track_get_type(j) == Animation::TYPE_TRANSFORM3D) { - Quaternion q; + if (default_anim->track_get_type(j) == Animation::TYPE_POSITION_3D) { Vector3 p; + default_anim->position_track_get_key(j, k, &p); + new_anim->position_track_insert_key(dtrack, kt - from, p); + } else if (default_anim->track_get_type(j) == Animation::TYPE_ROTATION_3D) { + Quaternion r; + default_anim->rotation_track_get_key(j, k, &r); + new_anim->rotation_track_insert_key(dtrack, kt - from, r); + } else if (default_anim->track_get_type(j) == Animation::TYPE_SCALE_3D) { Vector3 s; - default_anim->transform_track_get_key(j, k, &p, &q, &s); - new_anim->transform_track_insert_key(dtrack, kt - from, p, q, s); - } - if (default_anim->track_get_type(j) == Animation::TYPE_VALUE) { + default_anim->scale_track_get_key(j, k, &s); + new_anim->scale_track_insert_key(dtrack, kt - from, s); + } else if (default_anim->track_get_type(j) == Animation::TYPE_VALUE) { Variant var = default_anim->track_get_key_value(j, k); new_anim->track_insert_key(dtrack, kt - from, var); + } else if (default_anim->track_get_type(j) == Animation::TYPE_BLEND_SHAPE) { + float interp; + default_anim->blend_shape_track_get_key(j, k, &interp); + new_anim->blend_shape_track_insert_key(dtrack, kt - from, interp); } } if (dtrack != -1 && kt >= to) { - if (default_anim->track_get_type(j) == Animation::TYPE_TRANSFORM3D) { - Quaternion q; + if (default_anim->track_get_type(j) == Animation::TYPE_POSITION_3D) { Vector3 p; + default_anim->position_track_interpolate(j, to, &p); + new_anim->position_track_insert_key(dtrack, to - from, p); + } else if (default_anim->track_get_type(j) == Animation::TYPE_ROTATION_3D) { + Quaternion r; + default_anim->rotation_track_interpolate(j, to, &r); + new_anim->rotation_track_insert_key(dtrack, to - from, r); + } else if (default_anim->track_get_type(j) == Animation::TYPE_SCALE_3D) { Vector3 s; - default_anim->transform_track_interpolate(j, to, &p, &q, &s); - new_anim->transform_track_insert_key(dtrack, to - from, p, q, s); - } - if (default_anim->track_get_type(j) == Animation::TYPE_VALUE) { + default_anim->scale_track_interpolate(j, to, &s); + new_anim->scale_track_insert_key(dtrack, to - from, s); + } else if (default_anim->track_get_type(j) == Animation::TYPE_VALUE) { Variant var = default_anim->value_track_interpolate(j, to); new_anim->track_insert_key(dtrack, to - from, var); + } else if (default_anim->track_get_type(j) == Animation::TYPE_BLEND_SHAPE) { + float interp; + default_anim->blend_shape_track_interpolate(j, to, &interp); + new_anim->blend_shape_track_insert_key(dtrack, to - from, interp); } } } @@ -896,20 +1094,35 @@ void ResourceImporterScene::_create_clips(AnimationPlayer *anim, const Array &p_ new_anim->add_track(default_anim->track_get_type(j)); dtrack = new_anim->get_track_count() - 1; new_anim->track_set_path(dtrack, default_anim->track_get_path(j)); - if (default_anim->track_get_type(j) == Animation::TYPE_TRANSFORM3D) { - Quaternion q; + if (default_anim->track_get_type(j) == Animation::TYPE_POSITION_3D) { Vector3 p; + default_anim->position_track_interpolate(j, from, &p); + new_anim->position_track_insert_key(dtrack, 0, p); + default_anim->position_track_interpolate(j, to, &p); + new_anim->position_track_insert_key(dtrack, to - from, p); + } else if (default_anim->track_get_type(j) == Animation::TYPE_ROTATION_3D) { + Quaternion r; + default_anim->rotation_track_interpolate(j, from, &r); + new_anim->rotation_track_insert_key(dtrack, 0, r); + default_anim->rotation_track_interpolate(j, to, &r); + new_anim->rotation_track_insert_key(dtrack, to - from, r); + } else if (default_anim->track_get_type(j) == Animation::TYPE_SCALE_3D) { Vector3 s; - default_anim->transform_track_interpolate(j, from, &p, &q, &s); - new_anim->transform_track_insert_key(dtrack, 0, p, q, s); - default_anim->transform_track_interpolate(j, to, &p, &q, &s); - new_anim->transform_track_insert_key(dtrack, to - from, p, q, s); - } - if (default_anim->track_get_type(j) == Animation::TYPE_VALUE) { + default_anim->scale_track_interpolate(j, from, &s); + new_anim->scale_track_insert_key(dtrack, 0, s); + default_anim->scale_track_interpolate(j, to, &s); + new_anim->scale_track_insert_key(dtrack, to - from, s); + } else if (default_anim->track_get_type(j) == Animation::TYPE_VALUE) { Variant var = default_anim->value_track_interpolate(j, from); new_anim->track_insert_key(dtrack, 0, var); Variant to_var = default_anim->value_track_interpolate(j, to); new_anim->track_insert_key(dtrack, to - from, to_var); + } else if (default_anim->track_get_type(j) == Animation::TYPE_BLEND_SHAPE) { + float interp; + default_anim->blend_shape_track_interpolate(j, from, &interp); + new_anim->blend_shape_track_insert_key(dtrack, 0, interp); + default_anim->blend_shape_track_interpolate(j, to, &interp); + new_anim->blend_shape_track_insert_key(dtrack, to - from, interp); } } } @@ -980,6 +1193,8 @@ void ResourceImporterScene::get_internal_import_options(InternalImportCategory p r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "generate/shadow_meshes", PROPERTY_HINT_ENUM, "Default,Enable,Disable"), 0)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "generate/lightmap_uv", PROPERTY_HINT_ENUM, "Default,Enable,Disable"), 0)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "generate/lods", PROPERTY_HINT_ENUM, "Default,Enable,Disable"), 0)); + r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "lods/normal_split_angle", PROPERTY_HINT_RANGE, "0,180,0.1,degrees"), 25.0f)); + r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "lods/normal_merge_angle", PROPERTY_HINT_RANGE, "0,180,0.1,degrees"), 60.0f)); } break; case INTERNAL_IMPORT_CATEGORY_MATERIAL: { r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "use_external/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false)); @@ -997,6 +1212,9 @@ void ResourceImporterScene::get_internal_import_options(InternalImportCategory p r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "optimizer/max_linear_error"), 0.05)); r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "optimizer/max_angular_error"), 0.01)); r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "optimizer/max_angle"), 22)); + r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "import_tracks/position", PROPERTY_HINT_ENUM, "IfPresent,IfPresentForAll,Never"), 1)); + r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "import_tracks/rotation", PROPERTY_HINT_ENUM, "IfPresent,IfPresentForAll,Never"), 1)); + r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "import_tracks/scale", PROPERTY_HINT_ENUM, "IfPresent,IfPresentForAll,Never"), 1)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slices/amount", PROPERTY_HINT_RANGE, "0,256,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 0)); for (int i = 0; i < 256; i++) { @@ -1012,6 +1230,10 @@ void ResourceImporterScene::get_internal_import_options(InternalImportCategory p default: { } } + + for (int i = 0; i < post_importer_plugins.size(); i++) { + post_importer_plugins.write[i]->get_internal_import_options(EditorScenePostImportPlugin::InternalImportCategory(p_category), r_options); + } } bool ResourceImporterScene::get_internal_option_visibility(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const { @@ -1114,6 +1336,13 @@ bool ResourceImporterScene::get_internal_option_visibility(InternalImportCategor } } + for (int i = 0; i < post_importer_plugins.size(); i++) { + Variant ret = post_importer_plugins.write[i]->get_internal_option_visibility(EditorScenePostImportPlugin::InternalImportCategory(p_category), p_option, p_options); + if (ret.get_type() == Variant::BOOL) { + return ret; + } + } + return true; } @@ -1141,6 +1370,14 @@ bool ResourceImporterScene::get_internal_option_update_view_required(InternalImp default: { } } + + for (int i = 0; i < post_importer_plugins.size(); i++) { + Variant ret = post_importer_plugins.write[i]->get_internal_option_update_view_required(EditorScenePostImportPlugin::InternalImportCategory(p_category), p_option, p_options); + if (ret.get_type() == Variant::BOOL) { + return ret; + } + } + return false; } @@ -1168,11 +1405,14 @@ 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::BOOL, "animation/bake_reset_animation"), 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::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())); + + for (int i = 0; i < post_importer_plugins.size(); i++) { + post_importer_plugins.write[i]->get_import_options(r_options); + } } void ResourceImporterScene::_replace_owner(Node *p_node, Node *p_scene, Node *p_new_owner) { @@ -1186,11 +1426,11 @@ void ResourceImporterScene::_replace_owner(Node *p_node, Node *p_scene, Node *p_ } } -Node *ResourceImporterScene::import_scene_from_other_importer(EditorSceneImporter *p_exception, const String &p_path, uint32_t p_flags, int p_bake_fps) { - Ref<EditorSceneImporter> importer; +Node *ResourceImporterScene::import_scene_from_other_importer(EditorSceneFormatImporter *p_exception, const String &p_path, uint32_t p_flags, int p_bake_fps) { + Ref<EditorSceneFormatImporter> importer; String ext = p_path.get_extension().to_lower(); - for (Set<Ref<EditorSceneImporter>>::Element *E = importers.front(); E; E = E->next()) { + for (Set<Ref<EditorSceneFormatImporter>>::Element *E = importers.front(); E; E = E->next()) { if (E->get().ptr() == p_exception) { continue; } @@ -1216,11 +1456,11 @@ Node *ResourceImporterScene::import_scene_from_other_importer(EditorSceneImporte return importer->import_scene(p_path, p_flags, p_bake_fps, &missing, &err); } -Ref<Animation> ResourceImporterScene::import_animation_from_other_importer(EditorSceneImporter *p_exception, const String &p_path, uint32_t p_flags, int p_bake_fps) { - Ref<EditorSceneImporter> importer; +Ref<Animation> ResourceImporterScene::import_animation_from_other_importer(EditorSceneFormatImporter *p_exception, const String &p_path, uint32_t p_flags, int p_bake_fps) { + Ref<EditorSceneFormatImporter> importer; String ext = p_path.get_extension().to_lower(); - for (Set<Ref<EditorSceneImporter>>::Element *E = importers.front(); E; E = E->next()) { + for (Set<Ref<EditorSceneFormatImporter>>::Element *E = importers.front(); E; E = E->next()) { if (E->get().ptr() == p_exception) { continue; } @@ -1245,7 +1485,7 @@ Ref<Animation> ResourceImporterScene::import_animation_from_other_importer(Edito } void ResourceImporterScene::_generate_meshes(Node *p_node, const Dictionary &p_mesh_data, bool p_generate_lods, bool p_create_shadow_meshes, LightBakeMode p_light_bake_mode, float p_lightmap_texel_size, const Vector<uint8_t> &p_src_lightmap_cache, Vector<Vector<uint8_t>> &r_lightmap_caches) { - EditorSceneImporterMeshNode3D *src_mesh_node = Object::cast_to<EditorSceneImporterMeshNode3D>(p_node); + ImporterMeshInstance3D *src_mesh_node = Object::cast_to<ImporterMeshInstance3D>(p_node); if (src_mesh_node) { //is mesh MeshInstance3D *mesh_node = memnew(MeshInstance3D); @@ -1259,6 +1499,8 @@ void ResourceImporterScene::_generate_meshes(Node *p_node, const Dictionary &p_m //do mesh processing bool generate_lods = p_generate_lods; + float split_angle = 25.0f; + float merge_angle = 60.0f; bool create_shadow_meshes = p_create_shadow_meshes; bool bake_lightmaps = p_light_bake_mode == LIGHT_BAKE_STATIC_LIGHTMAPS; String save_to_file; @@ -1301,17 +1543,30 @@ void ResourceImporterScene::_generate_meshes(Node *p_node, const Dictionary &p_m } } + if (mesh_settings.has("lods/normal_split_angle")) { + split_angle = mesh_settings["lods/normal_split_angle"]; + } + + if (mesh_settings.has("lods/normal_merge_angle")) { + merge_angle = mesh_settings["lods/normal_merge_angle"]; + } + if (mesh_settings.has("save_to_file/enabled") && bool(mesh_settings["save_to_file/enabled"]) && mesh_settings.has("save_to_file/path")) { save_to_file = mesh_settings["save_to_file/path"]; if (!save_to_file.is_resource_file()) { save_to_file = ""; } } + + for (int i = 0; i < post_importer_plugins.size(); i++) { + post_importer_plugins.write[i]->internal_process(EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_MESH, nullptr, src_mesh_node, src_mesh_node->get_mesh(), mesh_settings); + } } if (generate_lods) { - src_mesh_node->get_mesh()->generate_lods(); + src_mesh_node->get_mesh()->generate_lods(merge_angle, split_angle); } + if (create_shadow_meshes) { src_mesh_node->get_mesh()->create_shadow_mesh(); } @@ -1408,14 +1663,164 @@ void ResourceImporterScene::_add_shapes(Node *p_node, const Vector<Ref<Shape3D>> } } +void ResourceImporterScene::_optimize_track_usage(AnimationPlayer *p_player, AnimationImportTracks *p_track_actions) { + List<StringName> anims; + p_player->get_animation_list(&anims); + Node *parent = p_player->get_parent(); + ERR_FAIL_COND(parent == nullptr); + OrderedHashMap<NodePath, uint32_t> used_tracks[TRACK_CHANNEL_MAX]; + bool tracks_to_add = false; + static const Animation::TrackType track_types[TRACK_CHANNEL_MAX] = { Animation::TYPE_POSITION_3D, Animation::TYPE_ROTATION_3D, Animation::TYPE_SCALE_3D, Animation::TYPE_BLEND_SHAPE }; + for (const StringName &I : anims) { + Ref<Animation> anim = p_player->get_animation(I); + for (int i = 0; i < anim->get_track_count(); i++) { + for (int j = 0; j < TRACK_CHANNEL_MAX; j++) { + if (anim->track_get_type(i) != track_types[j]) { + continue; + } + switch (p_track_actions[j]) { + case ANIMATION_IMPORT_TRACKS_IF_PRESENT: { + // Do Nothing. + } break; + case ANIMATION_IMPORT_TRACKS_IF_PRESENT_FOR_ALL: { + used_tracks[j].insert(anim->track_get_path(i), 0); + tracks_to_add = true; + } break; + case ANIMATION_IMPORT_TRACKS_NEVER: { + anim->remove_track(i); + i--; + } break; + } + } + } + } + + if (!tracks_to_add) { + return; + } + + uint32_t pass = 0; + for (const StringName &I : anims) { + Ref<Animation> anim = p_player->get_animation(I); + for (int j = 0; j < TRACK_CHANNEL_MAX; j++) { + if (p_track_actions[j] != ANIMATION_IMPORT_TRACKS_IF_PRESENT_FOR_ALL) { + continue; + } + + pass++; + + for (int i = 0; i < anim->get_track_count(); i++) { + if (anim->track_get_type(i) != track_types[j]) { + continue; + } + + NodePath path = anim->track_get_path(i); + + ERR_CONTINUE(!used_tracks[j].has(path)); // Should never happen. + + used_tracks[j][path] = pass; + } + + for (OrderedHashMap<NodePath, uint32_t>::Element J = used_tracks[j].front(); J; J = J.next()) { + if (J.get() == pass) { + continue; + } + + NodePath path = J.key(); + Node *n = parent->get_node(path); + + if (j == TRACK_CHANNEL_BLEND_SHAPE) { + MeshInstance3D *mi = Object::cast_to<MeshInstance3D>(n); + if (mi && path.get_subname_count() > 0) { + StringName bs = path.get_subname(0); + bool valid; + float value = mi->get(bs, &valid); + if (valid) { + int track_idx = anim->add_track(track_types[j]); + anim->track_set_path(track_idx, path); + anim->track_set_imported(track_idx, true); + anim->blend_shape_track_insert_key(track_idx, 0, value); + } + } + + } else { + Skeleton3D *skel = Object::cast_to<Skeleton3D>(n); + Node3D *n3d = Object::cast_to<Node3D>(n); + Vector3 loc; + Quaternion rot; + Vector3 scale; + if (skel && path.get_subname_count() > 0) { + StringName bone = path.get_subname(0); + int bone_idx = skel->find_bone(bone); + if (bone_idx == -1) { + continue; + } + skel->get_bone_pose(bone_idx); + loc = skel->get_bone_pose_position(bone_idx); + rot = skel->get_bone_pose_rotation(bone_idx); + scale = skel->get_bone_pose_scale(bone_idx); + } else if (n3d) { + loc = n3d->get_position(); + rot = n3d->get_transform().basis.get_rotation_quaternion(); + scale = n3d->get_scale(); + } else { + continue; + } + + // Ensure insertion keeps tracks together and ordered by type (loc/rot/scale) + int insert_at_pos = -1; + for (int k = 0; k < anim->get_track_count(); k++) { + NodePath tpath = anim->track_get_path(k); + + if (path == tpath) { + Animation::TrackType ttype = anim->track_get_type(k); + if (insert_at_pos == -1) { + // First insert, determine whether replacing or kicking back + if (track_types[j] < ttype) { + insert_at_pos = k; + break; // No point in continuing. + } else { + insert_at_pos = k + 1; + } + } else if (ttype < track_types[j]) { + // Kick back. + insert_at_pos = k + 1; + } + } else if (insert_at_pos >= 0) { + break; + } + } + int track_idx = anim->add_track(track_types[j], insert_at_pos); + + anim->track_set_path(track_idx, path); + anim->track_set_imported(track_idx, true); + switch (j) { + case TRACK_CHANNEL_POSITION: { + anim->position_track_insert_key(track_idx, 0, loc); + } break; + case TRACK_CHANNEL_ROTATION: { + anim->rotation_track_insert_key(track_idx, 0, rot); + } break; + case TRACK_CHANNEL_SCALE: { + anim->scale_track_insert_key(track_idx, 0, scale); + } break; + default: { + } + } + } + } + } + } +} + Node *ResourceImporterScene::pre_import(const String &p_source_file) { - Ref<EditorSceneImporter> importer; + Ref<EditorSceneFormatImporter> importer; String ext = p_source_file.get_extension().to_lower(); EditorProgress progress("pre-import", TTR("Pre-Import Scene"), 0); progress.step(TTR("Importing Scene..."), 0); - for (Set<Ref<EditorSceneImporter>>::Element *E = importers.front(); E; E = E->next()) { + for (Set<Ref<EditorSceneFormatImporter>>::Element *E = importers.front(); E; E = E->next()) { List<String> extensions; E->get()->get_extensions(&extensions); @@ -1434,12 +1839,12 @@ Node *ResourceImporterScene::pre_import(const String &p_source_file) { ERR_FAIL_COND_V(!importer.is_valid(), nullptr); Error err = OK; - Node *scene = importer->import_scene(p_source_file, EditorSceneImporter::IMPORT_ANIMATION | EditorSceneImporter::IMPORT_GENERATE_TANGENT_ARRAYS, 15, nullptr, &err); + Node *scene = importer->import_scene(p_source_file, EditorSceneFormatImporter::IMPORT_ANIMATION | EditorSceneFormatImporter::IMPORT_GENERATE_TANGENT_ARRAYS, 15, nullptr, &err); if (!scene || err != OK) { return nullptr; } - Map<Ref<EditorSceneImporterMesh>, Vector<Ref<Shape3D>>> collision_map; + Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> collision_map; _pre_fix_node(scene, scene, collision_map); @@ -1449,13 +1854,13 @@ Node *ResourceImporterScene::pre_import(const String &p_source_file) { Error ResourceImporterScene::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { const String &src_path = p_source_file; - Ref<EditorSceneImporter> importer; + Ref<EditorSceneFormatImporter> importer; String ext = src_path.get_extension().to_lower(); EditorProgress progress("import", TTR("Import Scene"), 104); progress.step(TTR("Importing Scene..."), 0); - for (Set<Ref<EditorSceneImporter>>::Element *E = importers.front(); E; E = E->next()) { + for (Set<Ref<EditorSceneFormatImporter>>::Element *E = importers.front(); E; E = E->next()) { List<String> extensions; E->get()->get_extensions(&extensions); @@ -1478,16 +1883,16 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p int import_flags = 0; if (bool(p_options["animation/import"])) { - import_flags |= EditorSceneImporter::IMPORT_ANIMATION; + import_flags |= EditorSceneFormatImporter::IMPORT_ANIMATION; } if (bool(p_options["skins/use_named_skins"])) { - import_flags |= EditorSceneImporter::IMPORT_USE_NAMED_SKIN_BINDS; + import_flags |= EditorSceneFormatImporter::IMPORT_USE_NAMED_SKIN_BINDS; } bool ensure_tangents = p_options["meshes/ensure_tangents"]; if (ensure_tangents) { - import_flags |= EditorSceneImporter::IMPORT_GENERATE_TANGENT_ARRAYS; + import_flags |= EditorSceneFormatImporter::IMPORT_GENERATE_TANGENT_ARRAYS; } Error err = OK; @@ -1514,17 +1919,17 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p animation_data = subresources["animations"]; } - Set<Ref<EditorSceneImporterMesh>> scanned_meshes; - Map<Ref<EditorSceneImporterMesh>, Vector<Ref<Shape3D>>> collision_map; + Set<Ref<ImporterMesh>> scanned_meshes; + Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> collision_map; _pre_fix_node(scene, scene, collision_map); - _post_fix_node(scene, scene, collision_map, scanned_meshes, node_data, material_data, animation_data, fps); - bool use_bake_reset_animation = p_options["animation/bake_reset_animation"]; - if (use_bake_reset_animation) { - BakeReset bake_reset; - bake_reset._bake_animation_pose(scene, "RESET"); + + for (int i = 0; i < post_importer_plugins.size(); i++) { + post_importer_plugins.write[i]->pre_process(scene, p_options); } + _post_fix_node(scene, scene, collision_map, scanned_meshes, node_data, material_data, animation_data, fps); + String root_type = p_options["nodes/root_type"]; root_type = root_type.split(" ")[0]; // full root_type is "ClassName (filename.gd)" for a script global class. @@ -1626,6 +2031,10 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p } } + for (int i = 0; i < post_importer_plugins.size(); i++) { + post_importer_plugins.write[i]->post_process(scene, p_options); + } + progress.step(TTR("Saving..."), 104); Ref<PackedScene> packer = memnew(PackedScene); @@ -1657,15 +2066,15 @@ ResourceImporterScene::ResourceImporterScene() { /////////////////////////////////////// -uint32_t EditorSceneImporterESCN::get_import_flags() const { +uint32_t EditorSceneFormatImporterESCN::get_import_flags() const { return IMPORT_SCENE; } -void EditorSceneImporterESCN::get_extensions(List<String> *r_extensions) const { +void EditorSceneFormatImporterESCN::get_extensions(List<String> *r_extensions) const { r_extensions->push_back("escn"); } -Node *EditorSceneImporterESCN::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { +Node *EditorSceneFormatImporterESCN::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { Error error; Ref<PackedScene> ps = ResourceFormatLoaderText::singleton->load(p_path, p_path, &error); ERR_FAIL_COND_V_MSG(!ps.is_valid(), nullptr, "Cannot load scene as text resource from path '" + p_path + "'."); @@ -1676,6 +2085,6 @@ Node *EditorSceneImporterESCN::import_scene(const String &p_path, uint32_t p_fla return scene; } -Ref<Animation> EditorSceneImporterESCN::import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) { +Ref<Animation> EditorSceneFormatImporterESCN::import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) { ERR_FAIL_V(Ref<Animation>()); } diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h index e232b715be..e1e7046be5 100644 --- a/editor/import/resource_importer_scene.h +++ b/editor/import/resource_importer_scene.h @@ -41,9 +41,9 @@ class Material; class AnimationPlayer; -class EditorSceneImporterMesh; -class EditorSceneImporter : public RefCounted { - GDCLASS(EditorSceneImporter, RefCounted); +class ImporterMesh; +class EditorSceneFormatImporter : public RefCounted { + GDCLASS(EditorSceneFormatImporter, RefCounted); protected: static void _bind_methods(); @@ -70,7 +70,7 @@ public: virtual Node *import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr); virtual Ref<Animation> import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps); - EditorSceneImporter() {} + EditorSceneFormatImporter() {} }; class EditorScenePostImport : public RefCounted { @@ -90,10 +90,64 @@ public: EditorScenePostImport(); }; +class EditorScenePostImportPlugin : public RefCounted { + GDCLASS(EditorScenePostImportPlugin, RefCounted); + +public: + enum InternalImportCategory { + INTERNAL_IMPORT_CATEGORY_NODE, + INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE, + INTERNAL_IMPORT_CATEGORY_MESH, + INTERNAL_IMPORT_CATEGORY_MATERIAL, + INTERNAL_IMPORT_CATEGORY_ANIMATION, + INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE, + INTERNAL_IMPORT_CATEGORY_MAX + }; + +private: + mutable const Map<StringName, Variant> *current_options = nullptr; + mutable const Dictionary *current_options_dict = nullptr; + List<ResourceImporter::ImportOption> *current_option_list = nullptr; + InternalImportCategory current_category = INTERNAL_IMPORT_CATEGORY_MAX; + +protected: + GDVIRTUAL1(_get_internal_import_options, int) + GDVIRTUAL2RC(Variant, _get_internal_option_visibility, int, String) + GDVIRTUAL2RC(Variant, _get_internal_option_update_view_required, int, String) + GDVIRTUAL4(_internal_process, int, Node *, Node *, RES) + GDVIRTUAL0(_get_import_options) + GDVIRTUAL1RC(Variant, _get_option_visibility, String) + GDVIRTUAL1(_pre_process, Node *) + GDVIRTUAL1(_post_process, Node *) + + static void _bind_methods(); + +public: + Variant get_option_value(const StringName &p_name) const; + void add_import_option(const String &p_name, Variant p_default_value); + void add_import_option_advanced(Variant::Type p_type, const String &p_name, Variant p_default_value, PropertyHint p_hint = PROPERTY_HINT_NONE, const String &p_hint_string = String(), int p_usage_flags = PROPERTY_USAGE_DEFAULT); + + virtual void get_internal_import_options(InternalImportCategory p_category, List<ResourceImporter::ImportOption> *r_options); + virtual Variant get_internal_option_visibility(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const; + virtual Variant get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const; + + virtual void internal_process(InternalImportCategory p_category, Node *p_base_scene, Node *p_node, RES p_resource, const Dictionary &p_options); + + virtual void get_import_options(List<ResourceImporter::ImportOption> *r_options); + virtual Variant get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const; + + virtual void pre_process(Node *p_scene, const Map<StringName, Variant> &p_options); + virtual void post_process(Node *p_scene, const Map<StringName, Variant> &p_options); + + EditorScenePostImportPlugin() {} +}; + +VARIANT_ENUM_CAST(EditorScenePostImportPlugin::InternalImportCategory) + class ResourceImporterScene : public ResourceImporter { GDCLASS(ResourceImporterScene, ResourceImporter); - Set<Ref<EditorSceneImporter>> importers; + Set<Ref<EditorSceneFormatImporter>> importers; static ResourceImporterScene *singleton; @@ -144,13 +198,33 @@ class ResourceImporterScene : public ResourceImporter { void _generate_meshes(Node *p_node, const Dictionary &p_mesh_data, bool p_generate_lods, bool p_create_shadow_meshes, LightBakeMode p_light_bake_mode, float p_lightmap_texel_size, const Vector<uint8_t> &p_src_lightmap_cache, Vector<Vector<uint8_t>> &r_lightmap_caches); void _add_shapes(Node *p_node, const Vector<Ref<Shape3D>> &p_shapes); + enum AnimationImportTracks { + ANIMATION_IMPORT_TRACKS_IF_PRESENT, + ANIMATION_IMPORT_TRACKS_IF_PRESENT_FOR_ALL, + ANIMATION_IMPORT_TRACKS_NEVER, + }; + enum TrackChannel { + TRACK_CHANNEL_POSITION, + TRACK_CHANNEL_ROTATION, + TRACK_CHANNEL_SCALE, + TRACK_CHANNEL_BLEND_SHAPE, + TRACK_CHANNEL_MAX + }; + + void _optimize_track_usage(AnimationPlayer *p_player, AnimationImportTracks *p_track_actions); + + mutable Vector<Ref<EditorScenePostImportPlugin>> post_importer_plugins; + public: static ResourceImporterScene *get_singleton() { return singleton; } - const Set<Ref<EditorSceneImporter>> &get_importers() const { return importers; } + void add_post_importer_plugin(const Ref<EditorScenePostImportPlugin> &p_plugin) { post_importer_plugins.push_back(p_plugin); } + void remove_post_importer_plugin(const Ref<EditorScenePostImportPlugin> &p_plugin) { post_importer_plugins.erase(p_plugin); } + + const Set<Ref<EditorSceneFormatImporter>> &get_importers() const { return importers; } - void add_importer(Ref<EditorSceneImporter> p_importer) { importers.insert(p_importer); } - void remove_importer(Ref<EditorSceneImporter> p_importer) { importers.erase(p_importer); } + void add_importer(Ref<EditorSceneFormatImporter> p_importer) { importers.insert(p_importer); } + void remove_importer(Ref<EditorSceneFormatImporter> p_importer) { importers.erase(p_importer); } virtual String get_importer_name() const override; virtual String get_visible_name() const override; @@ -163,13 +237,13 @@ public: virtual String get_preset_name(int p_idx) const override; enum InternalImportCategory { - INTERNAL_IMPORT_CATEGORY_NODE, - INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE, - INTERNAL_IMPORT_CATEGORY_MESH, - INTERNAL_IMPORT_CATEGORY_MATERIAL, - INTERNAL_IMPORT_CATEGORY_ANIMATION, - INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE, - INTERNAL_IMPORT_CATEGORY_MAX + INTERNAL_IMPORT_CATEGORY_NODE = EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_NODE, + INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE = EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE, + INTERNAL_IMPORT_CATEGORY_MESH = EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_MESH, + INTERNAL_IMPORT_CATEGORY_MATERIAL = EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_MATERIAL, + INTERNAL_IMPORT_CATEGORY_ANIMATION = EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_ANIMATION, + INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE = EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE, + INTERNAL_IMPORT_CATEGORY_MAX = EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_MAX }; void get_internal_import_options(InternalImportCategory p_category, List<ImportOption> *r_options) const; @@ -181,8 +255,8 @@ public: // Import scenes *after* everything else (such as textures). virtual int get_import_order() const override { return ResourceImporter::IMPORT_ORDER_SCENE; } - Node *_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<EditorSceneImporterMesh>, Vector<Ref<Shape3D>>> &collision_map); - Node *_post_fix_node(Node *p_node, Node *p_root, Map<Ref<EditorSceneImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Set<Ref<EditorSceneImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps); + Node *_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map); + Node *_post_fix_node(Node *p_node, Node *p_root, Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Set<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps); Ref<Animation> _save_animation_to_file(Ref<Animation> anim, bool p_save_to_file, String p_save_to_path, bool p_keep_custom_tracks); void _create_clips(AnimationPlayer *anim, const Array &p_clips, bool p_bake_all); @@ -191,8 +265,8 @@ public: Node *pre_import(const String &p_source_file); virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; - Node *import_scene_from_other_importer(EditorSceneImporter *p_exception, const String &p_path, uint32_t p_flags, int p_bake_fps); - Ref<Animation> import_animation_from_other_importer(EditorSceneImporter *p_exception, const String &p_path, uint32_t p_flags, int p_bake_fps); + Node *import_scene_from_other_importer(EditorSceneFormatImporter *p_exception, const String &p_path, uint32_t p_flags, int p_bake_fps); + Ref<Animation> import_animation_from_other_importer(EditorSceneFormatImporter *p_exception, const String &p_path, uint32_t p_flags, int p_bake_fps); virtual bool has_advanced_options() const override; virtual void show_advanced_options(const String &p_path) override; @@ -208,8 +282,8 @@ public: static Transform3D get_collision_shapes_transform(const M &p_options); }; -class EditorSceneImporterESCN : public EditorSceneImporter { - GDCLASS(EditorSceneImporterESCN, EditorSceneImporter); +class EditorSceneFormatImporterESCN : public EditorSceneFormatImporter { + GDCLASS(EditorSceneFormatImporterESCN, EditorSceneFormatImporter); public: virtual uint32_t get_import_flags() const override; diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp index 61745cb6ee..96a53b3257 100644 --- a/editor/import/resource_importer_texture.cpp +++ b/editor/import/resource_importer_texture.cpp @@ -86,28 +86,28 @@ void ResourceImporterTexture::update_imports() { return; } - for (Map<StringName, MakeInfo>::Element *E = make_flags.front(); E; E = E->next()) { + for (const KeyValue<StringName, MakeInfo> &E : make_flags) { Ref<ConfigFile> cf; cf.instantiate(); - String src_path = String(E->key()) + ".import"; + String src_path = String(E.key) + ".import"; Error err = cf->load(src_path); ERR_CONTINUE(err != OK); bool changed = false; - if (E->get().flags & MAKE_NORMAL_FLAG && int(cf->get_value("params", "compress/normal_map")) == 0) { + if (E.value.flags & MAKE_NORMAL_FLAG && int(cf->get_value("params", "compress/normal_map")) == 0) { cf->set_value("params", "compress/normal_map", 1); changed = true; } - if (E->get().flags & MAKE_ROUGHNESS_FLAG && int(cf->get_value("params", "roughness/mode")) == 0) { - cf->set_value("params", "roughness/mode", E->get().channel_for_roughness + 2); - cf->set_value("params", "roughness/src_normal", E->get().normal_path_for_roughness); + if (E.value.flags & MAKE_ROUGHNESS_FLAG && int(cf->get_value("params", "roughness/mode")) == 0) { + cf->set_value("params", "roughness/mode", E.value.channel_for_roughness + 2); + cf->set_value("params", "roughness/src_normal", E.value.normal_path_for_roughness); changed = true; } - if (E->get().flags & MAKE_3D_FLAG && bool(cf->get_value("params", "detect_3d/compress_to"))) { + if (E.value.flags & MAKE_3D_FLAG && bool(cf->get_value("params", "detect_3d/compress_to"))) { int compress_to = cf->get_value("params", "detect_3d/compress_to"); cf->set_value("params", "detect_3d/compress_to", 0); if (compress_to == 1) { @@ -121,7 +121,7 @@ void ResourceImporterTexture::update_imports() { if (changed) { cf->save(src_path); - to_reimport.push_back(E->key()); + to_reimport.push_back(E.key); } } diff --git a/editor/import/resource_importer_texture_atlas.cpp b/editor/import/resource_importer_texture_atlas.cpp index 36fd161c35..cf699599ae 100644 --- a/editor/import/resource_importer_texture_atlas.cpp +++ b/editor/import/resource_importer_texture_atlas.cpp @@ -74,6 +74,7 @@ String ResourceImporterTextureAtlas::get_preset_name(int p_idx) const { void ResourceImporterTextureAtlas::get_import_options(List<ImportOption> *r_options, int p_preset) const { r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "atlas_file", PROPERTY_HINT_SAVE_FILE, "*.png"), "")); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "import_mode", PROPERTY_HINT_ENUM, "Region,Mesh2D"), 0)); + r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "crop_to_region"), false)); } String ResourceImporterTextureAtlas::get_option_group_file() const { @@ -206,6 +207,7 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file ERR_CONTINUE(err != OK); pack_data.image = image; + pack_data.is_cropped = options["crop_to_region"]; int mode = options["import_mode"]; @@ -324,7 +326,10 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file atlas_texture.instantiate(); atlas_texture->set_atlas(cache); atlas_texture->set_region(Rect2(offset, pack_data.region.size)); - atlas_texture->set_margin(Rect2(pack_data.region.position, pack_data.image->get_size() - pack_data.region.size)); + + if (!pack_data.is_cropped) { + atlas_texture->set_margin(Rect2(pack_data.region.position, pack_data.image->get_size() - pack_data.region.size)); + } texture = atlas_texture; } else { diff --git a/editor/import/resource_importer_texture_atlas.h b/editor/import/resource_importer_texture_atlas.h index b675d12477..d518a120bf 100644 --- a/editor/import/resource_importer_texture_atlas.h +++ b/editor/import/resource_importer_texture_atlas.h @@ -38,6 +38,7 @@ class ResourceImporterTextureAtlas : public ResourceImporter { struct PackData { Rect2 region; + bool is_cropped = false; bool is_mesh = false; Vector<int> chart_pieces; //one for region, many for mesh Vector<Vector<Vector2>> chart_vertices; //for mesh diff --git a/editor/import/scene_import_settings.cpp b/editor/import/scene_import_settings.cpp index f99ab9888a..95a96f9e26 100644 --- a/editor/import/scene_import_settings.cpp +++ b/editor/import/scene_import_settings.cpp @@ -31,7 +31,8 @@ #include "scene_import_settings.h" #include "editor/editor_node.h" #include "editor/editor_scale.h" -#include "editor/import/scene_importer_mesh_node_3d.h" +#include "scene/3d/importer_mesh_instance_3d.h" +#include "scene/resources/importer_mesh.h" #include "scene/resources/surface_tool.h" class SceneImportSettingsData : public Object { @@ -240,7 +241,7 @@ void SceneImportSettings::_fill_scene(Node *p_node, TreeItem *p_parent_item) { p_node->set_meta("import_id", import_id); } - EditorSceneImporterMeshNode3D *src_mesh_node = Object::cast_to<EditorSceneImporterMeshNode3D>(p_node); + ImporterMeshInstance3D *src_mesh_node = Object::cast_to<ImporterMeshInstance3D>(p_node); if (src_mesh_node) { MeshInstance3D *mesh_node = memnew(MeshInstance3D); @@ -249,7 +250,7 @@ void SceneImportSettings::_fill_scene(Node *p_node, TreeItem *p_parent_item) { mesh_node->set_skin(src_mesh_node->get_skin()); mesh_node->set_skeleton_path(src_mesh_node->get_skeleton_path()); if (src_mesh_node->get_mesh().is_valid()) { - Ref<EditorSceneImporterMesh> editor_mesh = src_mesh_node->get_mesh(); + Ref<ImporterMesh> editor_mesh = src_mesh_node->get_mesh(); mesh_node->set_mesh(editor_mesh->get_mesh()); } @@ -771,52 +772,52 @@ void SceneImportSettings::_re_import() { Dictionary subresources; - for (Map<String, NodeData>::Element *E = node_map.front(); E; E = E->next()) { - if (E->get().settings.size()) { + for (KeyValue<String, NodeData> &E : node_map) { + if (E.value.settings.size()) { Dictionary d; - for (Map<StringName, Variant>::Element *F = E->get().settings.front(); F; F = F->next()) { - d[String(F->key())] = F->get(); + for (const KeyValue<StringName, Variant> &F : E.value.settings) { + d[String(F.key)] = F.value; } - nodes[E->key()] = d; + nodes[E.key] = d; } } if (nodes.size()) { subresources["nodes"] = nodes; } - for (Map<String, MaterialData>::Element *E = material_map.front(); E; E = E->next()) { - if (E->get().settings.size()) { + for (KeyValue<String, MaterialData> &E : material_map) { + if (E.value.settings.size()) { Dictionary d; - for (Map<StringName, Variant>::Element *F = E->get().settings.front(); F; F = F->next()) { - d[String(F->key())] = F->get(); + for (const KeyValue<StringName, Variant> &F : E.value.settings) { + d[String(F.key)] = F.value; } - materials[E->key()] = d; + materials[E.key] = d; } } if (materials.size()) { subresources["materials"] = materials; } - for (Map<String, MeshData>::Element *E = mesh_map.front(); E; E = E->next()) { - if (E->get().settings.size()) { + for (KeyValue<String, MeshData> &E : mesh_map) { + if (E.value.settings.size()) { Dictionary d; - for (Map<StringName, Variant>::Element *F = E->get().settings.front(); F; F = F->next()) { - d[String(F->key())] = F->get(); + for (const KeyValue<StringName, Variant> &F : E.value.settings) { + d[String(F.key)] = F.value; } - meshes[E->key()] = d; + meshes[E.key] = d; } } if (meshes.size()) { subresources["meshes"] = meshes; } - for (Map<String, AnimationData>::Element *E = animation_map.front(); E; E = E->next()) { - if (E->get().settings.size()) { + for (KeyValue<String, AnimationData> &E : animation_map) { + if (E.value.settings.size()) { Dictionary d; - for (Map<StringName, Variant>::Element *F = E->get().settings.front(); F; F = F->next()) { - d[String(F->key())] = F->get(); + for (const KeyValue<StringName, Variant> &F : E.value.settings) { + d[String(F.key)] = F.value; } - animations[E->key()] = d; + animations[E.key] = d; } } if (animations.size()) { @@ -889,8 +890,8 @@ void SceneImportSettings::_save_dir_callback(const String &p_path) { switch (current_action) { case ACTION_EXTRACT_MATERIALS: { - for (Map<String, MaterialData>::Element *E = material_map.front(); E; E = E->next()) { - MaterialData &md = material_map[E->key()]; + for (const KeyValue<String, MaterialData> &E : material_map) { + MaterialData &md = material_map[E.key]; TreeItem *item = external_path_tree->create_item(root); @@ -905,7 +906,7 @@ void SceneImportSettings::_save_dir_callback(const String &p_path) { item->set_text(2, "Already External"); item->set_tooltip(2, TTR("This material already references an external file, no action will be taken.\nDisable the external property for it to be extracted again.")); } else { - item->set_metadata(0, E->key()); + item->set_metadata(0, E.key); item->set_editable(0, true); item->set_checked(0, true); String path = p_path.plus_file(name); @@ -942,8 +943,8 @@ void SceneImportSettings::_save_dir_callback(const String &p_path) { external_paths->get_ok_button()->set_text(TTR("Extract")); } break; case ACTION_CHOOSE_MESH_SAVE_PATHS: { - for (Map<String, MeshData>::Element *E = mesh_map.front(); E; E = E->next()) { - MeshData &md = mesh_map[E->key()]; + for (const KeyValue<String, MeshData> &E : mesh_map) { + MeshData &md = mesh_map[E.key]; TreeItem *item = external_path_tree->create_item(root); @@ -958,7 +959,7 @@ void SceneImportSettings::_save_dir_callback(const String &p_path) { item->set_text(2, "Already Saving"); item->set_tooltip(2, TTR("This mesh already saves to an external resource, no action will be taken.")); } else { - item->set_metadata(0, E->key()); + item->set_metadata(0, E.key); item->set_editable(0, true); item->set_checked(0, true); String path = p_path.plus_file(name); @@ -995,8 +996,8 @@ void SceneImportSettings::_save_dir_callback(const String &p_path) { external_paths->get_ok_button()->set_text(TTR("Set Paths")); } break; case ACTION_CHOOSE_ANIMATION_SAVE_PATHS: { - for (Map<String, AnimationData>::Element *E = animation_map.front(); E; E = E->next()) { - AnimationData &ad = animation_map[E->key()]; + for (const KeyValue<String, AnimationData> &E : animation_map) { + AnimationData &ad = animation_map[E.key]; TreeItem *item = external_path_tree->create_item(root); @@ -1010,7 +1011,7 @@ void SceneImportSettings::_save_dir_callback(const String &p_path) { item->set_text(2, "Already Saving"); item->set_tooltip(2, TTR("This animation already saves to an external resource, no action will be taken.")); } else { - item->set_metadata(0, E->key()); + item->set_metadata(0, E.key); item->set_editable(0, true); item->set_checked(0, true); String path = p_path.plus_file(name); diff --git a/editor/import/scene_importer_mesh.cpp b/editor/import/scene_importer_mesh.cpp deleted file mode 100644 index 5e6dd08e79..0000000000 --- a/editor/import/scene_importer_mesh.cpp +++ /dev/null @@ -1,889 +0,0 @@ -/*************************************************************************/ -/* scene_importer_mesh.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 "scene_importer_mesh.h" - -#include "core/math/math_defs.h" -#include "scene/resources/surface_tool.h" - -#include <cstdint> - -void EditorSceneImporterMesh::add_blend_shape(const String &p_name) { - ERR_FAIL_COND(surfaces.size() > 0); - blend_shapes.push_back(p_name); -} - -int EditorSceneImporterMesh::get_blend_shape_count() const { - return blend_shapes.size(); -} - -String EditorSceneImporterMesh::get_blend_shape_name(int p_blend_shape) const { - ERR_FAIL_INDEX_V(p_blend_shape, blend_shapes.size(), String()); - return blend_shapes[p_blend_shape]; -} - -void EditorSceneImporterMesh::set_blend_shape_mode(Mesh::BlendShapeMode p_blend_shape_mode) { - blend_shape_mode = p_blend_shape_mode; -} - -Mesh::BlendShapeMode EditorSceneImporterMesh::get_blend_shape_mode() const { - return blend_shape_mode; -} - -void EditorSceneImporterMesh::add_surface(Mesh::PrimitiveType p_primitive, const Array &p_arrays, const Array &p_blend_shapes, const Dictionary &p_lods, const Ref<Material> &p_material, const String &p_name, const uint32_t p_flags) { - ERR_FAIL_COND(p_blend_shapes.size() != blend_shapes.size()); - ERR_FAIL_COND(p_arrays.size() != Mesh::ARRAY_MAX); - Surface s; - s.primitive = p_primitive; - s.arrays = p_arrays; - s.name = p_name; - s.flags = p_flags; - - Vector<Vector3> vertex_array = p_arrays[Mesh::ARRAY_VERTEX]; - int vertex_count = vertex_array.size(); - ERR_FAIL_COND(vertex_count == 0); - - for (int i = 0; i < blend_shapes.size(); i++) { - Array bsdata = p_blend_shapes[i]; - ERR_FAIL_COND(bsdata.size() != Mesh::ARRAY_MAX); - Vector<Vector3> vertex_data = bsdata[Mesh::ARRAY_VERTEX]; - ERR_FAIL_COND(vertex_data.size() != vertex_count); - Surface::BlendShape bs; - bs.arrays = bsdata; - s.blend_shape_data.push_back(bs); - } - - List<Variant> lods; - p_lods.get_key_list(&lods); - for (const Variant &E : lods) { - ERR_CONTINUE(!E.is_num()); - Surface::LOD lod; - lod.distance = E; - lod.indices = p_lods[E]; - ERR_CONTINUE(lod.indices.size() == 0); - s.lods.push_back(lod); - } - - s.material = p_material; - - surfaces.push_back(s); - mesh.unref(); -} - -int EditorSceneImporterMesh::get_surface_count() const { - return surfaces.size(); -} - -Mesh::PrimitiveType EditorSceneImporterMesh::get_surface_primitive_type(int p_surface) { - ERR_FAIL_INDEX_V(p_surface, surfaces.size(), Mesh::PRIMITIVE_MAX); - return surfaces[p_surface].primitive; -} -Array EditorSceneImporterMesh::get_surface_arrays(int p_surface) const { - ERR_FAIL_INDEX_V(p_surface, surfaces.size(), Array()); - return surfaces[p_surface].arrays; -} -String EditorSceneImporterMesh::get_surface_name(int p_surface) const { - ERR_FAIL_INDEX_V(p_surface, surfaces.size(), String()); - return surfaces[p_surface].name; -} -void EditorSceneImporterMesh::set_surface_name(int p_surface, const String &p_name) { - ERR_FAIL_INDEX(p_surface, surfaces.size()); - surfaces.write[p_surface].name = p_name; - mesh.unref(); -} - -Array EditorSceneImporterMesh::get_surface_blend_shape_arrays(int p_surface, int p_blend_shape) const { - ERR_FAIL_INDEX_V(p_surface, surfaces.size(), Array()); - ERR_FAIL_INDEX_V(p_blend_shape, surfaces[p_surface].blend_shape_data.size(), Array()); - return surfaces[p_surface].blend_shape_data[p_blend_shape].arrays; -} -int EditorSceneImporterMesh::get_surface_lod_count(int p_surface) const { - ERR_FAIL_INDEX_V(p_surface, surfaces.size(), 0); - return surfaces[p_surface].lods.size(); -} -Vector<int> EditorSceneImporterMesh::get_surface_lod_indices(int p_surface, int p_lod) const { - ERR_FAIL_INDEX_V(p_surface, surfaces.size(), Vector<int>()); - ERR_FAIL_INDEX_V(p_lod, surfaces[p_surface].lods.size(), Vector<int>()); - - return surfaces[p_surface].lods[p_lod].indices; -} - -float EditorSceneImporterMesh::get_surface_lod_size(int p_surface, int p_lod) const { - ERR_FAIL_INDEX_V(p_surface, surfaces.size(), 0); - ERR_FAIL_INDEX_V(p_lod, surfaces[p_surface].lods.size(), 0); - return surfaces[p_surface].lods[p_lod].distance; -} - -uint32_t EditorSceneImporterMesh::get_surface_format(int p_surface) const { - ERR_FAIL_INDEX_V(p_surface, surfaces.size(), 0); - return surfaces[p_surface].flags; -} - -Ref<Material> EditorSceneImporterMesh::get_surface_material(int p_surface) const { - ERR_FAIL_INDEX_V(p_surface, surfaces.size(), Ref<Material>()); - return surfaces[p_surface].material; -} - -void EditorSceneImporterMesh::set_surface_material(int p_surface, const Ref<Material> &p_material) { - ERR_FAIL_INDEX(p_surface, surfaces.size()); - surfaces.write[p_surface].material = p_material; - mesh.unref(); -} - -Basis EditorSceneImporterMesh::compute_rotation_matrix_from_ortho_6d(Vector3 p_x_raw, Vector3 p_y_raw) { - Vector3 x = p_x_raw.normalized(); - Vector3 z = x.cross(p_y_raw); - z = z.normalized(); - Vector3 y = z.cross(x); - Basis basis; - basis.set_axis(Vector3::AXIS_X, x); - basis.set_axis(Vector3::AXIS_Y, y); - basis.set_axis(Vector3::AXIS_Z, z); - return basis; -} - -void EditorSceneImporterMesh::generate_lods() { - if (!SurfaceTool::simplify_func) { - return; - } - if (!SurfaceTool::simplify_scale_func) { - return; - } - if (!SurfaceTool::simplify_sloppy_func) { - return; - } - if (!SurfaceTool::simplify_with_attrib_func) { - return; - } - - for (int i = 0; i < surfaces.size(); i++) { - if (surfaces[i].primitive != Mesh::PRIMITIVE_TRIANGLES) { - continue; - } - - surfaces.write[i].lods.clear(); - Vector<Vector3> vertices = surfaces[i].arrays[RS::ARRAY_VERTEX]; - Vector<int> indices = surfaces[i].arrays[RS::ARRAY_INDEX]; - if (indices.size() == 0) { - continue; //no lods if no indices - } - Vector<Vector3> normals = surfaces[i].arrays[RS::ARRAY_NORMAL]; - uint32_t vertex_count = vertices.size(); - const Vector3 *vertices_ptr = vertices.ptr(); - Vector<float> attributes; - Vector<float> normal_weights; - int32_t attribute_count = 6; - if (normals.size()) { - attributes.resize(normals.size() * attribute_count); - for (int32_t normal_i = 0; normal_i < normals.size(); normal_i++) { - Basis basis; - basis.set_euler(normals[normal_i]); - Vector3 basis_x = basis.get_axis(0); - Vector3 basis_y = basis.get_axis(1); - basis = compute_rotation_matrix_from_ortho_6d(basis_x, basis_y); - basis_x = basis.get_axis(0); - basis_y = basis.get_axis(1); - attributes.write[normal_i * attribute_count + 0] = basis_x.x; - attributes.write[normal_i * attribute_count + 1] = basis_x.y; - attributes.write[normal_i * attribute_count + 2] = basis_x.z; - attributes.write[normal_i * attribute_count + 3] = basis_y.x; - attributes.write[normal_i * attribute_count + 4] = basis_y.y; - attributes.write[normal_i * attribute_count + 5] = basis_y.z; - } - normal_weights.resize(vertex_count); - for (int32_t weight_i = 0; weight_i < normal_weights.size(); weight_i++) { - normal_weights.write[weight_i] = 1.0; - } - } else { - attribute_count = 0; - } - const int min_indices = 10; - const float error_tolerance = 1.44224'95703; // Cube root of 3 - const float threshold = 1.0 / error_tolerance; - int index_target = indices.size() * threshold; - float max_mesh_error_percentage = 1e0f; - float mesh_error = 0.0f; - float scale = SurfaceTool::simplify_scale_func((const float *)vertices_ptr, vertex_count, sizeof(Vector3)); - while (index_target > min_indices) { - Vector<int> new_indices; - new_indices.resize(indices.size()); - size_t new_len = SurfaceTool::simplify_with_attrib_func((unsigned int *)new_indices.ptrw(), (const unsigned int *)indices.ptr(), indices.size(), (const float *)vertices_ptr, vertex_count, sizeof(Vector3), index_target, max_mesh_error_percentage, &mesh_error, (float *)attributes.ptrw(), normal_weights.ptrw(), attribute_count); - if ((int)new_len > (index_target * error_tolerance)) { - break; - } - Surface::LOD lod; - lod.distance = mesh_error * scale; - if (Math::is_zero_approx(mesh_error)) { - break; - } - if (new_len <= 0) { - break; - } - new_indices.resize(new_len); - lod.indices = new_indices; - print_line("Lod " + itos(surfaces.write[i].lods.size()) + " begin with " + itos(indices.size() / 3) + " triangles and shoot for " + itos(index_target / 3) + " triangles. Got " + itos(new_len / 3) + " triangles. Lod screen ratio " + rtos(lod.distance)); - surfaces.write[i].lods.push_back(lod); - index_target *= threshold; - } - } -} - -bool EditorSceneImporterMesh::has_mesh() const { - return mesh.is_valid(); -} - -Ref<ArrayMesh> EditorSceneImporterMesh::get_mesh(const Ref<ArrayMesh> &p_base) { - ERR_FAIL_COND_V(surfaces.size() == 0, Ref<ArrayMesh>()); - - if (mesh.is_null()) { - if (p_base.is_valid()) { - mesh = p_base; - } - if (mesh.is_null()) { - mesh.instantiate(); - } - mesh->set_name(get_name()); - if (has_meta("import_id")) { - mesh->set_meta("import_id", get_meta("import_id")); - } - for (int i = 0; i < blend_shapes.size(); i++) { - mesh->add_blend_shape(blend_shapes[i]); - } - mesh->set_blend_shape_mode(blend_shape_mode); - for (int i = 0; i < surfaces.size(); i++) { - Array bs_data; - if (surfaces[i].blend_shape_data.size()) { - for (int j = 0; j < surfaces[i].blend_shape_data.size(); j++) { - bs_data.push_back(surfaces[i].blend_shape_data[j].arrays); - } - } - Dictionary lods; - if (surfaces[i].lods.size()) { - for (int j = 0; j < surfaces[i].lods.size(); j++) { - lods[surfaces[i].lods[j].distance] = surfaces[i].lods[j].indices; - } - } - - mesh->add_surface_from_arrays(surfaces[i].primitive, surfaces[i].arrays, bs_data, lods, surfaces[i].flags); - if (surfaces[i].material.is_valid()) { - mesh->surface_set_material(mesh->get_surface_count() - 1, surfaces[i].material); - } - if (surfaces[i].name != String()) { - mesh->surface_set_name(mesh->get_surface_count() - 1, surfaces[i].name); - } - } - - mesh->set_lightmap_size_hint(lightmap_size_hint); - - if (shadow_mesh.is_valid()) { - Ref<ArrayMesh> shadow = shadow_mesh->get_mesh(); - mesh->set_shadow_mesh(shadow); - } - } - - return mesh; -} - -void EditorSceneImporterMesh::clear() { - surfaces.clear(); - blend_shapes.clear(); - mesh.unref(); -} - -void EditorSceneImporterMesh::create_shadow_mesh() { - if (shadow_mesh.is_valid()) { - shadow_mesh.unref(); - } - - //no shadow mesh for blendshapes - if (blend_shapes.size() > 0) { - return; - } - //no shadow mesh for skeletons - for (int i = 0; i < surfaces.size(); i++) { - if (surfaces[i].arrays[RS::ARRAY_BONES].get_type() != Variant::NIL) { - return; - } - if (surfaces[i].arrays[RS::ARRAY_WEIGHTS].get_type() != Variant::NIL) { - return; - } - } - - shadow_mesh.instantiate(); - - for (int i = 0; i < surfaces.size(); i++) { - LocalVector<int> vertex_remap; - Vector<Vector3> new_vertices; - Vector<Vector3> vertices = surfaces[i].arrays[RS::ARRAY_VERTEX]; - int vertex_count = vertices.size(); - { - Map<Vector3, int> unique_vertices; - const Vector3 *vptr = vertices.ptr(); - for (int j = 0; j < vertex_count; j++) { - Vector3 v = vptr[j]; - - Map<Vector3, int>::Element *E = unique_vertices.find(v); - - if (E) { - vertex_remap.push_back(E->get()); - } else { - int vcount = unique_vertices.size(); - unique_vertices[v] = vcount; - vertex_remap.push_back(vcount); - new_vertices.push_back(v); - } - } - } - - Array new_surface; - new_surface.resize(RS::ARRAY_MAX); - Dictionary lods; - - // print_line("original vertex count: " + itos(vertices.size()) + " new vertex count: " + itos(new_vertices.size())); - - new_surface[RS::ARRAY_VERTEX] = new_vertices; - - Vector<int> indices = surfaces[i].arrays[RS::ARRAY_INDEX]; - if (indices.size()) { - int index_count = indices.size(); - const int *index_rptr = indices.ptr(); - Vector<int> new_indices; - new_indices.resize(indices.size()); - int *index_wptr = new_indices.ptrw(); - - for (int j = 0; j < index_count; j++) { - int index = index_rptr[j]; - ERR_FAIL_INDEX(index, vertex_count); - index_wptr[j] = vertex_remap[index]; - } - - new_surface[RS::ARRAY_INDEX] = new_indices; - - // Make sure the same LODs as the full version are used. - // This makes it more coherent between rendered model and its shadows. - for (int j = 0; j < surfaces[i].lods.size(); j++) { - indices = surfaces[i].lods[j].indices; - - index_count = indices.size(); - index_rptr = indices.ptr(); - new_indices.resize(indices.size()); - index_wptr = new_indices.ptrw(); - - for (int k = 0; k < index_count; k++) { - int index = index_rptr[j]; - ERR_FAIL_INDEX(index, vertex_count); - index_wptr[j] = vertex_remap[index]; - } - - lods[surfaces[i].lods[j].distance] = new_indices; - } - } - - shadow_mesh->add_surface(surfaces[i].primitive, new_surface, Array(), lods, Ref<Material>(), surfaces[i].name, surfaces[i].flags); - } -} - -Ref<EditorSceneImporterMesh> EditorSceneImporterMesh::get_shadow_mesh() const { - return shadow_mesh; -} - -void EditorSceneImporterMesh::_set_data(const Dictionary &p_data) { - clear(); - if (p_data.has("blend_shape_names")) { - blend_shapes = p_data["blend_shape_names"]; - } - if (p_data.has("surfaces")) { - Array surface_arr = p_data["surfaces"]; - for (int i = 0; i < surface_arr.size(); i++) { - Dictionary s = surface_arr[i]; - ERR_CONTINUE(!s.has("primitive")); - ERR_CONTINUE(!s.has("arrays")); - Mesh::PrimitiveType prim = Mesh::PrimitiveType(int(s["primitive"])); - ERR_CONTINUE(prim >= Mesh::PRIMITIVE_MAX); - Array arr = s["arrays"]; - Dictionary lods; - String name; - if (s.has("name")) { - name = s["name"]; - } - if (s.has("lods")) { - lods = s["lods"]; - } - Array blend_shapes; - if (s.has("blend_shapes")) { - blend_shapes = s["blend_shapes"]; - } - Ref<Material> material; - if (s.has("material")) { - material = s["material"]; - } - uint32_t flags = 0; - if (s.has("flags")) { - flags = s["flags"]; - } - add_surface(prim, arr, blend_shapes, lods, material, name, flags); - } - } -} -Dictionary EditorSceneImporterMesh::_get_data() const { - Dictionary data; - if (blend_shapes.size()) { - data["blend_shape_names"] = blend_shapes; - } - Array surface_arr; - for (int i = 0; i < surfaces.size(); i++) { - Dictionary d; - d["primitive"] = surfaces[i].primitive; - d["arrays"] = surfaces[i].arrays; - if (surfaces[i].blend_shape_data.size()) { - Array bs_data; - for (int j = 0; j < surfaces[i].blend_shape_data.size(); j++) { - bs_data.push_back(surfaces[i].blend_shape_data[j].arrays); - } - d["blend_shapes"] = bs_data; - } - if (surfaces[i].lods.size()) { - Dictionary lods; - for (int j = 0; j < surfaces[i].lods.size(); j++) { - lods[surfaces[i].lods[j].distance] = surfaces[i].lods[j].indices; - } - d["lods"] = lods; - } - - if (surfaces[i].material.is_valid()) { - d["material"] = surfaces[i].material; - } - - if (surfaces[i].name != String()) { - d["name"] = surfaces[i].name; - } - - if (surfaces[i].flags != 0) { - d["flags"] = surfaces[i].flags; - } - - surface_arr.push_back(d); - } - data["surfaces"] = surface_arr; - return data; -} - -Vector<Face3> EditorSceneImporterMesh::get_faces() const { - Vector<Face3> faces; - for (int i = 0; i < surfaces.size(); i++) { - if (surfaces[i].primitive == Mesh::PRIMITIVE_TRIANGLES) { - Vector<Vector3> vertices = surfaces[i].arrays[Mesh::ARRAY_VERTEX]; - Vector<int> indices = surfaces[i].arrays[Mesh::ARRAY_INDEX]; - if (indices.size()) { - for (int j = 0; j < indices.size(); j += 3) { - Face3 f; - f.vertex[0] = vertices[indices[j + 0]]; - f.vertex[1] = vertices[indices[j + 1]]; - f.vertex[2] = vertices[indices[j + 2]]; - faces.push_back(f); - } - } else { - for (int j = 0; j < vertices.size(); j += 3) { - Face3 f; - f.vertex[0] = vertices[j + 0]; - f.vertex[1] = vertices[j + 1]; - f.vertex[2] = vertices[j + 2]; - faces.push_back(f); - } - } - } - } - - return faces; -} - -Vector<Ref<Shape3D>> EditorSceneImporterMesh::convex_decompose(const Mesh::ConvexDecompositionSettings &p_settings) const { - ERR_FAIL_COND_V(!Mesh::convex_decomposition_function, Vector<Ref<Shape3D>>()); - - const Vector<Face3> faces = get_faces(); - int face_count = faces.size(); - - Vector<Vector3> vertices; - uint32_t vertex_count = 0; - vertices.resize(face_count * 3); - Vector<uint32_t> indices; - indices.resize(face_count * 3); - { - Map<Vector3, uint32_t> vertex_map; - Vector3 *vertex_w = vertices.ptrw(); - uint32_t *index_w = indices.ptrw(); - for (int i = 0; i < face_count; i++) { - for (int j = 0; j < 3; j++) { - const Vector3 &vertex = faces[i].vertex[j]; - Map<Vector3, uint32_t>::Element *found_vertex = vertex_map.find(vertex); - uint32_t index; - if (found_vertex) { - index = found_vertex->get(); - } else { - index = ++vertex_count; - vertex_map[vertex] = index; - vertex_w[index] = vertex; - } - index_w[i * 3 + j] = index; - } - } - } - vertices.resize(vertex_count); - - Vector<Vector<Vector3>> decomposed = Mesh::convex_decomposition_function((real_t *)vertices.ptr(), vertex_count, indices.ptr(), face_count, p_settings, nullptr); - - Vector<Ref<Shape3D>> ret; - - for (int i = 0; i < decomposed.size(); i++) { - Ref<ConvexPolygonShape3D> shape; - shape.instantiate(); - shape->set_points(decomposed[i]); - ret.push_back(shape); - } - - return ret; -} - -Ref<Shape3D> EditorSceneImporterMesh::create_trimesh_shape() const { - Vector<Face3> faces = get_faces(); - if (faces.size() == 0) { - return Ref<Shape3D>(); - } - - Vector<Vector3> face_points; - face_points.resize(faces.size() * 3); - - for (int i = 0; i < face_points.size(); i += 3) { - Face3 f = faces.get(i / 3); - face_points.set(i, f.vertex[0]); - face_points.set(i + 1, f.vertex[1]); - face_points.set(i + 2, f.vertex[2]); - } - - Ref<ConcavePolygonShape3D> shape = memnew(ConcavePolygonShape3D); - shape->set_faces(face_points); - return shape; -} - -Ref<NavigationMesh> EditorSceneImporterMesh::create_navigation_mesh() { - Vector<Face3> faces = get_faces(); - if (faces.size() == 0) { - return Ref<NavigationMesh>(); - } - - Map<Vector3, int> unique_vertices; - LocalVector<int> face_indices; - - for (int i = 0; i < faces.size(); i++) { - for (int j = 0; j < 3; j++) { - Vector3 v = faces[i].vertex[j]; - int idx; - if (unique_vertices.has(v)) { - idx = unique_vertices[v]; - } else { - idx = unique_vertices.size(); - unique_vertices[v] = idx; - } - face_indices.push_back(idx); - } - } - - Vector<Vector3> vertices; - vertices.resize(unique_vertices.size()); - for (Map<Vector3, int>::Element *E = unique_vertices.front(); E; E = E->next()) { - vertices.write[E->get()] = E->key(); - } - - Ref<NavigationMesh> nm; - nm.instantiate(); - nm->set_vertices(vertices); - - Vector<int> v3; - v3.resize(3); - for (uint32_t i = 0; i < face_indices.size(); i += 3) { - v3.write[0] = face_indices[i + 0]; - v3.write[1] = face_indices[i + 1]; - v3.write[2] = face_indices[i + 2]; - nm->add_polygon(v3); - } - - return nm; -} - -extern bool (*array_mesh_lightmap_unwrap_callback)(float p_texel_size, const float *p_vertices, const float *p_normals, int p_vertex_count, const int *p_indices, int p_index_count, const uint8_t *p_cache_data, bool *r_use_cache, uint8_t **r_mesh_cache, int *r_mesh_cache_size, float **r_uv, int **r_vertex, int *r_vertex_count, int **r_index, int *r_index_count, int *r_size_hint_x, int *r_size_hint_y); - -struct EditorSceneImporterMeshLightmapSurface { - Ref<Material> material; - LocalVector<SurfaceTool::Vertex> vertices; - Mesh::PrimitiveType primitive = Mesh::PrimitiveType::PRIMITIVE_MAX; - uint32_t format = 0; - String name; -}; - -Error EditorSceneImporterMesh::lightmap_unwrap_cached(const Transform3D &p_base_transform, float p_texel_size, const Vector<uint8_t> &p_src_cache, Vector<uint8_t> &r_dst_cache) { - ERR_FAIL_COND_V(!array_mesh_lightmap_unwrap_callback, ERR_UNCONFIGURED); - ERR_FAIL_COND_V_MSG(blend_shapes.size() != 0, ERR_UNAVAILABLE, "Can't unwrap mesh with blend shapes."); - - LocalVector<float> vertices; - LocalVector<float> normals; - LocalVector<int> indices; - LocalVector<float> uv; - LocalVector<Pair<int, int>> uv_indices; - - Vector<EditorSceneImporterMeshLightmapSurface> lightmap_surfaces; - - // Keep only the scale - Basis basis = p_base_transform.get_basis(); - Vector3 scale = Vector3(basis.get_axis(0).length(), basis.get_axis(1).length(), basis.get_axis(2).length()); - - Transform3D transform; - transform.scale(scale); - - Basis normal_basis = transform.basis.inverse().transposed(); - - for (int i = 0; i < get_surface_count(); i++) { - EditorSceneImporterMeshLightmapSurface s; - s.primitive = get_surface_primitive_type(i); - - ERR_FAIL_COND_V_MSG(s.primitive != Mesh::PRIMITIVE_TRIANGLES, ERR_UNAVAILABLE, "Only triangles are supported for lightmap unwrap."); - Array arrays = get_surface_arrays(i); - s.material = get_surface_material(i); - s.name = get_surface_name(i); - - SurfaceTool::create_vertex_array_from_triangle_arrays(arrays, s.vertices, &s.format); - - PackedVector3Array rvertices = arrays[Mesh::ARRAY_VERTEX]; - int vc = rvertices.size(); - - PackedVector3Array rnormals = arrays[Mesh::ARRAY_NORMAL]; - - int vertex_ofs = vertices.size() / 3; - - vertices.resize((vertex_ofs + vc) * 3); - normals.resize((vertex_ofs + vc) * 3); - uv_indices.resize(vertex_ofs + vc); - - for (int j = 0; j < vc; j++) { - Vector3 v = transform.xform(rvertices[j]); - Vector3 n = normal_basis.xform(rnormals[j]).normalized(); - - vertices[(j + vertex_ofs) * 3 + 0] = v.x; - vertices[(j + vertex_ofs) * 3 + 1] = v.y; - vertices[(j + vertex_ofs) * 3 + 2] = v.z; - normals[(j + vertex_ofs) * 3 + 0] = n.x; - normals[(j + vertex_ofs) * 3 + 1] = n.y; - normals[(j + vertex_ofs) * 3 + 2] = n.z; - uv_indices[j + vertex_ofs] = Pair<int, int>(i, j); - } - - PackedInt32Array rindices = arrays[Mesh::ARRAY_INDEX]; - int ic = rindices.size(); - - float eps = 1.19209290e-7F; // Taken from xatlas.h - if (ic == 0) { - for (int j = 0; j < vc / 3; j++) { - Vector3 p0 = transform.xform(rvertices[j * 3 + 0]); - Vector3 p1 = transform.xform(rvertices[j * 3 + 1]); - Vector3 p2 = transform.xform(rvertices[j * 3 + 2]); - - if ((p0 - p1).length_squared() < eps || (p1 - p2).length_squared() < eps || (p2 - p0).length_squared() < eps) { - continue; - } - - indices.push_back(vertex_ofs + j * 3 + 0); - indices.push_back(vertex_ofs + j * 3 + 1); - indices.push_back(vertex_ofs + j * 3 + 2); - } - - } else { - for (int j = 0; j < ic / 3; j++) { - Vector3 p0 = transform.xform(rvertices[rindices[j * 3 + 0]]); - Vector3 p1 = transform.xform(rvertices[rindices[j * 3 + 1]]); - Vector3 p2 = transform.xform(rvertices[rindices[j * 3 + 2]]); - - if ((p0 - p1).length_squared() < eps || (p1 - p2).length_squared() < eps || (p2 - p0).length_squared() < eps) { - continue; - } - - indices.push_back(vertex_ofs + rindices[j * 3 + 0]); - indices.push_back(vertex_ofs + rindices[j * 3 + 1]); - indices.push_back(vertex_ofs + rindices[j * 3 + 2]); - } - } - - lightmap_surfaces.push_back(s); - } - - //unwrap - - bool use_cache = true; // Used to request cache generation and to know if cache was used - uint8_t *gen_cache; - int gen_cache_size; - float *gen_uvs; - int *gen_vertices; - int *gen_indices; - int gen_vertex_count; - int gen_index_count; - int size_x; - int size_y; - - bool ok = array_mesh_lightmap_unwrap_callback(p_texel_size, vertices.ptr(), normals.ptr(), vertices.size() / 3, indices.ptr(), indices.size(), p_src_cache.ptr(), &use_cache, &gen_cache, &gen_cache_size, &gen_uvs, &gen_vertices, &gen_vertex_count, &gen_indices, &gen_index_count, &size_x, &size_y); - - if (!ok) { - return ERR_CANT_CREATE; - } - - //remove surfaces - clear(); - - //create surfacetools for each surface.. - LocalVector<Ref<SurfaceTool>> surfaces_tools; - - for (int i = 0; i < lightmap_surfaces.size(); i++) { - Ref<SurfaceTool> st; - st.instantiate(); - st->begin(Mesh::PRIMITIVE_TRIANGLES); - st->set_material(lightmap_surfaces[i].material); - st->set_meta("name", lightmap_surfaces[i].name); - surfaces_tools.push_back(st); //stay there - } - - print_verbose("Mesh: Gen indices: " + itos(gen_index_count)); - - //go through all indices - for (int i = 0; i < gen_index_count; i += 3) { - ERR_FAIL_INDEX_V(gen_vertices[gen_indices[i + 0]], (int)uv_indices.size(), ERR_BUG); - ERR_FAIL_INDEX_V(gen_vertices[gen_indices[i + 1]], (int)uv_indices.size(), ERR_BUG); - ERR_FAIL_INDEX_V(gen_vertices[gen_indices[i + 2]], (int)uv_indices.size(), ERR_BUG); - - ERR_FAIL_COND_V(uv_indices[gen_vertices[gen_indices[i + 0]]].first != uv_indices[gen_vertices[gen_indices[i + 1]]].first || uv_indices[gen_vertices[gen_indices[i + 0]]].first != uv_indices[gen_vertices[gen_indices[i + 2]]].first, ERR_BUG); - - int surface = uv_indices[gen_vertices[gen_indices[i + 0]]].first; - - for (int j = 0; j < 3; j++) { - SurfaceTool::Vertex v = lightmap_surfaces[surface].vertices[uv_indices[gen_vertices[gen_indices[i + j]]].second]; - - if (lightmap_surfaces[surface].format & Mesh::ARRAY_FORMAT_COLOR) { - surfaces_tools[surface]->set_color(v.color); - } - if (lightmap_surfaces[surface].format & Mesh::ARRAY_FORMAT_TEX_UV) { - surfaces_tools[surface]->set_uv(v.uv); - } - if (lightmap_surfaces[surface].format & Mesh::ARRAY_FORMAT_NORMAL) { - surfaces_tools[surface]->set_normal(v.normal); - } - if (lightmap_surfaces[surface].format & Mesh::ARRAY_FORMAT_TANGENT) { - Plane t; - t.normal = v.tangent; - t.d = v.binormal.dot(v.normal.cross(v.tangent)) < 0 ? -1 : 1; - surfaces_tools[surface]->set_tangent(t); - } - if (lightmap_surfaces[surface].format & Mesh::ARRAY_FORMAT_BONES) { - surfaces_tools[surface]->set_bones(v.bones); - } - if (lightmap_surfaces[surface].format & Mesh::ARRAY_FORMAT_WEIGHTS) { - surfaces_tools[surface]->set_weights(v.weights); - } - - Vector2 uv2(gen_uvs[gen_indices[i + j] * 2 + 0], gen_uvs[gen_indices[i + j] * 2 + 1]); - surfaces_tools[surface]->set_uv2(uv2); - - surfaces_tools[surface]->add_vertex(v.vertex); - } - } - - //generate surfaces - for (unsigned int i = 0; i < surfaces_tools.size(); i++) { - surfaces_tools[i]->index(); - Array arrays = surfaces_tools[i]->commit_to_arrays(); - add_surface(surfaces_tools[i]->get_primitive(), arrays, Array(), Dictionary(), surfaces_tools[i]->get_material(), surfaces_tools[i]->get_meta("name")); - } - - set_lightmap_size_hint(Size2(size_x, size_y)); - - if (gen_cache_size > 0) { - r_dst_cache.resize(gen_cache_size); - memcpy(r_dst_cache.ptrw(), gen_cache, gen_cache_size); - memfree(gen_cache); - } - - if (!use_cache) { - // Cache was not used, free the buffers - memfree(gen_vertices); - memfree(gen_indices); - memfree(gen_uvs); - } - - return OK; -} - -void EditorSceneImporterMesh::set_lightmap_size_hint(const Size2i &p_size) { - lightmap_size_hint = p_size; -} - -Size2i EditorSceneImporterMesh::get_lightmap_size_hint() const { - return lightmap_size_hint; -} - -void EditorSceneImporterMesh::_bind_methods() { - ClassDB::bind_method(D_METHOD("add_blend_shape", "name"), &EditorSceneImporterMesh::add_blend_shape); - ClassDB::bind_method(D_METHOD("get_blend_shape_count"), &EditorSceneImporterMesh::get_blend_shape_count); - ClassDB::bind_method(D_METHOD("get_blend_shape_name", "blend_shape_idx"), &EditorSceneImporterMesh::get_blend_shape_name); - - ClassDB::bind_method(D_METHOD("set_blend_shape_mode", "mode"), &EditorSceneImporterMesh::set_blend_shape_mode); - ClassDB::bind_method(D_METHOD("get_blend_shape_mode"), &EditorSceneImporterMesh::get_blend_shape_mode); - - ClassDB::bind_method(D_METHOD("add_surface", "primitive", "arrays", "blend_shapes", "lods", "material", "name", "flags"), &EditorSceneImporterMesh::add_surface, DEFVAL(Array()), DEFVAL(Dictionary()), DEFVAL(Ref<Material>()), DEFVAL(String()), DEFVAL(0)); - - ClassDB::bind_method(D_METHOD("get_surface_count"), &EditorSceneImporterMesh::get_surface_count); - ClassDB::bind_method(D_METHOD("get_surface_primitive_type", "surface_idx"), &EditorSceneImporterMesh::get_surface_primitive_type); - ClassDB::bind_method(D_METHOD("get_surface_name", "surface_idx"), &EditorSceneImporterMesh::get_surface_name); - ClassDB::bind_method(D_METHOD("get_surface_arrays", "surface_idx"), &EditorSceneImporterMesh::get_surface_arrays); - ClassDB::bind_method(D_METHOD("get_surface_blend_shape_arrays", "surface_idx", "blend_shape_idx"), &EditorSceneImporterMesh::get_surface_blend_shape_arrays); - ClassDB::bind_method(D_METHOD("get_surface_lod_count", "surface_idx"), &EditorSceneImporterMesh::get_surface_lod_count); - ClassDB::bind_method(D_METHOD("get_surface_lod_size", "surface_idx", "lod_idx"), &EditorSceneImporterMesh::get_surface_lod_size); - ClassDB::bind_method(D_METHOD("get_surface_lod_indices", "surface_idx", "lod_idx"), &EditorSceneImporterMesh::get_surface_lod_indices); - ClassDB::bind_method(D_METHOD("get_surface_material", "surface_idx"), &EditorSceneImporterMesh::get_surface_material); - ClassDB::bind_method(D_METHOD("get_surface_format", "surface_idx"), &EditorSceneImporterMesh::get_surface_format); - - ClassDB::bind_method(D_METHOD("set_surface_name", "surface_idx", "name"), &EditorSceneImporterMesh::set_surface_name); - ClassDB::bind_method(D_METHOD("set_surface_material", "surface_idx", "material"), &EditorSceneImporterMesh::set_surface_material); - - ClassDB::bind_method(D_METHOD("get_mesh", "base_mesh"), &EditorSceneImporterMesh::get_mesh, DEFVAL(Ref<ArrayMesh>())); - ClassDB::bind_method(D_METHOD("clear"), &EditorSceneImporterMesh::clear); - - ClassDB::bind_method(D_METHOD("_set_data", "data"), &EditorSceneImporterMesh::_set_data); - ClassDB::bind_method(D_METHOD("_get_data"), &EditorSceneImporterMesh::_get_data); - - ClassDB::bind_method(D_METHOD("set_lightmap_size_hint", "size"), &EditorSceneImporterMesh::set_lightmap_size_hint); - ClassDB::bind_method(D_METHOD("get_lightmap_size_hint"), &EditorSceneImporterMesh::get_lightmap_size_hint); - - ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_data", "_get_data"); -} diff --git a/editor/import/scene_importer_mesh.h b/editor/import/scene_importer_mesh.h deleted file mode 100644 index d32b1fdf74..0000000000 --- a/editor/import/scene_importer_mesh.h +++ /dev/null @@ -1,124 +0,0 @@ -/*************************************************************************/ -/* scene_importer_mesh.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 EDITOR_SCENE_IMPORTER_MESH_H -#define EDITOR_SCENE_IMPORTER_MESH_H - -#include "core/io/resource.h" -#include "scene/resources/concave_polygon_shape_3d.h" -#include "scene/resources/convex_polygon_shape_3d.h" -#include "scene/resources/mesh.h" -#include "scene/resources/navigation_mesh.h" - -#include <cstdint> - -// The following classes are used by importers instead of ArrayMesh and MeshInstance3D -// so the data is not registered (hence, quality loss), importing happens faster and -// its easier to modify before saving - -class EditorSceneImporterMesh : public Resource { - GDCLASS(EditorSceneImporterMesh, Resource) - - struct Surface { - Mesh::PrimitiveType primitive; - Array arrays; - struct BlendShape { - Array arrays; - }; - Vector<BlendShape> blend_shape_data; - struct LOD { - Vector<int> indices; - float distance; - }; - Vector<LOD> lods; - Ref<Material> material; - String name; - uint32_t flags = 0; - }; - Vector<Surface> surfaces; - Vector<String> blend_shapes; - Mesh::BlendShapeMode blend_shape_mode = Mesh::BLEND_SHAPE_MODE_NORMALIZED; - - Ref<ArrayMesh> mesh; - - Ref<EditorSceneImporterMesh> shadow_mesh; - - Size2i lightmap_size_hint; - Basis compute_rotation_matrix_from_ortho_6d(Vector3 p_x_raw, Vector3 y_raw); - -protected: - void _set_data(const Dictionary &p_data); - Dictionary _get_data() const; - - static void _bind_methods(); - -public: - void add_blend_shape(const String &p_name); - int get_blend_shape_count() const; - String get_blend_shape_name(int p_blend_shape) const; - - void add_surface(Mesh::PrimitiveType p_primitive, const Array &p_arrays, const Array &p_blend_shapes = Array(), const Dictionary &p_lods = Dictionary(), const Ref<Material> &p_material = Ref<Material>(), const String &p_name = String(), const uint32_t p_flags = 0); - int get_surface_count() const; - - void set_blend_shape_mode(Mesh::BlendShapeMode p_blend_shape_mode); - Mesh::BlendShapeMode get_blend_shape_mode() const; - - Mesh::PrimitiveType get_surface_primitive_type(int p_surface); - String get_surface_name(int p_surface) const; - void set_surface_name(int p_surface, const String &p_name); - Array get_surface_arrays(int p_surface) const; - Array get_surface_blend_shape_arrays(int p_surface, int p_blend_shape) const; - int get_surface_lod_count(int p_surface) const; - Vector<int> get_surface_lod_indices(int p_surface, int p_lod) const; - float get_surface_lod_size(int p_surface, int p_lod) const; - Ref<Material> get_surface_material(int p_surface) const; - uint32_t get_surface_format(int p_surface) const; - - void set_surface_material(int p_surface, const Ref<Material> &p_material); - - void generate_lods(); - - void create_shadow_mesh(); - Ref<EditorSceneImporterMesh> get_shadow_mesh() const; - - Vector<Face3> get_faces() const; - Vector<Ref<Shape3D>> convex_decompose(const Mesh::ConvexDecompositionSettings &p_settings) const; - Ref<Shape3D> create_trimesh_shape() const; - Ref<NavigationMesh> create_navigation_mesh(); - Error lightmap_unwrap_cached(const Transform3D &p_base_transform, float p_texel_size, const Vector<uint8_t> &p_src_cache, Vector<uint8_t> &r_dst_cache); - - void set_lightmap_size_hint(const Size2i &p_size); - Size2i get_lightmap_size_hint() const; - - bool has_mesh() const; - Ref<ArrayMesh> get_mesh(const Ref<ArrayMesh> &p_base = Ref<ArrayMesh>()); - void clear(); -}; -#endif // EDITOR_SCENE_IMPORTER_MESH_H diff --git a/editor/import/scene_importer_mesh_node_3d.cpp b/editor/import/scene_importer_mesh_node_3d.cpp deleted file mode 100644 index 3c201cf674..0000000000 --- a/editor/import/scene_importer_mesh_node_3d.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/*************************************************************************/ -/* scene_importer_mesh_node_3d.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 "scene_importer_mesh_node_3d.h" - -void EditorSceneImporterMeshNode3D::set_mesh(const Ref<EditorSceneImporterMesh> &p_mesh) { - mesh = p_mesh; -} -Ref<EditorSceneImporterMesh> EditorSceneImporterMeshNode3D::get_mesh() const { - return mesh; -} - -void EditorSceneImporterMeshNode3D::set_skin(const Ref<Skin> &p_skin) { - skin = p_skin; -} -Ref<Skin> EditorSceneImporterMeshNode3D::get_skin() const { - return skin; -} - -void EditorSceneImporterMeshNode3D::set_surface_material(int p_idx, const Ref<Material> &p_material) { - ERR_FAIL_COND(p_idx < 0); - if (p_idx >= surface_materials.size()) { - surface_materials.resize(p_idx + 1); - } - - surface_materials.write[p_idx] = p_material; -} -Ref<Material> EditorSceneImporterMeshNode3D::get_surface_material(int p_idx) const { - ERR_FAIL_COND_V(p_idx < 0, Ref<Material>()); - if (p_idx >= surface_materials.size()) { - return Ref<Material>(); - } - return surface_materials[p_idx]; -} - -void EditorSceneImporterMeshNode3D::set_skeleton_path(const NodePath &p_path) { - skeleton_path = p_path; -} -NodePath EditorSceneImporterMeshNode3D::get_skeleton_path() const { - return skeleton_path; -} - -void EditorSceneImporterMeshNode3D::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_mesh", "mesh"), &EditorSceneImporterMeshNode3D::set_mesh); - ClassDB::bind_method(D_METHOD("get_mesh"), &EditorSceneImporterMeshNode3D::get_mesh); - - ClassDB::bind_method(D_METHOD("set_skin", "skin"), &EditorSceneImporterMeshNode3D::set_skin); - ClassDB::bind_method(D_METHOD("get_skin"), &EditorSceneImporterMeshNode3D::get_skin); - - ClassDB::bind_method(D_METHOD("set_skeleton_path", "skeleton_path"), &EditorSceneImporterMeshNode3D::set_skeleton_path); - ClassDB::bind_method(D_METHOD("get_skeleton_path"), &EditorSceneImporterMeshNode3D::get_skeleton_path); - - ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "mesh", PROPERTY_HINT_RESOURCE_TYPE, "EditorSceneImporterMesh"), "set_mesh", "get_mesh"); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "skin", PROPERTY_HINT_RESOURCE_TYPE, "Skin"), "set_skin", "get_skin"); - ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "skeleton_path", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "Skeleton"), "set_skeleton_path", "get_skeleton_path"); -} diff --git a/editor/import/scene_importer_mesh_node_3d.h b/editor/import/scene_importer_mesh_node_3d.h deleted file mode 100644 index dec1717c99..0000000000 --- a/editor/import/scene_importer_mesh_node_3d.h +++ /dev/null @@ -1,64 +0,0 @@ -/*************************************************************************/ -/* scene_importer_mesh_node_3d.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 EDITOR_SCENE_IMPORTER_MESH_NODE_3D_H -#define EDITOR_SCENE_IMPORTER_MESH_NODE_3D_H - -#include "editor/import/scene_importer_mesh.h" -#include "scene/3d/node_3d.h" -#include "scene/resources/skin.h" - -class EditorSceneImporterMesh; - -class EditorSceneImporterMeshNode3D : public Node3D { - GDCLASS(EditorSceneImporterMeshNode3D, Node3D) - - Ref<EditorSceneImporterMesh> mesh; - Ref<Skin> skin; - NodePath skeleton_path; - Vector<Ref<Material>> surface_materials; - -protected: - static void _bind_methods(); - -public: - void set_mesh(const Ref<EditorSceneImporterMesh> &p_mesh); - Ref<EditorSceneImporterMesh> get_mesh() const; - - void set_skin(const Ref<Skin> &p_skin); - Ref<Skin> get_skin() const; - - void set_surface_material(int p_idx, const Ref<Material> &p_material); - Ref<Material> get_surface_material(int p_idx) const; - - void set_skeleton_path(const NodePath &p_path); - NodePath get_skeleton_path() const; -}; -#endif diff --git a/editor/import_defaults_editor.cpp b/editor/import_defaults_editor.cpp index 25bca1d4f4..8300dcf555 100644 --- a/editor/import_defaults_editor.cpp +++ b/editor/import_defaults_editor.cpp @@ -86,9 +86,9 @@ void ImportDefaultsEditor::_save() { if (settings->importer.is_valid()) { Dictionary modified; - for (Map<StringName, Variant>::Element *E = settings->values.front(); E; E = E->next()) { - if (E->get() != settings->default_values[E->key()]) { - modified[E->key()] = E->get(); + for (const KeyValue<StringName, Variant> &E : settings->values) { + if (E.value != settings->default_values[E.key]) { + modified[E.key] = E.value; } } diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp index 5b52554335..a6e1e1d094 100644 --- a/editor/import_dock.cpp +++ b/editor/import_dock.cpp @@ -130,6 +130,7 @@ void ImportDock::set_edit_path(const String &p_path) { _add_keep_import_option(importer_name); import->set_disabled(false); + _set_dirty(false); import_as->set_disabled(false); preset->set_disabled(false); @@ -280,6 +281,7 @@ void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) { params->paths = p_paths; import->set_disabled(false); + _set_dirty(false); import_as->set_disabled(false); preset->set_disabled(false); @@ -533,6 +535,8 @@ void ImportDock::_reimport() { EditorFileSystem::get_singleton()->reimport_files(params->paths); EditorFileSystem::get_singleton()->emit_signal(SNAME("filesystem_changed")); //it changed, so force emitting the signal + + _set_dirty(false); } void ImportDock::_notification(int p_what) { @@ -548,6 +552,24 @@ void ImportDock::_notification(int p_what) { } } +void ImportDock::_property_edited(const StringName &p_prop) { + _set_dirty(true); +} + +void ImportDock::_set_dirty(bool p_dirty) { + if (p_dirty) { + // Add a dirty marker to notify the user that they should reimport the selected resource to see changes. + import->set_text(TTR("Reimport") + " (*)"); + import->add_theme_color_override("font_color", get_theme_color(SNAME("warning_color"), SNAME("Editor"))); + import->set_tooltip(TTR("You have pending changes that haven't been applied yet. Click Reimport to apply changes made to the import options.\nSelecting another resource in the FileSystem dock without clicking Reimport first will discard changes made in the Import dock.")); + } else { + // Remove the dirty marker on the Reimport button. + import->set_text(TTR("Reimport")); + import->remove_theme_color_override("font_color"); + import->set_tooltip(""); + } +} + void ImportDock::_property_toggled(const StringName &p_prop, bool p_checked) { if (p_checked) { params->checked.insert(p_prop); @@ -588,6 +610,7 @@ ImportDock::ImportDock() { import_opts = memnew(EditorInspector); add_child(import_opts); import_opts->set_v_size_flags(SIZE_EXPAND_FILL); + import_opts->connect("property_edited", callable_mp(this, &ImportDock::_property_edited)); import_opts->connect("property_toggled", callable_mp(this, &ImportDock::_property_toggled)); hb = memnew(HBoxContainer); diff --git a/editor/import_dock.h b/editor/import_dock.h index 3c28bbcd89..150c44576d 100644 --- a/editor/import_dock.h +++ b/editor/import_dock.h @@ -68,7 +68,9 @@ class ImportDock : public VBoxContainer { void _update_preset_menu(); void _add_keep_import_option(const String &p_importer_name); + void _property_edited(const StringName &p_prop); void _property_toggled(const StringName &p_prop, bool p_checked); + void _set_dirty(bool p_dirty); void _reimport_attempt(); void _reimport_and_restart(); void _reimport(); diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp index 04ddf3552b..59d0b92ba0 100644 --- a/editor/inspector_dock.cpp +++ b/editor/inspector_dock.cpp @@ -204,11 +204,24 @@ void InspectorDock::_load_resource(const String &p_type) { load_resource_dialog->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper()); } + const Vector<String> textfile_ext = ((String)(EditorSettings::get_singleton()->get("docks/filesystem/textfile_extensions"))).split(",", false); + for (int i = 0; i < textfile_ext.size(); i++) { + load_resource_dialog->add_filter("*." + textfile_ext[i] + " ; " + textfile_ext[i].to_upper()); + } + load_resource_dialog->popup_file_dialog(); } void InspectorDock::_resource_file_selected(String p_file) { - RES res = ResourceLoader::load(p_file); + RES res; + if (ResourceLoader::exists(p_file, "")) { + res = ResourceLoader::load(p_file); + } else { + const Vector<String> textfile_ext = ((String)(EditorSettings::get_singleton()->get("docks/filesystem/textfile_extensions"))).split(",", false); + if (textfile_ext.has(p_file.get_extension())) { + res = ScriptEditor::get_singleton()->open_file(p_file); + } + } if (res.is_null()) { warning_dialog->set_text(TTR("Failed to load resource.")); @@ -370,7 +383,7 @@ void InspectorDock::_menu_expandall() { } void InspectorDock::_property_keyed(const String &p_keyed, const Variant &p_value, bool p_advance) { - AnimationPlayerEditor::singleton->get_track_editor()->insert_value_key(p_keyed, p_value, p_advance); + AnimationPlayerEditor::get_singleton()->get_track_editor()->insert_value_key(p_keyed, p_value, p_advance); } void InspectorDock::_transform_keyed(Object *sp, const String &p_sub, const Transform3D &p_key) { @@ -378,7 +391,7 @@ void InspectorDock::_transform_keyed(Object *sp, const String &p_sub, const Tran if (!s) { return; } - AnimationPlayerEditor::singleton->get_track_editor()->insert_transform_key(s, p_sub, p_key); + AnimationPlayerEditor::get_singleton()->get_track_editor()->insert_transform_key(s, p_sub, p_key); } void InspectorDock::_warning_pressed() { @@ -469,18 +482,19 @@ void InspectorDock::update(Object *p_object) { const bool is_object = p_object != nullptr; const bool is_resource = is_object && p_object->is_class("Resource"); + const bool is_text_file = is_object && p_object->is_class("TextFile"); const bool is_node = is_object && p_object->is_class("Node"); - object_menu->set_disabled(!is_object); - search->set_editable(is_object); - resource_save_button->set_disabled(!is_resource); - open_docs_button->set_disabled(!is_resource && !is_node); + object_menu->set_disabled(!is_object || is_text_file); + search->set_editable(is_object && !is_text_file); + resource_save_button->set_disabled(!is_resource || is_text_file); + open_docs_button->set_disabled(is_text_file || (!is_resource && !is_node)); PopupMenu *resource_extra_popup = resource_extra_button->get_popup(); - resource_extra_popup->set_item_disabled(resource_extra_popup->get_item_index(RESOURCE_COPY), !is_resource); - resource_extra_popup->set_item_disabled(resource_extra_popup->get_item_index(RESOURCE_MAKE_BUILT_IN), !is_resource); + resource_extra_popup->set_item_disabled(resource_extra_popup->get_item_index(RESOURCE_COPY), !is_resource || is_text_file); + resource_extra_popup->set_item_disabled(resource_extra_popup->get_item_index(RESOURCE_MAKE_BUILT_IN), !is_resource || is_text_file); - if (!is_object) { + if (!is_object || is_text_file) { warning->hide(); editor_path->clear_path(); return; @@ -531,7 +545,7 @@ void InspectorDock::go_back() { void InspectorDock::update_keying() { bool valid = false; - if (AnimationPlayerEditor::singleton->get_track_editor()->has_keying()) { + if (AnimationPlayerEditor::get_singleton()->get_track_editor()->has_keying()) { EditorHistory *editor_history = EditorNode::get_singleton()->get_editor_history(); if (editor_history->get_path_size() >= 1) { Object *obj = ObjectDB::get_instance(editor_history->get_path_object(0)); diff --git a/editor/plugin_config_dialog.cpp b/editor/plugin_config_dialog.cpp index a3ff312497..91ca1465df 100644 --- a/editor/plugin_config_dialog.cpp +++ b/editor/plugin_config_dialog.cpp @@ -124,6 +124,10 @@ void PluginConfigDialog::_on_cancelled() { _clear_fields(); } +void PluginConfigDialog::_on_language_changed(const int) { + _on_required_text_changed(String()); +} + void PluginConfigDialog::_on_required_text_changed(const String &) { int lang_idx = script_option_edit->get_selected(); String ext = ScriptServer::get_language(lang_idx)->get_extension(); @@ -161,6 +165,9 @@ void PluginConfigDialog::_on_required_text_changed(const String &) { is_valid = false; subfolder_validation->set_texture(invalid_icon); subfolder_validation->set_tooltip(TTR("Subfolder cannot be blank.")); + } else if (!subfolder_edit->get_text().is_valid_filename()) { + subfolder_validation->set_texture(invalid_icon); + subfolder_validation->set_tooltip(TTR("Subfolder name is not a valid folder name.")); } else { DirAccessRef dir = DirAccess::create(DirAccess::ACCESS_RESOURCES); String path = "res://addons/" + subfolder_edit->get_text(); @@ -330,6 +337,7 @@ PluginConfigDialog::PluginConfigDialog() { } script_option_edit->select(default_lang); grid->add_child(script_option_edit); + script_option_edit->connect("item_selected", callable_mp(this, &PluginConfigDialog::_on_language_changed)); // Plugin Script Name Label *script_lb = memnew(Label); diff --git a/editor/plugin_config_dialog.h b/editor/plugin_config_dialog.h index ad5b96735f..45fcdb6b6e 100644 --- a/editor/plugin_config_dialog.h +++ b/editor/plugin_config_dialog.h @@ -59,6 +59,7 @@ class PluginConfigDialog : public ConfirmationDialog { void _clear_fields(); void _on_confirmed(); void _on_cancelled(); + void _on_language_changed(const int p_language); void _on_required_text_changed(const String &p_text); static String _to_absolute_plugin_path(const String &p_plugin_name); diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp index 49fcac512b..686a35e442 100644 --- a/editor/plugins/animation_blend_space_2d_editor.cpp +++ b/editor/plugins/animation_blend_space_2d_editor.cpp @@ -129,8 +129,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven add_point_pos += blend_space->get_min_space(); if (snap->is_pressed()) { - add_point_pos.x = Math::snapped(add_point_pos.x, blend_space->get_snap().x); - add_point_pos.y = Math::snapped(add_point_pos.y, blend_space->get_snap().y); + add_point_pos = add_point_pos.snapped(blend_space->get_snap()); } } @@ -215,8 +214,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven Vector2 point = blend_space->get_blend_point_position(selected_point); point += drag_ofs; if (snap->is_pressed()) { - point.x = Math::snapped(point.x, blend_space->get_snap().x); - point.y = Math::snapped(point.y, blend_space->get_snap().y); + point = point.snapped(blend_space->get_snap()); } updating = true; @@ -467,8 +465,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_draw() { if (dragging_selected && selected_point == point_idx) { point += drag_ofs; if (snap->is_pressed()) { - point.x = Math::snapped(point.x, blend_space->get_snap().x); - point.y = Math::snapped(point.y, blend_space->get_snap().y); + point = point.snapped(blend_space->get_snap()); } } point = (point - blend_space->get_min_space()) / (blend_space->get_max_space() - blend_space->get_min_space()); @@ -503,8 +500,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_draw() { if (dragging_selected && selected_point == i) { point += drag_ofs; if (snap->is_pressed()) { - point.x = Math::snapped(point.x, blend_space->get_snap().x); - point.y = Math::snapped(point.y, blend_space->get_snap().y); + point = point.snapped(blend_space->get_snap()); } } point = (point - blend_space->get_min_space()) / (blend_space->get_max_space() - blend_space->get_min_space()); @@ -702,8 +698,7 @@ void AnimationNodeBlendSpace2DEditor::_update_edited_point_pos() { if (dragging_selected) { pos += drag_ofs; if (snap->is_pressed()) { - pos.x = Math::snapped(pos.x, blend_space->get_snap().x); - pos.y = Math::snapped(pos.y, blend_space->get_snap().y); + pos = pos.snapped(blend_space->get_snap()); } } updating = true; diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp index 24cb660f7a..55ffbf9477 100644 --- a/editor/plugins/animation_blend_tree_editor_plugin.cpp +++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp @@ -776,16 +776,16 @@ void AnimationNodeBlendTreeEditor::_notification(int p_what) { } if (player) { - for (Map<StringName, ProgressBar *>::Element *E = animations.front(); E; E = E->next()) { - Ref<AnimationNodeAnimation> an = blend_tree->get_node(E->key()); + for (const KeyValue<StringName, ProgressBar *> &E : animations) { + Ref<AnimationNodeAnimation> an = blend_tree->get_node(E.key); if (an.is_valid()) { if (player->has_animation(an->get_animation())) { Ref<Animation> anim = player->get_animation(an->get_animation()); if (anim.is_valid()) { - E->get()->set_max(anim->get_length()); + E.value->set_max(anim->get_length()); //StringName path = AnimationTreeEditor::get_singleton()->get_base_path() + E.input_node; - StringName time_path = AnimationTreeEditor::get_singleton()->get_base_path() + String(E->key()) + "/time"; - E->get()->set_value(AnimationTreeEditor::get_singleton()->get_tree()->get(time_path)); + StringName time_path = AnimationTreeEditor::get_singleton()->get_base_path() + String(E.key) + "/time"; + E.value->set_value(AnimationTreeEditor::get_singleton()->get_tree()->get(time_path)); } } } diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index 68b143358a..ea025dad3e 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -298,7 +298,7 @@ void AnimationPlayerEditor::_animation_selected(int p_which) { autoplay->set_pressed(current == player->get_autoplay()); - AnimationPlayerEditor::singleton->get_track_editor()->update_keying(); + AnimationPlayerEditor::get_singleton()->get_track_editor()->update_keying(); EditorNode::get_singleton()->update_keying(); _animation_key_editor_seek(timeline_position, false); } @@ -826,7 +826,7 @@ void AnimationPlayerEditor::_update_player() { pin->set_disabled(player == nullptr); if (!player) { - AnimationPlayerEditor::singleton->get_track_editor()->update_keying(); + AnimationPlayerEditor::get_singleton()->get_track_editor()->update_keying(); EditorNode::get_singleton()->update_keying(); return; } @@ -1466,15 +1466,15 @@ void AnimationPlayerEditor::_prepare_onion_layers_2() { } void AnimationPlayerEditor::_start_onion_skinning() { - // FIXME: Using "idle_frame" makes onion layers update one frame behind the current. - if (!get_tree()->is_connected("idle_frame", callable_mp(this, &AnimationPlayerEditor::_prepare_onion_layers_1_deferred))) { - get_tree()->connect("idle_frame", callable_mp(this, &AnimationPlayerEditor::_prepare_onion_layers_1_deferred)); + // FIXME: Using "process_frame" makes onion layers update one frame behind the current. + if (!get_tree()->is_connected("process_frame", callable_mp(this, &AnimationPlayerEditor::_prepare_onion_layers_1_deferred))) { + get_tree()->connect("process_frame", callable_mp(this, &AnimationPlayerEditor::_prepare_onion_layers_1_deferred)); } } void AnimationPlayerEditor::_stop_onion_skinning() { - if (get_tree()->is_connected("idle_frame", callable_mp(this, &AnimationPlayerEditor::_prepare_onion_layers_1_deferred))) { - get_tree()->disconnect("idle_frame", callable_mp(this, &AnimationPlayerEditor::_prepare_onion_layers_1_deferred)); + if (get_tree()->is_connected("process_frame", callable_mp(this, &AnimationPlayerEditor::_prepare_onion_layers_1_deferred))) { + get_tree()->disconnect("process_frame", callable_mp(this, &AnimationPlayerEditor::_prepare_onion_layers_1_deferred)); _free_onion_layers(); diff --git a/editor/plugins/animation_player_editor_plugin.h b/editor/plugins/animation_player_editor_plugin.h index 0a514d3ff1..eb8db2eaba 100644 --- a/editor/plugins/animation_player_editor_plugin.h +++ b/editor/plugins/animation_player_editor_plugin.h @@ -128,6 +128,7 @@ class AnimationPlayerEditor : public VBoxContainer { bool updating_blends; AnimationTrackEditor *track_editor; + static AnimationPlayerEditor *singleton; // Onion skinning. struct { @@ -226,7 +227,8 @@ protected: public: AnimationPlayer *get_player() const; - static AnimationPlayerEditor *singleton; + + static AnimationPlayerEditor *get_singleton() { return singleton; } bool is_pinned() const { return pin->is_pressed(); } void unpin() { pin->set_pressed(false); } diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp index cd84be0c25..6c5606fbfd 100644 --- a/editor/plugins/animation_tree_editor_plugin.cpp +++ b/editor/plugins/animation_tree_editor_plugin.cpp @@ -55,7 +55,7 @@ void AnimationTreeEditor::edit(AnimationTree *p_tree) { tree = p_tree; Vector<String> path; - if (tree->has_meta("_tree_edit_path")) { + if (tree && tree->has_meta("_tree_edit_path")) { path = tree->get_meta("_tree_edit_path"); edit_path(path); } else { diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index 664b2f521e..aacfc3e305 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -830,9 +830,9 @@ void EditorAssetLibrary::_update_image_queue() { int current_images = 0; List<int> to_delete; - for (Map<int, ImageQueue>::Element *E = image_queue.front(); E; E = E->next()) { - if (!E->get().active && current_images < max_images) { - String cache_filename_base = EditorPaths::get_singleton()->get_cache_dir().plus_file("assetimage_" + E->get().image_url.md5_text()); + for (KeyValue<int, ImageQueue> &E : image_queue) { + if (!E.value.active && current_images < max_images) { + String cache_filename_base = EditorPaths::get_singleton()->get_cache_dir().plus_file("assetimage_" + E.value.image_url.md5_text()); Vector<String> headers; if (FileAccess::exists(cache_filename_base + ".etag") && FileAccess::exists(cache_filename_base + ".data")) { @@ -844,14 +844,14 @@ void EditorAssetLibrary::_update_image_queue() { } } - Error err = E->get().request->request(E->get().image_url, headers); + Error err = E.value.request->request(E.value.image_url, headers); if (err != OK) { - to_delete.push_back(E->key()); + to_delete.push_back(E.key); } else { - E->get().active = true; + E.value.active = true; } current_images++; - } else if (E->get().active) { + } else if (E.value.active) { current_images++; } } diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index faa3b58dbb..8935f715e6 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -513,7 +513,7 @@ Object *CanvasItemEditor::_get_editor_data(Object *p_what) { } void CanvasItemEditor::_keying_changed() { - if (AnimationPlayerEditor::singleton->get_track_editor()->is_visible_in_tree()) { + if (AnimationPlayerEditor::get_singleton()->get_track_editor()->is_visible_in_tree()) { animation_hb->show(); } else { animation_hb->hide(); @@ -748,8 +748,8 @@ bool CanvasItemEditor::_select_click_on_item(CanvasItem *item, Point2 p_click_po List<CanvasItem *> CanvasItemEditor::_get_edited_canvas_items(bool retreive_locked, bool remove_canvas_item_if_parent_in_selection) { List<CanvasItem *> selection; - for (Map<Node *, Object *>::Element *E = editor_selection->get_selection().front(); E; E = E->next()) { - CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->key()); + for (const KeyValue<Node *, Object *> &E : editor_selection->get_selection()) { + CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E.key); if (canvas_item && canvas_item->is_visible_in_tree() && canvas_item->get_viewport() == EditorNode::get_singleton()->get_scene_root() && (retreive_locked || !_is_node_locked(canvas_item))) { CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item); if (se) { @@ -1174,7 +1174,6 @@ bool CanvasItemEditor::_gui_input_zoom_or_pan(const Ref<InputEvent> &p_event, bo if (!panning) { if (b->is_pressed() && (b->get_button_index() == MOUSE_BUTTON_MIDDLE || - b->get_button_index() == MOUSE_BUTTON_RIGHT || (b->get_button_index() == MOUSE_BUTTON_LEFT && tool == TOOL_PAN) || (b->get_button_index() == MOUSE_BUTTON_LEFT && !EditorSettings::get_singleton()->get("editors/2d/simple_panning") && pan_pressed))) { // Pan the viewport @@ -1232,8 +1231,9 @@ bool CanvasItemEditor::_gui_input_zoom_or_pan(const Ref<InputEvent> &p_event, bo } } - if (is_pan_key) { + if (is_pan_key && pan_pressed != k->is_pressed()) { pan_pressed = k->is_pressed(); + _update_cursor(); } } @@ -1460,8 +1460,8 @@ bool CanvasItemEditor::_gui_input_open_scene_on_double_click(const Ref<InputEven List<CanvasItem *> selection = _get_edited_canvas_items(); if (selection.size() == 1) { CanvasItem *canvas_item = selection[0]; - if (canvas_item->get_filename() != "" && canvas_item != editor->get_edited_scene()) { - editor->open_request(canvas_item->get_filename()); + if (canvas_item->get_scene_file_path() != "" && canvas_item != editor->get_edited_scene()) { + editor->open_request(canvas_item->get_scene_file_path()); return true; } } @@ -2615,7 +2615,19 @@ void CanvasItemEditor::_update_cursor() { c = CURSOR_HSIZE; } - viewport->set_default_cursor_shape(c); + if (pan_pressed) { + c = CURSOR_DRAG; + } + + if (c != viewport->get_default_cursor_shape()) { + viewport->set_default_cursor_shape(c); + + // Force refresh cursor if it's over the viewport. + if (viewport->get_global_rect().has_point(get_global_mouse_position())) { + DisplayServer::CursorShape ds_cursor_shape = (DisplayServer::CursorShape)viewport->get_default_cursor_shape(); + DisplayServer::get_singleton()->cursor_set_shape(ds_cursor_shape); + } + } } void CanvasItemEditor::_draw_text_at_position(Point2 p_position, String p_string, Side p_side) { @@ -3782,8 +3794,8 @@ void CanvasItemEditor::_notification(int p_what) { } // Update the viewport if bones changes - for (Map<BoneKey, BoneList>::Element *E = bone_list.front(); E; E = E->next()) { - Object *b = ObjectDB::get_instance(E->key().from); + for (KeyValue<BoneKey, BoneList> &E : bone_list) { + Object *b = ObjectDB::get_instance(E.key.from); if (!b) { viewport->update(); break; @@ -3796,14 +3808,14 @@ void CanvasItemEditor::_notification(int p_what) { Transform2D global_xform = b2->get_global_transform(); - if (global_xform != E->get().xform) { - E->get().xform = global_xform; + if (global_xform != E.value.xform) { + E.value.xform = global_xform; viewport->update(); } Bone2D *bone = Object::cast_to<Bone2D>(b); - if (bone && bone->get_length() != E->get().length) { - E->get().length = bone->get_length(); + if (bone && bone->get_length() != E.value.length) { + E.value.length = bone->get_length(); viewport->update(); } } @@ -3816,7 +3828,7 @@ void CanvasItemEditor::_notification(int p_what) { select_sb->set_default_margin(Side(i), 4); } - AnimationPlayerEditor::singleton->get_track_editor()->connect("visibility_changed", callable_mp(this, &CanvasItemEditor::_keying_changed)); + AnimationPlayerEditor::get_singleton()->get_track_editor()->connect("visibility_changed", callable_mp(this, &CanvasItemEditor::_keying_changed)); _keying_changed(); } else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) { @@ -4254,17 +4266,13 @@ void CanvasItemEditor::_button_tool_select(int p_index) { viewport->update(); _update_cursor(); - - // Request immediate refresh of cursor when using hot-keys to switch between tools - DisplayServer::CursorShape ds_cursor_shape = (DisplayServer::CursorShape)viewport->get_default_cursor_shape(); - DisplayServer::get_singleton()->cursor_set_shape(ds_cursor_shape); } void CanvasItemEditor::_insert_animation_keys(bool p_location, bool p_rotation, bool p_scale, bool p_on_existing) { Map<Node *, Object *> &selection = editor_selection->get_selection(); - for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) { - CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->key()); + for (const KeyValue<Node *, Object *> &E : selection) { + CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E.key); if (!canvas_item || !canvas_item->is_visible_in_tree()) { continue; } @@ -4277,13 +4285,13 @@ void CanvasItemEditor::_insert_animation_keys(bool p_location, bool p_rotation, Node2D *n2d = Object::cast_to<Node2D>(canvas_item); if (key_pos && p_location) { - AnimationPlayerEditor::singleton->get_track_editor()->insert_node_value_key(n2d, "position", n2d->get_position(), p_on_existing); + AnimationPlayerEditor::get_singleton()->get_track_editor()->insert_node_value_key(n2d, "position", n2d->get_position(), p_on_existing); } if (key_rot && p_rotation) { - AnimationPlayerEditor::singleton->get_track_editor()->insert_node_value_key(n2d, "rotation", n2d->get_rotation(), p_on_existing); + AnimationPlayerEditor::get_singleton()->get_track_editor()->insert_node_value_key(n2d, "rotation", n2d->get_rotation(), p_on_existing); } if (key_scale && p_scale) { - AnimationPlayerEditor::singleton->get_track_editor()->insert_node_value_key(n2d, "scale", n2d->get_scale(), p_on_existing); + AnimationPlayerEditor::get_singleton()->get_track_editor()->insert_node_value_key(n2d, "scale", n2d->get_scale(), p_on_existing); } if (n2d->has_meta("_edit_bone_") && n2d->get_parent_item()) { @@ -4309,13 +4317,13 @@ void CanvasItemEditor::_insert_animation_keys(bool p_location, bool p_rotation, if (has_chain && ik_chain.size()) { for (Node2D *&F : ik_chain) { if (key_pos) { - AnimationPlayerEditor::singleton->get_track_editor()->insert_node_value_key(F, "position", F->get_position(), p_on_existing); + AnimationPlayerEditor::get_singleton()->get_track_editor()->insert_node_value_key(F, "position", F->get_position(), p_on_existing); } if (key_rot) { - AnimationPlayerEditor::singleton->get_track_editor()->insert_node_value_key(F, "rotation", F->get_rotation(), p_on_existing); + AnimationPlayerEditor::get_singleton()->get_track_editor()->insert_node_value_key(F, "rotation", F->get_rotation(), p_on_existing); } if (key_scale) { - AnimationPlayerEditor::singleton->get_track_editor()->insert_node_value_key(F, "scale", F->get_scale(), p_on_existing); + AnimationPlayerEditor::get_singleton()->get_track_editor()->insert_node_value_key(F, "scale", F->get_scale(), p_on_existing); } } } @@ -4325,13 +4333,13 @@ void CanvasItemEditor::_insert_animation_keys(bool p_location, bool p_rotation, Control *ctrl = Object::cast_to<Control>(canvas_item); if (key_pos) { - AnimationPlayerEditor::singleton->get_track_editor()->insert_node_value_key(ctrl, "rect_position", ctrl->get_position(), p_on_existing); + AnimationPlayerEditor::get_singleton()->get_track_editor()->insert_node_value_key(ctrl, "rect_position", ctrl->get_position(), p_on_existing); } if (key_rot) { - AnimationPlayerEditor::singleton->get_track_editor()->insert_node_value_key(ctrl, "rect_rotation", ctrl->get_rotation(), p_on_existing); + AnimationPlayerEditor::get_singleton()->get_track_editor()->insert_node_value_key(ctrl, "rect_rotation", ctrl->get_rotation(), p_on_existing); } if (key_scale) { - AnimationPlayerEditor::singleton->get_track_editor()->insert_node_value_key(ctrl, "rect_size", ctrl->get_size(), p_on_existing); + AnimationPlayerEditor::get_singleton()->get_track_editor()->insert_node_value_key(ctrl, "rect_size", ctrl->get_size(), p_on_existing); } } } @@ -4695,8 +4703,8 @@ void CanvasItemEditor::_popup_callback(int p_op) { Map<Node *, Object *> &selection = editor_selection->get_selection(); - for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) { - CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->key()); + for (const KeyValue<Node *, Object *> &E : selection) { + CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E.key); if (!canvas_item || !canvas_item->is_visible_in_tree()) { continue; } @@ -4741,8 +4749,8 @@ void CanvasItemEditor::_popup_callback(int p_op) { case ANIM_CLEAR_POSE: { Map<Node *, Object *> &selection = editor_selection->get_selection(); - for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) { - CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->key()); + for (const KeyValue<Node *, Object *> &E : selection) { + CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E.key); if (!canvas_item || !canvas_item->is_visible_in_tree()) { continue; } @@ -4771,7 +4779,7 @@ void CanvasItemEditor::_popup_callback(int p_op) { } /* if (key_scale) - AnimationPlayerEditor::singleton->get_track_editor()->insert_node_value_key(ctrl,"rect/size",ctrl->get_size()); + AnimationPlayerEditor::get_singleton()->get_track_editor()->insert_node_value_key(ctrl,"rect/size",ctrl->get_size()); */ } } @@ -4816,8 +4824,8 @@ void CanvasItemEditor::_popup_callback(int p_op) { Node *editor_root = EditorNode::get_singleton()->get_edited_scene()->get_tree()->get_edited_scene_root(); undo_redo->create_action(TTR("Create Custom Bone2D(s) from Node(s)")); - for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) { - Node2D *n2d = Object::cast_to<Node2D>(E->key()); + for (const KeyValue<Node *, Object *> &E : selection) { + Node2D *n2d = Object::cast_to<Node2D>(E.key); Bone2D *new_bone = memnew(Bone2D); String new_bone_name = n2d->get_name(); @@ -4861,8 +4869,8 @@ void CanvasItemEditor::_focus_selection(int p_op) { int count = 0; Map<Node *, Object *> &selection = editor_selection->get_selection(); - for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) { - CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->key()); + for (const KeyValue<Node *, Object *> &E : selection) { + CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E.key); if (!canvas_item) { continue; } @@ -4898,8 +4906,7 @@ void CanvasItemEditor::_focus_selection(int p_op) { if (p_op == VIEW_CENTER_TO_SELECTION) { center = rect.get_center(); Vector2 offset = viewport->get_size() / 2 - editor->get_scene_root()->get_global_canvas_transform().xform(center); - view_offset.x -= Math::round(offset.x / zoom); - view_offset.y -= Math::round(offset.y / zoom); + view_offset -= (offset / zoom).round(); update_viewport(); } else { // VIEW_FRAME_TO_SELECTION @@ -5385,7 +5392,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { pan_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_PAN)); pan_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/pan_mode", TTR("Pan Mode"), KEY_G)); pan_button->set_shortcut_context(this); - pan_button->set_tooltip(TTR("Pan Mode")); + pan_button->set_tooltip(TTR("You can also use Pan View shortcut (Space by default) to pan in any mode.")); ruler_button = memnew(Button); ruler_button->set_flat(true); @@ -5801,7 +5808,7 @@ void CanvasItemEditorViewport::_remove_preview() { } bool CanvasItemEditorViewport::_cyclical_dependency_exists(const String &p_target_scene_path, Node *p_desired_node) { - if (p_desired_node->get_filename() == p_target_scene_path) { + if (p_desired_node->get_scene_file_path() == p_target_scene_path) { return true; } @@ -5898,14 +5905,14 @@ bool CanvasItemEditorViewport::_create_instance(Node *parent, String &path, cons return false; } - if (editor->get_edited_scene()->get_filename() != "") { // cyclical instancing - if (_cyclical_dependency_exists(editor->get_edited_scene()->get_filename(), instantiated_scene)) { + if (editor->get_edited_scene()->get_scene_file_path() != "") { // cyclical instancing + if (_cyclical_dependency_exists(editor->get_edited_scene()->get_scene_file_path(), instantiated_scene)) { memdelete(instantiated_scene); return false; } } - instantiated_scene->set_filename(ProjectSettings::get_singleton()->localize_path(path)); + instantiated_scene->set_scene_file_path(ProjectSettings::get_singleton()->localize_path(path)); editor_data->get_undo_redo().add_do_method(parent, "add_child", instantiated_scene); editor_data->get_undo_redo().add_do_method(instantiated_scene, "set_owner", editor->get_edited_scene()); diff --git a/editor/plugins/collision_polygon_3d_editor_plugin.cpp b/editor/plugins/collision_polygon_3d_editor_plugin.cpp index 8b354c33a1..53314db1e9 100644 --- a/editor/plugins/collision_polygon_3d_editor_plugin.cpp +++ b/editor/plugins/collision_polygon_3d_editor_plugin.cpp @@ -103,16 +103,16 @@ void CollisionPolygon3DEditor::_wip_close() { undo_redo->commit_action(); } -bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) { +EditorPlugin::AfterGUIInput CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) { if (!node) { - return false; + return EditorPlugin::AFTER_GUI_INPUT_PASS; } Transform3D gt = node->get_global_transform(); Transform3D gi = gt.affine_inverse(); float depth = _get_depth() * 0.5; Vector3 n = gt.basis.get_axis(2).normalized(); - Plane p(gt.origin + n * depth, n); + Plane p(n, gt.origin + n * depth); Ref<InputEventMouseButton> mb = p_event; @@ -124,7 +124,7 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con Vector3 spoint; if (!p.intersects_ray(ray_from, ray_dir, &spoint)) { - return false; + return EditorPlugin::AFTER_GUI_INPUT_PASS; } spoint = gi.xform(spoint); @@ -151,19 +151,19 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con snap_ignore = false; _polygon_draw(); edited_point = 1; - return true; + return EditorPlugin::AFTER_GUI_INPUT_STOP; } else { if (wip.size() > 1 && p_camera->unproject_position(gt.xform(Vector3(wip[0].x, wip[0].y, depth))).distance_to(gpoint) < grab_threshold) { //wip closed _wip_close(); - return true; + return EditorPlugin::AFTER_GUI_INPUT_STOP; } else { wip.push_back(cpoint); edited_point = wip.size(); snap_ignore = false; _polygon_draw(); - return true; + return EditorPlugin::AFTER_GUI_INPUT_STOP; } } } else if (mb->get_button_index() == MOUSE_BUTTON_RIGHT && mb->is_pressed() && wip_active) { @@ -184,7 +184,7 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con undo_redo->add_do_method(this, "_polygon_draw"); undo_redo->add_undo_method(this, "_polygon_draw"); undo_redo->commit_action(); - return true; + return EditorPlugin::AFTER_GUI_INPUT_STOP; } //search edges @@ -219,7 +219,7 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con _polygon_draw(); snap_ignore = true; - return true; + return EditorPlugin::AFTER_GUI_INPUT_STOP; } } else { //look for points to move @@ -244,7 +244,7 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con edited_point_pos = poly[closest_idx]; _polygon_draw(); snap_ignore = false; - return true; + return EditorPlugin::AFTER_GUI_INPUT_STOP; } } } else { @@ -253,7 +253,7 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con if (edited_point != -1) { //apply - ERR_FAIL_INDEX_V(edited_point, poly.size(), false); + ERR_FAIL_INDEX_V(edited_point, poly.size(), EditorPlugin::AFTER_GUI_INPUT_PASS); poly.write[edited_point] = edited_point_pos; undo_redo->create_action(TTR("Edit Poly")); undo_redo->add_do_method(node, "set_polygon", poly); @@ -263,7 +263,7 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con undo_redo->commit_action(); edited_point = -1; - return true; + return EditorPlugin::AFTER_GUI_INPUT_STOP; } } } @@ -290,7 +290,7 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con undo_redo->add_do_method(this, "_polygon_draw"); undo_redo->add_undo_method(this, "_polygon_draw"); undo_redo->commit_action(); - return true; + return EditorPlugin::AFTER_GUI_INPUT_STOP; } } @@ -310,7 +310,7 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con Vector3 spoint; if (!p.intersects_ray(ray_from, ray_dir, &spoint)) { - return false; + return EditorPlugin::AFTER_GUI_INPUT_PASS; } spoint = gi.xform(spoint); @@ -332,7 +332,7 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con } } - return false; + return EditorPlugin::AFTER_GUI_INPUT_PASS; } float CollisionPolygon3DEditor::_get_depth() { diff --git a/editor/plugins/collision_polygon_3d_editor_plugin.h b/editor/plugins/collision_polygon_3d_editor_plugin.h index 5db0f7308a..10b0adf76c 100644 --- a/editor/plugins/collision_polygon_3d_editor_plugin.h +++ b/editor/plugins/collision_polygon_3d_editor_plugin.h @@ -88,7 +88,7 @@ protected: static void _bind_methods(); public: - virtual bool forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event); + virtual EditorPlugin::AfterGUIInput forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event); void edit(Node *p_collision_polygon); CollisionPolygon3DEditor(EditorNode *p_editor); ~CollisionPolygon3DEditor(); @@ -101,7 +101,7 @@ class Polygon3DEditorPlugin : public EditorPlugin { EditorNode *editor; public: - virtual bool forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) override { return collision_polygon_editor->forward_spatial_gui_input(p_camera, p_event); } + virtual EditorPlugin::AfterGUIInput forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) override { return collision_polygon_editor->forward_spatial_gui_input(p_camera, p_event); } virtual String get_name() const override { return "Polygon3DEditor"; } bool has_main_screen() const override { return false; } diff --git a/editor/plugins/editor_preview_plugins.h b/editor/plugins/editor_preview_plugins.h index 6e8b9a34cf..091feae5fb 100644 --- a/editor/plugins/editor_preview_plugins.h +++ b/editor/plugins/editor_preview_plugins.h @@ -173,4 +173,22 @@ public: EditorFontPreviewPlugin(); ~EditorFontPreviewPlugin(); }; + +class EditorTileMapPatternPreviewPlugin : public EditorResourcePreviewGenerator { + GDCLASS(EditorTileMapPatternPreviewPlugin, EditorResourcePreviewGenerator); + + mutable SafeFlag preview_done; + + void _preview_done(const Variant &p_udata); + +protected: + static void _bind_methods(); + +public: + virtual bool handles(const String &p_type) const override; + virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const override; + + EditorTileMapPatternPreviewPlugin(); + ~EditorTileMapPatternPreviewPlugin(); +}; #endif // EDITORPREVIEWPLUGINS_H diff --git a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp index a4436525fb..6df2e34ceb 100644 --- a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp +++ b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp @@ -33,7 +33,7 @@ void GPUParticlesCollisionSDFEditorPlugin::_bake() { if (col_sdf) { if (col_sdf->get_texture().is_null() || !col_sdf->get_texture()->get_path().is_resource_file()) { - String path = get_tree()->get_edited_scene_root()->get_filename(); + String path = get_tree()->get_edited_scene_root()->get_scene_file_path(); if (path == String()) { path = "res://" + col_sdf->get_name() + "_data.exr"; } else { diff --git a/editor/plugins/lightmap_gi_editor_plugin.cpp b/editor/plugins/lightmap_gi_editor_plugin.cpp index b4a70cd31d..123087446c 100644 --- a/editor/plugins/lightmap_gi_editor_plugin.cpp +++ b/editor/plugins/lightmap_gi_editor_plugin.cpp @@ -43,9 +43,9 @@ void LightmapGIEditorPlugin::_bake_select_file(const String &p_file) { switch (err) { case LightmapGI::BAKE_ERROR_NO_SAVE_PATH: { - String scene_path = lightmap->get_filename(); + String scene_path = lightmap->get_scene_file_path(); if (scene_path == String()) { - scene_path = lightmap->get_owner()->get_filename(); + scene_path = lightmap->get_owner()->get_scene_file_path(); } if (scene_path == String()) { EditorNode::get_singleton()->show_warning(TTR("Can't determine a save path for lightmap images.\nSave your scene and try again.")); diff --git a/editor/plugins/node_3d_editor_gizmos.cpp b/editor/plugins/node_3d_editor_gizmos.cpp index eb771f2bc4..b28f3e134c 100644 --- a/editor/plugins/node_3d_editor_gizmos.cpp +++ b/editor/plugins/node_3d_editor_gizmos.cpp @@ -43,13 +43,13 @@ #include "scene/3d/decal.h" #include "scene/3d/gpu_particles_3d.h" #include "scene/3d/gpu_particles_collision_3d.h" +#include "scene/3d/joint_3d.h" #include "scene/3d/light_3d.h" #include "scene/3d/lightmap_gi.h" #include "scene/3d/lightmap_probe.h" #include "scene/3d/mesh_instance_3d.h" #include "scene/3d/navigation_region_3d.h" #include "scene/3d/occluder_instance_3d.h" -#include "scene/3d/physics_joint_3d.h" #include "scene/3d/position_3d.h" #include "scene/3d/ray_cast_3d.h" #include "scene/3d/reflection_probe.h" @@ -682,7 +682,7 @@ bool EditorNode3DGizmo::intersect_ray(Camera3D *p_camera, const Point2 &p_point, } if (collision_segments.size()) { - Plane camp(p_camera->get_transform().origin, (-p_camera->get_transform().basis.get_axis(2)).normalized()); + Plane camp(-p_camera->get_transform().basis.get_axis(2).normalized(), p_camera->get_transform().origin); int vc = collision_segments.size(); const Vector3 *vptr = collision_segments.ptr(); @@ -832,7 +832,7 @@ void EditorNode3DGizmo::_bind_methods() { ClassDB::bind_method(D_METHOD("get_plugin"), &EditorNode3DGizmo::get_plugin); ClassDB::bind_method(D_METHOD("clear"), &EditorNode3DGizmo::clear); ClassDB::bind_method(D_METHOD("set_hidden", "hidden"), &EditorNode3DGizmo::set_hidden); - ClassDB::bind_method(D_METHOD("is_subgizmo_selected"), &EditorNode3DGizmo::is_subgizmo_selected); + ClassDB::bind_method(D_METHOD("is_subgizmo_selected", "id"), &EditorNode3DGizmo::is_subgizmo_selected); ClassDB::bind_method(D_METHOD("get_subgizmo_selection"), &EditorNode3DGizmo::get_subgizmo_selection); GDVIRTUAL_BIND(_redraw); @@ -1313,7 +1313,7 @@ void Light3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, light->set_param(Light3D::PARAM_RANGE, d); } else if (Object::cast_to<OmniLight3D>(light)) { - Plane cp = Plane(gt.origin, p_camera->get_transform().basis.get_axis(2)); + Plane cp = Plane(p_camera->get_transform().basis.get_axis(2), gt.origin); Vector3 inters; if (cp.intersects_ray(ray_from, ray_dir, &inters)) { @@ -1840,47 +1840,6 @@ void Camera3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { p_gizmo->add_lines(lines, material); p_gizmo->add_handles(handles, get_material("handles")); - - ClippedCamera3D *clipcam = Object::cast_to<ClippedCamera3D>(camera); - if (clipcam) { - Node3D *parent = Object::cast_to<Node3D>(camera->get_parent()); - if (!parent) { - return; - } - Vector3 cam_normal = -camera->get_global_transform().basis.get_axis(Vector3::AXIS_Z).normalized(); - Vector3 cam_x = camera->get_global_transform().basis.get_axis(Vector3::AXIS_X).normalized(); - Vector3 cam_y = camera->get_global_transform().basis.get_axis(Vector3::AXIS_Y).normalized(); - Vector3 cam_pos = camera->get_global_transform().origin; - Vector3 parent_pos = parent->get_global_transform().origin; - - Plane parent_plane(parent_pos, cam_normal); - Vector3 ray_from = parent_plane.project(cam_pos); - - lines.clear(); - lines.push_back(ray_from + cam_x * 0.5 + cam_y * 0.5); - lines.push_back(ray_from + cam_x * 0.5 + cam_y * -0.5); - - lines.push_back(ray_from + cam_x * 0.5 + cam_y * -0.5); - lines.push_back(ray_from + cam_x * -0.5 + cam_y * -0.5); - - lines.push_back(ray_from + cam_x * -0.5 + cam_y * -0.5); - lines.push_back(ray_from + cam_x * -0.5 + cam_y * 0.5); - - lines.push_back(ray_from + cam_x * -0.5 + cam_y * 0.5); - lines.push_back(ray_from + cam_x * 0.5 + cam_y * 0.5); - - if (parent_plane.distance_to(cam_pos) < 0) { - lines.push_back(ray_from); - lines.push_back(cam_pos); - } - - Transform3D local = camera->get_global_transform().affine_inverse(); - for (int i = 0; i < lines.size(); i++) { - lines.write[i] = local.xform(lines[i]); - } - - p_gizmo->add_lines(lines, material); - } } ////// @@ -2070,169 +2029,6 @@ void Position3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { p_gizmo->add_collision_segments(cursor_points); } -///// - -Skeleton3DGizmoPlugin::Skeleton3DGizmoPlugin() { - Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/skeleton", Color(1, 0.8, 0.4)); - create_material("skeleton_material", gizmo_color); -} - -bool Skeleton3DGizmoPlugin::has_gizmo(Node3D *p_spatial) { - return Object::cast_to<Skeleton3D>(p_spatial) != nullptr; -} - -String Skeleton3DGizmoPlugin::get_gizmo_name() const { - return "Skeleton3D"; -} - -int Skeleton3DGizmoPlugin::get_priority() const { - return -1; -} - -void Skeleton3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { - Skeleton3D *skel = Object::cast_to<Skeleton3D>(p_gizmo->get_spatial_node()); - - p_gizmo->clear(); - - Ref<Material> material = get_material("skeleton_material", p_gizmo); - - Ref<SurfaceTool> surface_tool(memnew(SurfaceTool)); - - surface_tool->begin(Mesh::PRIMITIVE_LINES); - surface_tool->set_material(material); - LocalVector<Transform3D> grests; - grests.resize(skel->get_bone_count()); - - LocalVector<int> bones; - LocalVector<float> weights; - bones.resize(4); - weights.resize(4); - - for (int i = 0; i < 4; i++) { - bones[i] = 0; - weights[i] = 0; - } - - weights[0] = 1; - - AABB aabb; - - Color bonecolor = Color(1.0, 0.4, 0.4, 0.3); - Color rootcolor = Color(0.4, 1.0, 0.4, 0.1); - - LocalVector<int> bones_to_process; - bones_to_process = skel->get_parentless_bones(); - - while (bones_to_process.size() > 0) { - int current_bone_idx = bones_to_process[0]; - bones_to_process.erase(current_bone_idx); - - LocalVector<int> child_bones_vector; - child_bones_vector = skel->get_bone_children(current_bone_idx); - int child_bones_size = child_bones_vector.size(); - - if (skel->get_bone_parent(current_bone_idx) < 0) { - grests[current_bone_idx] = skel->get_bone_rest(current_bone_idx); - } - - for (int i = 0; i < child_bones_size; i++) { - int child_bone_idx = child_bones_vector[i]; - - grests[child_bone_idx] = grests[current_bone_idx] * skel->get_bone_rest(child_bone_idx); - Vector3 v0 = grests[current_bone_idx].origin; - Vector3 v1 = grests[child_bone_idx].origin; - Vector3 d = (v1 - v0).normalized(); - real_t dist = v0.distance_to(v1); - - // Find closest axis. - int closest = -1; - real_t closest_d = 0.0; - for (int j = 0; j < 3; j++) { - real_t dp = Math::abs(grests[current_bone_idx].basis[j].normalized().dot(d)); - if (j == 0 || dp > closest_d) { - closest = j; - } - } - - // Find closest other. - Vector3 first; - Vector3 points[4]; - int point_idx = 0; - for (int j = 0; j < 3; j++) { - bones[0] = current_bone_idx; - surface_tool->set_bones(bones); - surface_tool->set_weights(weights); - surface_tool->set_color(rootcolor); - surface_tool->add_vertex(v0 - grests[current_bone_idx].basis[j].normalized() * dist * 0.05); - surface_tool->set_bones(bones); - surface_tool->set_weights(weights); - surface_tool->set_color(rootcolor); - surface_tool->add_vertex(v0 + grests[current_bone_idx].basis[j].normalized() * dist * 0.05); - - if (j == closest) { - continue; - } - - Vector3 axis; - if (first == Vector3()) { - axis = d.cross(d.cross(grests[current_bone_idx].basis[j])).normalized(); - first = axis; - } else { - axis = d.cross(first).normalized(); - } - - for (int k = 0; k < 2; k++) { - if (k == 1) { - axis = -axis; - } - Vector3 point = v0 + d * dist * 0.2; - point += axis * dist * 0.1; - - bones[0] = current_bone_idx; - surface_tool->set_bones(bones); - surface_tool->set_weights(weights); - surface_tool->set_color(bonecolor); - surface_tool->add_vertex(v0); - surface_tool->set_bones(bones); - surface_tool->set_weights(weights); - surface_tool->set_color(bonecolor); - surface_tool->add_vertex(point); - - bones[0] = current_bone_idx; - surface_tool->set_bones(bones); - surface_tool->set_weights(weights); - surface_tool->set_color(bonecolor); - surface_tool->add_vertex(point); - bones[0] = child_bone_idx; - surface_tool->set_bones(bones); - surface_tool->set_weights(weights); - surface_tool->set_color(bonecolor); - surface_tool->add_vertex(v1); - points[point_idx++] = point; - } - } - SWAP(points[1], points[2]); - for (int j = 0; j < 4; j++) { - bones[0] = current_bone_idx; - surface_tool->set_bones(bones); - surface_tool->set_weights(weights); - surface_tool->set_color(bonecolor); - surface_tool->add_vertex(points[j]); - surface_tool->set_bones(bones); - surface_tool->set_weights(weights); - surface_tool->set_color(bonecolor); - surface_tool->add_vertex(points[(j + 1) % 4]); - } - - // Add the bone's children to the list of bones to be processed. - bones_to_process.push_back(child_bones_vector[i]); - } - } - - Ref<ArrayMesh> m = surface_tool->commit(); - p_gizmo->add_mesh(m, Ref<Material>(), Transform3D(), skel->register_skin(Ref<Skin>())); -} - //// PhysicalBone3DGizmoPlugin::PhysicalBone3DGizmoPlugin() { @@ -4773,10 +4569,10 @@ void NavigationRegion3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { } Vector<Vector3> lines; - for (Map<_EdgeKey, bool>::Element *E = edge_map.front(); E; E = E->next()) { - if (E->get()) { - lines.push_back(E->key().from); - lines.push_back(E->key().to); + for (const KeyValue<_EdgeKey, bool> &E : edge_map) { + if (E.value) { + lines.push_back(E.key.from); + lines.push_back(E.key.to); } } diff --git a/editor/plugins/node_3d_editor_gizmos.h b/editor/plugins/node_3d_editor_gizmos.h index 24b4a23d4b..d1aca4d92e 100644 --- a/editor/plugins/node_3d_editor_gizmos.h +++ b/editor/plugins/node_3d_editor_gizmos.h @@ -332,18 +332,6 @@ public: Position3DGizmoPlugin(); }; -class Skeleton3DGizmoPlugin : public EditorNode3DGizmoPlugin { - GDCLASS(Skeleton3DGizmoPlugin, 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; - - Skeleton3DGizmoPlugin(); -}; - class PhysicalBone3DGizmoPlugin : public EditorNode3DGizmoPlugin { GDCLASS(PhysicalBone3DGizmoPlugin, EditorNode3DGizmoPlugin); diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index d52a633fed..0096152cfe 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -357,8 +357,8 @@ int Node3DEditorViewport::get_selected_count() const { int count = 0; - for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) { - Node3D *sp = Object::cast_to<Node3D>(E->key()); + for (const KeyValue<Node *, Object *> &E : selection) { + Node3D *sp = Object::cast_to<Node3D>(E.key); if (!sp) { continue; } @@ -651,13 +651,13 @@ void Node3DEditorViewport::_select_region() { Vector3 a = _get_screen_to_space(box[i]); Vector3 b = _get_screen_to_space(box[(i + 1) % 4]); if (orthogonal) { - frustum.push_back(Plane(a, (a - b).normalized())); + frustum.push_back(Plane((a - b).normalized(), a)); } else { frustum.push_back(Plane(a, b, cam_pos)); } } - Plane near(cam_pos, -_get_camera_normal()); + Plane near(-_get_camera_normal(), cam_pos); near.d -= get_znear(); frustum.push_back(near); @@ -864,8 +864,8 @@ void Node3DEditorViewport::_compute_edit(const Point2 &p_point) { Node3DEditorSelectedItem *se = selected ? editor_selection->get_node_editor_data<Node3DEditorSelectedItem>(selected) : nullptr; if (se && se->gizmo.is_valid()) { - for (Map<int, Transform3D>::Element *E = se->subgizmos.front(); E; E = E->next()) { - int subgizmo_id = E->key(); + for (const KeyValue<int, Transform3D> &E : se->subgizmos) { + int subgizmo_id = E.key; se->subgizmos[subgizmo_id] = se->gizmo->get_subgizmo_transform(subgizmo_id); } se->original_local = selected->get_transform(); @@ -972,7 +972,7 @@ bool Node3DEditorViewport::_transform_gizmo_select(const Vector2 &p_screenpos, b const Vector3 grabber_pos = gt.origin + (ivec2 + ivec3) * gizmo_scale * (GIZMO_PLANE_SIZE + GIZMO_PLANE_DST * 0.6667); Vector3 r; - Plane plane(gt.origin, gt.basis.get_axis(i).normalized()); + Plane plane(gt.basis.get_axis(i).normalized(), gt.origin); if (plane.intersects_ray(ray_pos, ray, &r)) { const real_t dist = r.distance_to(grabber_pos); @@ -1010,7 +1010,7 @@ bool Node3DEditorViewport::_transform_gizmo_select(const Vector2 &p_screenpos, b float col_d = 1e20; for (int i = 0; i < 3; i++) { - Plane plane(gt.origin, gt.basis.get_axis(i).normalized()); + Plane plane(gt.basis.get_axis(i).normalized(), gt.origin); Vector3 r; if (!plane.intersects_ray(ray_pos, ray, &r)) { continue; @@ -1076,7 +1076,7 @@ bool Node3DEditorViewport::_transform_gizmo_select(const Vector2 &p_screenpos, b const Vector3 grabber_pos = gt.origin + (ivec2 + ivec3) * gizmo_scale * (GIZMO_PLANE_SIZE + GIZMO_PLANE_DST * 0.6667); Vector3 r; - Plane plane(gt.origin, gt.basis.get_axis(i).normalized()); + Plane plane(gt.basis.get_axis(i).normalized(), gt.origin); if (plane.intersects_ray(ray_pos, ray, &r)) { const real_t dist = r.distance_to(grabber_pos); @@ -1291,24 +1291,31 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { return; //do NONE } + EditorPlugin::AfterGUIInput after = EditorPlugin::AFTER_GUI_INPUT_PASS; { EditorNode *en = editor; EditorPluginList *force_input_forwarding_list = en->get_editor_plugins_force_input_forwarding(); if (!force_input_forwarding_list->is_empty()) { - bool discard = force_input_forwarding_list->forward_spatial_gui_input(camera, p_event, true); - if (discard) { + EditorPlugin::AfterGUIInput discard = force_input_forwarding_list->forward_spatial_gui_input(camera, p_event, true); + if (discard == EditorPlugin::AFTER_GUI_INPUT_STOP) { return; } + if (discard == EditorPlugin::AFTER_GUI_INPUT_DESELECT) { + after = EditorPlugin::AFTER_GUI_INPUT_DESELECT; + } } } { EditorNode *en = editor; EditorPluginList *over_plugin_list = en->get_editor_plugins_over(); if (!over_plugin_list->is_empty()) { - bool discard = over_plugin_list->forward_spatial_gui_input(camera, p_event, false); - if (discard) { + EditorPlugin::AfterGUIInput discard = over_plugin_list->forward_spatial_gui_input(camera, p_event, false); + if (discard == EditorPlugin::AFTER_GUI_INPUT_STOP) { return; } + if (discard == EditorPlugin::AFTER_GUI_INPUT_DESELECT) { + after = EditorPlugin::AFTER_GUI_INPUT_DESELECT; + } } } @@ -1374,9 +1381,9 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { Vector<int> ids; Vector<Transform3D> restore; - for (Map<int, Transform3D>::Element *GE = se->subgizmos.front(); GE; GE = GE->next()) { - ids.push_back(GE->key()); - restore.push_back(GE->value()); + for (const KeyValue<int, Transform3D> &GE : se->subgizmos) { + ids.push_back(GE.key); + restore.push_back(GE.value); } se->gizmo->commit_subgizmos(ids, restore, true); @@ -1573,17 +1580,19 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { break; } - clicked = _select_ray(b->get_position()); + if (after != EditorPlugin::AFTER_GUI_INPUT_DESELECT) { + clicked = _select_ray(b->get_position()); - //clicking is always deferred to either move or release + //clicking is always deferred to either move or release - clicked_wants_append = b->is_shift_pressed(); + clicked_wants_append = b->is_shift_pressed(); - if (clicked.is_null()) { - //default to regionselect - cursor.region_select = true; - cursor.region_begin = b->get_position(); - cursor.region_end = b->get_position(); + if (clicked.is_null()) { + //default to regionselect + cursor.region_select = true; + cursor.region_begin = b->get_position(); + cursor.region_end = b->get_position(); + } } surface->update(); @@ -1594,14 +1603,16 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { break; } - if (clicked.is_valid()) { - _select_clicked(false); - } + if (after != EditorPlugin::AFTER_GUI_INPUT_DESELECT) { + if (clicked.is_valid()) { + _select_clicked(false); + } - if (cursor.region_select) { - _select_region(); - cursor.region_select = false; - surface->update(); + if (cursor.region_select) { + _select_region(); + cursor.region_select = false; + surface->update(); + } } if (_edit.mode != TRANSFORM_NONE) { @@ -1612,9 +1623,9 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { Vector<int> ids; Vector<Transform3D> restore; - for (Map<int, Transform3D>::Element *GE = se->subgizmos.front(); GE; GE = GE->next()) { - ids.push_back(GE->key()); - restore.push_back(GE->value()); + for (const KeyValue<int, Transform3D> &GE : se->subgizmos) { + ids.push_back(GE.key); + restore.push_back(GE.value); } se->gizmo->commit_subgizmos(ids, restore, false); @@ -1750,33 +1761,33 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { switch (_edit.plane) { case TRANSFORM_VIEW: motion_mask = Vector3(0, 0, 0); - plane = Plane(_edit.center, _get_camera_normal()); + plane = Plane(_get_camera_normal(), _edit.center); break; case TRANSFORM_X_AXIS: motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(0); - plane = Plane(_edit.center, motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized()); + plane = Plane(motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized(), _edit.center); break; case TRANSFORM_Y_AXIS: motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(1); - plane = Plane(_edit.center, motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized()); + plane = Plane(motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized(), _edit.center); break; case TRANSFORM_Z_AXIS: motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(2); - plane = Plane(_edit.center, motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized()); + plane = Plane(motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized(), _edit.center); break; case TRANSFORM_YZ: motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(2) + spatial_editor->get_gizmo_transform().basis.get_axis(1); - plane = Plane(_edit.center, spatial_editor->get_gizmo_transform().basis.get_axis(0)); + plane = Plane(spatial_editor->get_gizmo_transform().basis.get_axis(0), _edit.center); plane_mv = true; break; case TRANSFORM_XZ: motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(2) + spatial_editor->get_gizmo_transform().basis.get_axis(0); - plane = Plane(_edit.center, spatial_editor->get_gizmo_transform().basis.get_axis(1)); + plane = Plane(spatial_editor->get_gizmo_transform().basis.get_axis(1), _edit.center); plane_mv = true; break; case TRANSFORM_XY: motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(0) + spatial_editor->get_gizmo_transform().basis.get_axis(1); - plane = Plane(_edit.center, spatial_editor->get_gizmo_transform().basis.get_axis(2)); + plane = Plane(spatial_editor->get_gizmo_transform().basis.get_axis(2), _edit.center); plane_mv = true; break; } @@ -1845,13 +1856,13 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { } if (se->gizmo.is_valid()) { - for (Map<int, Transform3D>::Element *GE = se->subgizmos.front(); GE; GE = GE->next()) { - Transform3D xform = GE->get(); + for (KeyValue<int, Transform3D> &GE : se->subgizmos) { + Transform3D xform = GE.value; Transform3D new_xform = _compute_transform(TRANSFORM_SCALE, se->original * xform, xform, motion, snap, local_coords); if (!local_coords) { new_xform = se->original.affine_inverse() * new_xform; } - se->gizmo->set_subgizmo_transform(GE->key(), new_xform); + se->gizmo->set_subgizmo_transform(GE.key, new_xform); } } else { Transform3D new_xform = _compute_transform(TRANSFORM_SCALE, se->original, se->original_local, motion, snap, local_coords); @@ -1871,30 +1882,30 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { switch (_edit.plane) { case TRANSFORM_VIEW: - plane = Plane(_edit.center, _get_camera_normal()); + plane = Plane(_get_camera_normal(), _edit.center); break; case TRANSFORM_X_AXIS: motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(0); - plane = Plane(_edit.center, motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized()); + plane = Plane(motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized(), _edit.center); break; case TRANSFORM_Y_AXIS: motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(1); - plane = Plane(_edit.center, motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized()); + plane = Plane(motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized(), _edit.center); break; case TRANSFORM_Z_AXIS: motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(2); - plane = Plane(_edit.center, motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized()); + plane = Plane(motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized(), _edit.center); break; case TRANSFORM_YZ: - plane = Plane(_edit.center, spatial_editor->get_gizmo_transform().basis.get_axis(0)); + plane = Plane(spatial_editor->get_gizmo_transform().basis.get_axis(0), _edit.center); plane_mv = true; break; case TRANSFORM_XZ: - plane = Plane(_edit.center, spatial_editor->get_gizmo_transform().basis.get_axis(1)); + plane = Plane(spatial_editor->get_gizmo_transform().basis.get_axis(1), _edit.center); plane_mv = true; break; case TRANSFORM_XY: - plane = Plane(_edit.center, spatial_editor->get_gizmo_transform().basis.get_axis(2)); + plane = Plane(spatial_editor->get_gizmo_transform().basis.get_axis(2), _edit.center); plane_mv = true; break; } @@ -1944,11 +1955,11 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { } if (se->gizmo.is_valid()) { - for (Map<int, Transform3D>::Element *GE = se->subgizmos.front(); GE; GE = GE->next()) { - Transform3D xform = GE->get(); + for (KeyValue<int, Transform3D> &GE : se->subgizmos) { + Transform3D xform = GE.value; Transform3D new_xform = _compute_transform(TRANSFORM_TRANSLATE, se->original * xform, xform, motion, snap, local_coords); new_xform = se->original.affine_inverse() * new_xform; - se->gizmo->set_subgizmo_transform(GE->key(), new_xform); + se->gizmo->set_subgizmo_transform(GE.key, new_xform); } } else { Transform3D new_xform = _compute_transform(TRANSFORM_TRANSLATE, se->original, se->original_local, motion, snap, local_coords); @@ -1967,18 +1978,18 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { switch (_edit.plane) { case TRANSFORM_VIEW: - plane = Plane(_edit.center, _get_camera_normal()); + plane = Plane(_get_camera_normal(), _edit.center); break; case TRANSFORM_X_AXIS: - plane = Plane(_edit.center, spatial_editor->get_gizmo_transform().basis.get_axis(0)); + plane = Plane(spatial_editor->get_gizmo_transform().basis.get_axis(0), _edit.center); axis = Vector3(1, 0, 0); break; case TRANSFORM_Y_AXIS: - plane = Plane(_edit.center, spatial_editor->get_gizmo_transform().basis.get_axis(1)); + plane = Plane(spatial_editor->get_gizmo_transform().basis.get_axis(1), _edit.center); axis = Vector3(0, 1, 0); break; case TRANSFORM_Z_AXIS: - plane = Plane(_edit.center, spatial_editor->get_gizmo_transform().basis.get_axis(2)); + plane = Plane(spatial_editor->get_gizmo_transform().basis.get_axis(2), _edit.center); axis = Vector3(0, 0, 1); break; case TRANSFORM_YZ: @@ -2030,14 +2041,14 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { Vector3 compute_axis = local_coords ? axis : plane.normal; if (se->gizmo.is_valid()) { - for (Map<int, Transform3D>::Element *GE = se->subgizmos.front(); GE; GE = GE->next()) { - Transform3D xform = GE->get(); + for (KeyValue<int, Transform3D> &GE : se->subgizmos) { + Transform3D xform = GE.value; Transform3D new_xform = _compute_transform(TRANSFORM_ROTATE, se->original * xform, xform, compute_axis, angle, local_coords); if (!local_coords) { new_xform = se->original.affine_inverse() * new_xform; } - se->gizmo->set_subgizmo_transform(GE->key(), new_xform); + se->gizmo->set_subgizmo_transform(GE.key, new_xform); } } else { Transform3D new_xform = _compute_transform(TRANSFORM_ROTATE, se->original, se->original_local, compute_axis, angle, local_coords); @@ -2215,6 +2226,31 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { if (ED_IS_SHORTCUT("spatial_editor/right_view", p_event)) { _menu_option(VIEW_RIGHT); } + if (ED_IS_SHORTCUT("spatial_editor/orbit_view_down", p_event)) { + cursor.x_rot -= Math_PI / 12.0; + 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; + view_type = VIEW_TYPE_USER; + _update_name(); + } + if (ED_IS_SHORTCUT("spatial_editor/orbit_view_right", p_event)) { + cursor.y_rot -= Math_PI / 12.0; + view_type = VIEW_TYPE_USER; + _update_name(); + } + if (ED_IS_SHORTCUT("spatial_editor/orbit_view_left", p_event)) { + cursor.y_rot += Math_PI / 12.0; + view_type = VIEW_TYPE_USER; + _update_name(); + } + if (ED_IS_SHORTCUT("spatial_editor/orbit_view_180", p_event)) { + cursor.y_rot += Math_PI; + view_type = VIEW_TYPE_USER; + _update_name(); + } if (ED_IS_SHORTCUT("spatial_editor/focus_origin", p_event)) { _menu_option(VIEW_CENTER_TO_ORIGIN); } @@ -2237,7 +2273,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { return; } - if (!AnimationPlayerEditor::singleton->get_track_editor()->has_keying()) { + if (!AnimationPlayerEditor::get_singleton()->get_track_editor()->has_keying()) { set_message(TTR("Keying is disabled (no key inserted).")); return; } @@ -2483,8 +2519,14 @@ static bool is_shortcut_pressed(const String &p_path) { if (shortcut.is_null()) { return false; } - InputEventKey *k = Object::cast_to<InputEventKey>(shortcut->get_event().ptr()); - if (k == nullptr) { + + const Array shortcuts = shortcut->get_events(); + Ref<InputEventKey> k; + if (shortcuts.size() > 0) { + k = shortcuts.front(); + } + + if (k.is_null()) { return false; } const Input &input = *Input::get_singleton(); @@ -2601,6 +2643,9 @@ void Node3DEditorViewport::_project_settings_changed() { const bool use_occlusion_culling = GLOBAL_GET("rendering/occlusion_culling/use_occlusion_culling"); viewport->set_use_occlusion_culling(use_occlusion_culling); + + const float lod_threshold = GLOBAL_GET("rendering/mesh_lod/lod_change/threshold_pixels"); + viewport->set_lod_threshold(lod_threshold); } void Node3DEditorViewport::_notification(int p_what) { @@ -2663,8 +2708,8 @@ void Node3DEditorViewport::_notification(int p_what) { bool changed = false; bool exist = false; - for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) { - Node3D *sp = Object::cast_to<Node3D>(E->key()); + for (const KeyValue<Node *, Object *> &E : selection) { + Node3D *sp = Object::cast_to<Node3D>(E.key); if (!sp) { continue; } @@ -2688,15 +2733,28 @@ void Node3DEditorViewport::_notification(int p_what) { se->aabb = new_aabb; - t.translate(se->aabb.position); + Transform3D t_offset = t; // apply AABB scaling before item's global transform - Basis aabb_s; - aabb_s.scale(se->aabb.size); - t.basis = t.basis * aabb_s; + { + const Vector3 offset(0.005, 0.005, 0.005); + Basis aabb_s; + aabb_s.scale(se->aabb.size + offset); + t.translate(se->aabb.position - offset / 2); + t.basis = t.basis * aabb_s; + } + { + const Vector3 offset(0.01, 0.01, 0.01); + Basis aabb_s; + aabb_s.scale(se->aabb.size + offset); + t_offset.translate(se->aabb.position - offset / 2); + t_offset.basis = t_offset.basis * aabb_s; + } RenderingServer::get_singleton()->instance_set_transform(se->sbox_instance, t); + RenderingServer::get_singleton()->instance_set_transform(se->sbox_instance_offset, t_offset); RenderingServer::get_singleton()->instance_set_transform(se->sbox_instance_xray, t); + RenderingServer::get_singleton()->instance_set_transform(se->sbox_instance_xray_offset, t_offset); } if (changed || (spatial_editor->is_gizmo_visible() && !exist)) { @@ -3555,7 +3613,7 @@ void Node3DEditorViewport::update_transform_gizmo_view() { const Vector3 camz = -camera_xform.get_basis().get_axis(2).normalized(); const Vector3 camy = -camera_xform.get_basis().get_axis(1).normalized(); - const Plane p(camera_xform.origin, camz); + const Plane p = Plane(camz, camera_xform.origin); const real_t gizmo_d = MAX(Math::abs(p.distance_to(xform.origin)), CMP_EPSILON); const real_t d0 = camera->unproject_position(camera_xform.origin + camz * gizmo_d).y; const real_t d1 = camera->unproject_position(camera_xform.origin + camz * gizmo_d + camy).y; @@ -3806,8 +3864,8 @@ void Node3DEditorViewport::focus_selection() { } if (se->gizmo.is_valid()) { - for (Map<int, Transform3D>::Element *GE = se->subgizmos.front(); GE; GE = GE->next()) { - center += se->gizmo->get_subgizmo_transform(GE->key()).origin; + for (const KeyValue<int, Transform3D> &GE : se->subgizmos) { + center += se->gizmo->get_subgizmo_transform(GE.key).origin; count++; } } @@ -3830,7 +3888,7 @@ void Node3DEditorViewport::assign_pending_data_pointers(Node3D *p_preview_node, } Vector3 Node3DEditorViewport::_get_instance_position(const Point2 &p_pos) const { - const float MAX_DISTANCE = 10; + const float MAX_DISTANCE = 50.0; Vector3 world_ray = _get_ray(p_pos); Vector3 world_pos = _get_ray_pos(p_pos); @@ -3917,7 +3975,7 @@ void Node3DEditorViewport::_remove_preview() { } bool Node3DEditorViewport::_cyclical_dependency_exists(const String &p_target_scene_path, Node *p_desired_node) { - if (p_desired_node->get_filename() == p_target_scene_path) { + if (p_desired_node->get_scene_file_path() == p_target_scene_path) { return true; } @@ -3959,15 +4017,15 @@ bool Node3DEditorViewport::_create_instance(Node *parent, String &path, const Po return false; } - if (editor->get_edited_scene()->get_filename() != "") { // cyclical instancing - if (_cyclical_dependency_exists(editor->get_edited_scene()->get_filename(), instantiated_scene)) { + if (editor->get_edited_scene()->get_scene_file_path() != "") { // cyclical instancing + if (_cyclical_dependency_exists(editor->get_edited_scene()->get_scene_file_path(), instantiated_scene)) { memdelete(instantiated_scene); return false; } } if (scene != nullptr) { - instantiated_scene->set_filename(ProjectSettings::get_singleton()->localize_path(path)); + instantiated_scene->set_scene_file_path(ProjectSettings::get_singleton()->localize_path(path)); } editor_data->get_undo_redo().add_do_method(parent, "add_child", instantiated_scene); @@ -4722,9 +4780,15 @@ Node3DEditorSelectedItem::~Node3DEditorSelectedItem() { if (sbox_instance.is_valid()) { RenderingServer::get_singleton()->free(sbox_instance); } + if (sbox_instance_offset.is_valid()) { + RenderingServer::get_singleton()->free(sbox_instance_offset); + } if (sbox_instance_xray.is_valid()) { RenderingServer::get_singleton()->free(sbox_instance_xray); } + if (sbox_instance_xray_offset.is_valid()) { + RenderingServer::get_singleton()->free(sbox_instance_xray_offset); + } } void Node3DEditor::select_gizmo_highlight_axis(int p_axis) { @@ -4747,8 +4811,8 @@ void Node3DEditor::update_transform_gizmo() { Node3DEditorSelectedItem *se = selected ? editor_selection->get_node_editor_data<Node3DEditorSelectedItem>(selected) : nullptr; if (se && se->gizmo.is_valid()) { - for (Map<int, Transform3D>::Element *E = se->subgizmos.front(); E; E = E->next()) { - Transform3D xf = se->sp->get_global_transform() * se->gizmo->get_subgizmo_transform(E->key()); + for (const KeyValue<int, Transform3D> &E : se->subgizmos) { + Transform3D xf = se->sp->get_global_transform() * se->gizmo->get_subgizmo_transform(E.key); gizmo_center += xf.origin; if (count == 0 && local_gizmo_coords) { gizmo_basis = xf.basis; @@ -4827,23 +4891,39 @@ Object *Node3DEditor::_get_editor_data(Object *p_what) { si->sbox_instance = RenderingServer::get_singleton()->instance_create2( selection_box->get_rid(), sp->get_world_3d()->get_scenario()); + si->sbox_instance_offset = RenderingServer::get_singleton()->instance_create2( + selection_box->get_rid(), + sp->get_world_3d()->get_scenario()); RS::get_singleton()->instance_geometry_set_cast_shadows_setting( si->sbox_instance, RS::SHADOW_CASTING_SETTING_OFF); + RS::get_singleton()->instance_geometry_set_cast_shadows_setting( + si->sbox_instance_offset, + RS::SHADOW_CASTING_SETTING_OFF); // Use the Edit layer to hide the selection box when View Gizmos is disabled, since it is a bit distracting. // It's still possible to approximately guess what is selected by looking at the manipulation gizmo position. RS::get_singleton()->instance_set_layer_mask(si->sbox_instance, 1 << Node3DEditorViewport::GIZMO_EDIT_LAYER); + RS::get_singleton()->instance_set_layer_mask(si->sbox_instance_offset, 1 << Node3DEditorViewport::GIZMO_EDIT_LAYER); RS::get_singleton()->instance_geometry_set_flag(si->sbox_instance, RS::INSTANCE_FLAG_IGNORE_OCCLUSION_CULLING, true); + RS::get_singleton()->instance_geometry_set_flag(si->sbox_instance_offset, RS::INSTANCE_FLAG_IGNORE_OCCLUSION_CULLING, true); si->sbox_instance_xray = RenderingServer::get_singleton()->instance_create2( selection_box_xray->get_rid(), sp->get_world_3d()->get_scenario()); + si->sbox_instance_xray_offset = RenderingServer::get_singleton()->instance_create2( + selection_box_xray->get_rid(), + sp->get_world_3d()->get_scenario()); RS::get_singleton()->instance_geometry_set_cast_shadows_setting( si->sbox_instance_xray, RS::SHADOW_CASTING_SETTING_OFF); + RS::get_singleton()->instance_geometry_set_cast_shadows_setting( + si->sbox_instance_xray_offset, + RS::SHADOW_CASTING_SETTING_OFF); // Use the Edit layer to hide the selection box when View Gizmos is disabled, since it is a bit distracting. // It's still possible to approximately guess what is selected by looking at the manipulation gizmo position. RS::get_singleton()->instance_set_layer_mask(si->sbox_instance_xray, 1 << Node3DEditorViewport::GIZMO_EDIT_LAYER); - RS::get_singleton()->instance_geometry_set_flag(si->sbox_instance, RS::INSTANCE_FLAG_IGNORE_OCCLUSION_CULLING, true); + RS::get_singleton()->instance_set_layer_mask(si->sbox_instance_xray_offset, 1 << Node3DEditorViewport::GIZMO_EDIT_LAYER); + RS::get_singleton()->instance_geometry_set_flag(si->sbox_instance_xray, RS::INSTANCE_FLAG_IGNORE_OCCLUSION_CULLING, true); + RS::get_singleton()->instance_geometry_set_flag(si->sbox_instance_xray_offset, RS::INSTANCE_FLAG_IGNORE_OCCLUSION_CULLING, true); return si; } @@ -4851,10 +4931,6 @@ Object *Node3DEditor::_get_editor_data(Object *p_what) { void Node3DEditor::_generate_selection_boxes() { // Use two AABBs to create the illusion of a slightly thicker line. AABB aabb(Vector3(), Vector3(1, 1, 1)); - AABB aabb_offset(Vector3(), Vector3(1, 1, 1)); - // Grow the bounding boxes slightly to avoid Z-fighting with the mesh's edges. - aabb.grow_by(0.005); - aabb_offset.grow_by(0.01); // Create a x-ray (visible through solid surfaces) and standard version of the selection box. // Both will be drawn at the same position, but with different opacity. @@ -4874,16 +4950,6 @@ void Node3DEditor::_generate_selection_boxes() { st_xray->add_vertex(b); } - for (int i = 0; i < 12; i++) { - Vector3 a, b; - aabb_offset.get_edge(i, a, b); - - st->add_vertex(a); - st->add_vertex(b); - st_xray->add_vertex(a); - st_xray->add_vertex(b); - } - Ref<StandardMaterial3D> mat = memnew(StandardMaterial3D); mat->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED); const Color selection_box_color = EDITOR_GET("editors/3d/selection_box_color"); @@ -6130,7 +6196,7 @@ void Node3DEditor::_init_grid() { if (orthogonal) { camera_distance = camera->get_size() / 2.0; Vector3 camera_direction = -camera->get_global_transform().get_basis().get_axis(2); - Plane grid_plane = Plane(Vector3(), normal); + Plane grid_plane = Plane(normal); Vector3 intersection; if (grid_plane.intersects_ray(camera_position, camera_direction, &intersection)) { camera_position = intersection; @@ -6280,7 +6346,7 @@ void Node3DEditor::update_grid() { // Gets a orthogonal or perspective position correctly (for the grid comparison) const Vector3 camera_position = get_editor_viewport(0)->camera->get_position(); - if (!grid_init_draw || (camera_position - grid_camera_last_update_position).length() >= 10.0f) { + if (!grid_init_draw || grid_camera_last_update_position.distance_squared_to(camera_position) >= 100.0f) { _finish_grid(); _init_grid(); grid_init_draw = true; @@ -6428,7 +6494,7 @@ void Node3DEditor::snap_selected_nodes_to_floor() { // We add a bit of margin to the from position to avoid it from snapping // when the spatial is already on a floor and there's another floor under // it - from = from + Vector3(0.0, 0.2, 0.0); + from = from + Vector3(0.0, 1, 0.0); Dictionary d; @@ -6444,7 +6510,7 @@ void Node3DEditor::snap_selected_nodes_to_floor() { Array keys = snap_data.keys(); // The maximum height an object can travel to be snapped - const float max_snap_height = 20.0; + const float max_snap_height = 500.0; // Will be set to `true` if at least one node from the selection was successfully snapped bool snapped_to_floor = false; @@ -6674,8 +6740,8 @@ Vector<int> Node3DEditor::get_subgizmo_selection() { Vector<int> ret; if (se) { - for (Map<int, Transform3D>::Element *E = se->subgizmos.front(); E; E = E->next()) { - ret.push_back(E->key()); + for (const KeyValue<int, Transform3D> &E : se->subgizmos) { + ret.push_back(E.key); } } return ret; @@ -6727,6 +6793,33 @@ void Node3DEditor::_request_gizmo(Object *p_obj) { } } +void Node3DEditor::_set_subgizmo_selection(Object *p_obj, Ref<Node3DGizmo> p_gizmo, int p_id, Transform3D p_transform) { + if (p_id == -1) { + _clear_subgizmo_selection(p_obj); + return; + } + + Node3D *sp = nullptr; + if (p_obj) { + sp = Object::cast_to<Node3D>(p_obj); + } else { + sp = selected; + } + + if (!sp) { + return; + } + + Node3DEditorSelectedItem *se = editor_selection->get_node_editor_data<Node3DEditorSelectedItem>(sp); + if (se) { + se->subgizmos.clear(); + se->subgizmos.insert(p_id, p_transform); + se->gizmo = p_gizmo; + sp->update_gizmos(); + update_transform_gizmo(); + } +} + void Node3DEditor::_clear_subgizmo_selection(Object *p_obj) { Node3D *sp = nullptr; if (p_obj) { @@ -6852,7 +6945,6 @@ void Node3DEditor::_register_all_gizmos() { add_gizmo_plugin(Ref<OccluderInstance3DGizmoPlugin>(memnew(OccluderInstance3DGizmoPlugin))); add_gizmo_plugin(Ref<SoftDynamicBody3DGizmoPlugin>(memnew(SoftDynamicBody3DGizmoPlugin))); add_gizmo_plugin(Ref<Sprite3DGizmoPlugin>(memnew(Sprite3DGizmoPlugin))); - add_gizmo_plugin(Ref<Skeleton3DGizmoPlugin>(memnew(Skeleton3DGizmoPlugin))); add_gizmo_plugin(Ref<Position3DGizmoPlugin>(memnew(Position3DGizmoPlugin))); add_gizmo_plugin(Ref<RayCast3DGizmoPlugin>(memnew(RayCast3DGizmoPlugin))); add_gizmo_plugin(Ref<SpringArm3DGizmoPlugin>(memnew(SpringArm3DGizmoPlugin))); @@ -6877,6 +6969,7 @@ void Node3DEditor::_register_all_gizmos() { void Node3DEditor::_bind_methods() { ClassDB::bind_method("_get_editor_data", &Node3DEditor::_get_editor_data); ClassDB::bind_method("_request_gizmo", &Node3DEditor::_request_gizmo); + ClassDB::bind_method("_set_subgizmo_selection", &Node3DEditor::_set_subgizmo_selection); ClassDB::bind_method("_clear_subgizmo_selection", &Node3DEditor::_clear_subgizmo_selection); ClassDB::bind_method("_refresh_menu_icons", &Node3DEditor::_refresh_menu_icons); @@ -7238,6 +7331,11 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { ED_SHORTCUT("spatial_editor/front_view", TTR("Front View"), KEY_KP_1); ED_SHORTCUT("spatial_editor/left_view", TTR("Left View"), KEY_MASK_ALT + KEY_KP_3); ED_SHORTCUT("spatial_editor/right_view", TTR("Right View"), KEY_KP_3); + ED_SHORTCUT("spatial_editor/orbit_view_down", TTR("Orbit View Down"), KEY_KP_2); + ED_SHORTCUT("spatial_editor/orbit_view_left", TTR("Orbit View Left"), KEY_KP_4); + ED_SHORTCUT("spatial_editor/orbit_view_right", TTR("Orbit View Right"), KEY_KP_6); + ED_SHORTCUT("spatial_editor/orbit_view_up", TTR("Orbit View Up"), KEY_KP_8); + ED_SHORTCUT("spatial_editor/orbit_view_180", TTR("Orbit View 180"), KEY_KP_9); ED_SHORTCUT("spatial_editor/switch_perspective_orthogonal", TTR("Switch Perspective/Orthogonal View"), KEY_KP_5); ED_SHORTCUT("spatial_editor/insert_anim_key", TTR("Insert Animation Key"), KEY_K); ED_SHORTCUT("spatial_editor/focus_origin", TTR("Focus Origin"), KEY_O); @@ -7703,6 +7801,13 @@ Vector3 Node3DEditor::snap_point(Vector3 p_target, Vector3 p_start) const { return p_target; } +bool Node3DEditor::is_gizmo_visible() const { + if (selected) { + return gizmo.visible && selected->is_transform_gizmo_visible(); + } + return gizmo.visible; +} + double Node3DEditor::get_translate_snap() const { double snap_value; if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h index 59f3ec6fcd..2d5aeaa981 100644 --- a/editor/plugins/node_3d_editor_plugin.h +++ b/editor/plugins/node_3d_editor_plugin.h @@ -431,7 +431,9 @@ public: bool last_xform_dirty; Node3D *sp; RID sbox_instance; + RID sbox_instance_offset; RID sbox_instance_xray; + RID sbox_instance_xray_offset; Ref<EditorNode3DGizmo> gizmo; Map<int, Transform3D> subgizmos; // map ID -> initial transform @@ -663,6 +665,7 @@ private: Node3D *selected; void _request_gizmo(Object *p_obj); + void _set_subgizmo_selection(Object *p_obj, Ref<Node3DGizmo> p_gizmo, int p_id, Transform3D p_transform = Transform3D()); void _clear_subgizmo_selection(Object *p_obj = nullptr); static Node3DEditor *singleton; @@ -756,7 +759,7 @@ public: float get_fov() const { return settings_fov->get_value(); } Transform3D get_gizmo_transform() const { return gizmo.transform; } - bool is_gizmo_visible() const { return gizmo.visible; } + bool is_gizmo_visible() const; ToolMode get_tool_mode() const { return tool_mode; } bool are_local_coords_enabled() const { return tool_option_button[Node3DEditor::TOOL_OPT_LOCAL_COORDS]->is_pressed(); } diff --git a/editor/plugins/occluder_instance_3d_editor_plugin.cpp b/editor/plugins/occluder_instance_3d_editor_plugin.cpp index ab88b9f00d..0328b1bea6 100644 --- a/editor/plugins/occluder_instance_3d_editor_plugin.cpp +++ b/editor/plugins/occluder_instance_3d_editor_plugin.cpp @@ -41,9 +41,9 @@ void OccluderInstance3DEditorPlugin::_bake_select_file(const String &p_file) { switch (err) { case OccluderInstance3D::BAKE_ERROR_NO_SAVE_PATH: { - String scene_path = occluder_instance->get_filename(); + String scene_path = occluder_instance->get_scene_file_path(); if (scene_path == String()) { - scene_path = occluder_instance->get_owner()->get_filename(); + scene_path = occluder_instance->get_owner()->get_scene_file_path(); } if (scene_path == String()) { EditorNode::get_singleton()->show_warning(TTR("Can't determine a save path for the occluder.\nSave your scene and try again.")); diff --git a/editor/plugins/path_3d_editor_plugin.cpp b/editor/plugins/path_3d_editor_plugin.cpp index 13f7908170..e2902feba1 100644 --- a/editor/plugins/path_3d_editor_plugin.cpp +++ b/editor/plugins/path_3d_editor_plugin.cpp @@ -101,7 +101,7 @@ void Path3DGizmo::set_handle(int p_id, Camera3D *p_camera, const Point2 &p_point // Setting curve point positions if (p_id < c->get_point_count()) { - Plane p(gt.xform(original), p_camera->get_transform().basis.get_axis(2)); + const Plane p = Plane(p_camera->get_transform().basis.get_axis(2), gt.xform(original)); Vector3 inters; @@ -125,7 +125,7 @@ void Path3DGizmo::set_handle(int p_id, Camera3D *p_camera, const Point2 &p_point Vector3 base = c->get_point_position(idx); - Plane p(gt.xform(original), p_camera->get_transform().basis.get_axis(2)); + Plane p(p_camera->get_transform().basis.get_axis(2), gt.xform(original)); Vector3 inters; @@ -294,13 +294,13 @@ Path3DGizmo::Path3DGizmo(Path3D *p_path) { orig_out_length = 0; } -bool Path3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) { +EditorPlugin::AfterGUIInput Path3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) { if (!path) { - return false; + return EditorPlugin::AFTER_GUI_INPUT_PASS; } Ref<Curve3D> c = path->get_curve(); if (c.is_null()) { - return false; + return EditorPlugin::AFTER_GUI_INPUT_PASS; } Transform3D gt = path->get_global_transform(); Transform3D it = gt.affine_inverse(); @@ -329,14 +329,14 @@ bool Path3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref const Vector3 *r = v3a.ptr(); if (p_camera->unproject_position(gt.xform(c->get_point_position(0))).distance_to(mbpos) < click_dist) { - return false; //nope, existing + return EditorPlugin::AFTER_GUI_INPUT_PASS; //nope, existing } for (int i = 0; i < c->get_point_count() - 1; i++) { //find the offset and point index of the place to break up int j = idx; if (p_camera->unproject_position(gt.xform(c->get_point_position(i + 1))).distance_to(mbpos) < click_dist) { - return false; //nope, existing + return EditorPlugin::AFTER_GUI_INPUT_PASS; //nope, existing } while (j < rc && c->get_point_position(i + 1) != r[j]) { @@ -386,16 +386,16 @@ bool Path3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref ur->add_do_method(c.ptr(), "add_point", closest_seg_point, Vector3(), Vector3(), closest_seg + 1); ur->add_undo_method(c.ptr(), "remove_point", closest_seg + 1); ur->commit_action(); - return true; + return EditorPlugin::AFTER_GUI_INPUT_STOP; } else { - Vector3 org; + Vector3 origin; if (c->get_point_count() == 0) { - org = path->get_transform().get_origin(); + origin = path->get_transform().get_origin(); } else { - org = gt.xform(c->get_point_position(c->get_point_count() - 1)); + origin = gt.xform(c->get_point_position(c->get_point_count() - 1)); } - Plane p(org, p_camera->get_transform().basis.get_axis(2)); + Plane p(p_camera->get_transform().basis.get_axis(2), origin); Vector3 ray_from = p_camera->project_ray_origin(mbpos); Vector3 ray_dir = p_camera->project_ray_normal(mbpos); @@ -405,7 +405,7 @@ bool Path3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref ur->add_do_method(c.ptr(), "add_point", it.xform(inters), Vector3(), Vector3(), -1); ur->add_undo_method(c.ptr(), "remove_point", c->get_point_count()); ur->commit_action(); - return true; + return EditorPlugin::AFTER_GUI_INPUT_STOP; } //add new at pos @@ -425,27 +425,27 @@ bool Path3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref ur->add_do_method(c.ptr(), "remove_point", i); ur->add_undo_method(c.ptr(), "add_point", c->get_point_position(i), c->get_point_in(i), c->get_point_out(i), i); ur->commit_action(); - return true; + return EditorPlugin::AFTER_GUI_INPUT_STOP; } else if (dist_to_p_out < click_dist) { UndoRedo *ur = editor->get_undo_redo(); ur->create_action(TTR("Remove Out-Control Point")); ur->add_do_method(c.ptr(), "set_point_out", i, Vector3()); ur->add_undo_method(c.ptr(), "set_point_out", i, c->get_point_out(i)); ur->commit_action(); - return true; + return EditorPlugin::AFTER_GUI_INPUT_STOP; } else if (dist_to_p_in < click_dist) { UndoRedo *ur = editor->get_undo_redo(); ur->create_action(TTR("Remove In-Control Point")); ur->add_do_method(c.ptr(), "set_point_in", i, Vector3()); ur->add_undo_method(c.ptr(), "set_point_in", i, c->get_point_in(i)); ur->commit_action(); - return true; + return EditorPlugin::AFTER_GUI_INPUT_STOP; } } } } - return false; + return EditorPlugin::AFTER_GUI_INPUT_PASS; } void Path3DEditorPlugin::edit(Object *p_object) { @@ -510,7 +510,14 @@ void Path3DEditorPlugin::_close_curve() { if (c->get_point_count() < 2) { return; } - c->add_point(c->get_point_position(0), c->get_point_in(0), c->get_point_out(0)); + if (c->get_point_position(0) == c->get_point_position(c->get_point_count() - 1)) { + return; + } + UndoRedo *ur = editor->get_undo_redo(); + ur->create_action(TTR("Close Curve")); + ur->add_do_method(c.ptr(), "add_point", c->get_point_position(0), c->get_point_in(0), c->get_point_out(0), -1); + ur->add_undo_method(c.ptr(), "remove_point", c->get_point_count()); + ur->commit_action(); } void Path3DEditorPlugin::_handle_option_pressed(int p_option) { diff --git a/editor/plugins/path_3d_editor_plugin.h b/editor/plugins/path_3d_editor_plugin.h index b74d7cc59e..974234ba8f 100644 --- a/editor/plugins/path_3d_editor_plugin.h +++ b/editor/plugins/path_3d_editor_plugin.h @@ -100,7 +100,7 @@ public: Path3D *get_edited_path() { return path; } static Path3DEditorPlugin *singleton; - virtual bool forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) override; + virtual EditorPlugin::AfterGUIInput forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) override; virtual String get_name() const override { return "Path3D"; } bool has_main_screen() const override { return false; } diff --git a/editor/plugins/physical_bone_3d_editor_plugin.cpp b/editor/plugins/physical_bone_3d_editor_plugin.cpp index f92f50f826..b1e104e680 100644 --- a/editor/plugins/physical_bone_3d_editor_plugin.cpp +++ b/editor/plugins/physical_bone_3d_editor_plugin.cpp @@ -43,6 +43,7 @@ void PhysicalBone3DEditor::_on_toggle_button_transform_joint(bool p_is_pressed) void PhysicalBone3DEditor::_set_move_joint() { if (selected) { selected->_set_gizmo_move_joint(button_transform_joint->is_pressed()); + Node3DEditor::get_singleton()->update_transform_gizmo(); } } diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 6922a48a50..677a5f1f2c 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -214,6 +214,7 @@ Ref<EditorSyntaxHighlighter> EditorPlainTextSyntaxHighlighter::_create() const { void ScriptEditorBase::_bind_methods() { ClassDB::bind_method(D_METHOD("get_base_editor"), &ScriptEditorBase::get_base_editor); + ClassDB::bind_method(D_METHOD("add_syntax_highlighter", "highlighter"), &ScriptEditorBase::add_syntax_highlighter); ADD_SIGNAL(MethodInfo("name_changed")); ADD_SIGNAL(MethodInfo("edited_script_changed")); @@ -484,14 +485,32 @@ void ScriptEditor::_clear_execution(REF p_script) { void ScriptEditor::_set_breakpoint(REF p_script, int p_line, bool p_enabled) { Ref<Script> script = Object::cast_to<Script>(*p_script); if (script.is_valid() && (script->has_source_code() || script->get_path().is_resource_file())) { - if (edit(p_script, p_line, 0, false)) { - editor->push_item(p_script.ptr()); - - ScriptEditorBase *se = _get_current_editor(); - if (se) { + // Update if open. + for (int i = 0; i < tab_container->get_child_count(); i++) { + ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i)); + if (se && se->get_edited_resource()->get_path() == script->get_path()) { se->set_breakpoint(p_line, p_enabled); + return; } } + + // Handle closed. + Dictionary state = script_editor_cache->get_value(script->get_path(), "state"); + Array breakpoints; + if (state.has("breakpoints")) { + breakpoints = state["breakpoints"]; + } + + if (breakpoints.has(p_line)) { + if (!p_enabled) { + breakpoints.erase(p_line); + } + } else if (p_enabled) { + breakpoints.push_back(p_line); + } + state["breakpoints"] = breakpoints; + script_editor_cache->set_value(script->get_path(), "state", state); + EditorDebuggerNode::get_singleton()->set_breakpoint(script->get_path(), p_line + 1, false); } } @@ -502,6 +521,34 @@ void ScriptEditor::_clear_breakpoints() { se->clear_breakpoints(); } } + + // Clear from closed scripts. + List<String> cached_editors; + script_editor_cache->get_sections(&cached_editors); + for (const String &E : cached_editors) { + Array breakpoints = _get_cached_breakpoints_for_script(E); + for (int i = 0; i < breakpoints.size(); i++) { + EditorDebuggerNode::get_singleton()->set_breakpoint(E, (int)breakpoints[i] + 1, false); + } + + if (breakpoints.size() > 0) { + Dictionary state = script_editor_cache->get_value(E, "state"); + state["breakpoints"] = Array(); + script_editor_cache->set_value(E, "state", state); + } + } +} + +Array ScriptEditor::_get_cached_breakpoints_for_script(const String &p_path) const { + if (!ResourceLoader::exists(p_path, "Script") || p_path.begins_with("local://") || !script_editor_cache->has_section_key(p_path, "state")) { + return Array(); + } + + Dictionary state = script_editor_cache->get_value(p_path, "state"); + if (!state.has("breakpoints")) { + return Array(); + } + return state["breakpoints"]; } ScriptEditorBase *ScriptEditor::_get_current_editor() const { @@ -716,20 +763,24 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save, bool p_history_back) { ScriptEditorBase *current = Object::cast_to<ScriptEditorBase>(tselected); if (current) { - Ref<Script> script = current->get_edited_resource(); - if (p_save && script.is_valid()) { + RES file = current->get_edited_resource(); + 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 (script->get_path().find("local://") == -1 && script->get_path().find("::") == -1) { + if (file->get_path().find("local://") == -1 && file->get_path().find("::") == -1) { save_current_script(); } } - if (script.is_valid()) { - if (!script->get_path().is_empty()) { + if (file.is_valid()) { + if (!file->get_path().is_empty()) { // Only saved scripts can be restored. - previous_scripts.push_back(script->get_path()); + previous_scripts.push_back(file->get_path()); + } + + Ref<Script> script = file; + if (script.is_valid()) { + notify_script_close(script); } - notify_script_close(script); } } @@ -756,6 +807,7 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save, bool p_history_back) { int idx = tab_container->get_current_tab(); if (current) { current->clear_edit_menu(); + _save_editor_state(current); } memdelete(tselected); if (idx >= tab_container->get_child_count()) { @@ -1030,35 +1082,21 @@ void ScriptEditor::_file_dialog_action(String p_file) { } file->close(); memdelete(file); - [[fallthrough]]; - } - case FILE_OPEN: { - List<String> extensions; - ResourceLoader::get_recognized_extensions_for_type("Script", &extensions); - if (extensions.find(p_file.get_extension())) { - Ref<Script> scr = ResourceLoader::load(p_file); - if (!scr.is_valid()) { - editor->show_warning(TTR("Could not load file at:") + "\n\n" + p_file, TTR("Error!")); - file_dialog_option = -1; - return; - } - edit(scr); - file_dialog_option = -1; - return; - } - - Error error; - Ref<TextFile> text_file = _load_text_file(p_file, &error); - if (error != OK) { - editor->show_warning(TTR("Could not load file at:") + "\n\n" + p_file, TTR("Error!")); + if (EditorFileSystem::get_singleton()) { + if (textfile_extensions.has(p_file.get_extension())) { + EditorFileSystem::get_singleton()->update_file(p_file); + } } - if (text_file.is_valid()) { - edit(text_file); - file_dialog_option = -1; + if (!open_textfile_after_create) { return; } + [[fallthrough]]; + } + case FILE_OPEN: { + open_file(p_file); + file_dialog_option = -1; } break; case FILE_SAVE_AS: { ScriptEditorBase *current = _get_current_editor(); @@ -1133,8 +1171,12 @@ void ScriptEditor::_menu_option(int p_option) { file_dialog_option = FILE_NEW_TEXTFILE; file_dialog->clear_filters(); + for (const String &E : textfile_extensions) { + file_dialog->add_filter("*." + E + " ; " + E.to_upper()); + } file_dialog->popup_file_dialog(); file_dialog->set_title(TTR("New Text File...")); + open_textfile_after_create = true; } break; case FILE_OPEN: { file_dialog->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE); @@ -1148,6 +1190,10 @@ void ScriptEditor::_menu_option(int p_option) { file_dialog->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper()); } + for (const String &E : textfile_extensions) { + file_dialog->add_filter("*." + E + " ; " + E.to_upper()); + } + file_dialog->popup_file_dialog(); file_dialog->set_title(TTR("Open File")); return; @@ -1488,6 +1534,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->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)); @@ -1497,6 +1544,7 @@ void ScriptEditor::_notification(int p_what) { EditorSettings::get_singleton()->connect("settings_changed", callable_mp(this, &ScriptEditor::_editor_settings_changed)); EditorFileSystem::get_singleton()->connect("filesystem_changed", callable_mp(this, &ScriptEditor::_filesystem_changed)); + _editor_settings_changed(); [[fallthrough]]; } case NOTIFICATION_TRANSLATION_CHANGED: @@ -1600,6 +1648,7 @@ void ScriptEditor::notify_script_changed(const Ref<Script> &p_script) { } void ScriptEditor::get_breakpoints(List<String> *p_breakpoints) { + Set<String> loaded_scripts; for (int i = 0; i < tab_container->get_child_count(); i++) { ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i)); if (!se) { @@ -1612,6 +1661,7 @@ void ScriptEditor::get_breakpoints(List<String> *p_breakpoints) { } String base = script->get_path(); + loaded_scripts.insert(base); if (base.begins_with("local://") || base == "") { continue; } @@ -1621,6 +1671,20 @@ void ScriptEditor::get_breakpoints(List<String> *p_breakpoints) { p_breakpoints->push_back(base + ":" + itos((int)bpoints[j] + 1)); } } + + // Load breakpoints that are in closed scripts. + List<String> cached_editors; + script_editor_cache->get_sections(&cached_editors); + for (const String &E : cached_editors) { + if (loaded_scripts.has(E)) { + continue; + } + + Array breakpoints = _get_cached_breakpoints_for_script(E); + for (int i = 0; i < breakpoints.size(); i++) { + p_breakpoints->push_back(E + ":" + itos((int)breakpoints[i] + 1)); + } + } } void ScriptEditor::_members_overview_selected(int p_idx) { @@ -2056,7 +2120,7 @@ void ScriptEditor::_update_script_connections() { } } -Ref<TextFile> ScriptEditor::_load_text_file(const String &p_path, Error *r_error) { +Ref<TextFile> ScriptEditor::_load_text_file(const String &p_path, Error *r_error) const { if (r_error) { *r_error = ERR_FILE_CANT_OPEN; } @@ -2278,6 +2342,10 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra _add_recent_script(p_resource->get_path()); } + if (script_editor_cache->has_section(p_resource->get_path())) { + se->set_edit_state(script_editor_cache->get_value(p_resource->get_path(), "state")); + } + _sort_list_on_update = true; _update_script_names(); _save_layout(); @@ -2436,6 +2504,41 @@ void ScriptEditor::open_script_create_dialog(const String &p_base_name, const St script_create_dialog->config(p_base_name, p_base_path); } +void ScriptEditor::open_text_file_create_dialog(const String &p_base_path, const String &p_base_name) { + file_dialog->set_current_file(p_base_name); + file_dialog->set_current_dir(p_base_path); + _menu_option(FILE_NEW_TEXTFILE); + open_textfile_after_create = false; +} + +RES ScriptEditor::open_file(const String &p_file) { + List<String> extensions; + ResourceLoader::get_recognized_extensions_for_type("Script", &extensions); + if (extensions.find(p_file.get_extension())) { + Ref<Script> scr = ResourceLoader::load(p_file); + if (!scr.is_valid()) { + editor->show_warning(TTR("Could not load file at:") + "\n\n" + p_file, TTR("Error!")); + return RES(); + } + + edit(scr); + return scr; + } + + Error error; + Ref<TextFile> text_file = _load_text_file(p_file, &error); + if (error != OK) { + editor->show_warning(TTR("Could not load file at:") + "\n\n" + p_file, TTR("Error!")); + return RES(); + } + + if (text_file.is_valid()) { + edit(text_file); + return text_file; + } + return RES(); +} + void ScriptEditor::_editor_stop() { for (int i = 0; i < tab_container->get_child_count(); i++) { ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i)); @@ -2478,6 +2581,20 @@ void ScriptEditor::_add_callback(Object *p_obj, const String &p_function, const } } +void ScriptEditor::_save_editor_state(ScriptEditorBase *p_editor) { + if (restoring_layout) { + return; + } + + const String &path = p_editor->get_edited_resource()->get_path(); + if (!path.is_resource_file()) { + return; + } + + script_editor_cache->set_value(path, "state", p_editor->get_edit_state()); + // This is saved later when we save the editor layout. +} + void ScriptEditor::_save_layout() { if (restoring_layout) { return; @@ -2487,6 +2604,12 @@ void ScriptEditor::_save_layout() { } void ScriptEditor::_editor_settings_changed() { + textfile_extensions.clear(); + const Vector<String> textfile_ext = ((String)(EditorSettings::get_singleton()->get("docks/filesystem/textfile_extensions"))).split(",", false); + for (const String &E : textfile_ext) { + textfile_extensions.insert(E); + } + trim_trailing_whitespace_on_save = EditorSettings::get_singleton()->get("text_editor/behavior/files/trim_trailing_whitespace_on_save"); convert_indent_on_save = EditorSettings::get_singleton()->get("text_editor/behavior/files/convert_indent_on_save"); use_space_indentation = EditorSettings::get_singleton()->get("text_editor/behavior/indent/type"); @@ -2523,6 +2646,26 @@ void ScriptEditor::_filesystem_changed() { _update_script_names(); } +void ScriptEditor::_files_moved(const String &p_old_file, const String &p_new_file) { + if (!script_editor_cache->has_section(p_old_file)) { + return; + } + Variant state = script_editor_cache->get_value(p_old_file, "state"); + script_editor_cache->erase_section(p_old_file); + script_editor_cache->set_value(p_new_file, "state", state); + + // If Script, update breakpoints with debugger. + Array breakpoints = _get_cached_breakpoints_for_script(p_new_file); + for (int i = 0; i < breakpoints.size(); i++) { + int line = (int)breakpoints[i] + 1; + EditorDebuggerNode::get_singleton()->set_breakpoint(p_old_file, line, false); + if (!p_new_file.begins_with("local://") && ResourceLoader::exists(p_new_file, "Script")) { + EditorDebuggerNode::get_singleton()->set_breakpoint(p_new_file, line, true); + } + } + // This is saved later when we save the editor layout. +} + void ScriptEditor::_file_removed(const String &p_removed_file) { for (int i = 0; i < tab_container->get_child_count(); i++) { ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i)); @@ -2534,6 +2677,15 @@ void ScriptEditor::_file_removed(const String &p_removed_file) { _close_tab(i, false, false); } } + + // Check closed. + if (script_editor_cache->has_section(p_removed_file)) { + Array breakpoints = _get_cached_breakpoints_for_script(p_removed_file); + for (int i = 0; i < breakpoints.size(); i++) { + EditorDebuggerNode::get_singleton()->set_breakpoint(p_removed_file, (int)breakpoints[i] + 1, false); + } + script_editor_cache->erase_section(p_removed_file); + } } void ScriptEditor::_update_find_replace_bar() { @@ -2664,12 +2816,22 @@ bool ScriptEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data if (file == "" || !FileAccess::exists(file)) { continue; } - Ref<Script> scr = ResourceLoader::load(file); - if (scr.is_valid()) { - return true; + if (ResourceLoader::exists(file, "Script")) { + Ref<Script> scr = ResourceLoader::load(file); + if (scr.is_valid()) { + return true; + } + } + + if (textfile_extensions.has(file.get_extension())) { + Error err; + Ref<TextFile> text_file = _load_text_file(file, &err); + if (text_file.is_valid() && err == OK) { + return true; + } } } - return true; + return false; } return false; @@ -2734,9 +2896,13 @@ void ScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Co if (file == "" || !FileAccess::exists(file)) { continue; } - Ref<Script> scr = ResourceLoader::load(file); - if (scr.is_valid()) { - edit(scr); + + if (!ResourceLoader::exists(file, "Script") && !textfile_extensions.has(file.get_extension())) { + continue; + } + + RES res = open_file(file); + if (res.is_valid()) { if (tab_container->get_child_count() > num_tabs_before) { tab_container->move_child(tab_container->get_child(tab_container->get_child_count() - 1), new_index); num_tabs_before = tab_container->get_child_count(); @@ -2884,6 +3050,7 @@ void ScriptEditor::set_window_layout(Ref<ConfigFile> p_layout) { restoring_layout = true; + Set<String> loaded_scripts; List<String> extensions; ResourceLoader::get_recognized_extensions_for_type("Script", &extensions); @@ -2896,8 +3063,12 @@ void ScriptEditor::set_window_layout(Ref<ConfigFile> p_layout) { } if (!FileAccess::exists(path)) { + if (script_editor_cache->has_section(path)) { + script_editor_cache->erase_section(path); + } continue; } + loaded_scripts.insert(path); if (extensions.find(path.get_extension())) { Ref<Script> scr = ResourceLoader::load(path); @@ -2942,6 +3113,26 @@ void ScriptEditor::set_window_layout(Ref<ConfigFile> p_layout) { script_split->set_split_offset(p_layout->get_value("ScriptEditor", "split_offset")); } + // Remove any deleted editors that have been removed between launches. + // and if a Script, register breakpoints with the debugger. + List<String> cached_editors; + script_editor_cache->get_sections(&cached_editors); + for (const String &E : cached_editors) { + if (loaded_scripts.has(E)) { + continue; + } + + if (!FileAccess::exists(E)) { + script_editor_cache->erase_section(E); + continue; + } + + Array breakpoints = _get_cached_breakpoints_for_script(E); + for (int i = 0; i < breakpoints.size(); i++) { + EditorDebuggerNode::get_singleton()->set_breakpoint(E, (int)breakpoints[i] + 1, true); + } + } + restoring_layout = false; _update_script_names(); @@ -2959,11 +3150,8 @@ void ScriptEditor::get_window_layout(Ref<ConfigFile> p_layout) { continue; } - Dictionary script_info; - script_info["path"] = path; - script_info["state"] = se->get_edit_state(); - - scripts.push_back(script_info); + _save_editor_state(se); + scripts.push_back(path); } EditorHelp *eh = Object::cast_to<EditorHelp>(tab_container->get_child(i)); @@ -2976,6 +3164,9 @@ void ScriptEditor::get_window_layout(Ref<ConfigFile> p_layout) { p_layout->set_value("ScriptEditor", "open_scripts", scripts); p_layout->set_value("ScriptEditor", "open_help", helps); p_layout->set_value("ScriptEditor", "split_offset", script_split->get_split_offset()); + + // Save the cache. + script_editor_cache->save(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("script_editor_cache.cfg")); } void ScriptEditor::_help_class_open(const String &p_class) { @@ -3342,6 +3533,9 @@ void ScriptEditor::_bind_methods() { ScriptEditor::ScriptEditor(EditorNode *p_editor) { current_theme = ""; + script_editor_cache.instantiate(); + script_editor_cache->load(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("script_editor_cache.cfg")); + completion_cache = memnew(EditorScriptCodeCompletionCache); restoring_layout = false; waiting_update_names = false; diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index 6d9b27e0be..8caebc1c8c 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -366,6 +366,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); + bool open_textfile_after_create = true; bool trim_trailing_whitespace_on_save; bool use_space_indentation; bool convert_indent_on_save; @@ -381,13 +382,17 @@ class ScriptEditor : public PanelContainer { void _script_created(Ref<Script> p_script); void _set_breakpoint(REF p_scrpt, int p_line, bool p_enabled); void _clear_breakpoints(); + Array _get_cached_breakpoints_for_script(const String &p_path) const; ScriptEditorBase *_get_current_editor() const; Array _get_open_script_editors() const; + Ref<ConfigFile> script_editor_cache; + void _save_editor_state(ScriptEditorBase *p_editor); void _save_layout(); void _editor_settings_changed(); void _filesystem_changed(); + void _files_moved(const String &p_old_file, const String &p_new_file); void _file_removed(const String &p_file); void _autosave_scripts(); void _update_autosave_timer(); @@ -448,7 +453,8 @@ class ScriptEditor : public PanelContainer { Ref<Script> _get_current_script(); Array _get_open_scripts() const; - Ref<TextFile> _load_text_file(const String &p_path, Error *r_error); + Set<String> textfile_extensions; + Ref<TextFile> _load_text_file(const String &p_path, Error *r_error) const; Error _save_text_file(Ref<TextFile> p_text_file, const String &p_path); void _on_find_in_files_requested(String text); @@ -472,6 +478,8 @@ public: bool is_scripts_panel_toggled(); void apply_scripts() const; void open_script_create_dialog(const String &p_base_name, const String &p_base_path); + void open_text_file_create_dialog(const String &p_base_path, const String &p_base_name = ""); + RES open_file(const String &p_file); void ensure_select_current(); diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 2b1ca068ee..2c02389db2 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -433,10 +433,12 @@ void ScriptTextEditor::_validate_script() { int warning_nb = warnings.size(); warnings_panel->clear(); + bool has_connections_table = false; // Add missing connections. if (GLOBAL_GET("debug/gdscript/warnings/enable").booleanize()) { Node *base = get_tree()->get_edited_scene_root(); if (base && missing_connections.size() > 0) { + has_connections_table = true; warnings_panel->push_table(1); for (const Connection &connection : missing_connections) { String base_path = base->get_name(); @@ -458,6 +460,10 @@ void ScriptTextEditor::_validate_script() { code_editor->set_error_count(errors.size()); code_editor->set_warning_count(warning_nb); + if (has_connections_table) { + warnings_panel->add_newline(); + } + // Add script warnings. warnings_panel->push_table(3); for (const ScriptLanguage::Warning &w : warnings) { @@ -1335,8 +1341,6 @@ void ScriptTextEditor::_bind_methods() { ClassDB::bind_method("_get_drag_data_fw", &ScriptTextEditor::get_drag_data_fw); ClassDB::bind_method("_can_drop_data_fw", &ScriptTextEditor::can_drop_data_fw); ClassDB::bind_method("_drop_data_fw", &ScriptTextEditor::drop_data_fw); - - ClassDB::bind_method(D_METHOD("add_syntax_highlighter", "highlighter"), &ScriptTextEditor::add_syntax_highlighter); } Control *ScriptTextEditor::get_edit_menu() { @@ -1701,7 +1705,6 @@ void ScriptTextEditor::_enable_code_editor() { code_editor->connect("show_warnings_panel", callable_mp(this, &ScriptTextEditor::_show_warnings_panel)); code_editor->connect("validate_script", callable_mp(this, &ScriptTextEditor::_validate_script)); code_editor->connect("load_theme_settings", callable_mp(this, &ScriptTextEditor::_load_theme_settings)); - code_editor->get_text_editor()->connect("breakpoint_toggled", callable_mp(this, &ScriptTextEditor::_breakpoint_toggled)); code_editor->get_text_editor()->connect("symbol_lookup", callable_mp(this, &ScriptTextEditor::_lookup_symbol)); code_editor->get_text_editor()->connect("symbol_validate", callable_mp(this, &ScriptTextEditor::_validate_symbol)); code_editor->get_text_editor()->connect("gutter_added", callable_mp(this, &ScriptTextEditor::_update_gutter_indexes)); @@ -1841,6 +1844,7 @@ ScriptTextEditor::ScriptTextEditor() { code_editor->get_text_editor()->set_draw_breakpoints_gutter(true); code_editor->get_text_editor()->set_draw_executing_lines_gutter(true); + code_editor->get_text_editor()->connect("breakpoint_toggled", callable_mp(this, &ScriptTextEditor::_breakpoint_toggled)); connection_gutter = 1; code_editor->get_text_editor()->add_gutter(connection_gutter); diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index 22ca5592bd..a88e24c0d0 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -131,9 +131,9 @@ void ShaderTextEditor::_load_theme_settings() { List<String> built_ins; if (shader.is_valid()) { - for (const Map<StringName, ShaderLanguage::FunctionInfo>::Element *E = ShaderTypes::get_singleton()->get_functions(RenderingServer::ShaderMode(shader->get_mode())).front(); E; E = E->next()) { - for (const Map<StringName, ShaderLanguage::BuiltInInfo>::Element *F = E->get().built_ins.front(); F; F = F->next()) { - built_ins.push_back(F->key()); + for (const KeyValue<StringName, ShaderLanguage::FunctionInfo> &E : ShaderTypes::get_singleton()->get_functions(RenderingServer::ShaderMode(shader->get_mode()))) { + for (const KeyValue<StringName, ShaderLanguage::BuiltInInfo> &F : E.value.built_ins) { + built_ins.push_back(F.key); } } diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp index 309821b3dc..708eaf2c46 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.cpp +++ b/editor/plugins/skeleton_3d_editor_plugin.cpp @@ -37,298 +37,251 @@ #include "editor/plugins/animation_player_editor_plugin.h" #include "node_3d_editor_plugin.h" #include "scene/3d/collision_shape_3d.h" +#include "scene/3d/joint_3d.h" #include "scene/3d/mesh_instance_3d.h" #include "scene/3d/physics_body_3d.h" -#include "scene/3d/physics_joint_3d.h" #include "scene/resources/capsule_shape_3d.h" #include "scene/resources/sphere_shape_3d.h" +#include "scene/resources/surface_tool.h" void BoneTransformEditor::create_editors() { const Color section_color = get_theme_color(SNAME("prop_subsection"), SNAME("Editor")); section = memnew(EditorInspectorSection); section->setup("trf_properties", label, this, section_color, true); + section->unfold(); add_child(section); - key_button = memnew(Button); - key_button->set_text(TTR("Key Transform")); - key_button->set_visible(keyable); - key_button->set_icon(get_theme_icon(SNAME("Key"), SNAME("EditorIcons"))); - key_button->set_flat(true); - section->get_vbox()->add_child(key_button); - - enabled_checkbox = memnew(CheckBox(TTR("Pose Enabled"))); - enabled_checkbox->set_flat(true); - enabled_checkbox->set_visible(toggle_enabled); + enabled_checkbox = memnew(EditorPropertyCheck()); + enabled_checkbox->set_label("Pose Enabled"); + enabled_checkbox->connect("property_changed", callable_mp(this, &BoneTransformEditor::_value_changed)); section->get_vbox()->add_child(enabled_checkbox); - // Translation property - translation_property = memnew(EditorPropertyVector3()); - translation_property->setup(-10000, 10000, 0.001f, true); - translation_property->set_label("Translation"); - translation_property->set_use_folding(true); - translation_property->set_read_only(false); - translation_property->connect("property_changed", callable_mp(this, &BoneTransformEditor::_value_changed_vector3)); - section->get_vbox()->add_child(translation_property); - - // Rotation property - rotation_property = memnew(EditorPropertyVector3()); + // Position property. + position_property = memnew(EditorPropertyVector3()); + position_property->setup(-10000, 10000, 0.001f, true); + position_property->set_label("Position"); + position_property->connect("property_changed", callable_mp(this, &BoneTransformEditor::_value_changed)); + section->get_vbox()->add_child(position_property); + + // Rotation property. + rotation_property = memnew(EditorPropertyQuaternion()); rotation_property->setup(-10000, 10000, 0.001f, true); - rotation_property->set_label("Rotation Degrees"); - rotation_property->set_use_folding(true); - rotation_property->set_read_only(false); - rotation_property->connect("property_changed", callable_mp(this, &BoneTransformEditor::_value_changed_vector3)); + rotation_property->set_label("Rotation"); + rotation_property->connect("property_changed", callable_mp(this, &BoneTransformEditor::_value_changed)); section->get_vbox()->add_child(rotation_property); - // Scale property + // Scale property. scale_property = memnew(EditorPropertyVector3()); scale_property->setup(-10000, 10000, 0.001f, true); scale_property->set_label("Scale"); - scale_property->set_use_folding(true); - scale_property->set_read_only(false); - scale_property->connect("property_changed", callable_mp(this, &BoneTransformEditor::_value_changed_vector3)); + scale_property->connect("property_changed", callable_mp(this, &BoneTransformEditor::_value_changed)); section->get_vbox()->add_child(scale_property); - // Transform/Matrix section - transform_section = memnew(EditorInspectorSection); - transform_section->setup("trf_properties_transform", "Matrix", this, section_color, true); - section->get_vbox()->add_child(transform_section); + // Transform/Matrix section. + rest_section = memnew(EditorInspectorSection); + rest_section->setup("trf_properties_transform", "Rest", this, section_color, true); + section->get_vbox()->add_child(rest_section); - // Transform/Matrix property - transform_property = memnew(EditorPropertyTransform3D()); - transform_property->setup(-10000, 10000, 0.001f, true); - transform_property->set_label("Transform"); - transform_property->set_use_folding(true); - transform_property->set_read_only(false); - transform_property->connect("property_changed", callable_mp(this, &BoneTransformEditor::_value_changed_transform)); - transform_section->get_vbox()->add_child(transform_property); + // Transform/Matrix property. + rest_matrix = memnew(EditorPropertyTransform3D()); + rest_matrix->setup(-10000, 10000, 0.001f, true); + rest_matrix->set_label("Transform"); + rest_section->get_vbox()->add_child(rest_matrix); } void BoneTransformEditor::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { create_editors(); - key_button->connect("pressed", callable_mp(this, &BoneTransformEditor::_key_button_pressed)); - enabled_checkbox->connect("toggled", callable_mp(this, &BoneTransformEditor::_checkbox_toggled)); - [[fallthrough]]; - } - case NOTIFICATION_SORT_CHILDREN: { - const Ref<Font> font = get_theme_font(SNAME("font"), SNAME("Tree")); - int font_size = get_theme_font_size(SNAME("font_size"), SNAME("Tree")); - - Point2 buffer; - buffer.x += get_theme_constant(SNAME("inspector_margin"), SNAME("Editor")); - buffer.y += font->get_height(font_size); - buffer.y += get_theme_constant(SNAME("vseparation"), SNAME("Tree")); - - const float vector_height = translation_property->get_size().y; - const float transform_height = transform_property->get_size().y; - const float button_height = key_button->get_size().y; - - const float width = get_size().x - get_theme_constant(SNAME("inspector_margin"), SNAME("Editor")); - Vector<Rect2> input_rects; - if (keyable && section->get_vbox()->is_visible()) { - input_rects.push_back(Rect2(key_button->get_position() + buffer, Size2(width, button_height))); - } else { - input_rects.push_back(Rect2(0, 0, 0, 0)); - } - - if (section->get_vbox()->is_visible()) { - input_rects.push_back(Rect2(translation_property->get_position() + buffer, Size2(width, vector_height))); - input_rects.push_back(Rect2(rotation_property->get_position() + buffer, Size2(width, vector_height))); - input_rects.push_back(Rect2(scale_property->get_position() + buffer, Size2(width, vector_height))); - input_rects.push_back(Rect2(transform_property->get_position() + buffer, Size2(width, transform_height))); - } else { - const int32_t start = input_rects.size(); - const int32_t empty_input_rect_elements = 4; - const int32_t end = start + empty_input_rect_elements; - for (int i = start; i < end; ++i) { - input_rects.push_back(Rect2(0, 0, 0, 0)); - } - } - - for (int32_t i = 0; i < input_rects.size(); i++) { - background_rects[i] = input_rects[i]; - } - - update(); - break; - } - case NOTIFICATION_DRAW: { - const Color dark_color = get_theme_color(SNAME("dark_color_2"), SNAME("Editor")); - - for (int i = 0; i < 5; ++i) { - draw_rect(background_rects[i], dark_color); - } - break; } } } -void BoneTransformEditor::_value_changed(const double p_value) { +void BoneTransformEditor::_value_changed(const String &p_property, Variant p_value, const String &p_name, bool p_changing) { if (updating) { return; } - - Transform3D tform = compute_transform_from_vector3s(); - _change_transform(tform); + if (skeleton) { + undo_redo->create_action(TTR("Set Bone Transform"), UndoRedo::MERGE_ENDS); + undo_redo->add_undo_property(skeleton, p_property, skeleton->get(p_property)); + undo_redo->add_do_property(skeleton, p_property, p_value); + undo_redo->commit_action(); + } } -void BoneTransformEditor::_value_changed_vector3(const String p_property_name, const Vector3 p_vector, const StringName p_edited_property_name, const bool p_boolean) { - if (updating) { - return; - } - Transform3D tform = compute_transform_from_vector3s(); - _change_transform(tform); +BoneTransformEditor::BoneTransformEditor(Skeleton3D *p_skeleton) : + skeleton(p_skeleton) { + undo_redo = EditorNode::get_undo_redo(); } -Transform3D BoneTransformEditor::compute_transform_from_vector3s() const { - // Convert rotation from degrees to radians. - Vector3 prop_rotation = rotation_property->get_vector(); - prop_rotation.x = Math::deg2rad(prop_rotation.x); - prop_rotation.y = Math::deg2rad(prop_rotation.y); - prop_rotation.z = Math::deg2rad(prop_rotation.z); +void BoneTransformEditor::set_target(const String &p_prop) { + enabled_checkbox->set_object_and_property(skeleton, p_prop + "enabled"); + enabled_checkbox->update_property(); - return Transform3D( - Basis(prop_rotation, scale_property->get_vector()), - translation_property->get_vector()); -} + position_property->set_object_and_property(skeleton, p_prop + "position"); + position_property->update_property(); -void BoneTransformEditor::_value_changed_transform(const String p_property_name, const Transform3D p_transform, const StringName p_edited_property_name, const bool p_boolean) { - if (updating) { - return; - } - _change_transform(p_transform); -} + rotation_property->set_object_and_property(skeleton, p_prop + "rotation"); + rotation_property->update_property(); -void BoneTransformEditor::_change_transform(Transform3D p_new_transform) { - if (property.get_slicec('/', 0) == "bones" && property.get_slicec('/', 2) == "custom_pose") { - undo_redo->create_action(TTR("Set Custom Bone Pose Transform"), UndoRedo::MERGE_ENDS); - undo_redo->add_undo_method(skeleton, "set_bone_custom_pose", property.get_slicec('/', 1).to_int(), skeleton->get_bone_custom_pose(property.get_slicec('/', 1).to_int())); - undo_redo->add_do_method(skeleton, "set_bone_custom_pose", property.get_slicec('/', 1).to_int(), p_new_transform); - undo_redo->commit_action(); - } else if (property.get_slicec('/', 0) == "bones") { - undo_redo->create_action(TTR("Set Bone Transform"), UndoRedo::MERGE_ENDS); - undo_redo->add_undo_property(skeleton, property, skeleton->get(property)); - undo_redo->add_do_property(skeleton, property, p_new_transform); - undo_redo->commit_action(); - } -} + scale_property->set_object_and_property(skeleton, p_prop + "scale"); + scale_property->update_property(); -void BoneTransformEditor::update_enabled_checkbox() { - if (enabled_checkbox) { - const String path = "bones/" + property.get_slicec('/', 1) + "/enabled"; - const bool is_enabled = skeleton->get(path); - enabled_checkbox->set_pressed(is_enabled); - } + rest_matrix->set_object_and_property(skeleton, p_prop + "rest"); + rest_matrix->update_property(); } void BoneTransformEditor::_update_properties() { - if (updating) { + if (!skeleton) { return; } - - if (skeleton == nullptr) { - return; + int selected = Skeleton3DEditor::get_singleton()->get_selected_bone(); + List<PropertyInfo> props; + skeleton->get_property_list(&props); + for (const PropertyInfo &E : props) { + PackedStringArray spr = E.name.split("/"); + if (spr.size() == 3 && spr[0] == "bones") { + if (spr[1].to_int() == selected) { + if (spr[2] == "enabled") { + enabled_checkbox->set_read_only(E.usage & PROPERTY_USAGE_READ_ONLY); + enabled_checkbox->update_property(); + enabled_checkbox->update(); + } + if (spr[2] == "position") { + position_property->set_read_only(E.usage & PROPERTY_USAGE_READ_ONLY); + position_property->update_property(); + position_property->update(); + } + if (spr[2] == "rotation") { + rotation_property->set_read_only(E.usage & PROPERTY_USAGE_READ_ONLY); + rotation_property->update_property(); + rotation_property->update(); + } + if (spr[2] == "scale") { + scale_property->set_read_only(E.usage & PROPERTY_USAGE_READ_ONLY); + scale_property->update_property(); + scale_property->update(); + } + if (spr[2] == "rest") { + rest_matrix->set_read_only(E.usage & PROPERTY_USAGE_READ_ONLY); + rest_matrix->update_property(); + rest_matrix->update(); + } + } + } } +} - updating = true; +Skeleton3DEditor *Skeleton3DEditor::singleton = nullptr; - Transform3D tform = skeleton->get(property); - _update_transform_properties(tform); -} +void Skeleton3DEditor::set_keyable(const bool p_keyable) { + keyable = p_keyable; + skeleton_options->get_popup()->set_item_disabled(SKELETON_OPTION_INSERT_KEYS, !p_keyable); + skeleton_options->get_popup()->set_item_disabled(SKELETON_OPTION_INSERT_KEYS_EXISTED, !p_keyable); +}; -void BoneTransformEditor::_update_custom_pose_properties() { - if (updating) { - return; - } +void Skeleton3DEditor::set_rest_options_enabled(const bool p_rest_options_enabled) { + rest_options->get_popup()->set_item_disabled(REST_OPTION_POSE_TO_REST, !p_rest_options_enabled); +}; - if (skeleton == nullptr) { +void Skeleton3DEditor::_on_click_skeleton_option(int p_skeleton_option) { + if (!skeleton) { return; } - updating = true; - - Transform3D tform = skeleton->get_bone_custom_pose(property.to_int()); - _update_transform_properties(tform); -} - -void BoneTransformEditor::_update_transform_properties(Transform3D tform) { - Basis rotation_basis = tform.get_basis(); - Vector3 rotation_radians = rotation_basis.get_rotation_euler(); - Vector3 rotation_degrees = Vector3(Math::rad2deg(rotation_radians.x), Math::rad2deg(rotation_radians.y), Math::rad2deg(rotation_radians.z)); - Vector3 translation = tform.get_origin(); - Vector3 scale = tform.basis.get_scale(); - - translation_property->update_using_vector(translation); - rotation_property->update_using_vector(rotation_degrees); - scale_property->update_using_vector(scale); - transform_property->update_using_transform(tform); - - update_enabled_checkbox(); - updating = false; -} - -BoneTransformEditor::BoneTransformEditor(Skeleton3D *p_skeleton) : - skeleton(p_skeleton) { - undo_redo = EditorNode::get_undo_redo(); + switch (p_skeleton_option) { + case SKELETON_OPTION_CREATE_PHYSICAL_SKELETON: { + create_physical_skeleton(); + break; + } + case SKELETON_OPTION_INIT_POSE: { + init_pose(); + break; + } + case SKELETON_OPTION_INSERT_KEYS: { + insert_keys(true); + break; + } + case SKELETON_OPTION_INSERT_KEYS_EXISTED: { + insert_keys(false); + break; + } + } } -void BoneTransformEditor::set_target(const String &p_prop) { - property = p_prop; -} +void Skeleton3DEditor::_on_click_rest_option(int p_rest_option) { + if (!skeleton) { + return; + } -void BoneTransformEditor::set_keyable(const bool p_keyable) { - keyable = p_keyable; - if (key_button) { - key_button->set_visible(p_keyable); + switch (p_rest_option) { + case REST_OPTION_POSE_TO_REST: { + pose_to_rest(); + break; + } } } -void BoneTransformEditor::set_toggle_enabled(const bool p_enabled) { - toggle_enabled = p_enabled; - if (enabled_checkbox) { - enabled_checkbox->set_visible(p_enabled); +void Skeleton3DEditor::init_pose() { + const int bone_len = skeleton->get_bone_count(); + if (!bone_len) { + return; + } + UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); + ur->create_action(TTR("Set Bone Transform"), UndoRedo::MERGE_ENDS); + for (int i = 0; i < bone_len; i++) { + Transform3D rest = skeleton->get_bone_rest(i); + ur->add_do_method(skeleton, "set_bone_pose_position", i, rest.origin); + ur->add_do_method(skeleton, "set_bone_pose_rotation", i, rest.basis.get_rotation_quaternion()); + ur->add_do_method(skeleton, "set_bone_pose_scale", i, rest.basis.get_scale()); + ur->add_undo_method(skeleton, "set_bone_pose_position", i, skeleton->get_bone_pose_position(i)); + ur->add_undo_method(skeleton, "set_bone_pose_rotation", i, skeleton->get_bone_pose_rotation(i)); + ur->add_undo_method(skeleton, "set_bone_pose_scale", i, skeleton->get_bone_pose_scale(i)); } + ur->commit_action(); } -void BoneTransformEditor::_key_button_pressed() { - if (skeleton == nullptr) { +void Skeleton3DEditor::insert_keys(bool p_all_bones) { + if (!skeleton) { return; } - const BoneId bone_id = property.get_slicec('/', 1).to_int(); - const String name = skeleton->get_bone_name(bone_id); + int bone_len = skeleton->get_bone_count(); + Node *root = EditorNode::get_singleton()->get_tree()->get_root(); + String path = root->get_path_to(skeleton); - if (name.is_empty()) { - return; - } + AnimationTrackEditor *te = AnimationPlayerEditor::get_singleton()->get_track_editor(); + te->make_insert_queue(); + for (int i = 0; i < bone_len; i++) { + const String name = skeleton->get_bone_name(i); - // Need to normalize the basis before you key it - Transform3D tform = compute_transform_from_vector3s(); - tform.orthonormalize(); - AnimationPlayerEditor::singleton->get_track_editor()->insert_transform_key(skeleton, name, tform); -} + if (name.is_empty()) { + continue; + } + + if (!p_all_bones && !te->has_transform_track(skeleton, name)) { + continue; + } -void BoneTransformEditor::_checkbox_toggled(const bool p_toggled) { - if (enabled_checkbox) { - const String path = "bones/" + property.get_slicec('/', 1) + "/enabled"; - skeleton->set(path, p_toggled); + Transform3D tform = skeleton->get_bone_pose(i); + te->insert_transform_key(skeleton, name, tform); } + te->commit_insert_queue(); } -void Skeleton3DEditor::_on_click_option(int p_option) { +void Skeleton3DEditor::pose_to_rest() { if (!skeleton) { return; } - switch (p_option) { - case MENU_OPTION_CREATE_PHYSICAL_SKELETON: { - create_physical_skeleton(); - break; - } - } + // Todo: Do method with multiple bone selection. + UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); + ur->create_action(TTR("Set Bone Rest"), UndoRedo::MERGE_ENDS); + ur->add_do_method(skeleton, "set_bone_rest", selected_bone, skeleton->get_bone_pose(selected_bone)); + ur->add_undo_method(skeleton, "set_bone_rest", selected_bone, skeleton->get_bone_rest(selected_bone)); + ur->commit_action(); } void Skeleton3DEditor::create_physical_skeleton() { @@ -356,7 +309,7 @@ void Skeleton3DEditor::create_physical_skeleton() { bones_infos.write[bone_id].relative_rest = bones_infos[parent].relative_rest * skeleton->get_bone_rest(bone_id); - /// create physical bone on parent + // Create physical bone on parent. if (!bones_infos[parent].physical_bone) { bones_infos.write[parent].physical_bone = create_physical_bone(parent, bone_id, bones_infos); @@ -370,7 +323,7 @@ void Skeleton3DEditor::create_physical_skeleton() { bones_infos[parent].physical_bone->set_owner(owner); bones_infos[parent].physical_bone->get_child(0)->set_owner(owner); // set shape owner - /// Create joint between parent of parent + // Create joint between parent of parent. if (-1 != parent_parent) { bones_infos[parent].physical_bone->set_joint_type(PhysicalBone3D::JOINT_TYPE_PIN); } @@ -483,7 +436,7 @@ void Skeleton3DEditor::move_skeleton_bone(NodePath p_skeleton_path, int32_t p_se ERR_FAIL_NULL(skeleton); UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); ur->create_action(TTR("Set Bone Parentage")); - // If the target is a child of ourselves, we move only *us* and not our children + // If the target is a child of ourselves, we move only *us* and not our children. if (skeleton->is_bone_parent_of(p_target_boneidx, p_selected_boneidx)) { const BoneId parent_idx = skeleton->get_bone_parent(p_selected_boneidx); const int bone_count = skeleton->get_bone_count(); @@ -505,43 +458,38 @@ void Skeleton3DEditor::move_skeleton_bone(NodePath p_skeleton_path, int32_t p_se void Skeleton3DEditor::_joint_tree_selection_changed() { TreeItem *selected = joint_tree->get_selected(); - const String path = selected->get_metadata(0); - - if (path.begins_with("bones/")) { - const int b_idx = path.get_slicec('/', 1).to_int(); - const String bone_path = "bones/" + itos(b_idx) + "/"; + if (selected) { + const String path = selected->get_metadata(0); - pose_editor->set_target(bone_path + "pose"); - rest_editor->set_target(bone_path + "rest"); - custom_pose_editor->set_target(bone_path + "custom_pose"); + if (path.begins_with("bones/")) { + const int b_idx = path.get_slicec('/', 1).to_int(); + const String bone_path = "bones/" + itos(b_idx) + "/"; - _update_properties(); - - pose_editor->set_visible(true); - rest_editor->set_visible(true); - custom_pose_editor->set_visible(true); + pose_editor->set_target(bone_path); + selected_bone = b_idx; + } } + pose_editor->set_visible(selected); + set_rest_options_enabled(selected); + _update_properties(); + _update_gizmo_visible(); } +// May be not used with single select mode. void Skeleton3DEditor::_joint_tree_rmb_select(const Vector2 &p_pos) { } void Skeleton3DEditor::_update_properties() { - if (rest_editor) { - rest_editor->_update_properties(); - } if (pose_editor) { pose_editor->_update_properties(); } - if (custom_pose_editor) { - custom_pose_editor->_update_custom_pose_properties(); - } + Node3DEditor::get_singleton()->update_transform_gizmo(); } void Skeleton3DEditor::update_joint_tree() { joint_tree->clear(); - if (skeleton == nullptr) { + if (!skeleton) { return; } @@ -569,7 +517,7 @@ void Skeleton3DEditor::update_joint_tree() { joint_item->set_selectable(0, true); joint_item->set_metadata(0, "bones/" + itos(current_bone_idx)); - // Add the bone's children to the list of bones to be processed + // Add the bone's children to the list of bones to be processed. Vector<int> current_bone_child_bones = skeleton->get_bone_children(current_bone_idx); int child_bone_size = current_bone_child_bones.size(); for (int i = 0; i < child_bone_size; i++) { @@ -587,16 +535,56 @@ void Skeleton3DEditor::create_editors() { set_focus_mode(FOCUS_ALL); - // Create Top Menu Bar - options = memnew(MenuButton); - Node3DEditor::get_singleton()->add_control_to_menu_panel(options); + Node3DEditor *ne = Node3DEditor::get_singleton(); + AnimationTrackEditor *te = AnimationPlayerEditor::get_singleton()->get_track_editor(); + + // Create Top Menu Bar. + separator = memnew(VSeparator); + ne->add_control_to_menu_panel(separator); + + // Create Skeleton Option in Top Menu Bar. + skeleton_options = memnew(MenuButton); + ne->add_control_to_menu_panel(skeleton_options); + + skeleton_options->set_text(TTR("Skeleton3D")); + skeleton_options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Skeleton3D"), SNAME("EditorIcons"))); + + skeleton_options->get_popup()->add_item(TTR("Init pose"), SKELETON_OPTION_INIT_POSE); + skeleton_options->get_popup()->add_item(TTR("Insert key of all bone poses"), SKELETON_OPTION_INSERT_KEYS); + skeleton_options->get_popup()->add_item(TTR("Insert key of bone poses already exist track"), SKELETON_OPTION_INSERT_KEYS_EXISTED); + skeleton_options->get_popup()->add_item(TTR("Create physical skeleton"), SKELETON_OPTION_CREATE_PHYSICAL_SKELETON); + + skeleton_options->get_popup()->connect("id_pressed", callable_mp(this, &Skeleton3DEditor::_on_click_skeleton_option)); + + // Create Rest Option in Top Menu Bar. + rest_options = memnew(MenuButton); + ne->add_control_to_menu_panel(rest_options); + + rest_options->set_text(TTR("Edit Rest")); + rest_options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("BoneAttachment3D"), SNAME("EditorIcons"))); + + rest_options->get_popup()->add_item(TTR("Apply current pose to rest"), REST_OPTION_POSE_TO_REST); + rest_options->get_popup()->connect("id_pressed", callable_mp(this, &Skeleton3DEditor::_on_click_rest_option)); + set_rest_options_enabled(false); - options->set_text(TTR("Skeleton3D")); - options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Skeleton3D"), SNAME("EditorIcons"))); + Vector<Variant> button_binds; + button_binds.resize(1); - options->get_popup()->add_item(TTR("Create physical skeleton"), MENU_OPTION_CREATE_PHYSICAL_SKELETON); + edit_mode_button = memnew(Button); + ne->add_control_to_menu_panel(edit_mode_button); + edit_mode_button->set_tooltip(TTR("Edit Mode\nShow buttons on joints.")); + edit_mode_button->set_toggle_mode(true); + edit_mode_button->set_flat(true); + edit_mode_button->connect("toggled", callable_mp(this, &Skeleton3DEditor::edit_mode_toggled)); - options->get_popup()->connect("id_pressed", callable_mp(this, &Skeleton3DEditor::_on_click_option)); + edit_mode = false; + + set_keyable(te->has_keying()); + + if (skeleton) { + skeleton->add_child(handles_mesh_instance); + handles_mesh_instance->set_skeleton_path(NodePath("")); + } const Color section_color = get_theme_color(SNAME("prop_subsection"), SNAME("Editor")); @@ -612,7 +600,7 @@ void Skeleton3DEditor::create_editors() { joint_tree = memnew(Tree); joint_tree->set_columns(1); - joint_tree->set_focus_mode(Control::FocusMode::FOCUS_NONE); + joint_tree->set_focus_mode(Control::FOCUS_NONE); joint_tree->set_select_mode(Tree::SELECT_SINGLE); joint_tree->set_hide_root(true); joint_tree->set_v_size_flags(SIZE_EXPAND_FILL); @@ -622,37 +610,30 @@ void Skeleton3DEditor::create_editors() { s_con->add_child(joint_tree); pose_editor = memnew(BoneTransformEditor(skeleton)); - pose_editor->set_label(TTR("Bone Pose")); - pose_editor->set_keyable(AnimationPlayerEditor::singleton->get_track_editor()->has_keying()); - pose_editor->set_toggle_enabled(true); + pose_editor->set_label(TTR("Bone Transform")); pose_editor->set_visible(false); add_child(pose_editor); - - rest_editor = memnew(BoneTransformEditor(skeleton)); - rest_editor->set_label(TTR("Bone Rest")); - rest_editor->set_visible(false); - add_child(rest_editor); - - custom_pose_editor = memnew(BoneTransformEditor(skeleton)); - custom_pose_editor->set_label(TTR("Bone Custom Pose")); - custom_pose_editor->set_visible(false); - add_child(custom_pose_editor); } void Skeleton3DEditor::_notification(int p_what) { switch (p_what) { + case NOTIFICATION_READY: { + edit_mode_button->set_icon(get_theme_icon("ToolBoneSelect", "EditorIcons")); + get_tree()->connect("node_removed", callable_mp(this, &Skeleton3DEditor::_node_removed), Vector<Variant>(), Object::CONNECT_ONESHOT); + break; + } case NOTIFICATION_ENTER_TREE: { create_editors(); update_joint_tree(); update_editors(); - - get_tree()->connect("node_removed", callable_mp(this, &Skeleton3DEditor::_node_removed), Vector<Variant>(), Object::CONNECT_ONESHOT); joint_tree->connect("item_selected", callable_mp(this, &Skeleton3DEditor::_joint_tree_selection_changed)); joint_tree->connect("item_rmb_selected", callable_mp(this, &Skeleton3DEditor::_joint_tree_rmb_select)); #ifdef TOOLS_ENABLED + skeleton->connect("pose_updated", callable_mp(this, &Skeleton3DEditor::_draw_gizmo)); skeleton->connect("pose_updated", callable_mp(this, &Skeleton3DEditor::_update_properties)); -#endif // TOOLS_ENABLED - + skeleton->connect("bone_enabled_changed", callable_mp(this, &Skeleton3DEditor::_bone_enabled_changed)); + skeleton->connect("show_rest_only_changed", callable_mp(this, &Skeleton3DEditor::_update_gizmo_visible)); +#endif break; } } @@ -661,7 +642,8 @@ void Skeleton3DEditor::_notification(int p_what) { void Skeleton3DEditor::_node_removed(Node *p_node) { if (skeleton && p_node == skeleton) { skeleton = nullptr; - options->hide(); + skeleton_options->hide(); + rest_options->hide(); } _update_properties(); @@ -672,23 +654,236 @@ void Skeleton3DEditor::_bind_methods() { ClassDB::bind_method(D_METHOD("_joint_tree_selection_changed"), &Skeleton3DEditor::_joint_tree_selection_changed); ClassDB::bind_method(D_METHOD("_joint_tree_rmb_select"), &Skeleton3DEditor::_joint_tree_rmb_select); ClassDB::bind_method(D_METHOD("_update_properties"), &Skeleton3DEditor::_update_properties); - ClassDB::bind_method(D_METHOD("_on_click_option"), &Skeleton3DEditor::_on_click_option); + ClassDB::bind_method(D_METHOD("_on_click_skeleton_option"), &Skeleton3DEditor::_on_click_skeleton_option); + ClassDB::bind_method(D_METHOD("_on_click_rest_option"), &Skeleton3DEditor::_on_click_rest_option); + + ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &Skeleton3DEditor::get_drag_data_fw); + ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &Skeleton3DEditor::can_drop_data_fw); + ClassDB::bind_method(D_METHOD("drop_data_fw"), &Skeleton3DEditor::drop_data_fw); - ClassDB::bind_method(D_METHOD("_get_drag_data_fw"), &Skeleton3DEditor::get_drag_data_fw); - ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &Skeleton3DEditor::can_drop_data_fw); - ClassDB::bind_method(D_METHOD("_drop_data_fw"), &Skeleton3DEditor::drop_data_fw); ClassDB::bind_method(D_METHOD("move_skeleton_bone"), &Skeleton3DEditor::move_skeleton_bone); + + ClassDB::bind_method(D_METHOD("_draw_gizmo"), &Skeleton3DEditor::_draw_gizmo); +} + +void Skeleton3DEditor::edit_mode_toggled(const bool pressed) { + edit_mode = pressed; + _update_gizmo_visible(); } Skeleton3DEditor::Skeleton3DEditor(EditorInspectorPluginSkeleton *e_plugin, EditorNode *p_editor, Skeleton3D *p_skeleton) : editor(p_editor), editor_plugin(e_plugin), skeleton(p_skeleton) { + singleton = this; + + // Handle. + handle_material = Ref<ShaderMaterial>(memnew(ShaderMaterial)); + handle_shader = Ref<Shader>(memnew(Shader)); + handle_shader->set_code(R"( +// Skeleton 3D gizmo handle shader. + +shader_type spatial; +render_mode unshaded, shadows_disabled, depth_draw_always; +uniform sampler2D texture_albedo : hint_albedo; +uniform float point_size : hint_range(0,128) = 32; +void vertex() { + if (!OUTPUT_IS_SRGB) { + COLOR.rgb = mix( pow((COLOR.rgb + vec3(0.055)) * (1.0 / (1.0 + 0.055)), vec3(2.4)), COLOR.rgb* (1.0 / 12.92), lessThan(COLOR.rgb,vec3(0.04045)) ); + } + VERTEX = VERTEX; + POSITION=PROJECTION_MATRIX*INV_CAMERA_MATRIX*WORLD_MATRIX*vec4(VERTEX.xyz,1.0); + POSITION.z = mix(POSITION.z, 0, 0.999); + POINT_SIZE = point_size; +} +void fragment() { + vec4 albedo_tex = texture(texture_albedo,POINT_COORD); + vec3 col = albedo_tex.rgb + COLOR.rgb; + col = vec3(min(col.r,1.0),min(col.g,1.0),min(col.b,1.0)); + ALBEDO = col; + if (albedo_tex.a < 0.5) { discard; } + ALPHA = albedo_tex.a; +} +)"); + handle_material->set_shader(handle_shader); + Ref<Texture2D> handle = editor->get_gui_base()->get_theme_icon("EditorBoneHandle", "EditorIcons"); + handle_material->set_shader_param("point_size", handle->get_width()); + handle_material->set_shader_param("texture_albedo", handle); + + handles_mesh_instance = memnew(MeshInstance3D); + handles_mesh_instance->set_cast_shadows_setting(GeometryInstance3D::SHADOW_CASTING_SETTING_OFF); + handles_mesh.instantiate(); + handles_mesh_instance->set_mesh(handles_mesh); +} + +void Skeleton3DEditor::update_bone_original() { + if (!skeleton) { + return; + } + if (skeleton->get_bone_count() == 0 || selected_bone == -1) { + return; + } + bone_original_position = skeleton->get_bone_pose_position(selected_bone); + bone_original_rotation = skeleton->get_bone_pose_rotation(selected_bone); + bone_original_scale = skeleton->get_bone_pose_scale(selected_bone); +} + +void Skeleton3DEditor::_hide_handles() { + handles_mesh_instance->hide(); +} + +void Skeleton3DEditor::_draw_gizmo() { + if (!skeleton) { + return; + } + + // If you call get_bone_global_pose() while drawing the surface, such as toggle rest mode, + // the skeleton update will be done first and + // the drawing surface will be interrupted once and an error will occur. + skeleton->force_update_all_dirty_bones(); + + // Handles. + if (edit_mode) { + _draw_handles(); + } else { + _hide_handles(); + } +} + +void Skeleton3DEditor::_draw_handles() { + handles_mesh_instance->show(); + + const int bone_len = skeleton->get_bone_count(); + handles_mesh->clear_surfaces(); + handles_mesh->surface_begin(Mesh::PRIMITIVE_POINTS); + + for (int i = 0; i < bone_len; i++) { + Color c; + if (i == selected_bone) { + c = Color(1, 1, 0); + } else { + c = Color(0.1, 0.25, 0.8); + } + Vector3 point = skeleton->get_bone_global_pose(i).origin; + handles_mesh->surface_set_color(c); + handles_mesh->surface_add_vertex(point); + } + handles_mesh->surface_end(); + handles_mesh->surface_set_material(0, handle_material); +} + +TreeItem *Skeleton3DEditor::_find(TreeItem *p_node, const NodePath &p_path) { + if (!p_node) { + return nullptr; + } + + NodePath np = p_node->get_metadata(0); + if (np == p_path) { + return p_node; + } + + TreeItem *children = p_node->get_first_child(); + while (children) { + TreeItem *n = _find(children, p_path); + if (n) { + return n; + } + children = children->get_next(); + } + + return nullptr; +} + +void Skeleton3DEditor::_subgizmo_selection_change() { + if (!skeleton) { + return; + } + + // Once validated by subgizmos_intersect_ray, but required if through inspector's bones tree. + if (!edit_mode) { + skeleton->clear_subgizmo_selection(); + return; + } + + int selected = -1; + Skeleton3DEditor *se = Skeleton3DEditor::get_singleton(); + if (se) { + selected = se->get_selected_bone(); + } + + if (selected >= 0) { + Vector<Ref<Node3DGizmo>> gizmos = skeleton->get_gizmos(); + for (int i = 0; i < gizmos.size(); i++) { + Ref<EditorNode3DGizmo> gizmo = gizmos[i]; + if (!gizmo.is_valid()) { + continue; + } + Ref<Skeleton3DGizmoPlugin> plugin = gizmo->get_plugin(); + if (!plugin.is_valid()) { + continue; + } + skeleton->set_subgizmo_selection(gizmo, selected, skeleton->get_bone_global_pose(selected)); + break; + } + } else { + skeleton->clear_subgizmo_selection(); + } +} + +void Skeleton3DEditor::select_bone(int p_idx) { + if (p_idx >= 0) { + TreeItem *ti = _find(joint_tree->get_root(), "bones/" + itos(p_idx)); + if (ti) { + // Make visible when it's collapsed. + TreeItem *node = ti->get_parent(); + while (node && node != joint_tree->get_root()) { + node->set_collapsed(false); + node = node->get_parent(); + } + ti->select(0); + joint_tree->scroll_to_item(ti); + } + } else { + selected_bone = -1; + joint_tree->deselect_all(); + _joint_tree_selection_changed(); + } } Skeleton3DEditor::~Skeleton3DEditor() { - if (options) { - Node3DEditor::get_singleton()->remove_control_from_menu_panel(options); + if (skeleton) { +#ifdef TOOLS_ENABLED + skeleton->disconnect("show_rest_only_changed", callable_mp(this, &Skeleton3DEditor::_update_gizmo_visible)); + skeleton->disconnect("bone_enabled_changed", callable_mp(this, &Skeleton3DEditor::_bone_enabled_changed)); + skeleton->disconnect("pose_updated", callable_mp(this, &Skeleton3DEditor::_draw_gizmo)); + skeleton->disconnect("pose_updated", callable_mp(this, &Skeleton3DEditor::_update_properties)); + skeleton->set_transform_gizmo_visible(true); +#endif + handles_mesh_instance->get_parent()->remove_child(handles_mesh_instance); + } + + handles_mesh_instance->queue_delete(); + + Node3DEditor *ne = Node3DEditor::get_singleton(); + + if (separator) { + ne->remove_control_from_menu_panel(separator); + memdelete(separator); + } + + if (skeleton_options) { + ne->remove_control_from_menu_panel(skeleton_options); + memdelete(skeleton_options); + } + + if (rest_options) { + ne->remove_control_from_menu_panel(rest_options); + memdelete(rest_options); + } + + if (edit_mode_button) { + ne->remove_control_from_menu_panel(edit_mode_button); + memdelete(edit_mode_button); } } @@ -700,16 +895,432 @@ void EditorInspectorPluginSkeleton::parse_begin(Object *p_object) { Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_object); ERR_FAIL_COND(!skeleton); - Skeleton3DEditor *skel_editor = memnew(Skeleton3DEditor(this, editor, skeleton)); + skel_editor = memnew(Skeleton3DEditor(this, editor, skeleton)); add_custom_control(skel_editor); } Skeleton3DEditorPlugin::Skeleton3DEditorPlugin(EditorNode *p_node) { editor = p_node; - Ref<EditorInspectorPluginSkeleton> skeleton_plugin; - skeleton_plugin.instantiate(); + skeleton_plugin = memnew(EditorInspectorPluginSkeleton); skeleton_plugin->editor = editor; EditorInspector::add_inspector_plugin(skeleton_plugin); + + Ref<Skeleton3DGizmoPlugin> gizmo_plugin = Ref<Skeleton3DGizmoPlugin>(memnew(Skeleton3DGizmoPlugin)); + Node3DEditor::get_singleton()->add_gizmo_plugin(gizmo_plugin); +} + +EditorPlugin::AfterGUIInput Skeleton3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) { + Skeleton3DEditor *se = Skeleton3DEditor::get_singleton(); + Node3DEditor *ne = Node3DEditor::get_singleton(); + if (se->is_edit_mode()) { + const Ref<InputEventMouseButton> mb = p_event; + if (mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (ne->get_tool_mode() != Node3DEditor::TOOL_MODE_SELECT) { + if (!ne->is_gizmo_visible()) { + return EditorPlugin::AFTER_GUI_INPUT_STOP; + } + } + if (mb->is_pressed()) { + se->update_bone_original(); + } + } + return EditorPlugin::AFTER_GUI_INPUT_DESELECT; + } + return EditorPlugin::AFTER_GUI_INPUT_PASS; +} + +bool Skeleton3DEditorPlugin::handles(Object *p_object) const { + return p_object->is_class("Skeleton3D"); +} + +void Skeleton3DEditor::_bone_enabled_changed(const int p_bone_id) { + _update_gizmo_visible(); +} + +void Skeleton3DEditor::_update_gizmo_visible() { + _subgizmo_selection_change(); + if (edit_mode) { + if (selected_bone == -1) { +#ifdef TOOLS_ENABLED + skeleton->set_transform_gizmo_visible(false); +#endif + } else { +#ifdef TOOLS_ENABLED + if (skeleton->is_bone_enabled(selected_bone) && !skeleton->is_show_rest_only()) { + skeleton->set_transform_gizmo_visible(true); + } else { + skeleton->set_transform_gizmo_visible(false); + } +#endif + } + } else { +#ifdef TOOLS_ENABLED + skeleton->set_transform_gizmo_visible(true); +#endif + } + _draw_gizmo(); +} + +int Skeleton3DEditor::get_selected_bone() const { + return selected_bone; +} + +Skeleton3DGizmoPlugin::Skeleton3DGizmoPlugin() { + unselected_mat = Ref<StandardMaterial3D>(memnew(StandardMaterial3D)); + unselected_mat->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED); + unselected_mat->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA); + unselected_mat->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true); + unselected_mat->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true); + + selected_mat = Ref<ShaderMaterial>(memnew(ShaderMaterial)); + selected_sh = Ref<Shader>(memnew(Shader)); + selected_sh->set_code(R"( +// Skeleton 3D gizmo bones shader. + +shader_type spatial; +render_mode unshaded, shadows_disabled; +void vertex() { + if (!OUTPUT_IS_SRGB) { + COLOR.rgb = mix( pow((COLOR.rgb + vec3(0.055)) * (1.0 / (1.0 + 0.055)), vec3(2.4)), COLOR.rgb* (1.0 / 12.92), lessThan(COLOR.rgb,vec3(0.04045)) ); + } + VERTEX = VERTEX; + POSITION=PROJECTION_MATRIX*INV_CAMERA_MATRIX*WORLD_MATRIX*vec4(VERTEX.xyz,1.0); + POSITION.z = mix(POSITION.z, 0, 0.998); +} +void fragment() { + ALBEDO = COLOR.rgb; + ALPHA = COLOR.a; +} +)"); + selected_mat->set_shader(selected_sh); + + // Regist properties in editor settings. + EDITOR_DEF("editors/3d_gizmos/gizmo_colors/skeleton", Color(1, 0.8, 0.4)); + EDITOR_DEF("editors/3d_gizmos/gizmo_colors/selected_bone", Color(0.8, 0.3, 0.0)); + EDITOR_DEF("editors/3d_gizmos/gizmo_settings/bone_axis_length", (float)0.1); + EDITOR_DEF("editors/3d_gizmos/gizmo_settings/bone_shape", 1); + EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "editors/3d_gizmos/gizmo_settings/bone_shape", PROPERTY_HINT_ENUM, "Wire,Octahedron")); +} + +bool Skeleton3DGizmoPlugin::has_gizmo(Node3D *p_spatial) { + return Object::cast_to<Skeleton3D>(p_spatial) != nullptr; +} + +String Skeleton3DGizmoPlugin::get_gizmo_name() const { + return "Skeleton3D"; +} + +int Skeleton3DGizmoPlugin::get_priority() const { + return -1; +} + +int Skeleton3DGizmoPlugin::subgizmos_intersect_ray(const EditorNode3DGizmo *p_gizmo, Camera3D *p_camera, const Vector2 &p_point) const { + Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_gizmo->get_spatial_node()); + ERR_FAIL_COND_V(!skeleton, -1); + + Skeleton3DEditor *se = Skeleton3DEditor::get_singleton(); + + if (!se->is_edit_mode()) { + return -1; + } + + if (Node3DEditor::get_singleton()->get_tool_mode() != Node3DEditor::TOOL_MODE_SELECT) { + return -1; + } + + // Select bone. + real_t grab_threshold = 4 * EDSCALE; + Vector3 ray_from = p_camera->get_global_transform().origin; + Transform3D gt = skeleton->get_global_transform(); + int closest_idx = -1; + real_t closest_dist = 1e10; + const int bone_len = skeleton->get_bone_count(); + for (int i = 0; i < bone_len; i++) { + Vector3 joint_pos_3d = gt.xform(skeleton->get_bone_global_pose(i).origin); + Vector2 joint_pos_2d = p_camera->unproject_position(joint_pos_3d); + real_t dist_3d = ray_from.distance_to(joint_pos_3d); + real_t dist_2d = p_point.distance_to(joint_pos_2d); + if (dist_2d < grab_threshold && dist_3d < closest_dist) { + closest_dist = dist_3d; + closest_idx = i; + } + } + + if (closest_idx >= 0) { + WARN_PRINT("ray:"); + WARN_PRINT(itos(closest_idx)); + se->select_bone(closest_idx); + return closest_idx; + } + + se->select_bone(-1); + return -1; +} + +Transform3D Skeleton3DGizmoPlugin::get_subgizmo_transform(const EditorNode3DGizmo *p_gizmo, int p_id) const { + Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_gizmo->get_spatial_node()); + ERR_FAIL_COND_V(!skeleton, Transform3D()); + + return skeleton->get_bone_global_pose(p_id); +} + +void Skeleton3DGizmoPlugin::set_subgizmo_transform(const EditorNode3DGizmo *p_gizmo, int p_id, Transform3D p_transform) { + Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_gizmo->get_spatial_node()); + ERR_FAIL_COND(!skeleton); + + // Prepare for global to local. + Transform3D original_to_local = Transform3D(); + int parent_idx = skeleton->get_bone_parent(p_id); + if (parent_idx >= 0) { + original_to_local = original_to_local * skeleton->get_bone_global_pose(parent_idx); + } + Basis to_local = original_to_local.get_basis().inverse(); + + // Prepare transform. + Transform3D t = Transform3D(); + + // Basis. + t.basis = to_local * p_transform.get_basis(); + + // Origin. + Vector3 orig = Vector3(); + orig = skeleton->get_bone_pose(p_id).origin; + Vector3 sub = p_transform.origin - skeleton->get_bone_global_pose(p_id).origin; + t.origin = orig + to_local.xform(sub); + + // Apply transform. + skeleton->set_bone_pose_position(p_id, t.origin); + skeleton->set_bone_pose_rotation(p_id, t.basis.get_rotation_quaternion()); + skeleton->set_bone_pose_scale(p_id, t.basis.get_scale()); +} + +void Skeleton3DGizmoPlugin::commit_subgizmos(const EditorNode3DGizmo *p_gizmo, const Vector<int> &p_ids, const Vector<Transform3D> &p_restore, bool p_cancel) { + Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_gizmo->get_spatial_node()); + ERR_FAIL_COND(!skeleton); + + Skeleton3DEditor *se = Skeleton3DEditor::get_singleton(); + Node3DEditor *ne = Node3DEditor::get_singleton(); + + UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); + ur->create_action(TTR("Set Bone Transform")); + if (ne->get_tool_mode() == Node3DEditor::TOOL_MODE_SELECT || ne->get_tool_mode() == Node3DEditor::TOOL_MODE_MOVE) { + for (int i = 0; i < p_ids.size(); i++) { + ur->add_do_method(skeleton, "set_bone_pose_position", p_ids[i], skeleton->get_bone_pose_position(p_ids[i])); + ur->add_undo_method(skeleton, "set_bone_pose_position", p_ids[i], se->get_bone_original_position()); + } + } + if (ne->get_tool_mode() == Node3DEditor::TOOL_MODE_SELECT || ne->get_tool_mode() == Node3DEditor::TOOL_MODE_ROTATE) { + for (int i = 0; i < p_ids.size(); i++) { + ur->add_do_method(skeleton, "set_bone_pose_rotation", p_ids[i], skeleton->get_bone_pose_rotation(p_ids[i])); + ur->add_undo_method(skeleton, "set_bone_pose_rotation", p_ids[i], se->get_bone_original_rotation()); + } + } + if (ne->get_tool_mode() == Node3DEditor::TOOL_MODE_SCALE) { + for (int i = 0; i < p_ids.size(); i++) { + // If the axis is swapped by scaling, the rotation can be changed. + ur->add_do_method(skeleton, "set_bone_pose_rotation", p_ids[i], skeleton->get_bone_pose_rotation(p_ids[i])); + ur->add_undo_method(skeleton, "set_bone_pose_rotation", p_ids[i], se->get_bone_original_rotation()); + ur->add_do_method(skeleton, "set_bone_pose_scale", p_ids[i], skeleton->get_bone_pose_scale(p_ids[i])); + ur->add_undo_method(skeleton, "set_bone_pose_scale", p_ids[i], se->get_bone_original_scale()); + } + } + ur->commit_action(); +} + +void Skeleton3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { + Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_gizmo->get_spatial_node()); + p_gizmo->clear(); + + int selected = -1; + Skeleton3DEditor *se = Skeleton3DEditor::get_singleton(); + if (se) { + selected = se->get_selected_bone(); + } + + Color bone_color = EditorSettings::get_singleton()->get("editors/3d_gizmos/gizmo_colors/skeleton"); + Color selected_bone_color = EditorSettings::get_singleton()->get("editors/3d_gizmos/gizmo_colors/selected_bone"); + real_t bone_axis_length = EditorSettings::get_singleton()->get("editors/3d_gizmos/gizmo_settings/bone_axis_length"); + int bone_shape = EditorSettings::get_singleton()->get("editors/3d_gizmos/gizmo_settings/bone_shape"); + + LocalVector<Color> axis_colors; + axis_colors.push_back(Node3DEditor::get_singleton()->get_theme_color(SNAME("axis_x_color"), SNAME("Editor"))); + axis_colors.push_back(Node3DEditor::get_singleton()->get_theme_color(SNAME("axis_y_color"), SNAME("Editor"))); + axis_colors.push_back(Node3DEditor::get_singleton()->get_theme_color(SNAME("axis_z_color"), SNAME("Editor"))); + + Ref<SurfaceTool> surface_tool(memnew(SurfaceTool)); + surface_tool->begin(Mesh::PRIMITIVE_LINES); + + if (p_gizmo->is_selected()) { + surface_tool->set_material(selected_mat); + } else { + unselected_mat->set_albedo(bone_color); + surface_tool->set_material(unselected_mat); + } + + Vector<Transform3D> grests; + grests.resize(skeleton->get_bone_count()); + + LocalVector<int> bones; + LocalVector<float> weights; + bones.resize(4); + weights.resize(4); + for (int i = 0; i < 4; i++) { + bones[i] = 0; + weights[i] = 0; + } + weights[0] = 1; + + int current_bone_index = 0; + Vector<int> bones_to_process = skeleton->get_parentless_bones(); + + while (bones_to_process.size() > current_bone_index) { + int current_bone_idx = bones_to_process[current_bone_index]; + current_bone_index++; + + Color current_bone_color = (current_bone_idx == selected) ? selected_bone_color : bone_color; + + Vector<int> child_bones_vector; + child_bones_vector = skeleton->get_bone_children(current_bone_idx); + int child_bones_size = child_bones_vector.size(); + + // You have children but no parent, then you must be a root/parentless bone. + if (skeleton->get_bone_parent(current_bone_idx) < 0) { + grests.write[current_bone_idx] = skeleton->get_bone_rest(current_bone_idx); + } + + for (int i = 0; i < child_bones_size; i++) { + // Something wrong. + if (child_bones_vector[i] < 0) { + continue; + } + + int child_bone_idx = child_bones_vector[i]; + + grests.write[child_bone_idx] = grests[current_bone_idx] * skeleton->get_bone_rest(child_bone_idx); + + Vector3 v0 = grests[current_bone_idx].origin; + Vector3 v1 = grests[child_bone_idx].origin; + Vector3 d = (v1 - v0).normalized(); + real_t dist = v0.distance_to(v1); + + // Find closest axis. + int closest = -1; + real_t closest_d = 0.0; + for (int j = 0; j < 3; j++) { + real_t dp = Math::abs(grests[current_bone_idx].basis[j].normalized().dot(d)); + if (j == 0 || dp > closest_d) { + closest = j; + } + } + + // Draw bone. + switch (bone_shape) { + case 0: { // Wire shape. + surface_tool->set_color(current_bone_color); + bones[0] = current_bone_idx; + surface_tool->set_bones(bones); + surface_tool->set_weights(weights); + surface_tool->add_vertex(v0); + bones[0] = child_bone_idx; + surface_tool->set_bones(bones); + surface_tool->set_weights(weights); + surface_tool->add_vertex(v1); + } break; + + case 1: { // Octahedron shape. + Vector3 first; + Vector3 points[6]; + int point_idx = 0; + for (int j = 0; j < 3; j++) { + Vector3 axis; + if (first == Vector3()) { + axis = d.cross(d.cross(grests[current_bone_idx].basis[j])).normalized(); + first = axis; + } else { + axis = d.cross(first).normalized(); + } + + surface_tool->set_color(current_bone_color); + for (int k = 0; k < 2; k++) { + if (k == 1) { + axis = -axis; + } + Vector3 point = v0 + d * dist * 0.2; + point += axis * dist * 0.1; + + bones[0] = current_bone_idx; + surface_tool->set_bones(bones); + surface_tool->set_weights(weights); + surface_tool->add_vertex(v0); + surface_tool->set_bones(bones); + surface_tool->set_weights(weights); + surface_tool->add_vertex(point); + + surface_tool->set_bones(bones); + surface_tool->set_weights(weights); + surface_tool->add_vertex(point); + bones[0] = child_bone_idx; + surface_tool->set_bones(bones); + surface_tool->set_weights(weights); + surface_tool->add_vertex(v1); + points[point_idx++] = point; + } + } + surface_tool->set_color(current_bone_color); + SWAP(points[1], points[2]); + bones[0] = current_bone_idx; + for (int j = 0; j < 6; j++) { + surface_tool->set_bones(bones); + surface_tool->set_weights(weights); + surface_tool->add_vertex(points[j]); + surface_tool->set_bones(bones); + surface_tool->set_weights(weights); + surface_tool->add_vertex(points[(j + 1) % 6]); + } + } break; + } + + // Axis as root of the bone. + for (int j = 0; j < 3; j++) { + bones[0] = current_bone_idx; + surface_tool->set_color(axis_colors[j]); + surface_tool->set_bones(bones); + surface_tool->set_weights(weights); + surface_tool->add_vertex(v0); + surface_tool->set_bones(bones); + surface_tool->set_weights(weights); + surface_tool->add_vertex(v0 + (grests[current_bone_idx].basis.inverse())[j].normalized() * dist * bone_axis_length); + + if (j == closest) { + continue; + } + } + + // Axis at the end of the bone children. + if (i == child_bones_size - 1) { + for (int j = 0; j < 3; j++) { + bones[0] = child_bone_idx; + surface_tool->set_color(axis_colors[j]); + surface_tool->set_bones(bones); + surface_tool->set_weights(weights); + surface_tool->add_vertex(v1); + surface_tool->set_bones(bones); + surface_tool->set_weights(weights); + surface_tool->add_vertex(v1 + (grests[child_bone_idx].basis.inverse())[j].normalized() * dist * bone_axis_length); + + if (j == closest) { + continue; + } + } + } + + // Add the bone's children to the list of bones to be processed. + bones_to_process.push_back(child_bones_vector[i]); + } + } + + Ref<ArrayMesh> m = surface_tool->commit(); + p_gizmo->add_mesh(m, Ref<Material>(), Transform3D(), skeleton->register_skin(skeleton->create_skin_from_rest_transforms())); } diff --git a/editor/plugins/skeleton_3d_editor_plugin.h b/editor/plugins/skeleton_3d_editor_plugin.h index 9de52c6fa8..3b4dd362fb 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.h +++ b/editor/plugins/skeleton_3d_editor_plugin.h @@ -33,7 +33,12 @@ #include "editor/editor_node.h" #include "editor/editor_plugin.h" +#include "editor/editor_properties.h" +#include "node_3d_editor_plugin.h" +#include "scene/3d/camera_3d.h" +#include "scene/3d/mesh_instance_3d.h" #include "scene/3d/skeleton_3d.h" +#include "scene/resources/immediate_mesh.h" class EditorInspectorPluginSkeleton; class Joint; @@ -41,29 +46,28 @@ class PhysicalBone3D; class Skeleton3DEditorPlugin; class Button; class CheckBox; -class EditorPropertyTransform3D; -class EditorPropertyVector3; class BoneTransformEditor : public VBoxContainer { GDCLASS(BoneTransformEditor, VBoxContainer); EditorInspectorSection *section = nullptr; - EditorPropertyVector3 *translation_property = nullptr; - EditorPropertyVector3 *rotation_property = nullptr; + EditorPropertyCheck *enabled_checkbox = nullptr; + EditorPropertyVector3 *position_property = nullptr; + EditorPropertyQuaternion *rotation_property = nullptr; EditorPropertyVector3 *scale_property = nullptr; - EditorInspectorSection *transform_section = nullptr; - EditorPropertyTransform3D *transform_property = nullptr; + + EditorInspectorSection *rest_section = nullptr; + EditorPropertyTransform3D *rest_matrix = nullptr; Rect2 background_rects[5]; Skeleton3D *skeleton; - String property; + // String property; UndoRedo *undo_redo; - Button *key_button = nullptr; - CheckBox *enabled_checkbox = nullptr; + // Button *key_button = nullptr; bool keyable = false; bool toggle_enabled = false; @@ -73,18 +77,7 @@ class BoneTransformEditor : public VBoxContainer { void create_editors(); - // Called when one of the EditorSpinSliders are changed. - void _value_changed(const double p_value); - // Called when the one of the EditorPropertyVector3 are updated. - void _value_changed_vector3(const String p_property_name, const Vector3 p_vector, const StringName p_edited_property_name, const bool p_boolean); - // Called when the transform_property is updated. - void _value_changed_transform(const String p_property_name, const Transform3D p_transform, const StringName p_edited_property_name, const bool p_boolean); - // Changes the transform to the given transform and updates the UI accordingly. - void _change_transform(Transform3D p_new_transform); - // Creates a Transform using the EditorPropertyVector3 properties. - Transform3D compute_transform_from_vector3s() const; - - void update_enabled_checkbox(); + void _value_changed(const String &p_property, Variant p_value, const String &p_name, bool p_changing); protected: void _notification(int p_what); @@ -92,28 +85,11 @@ protected: public: BoneTransformEditor(Skeleton3D *p_skeleton); - // Which transform target to modify + // Which transform target to modify. void set_target(const String &p_prop); void set_label(const String &p_label) { label = p_label; } void _update_properties(); - void _update_custom_pose_properties(); - void _update_transform_properties(Transform3D p_transform); - - // Can/cannot modify the spinner values for the Transform - void set_read_only(const bool p_read_only); - - // Transform can be keyed, whether or not to show the button - void set_keyable(const bool p_keyable); - - // Bone can be toggled enabled or disabled, whether or not to show the checkbox - void set_toggle_enabled(const bool p_enabled); - - // Key Transform Button pressed - void _key_button_pressed(); - - // Bone Enabled Checkbox toggled - void _checkbox_toggled(const bool p_toggled); }; class Skeleton3DEditor : public VBoxContainer { @@ -121,13 +97,20 @@ class Skeleton3DEditor : public VBoxContainer { friend class Skeleton3DEditorPlugin; - enum Menu { - MENU_OPTION_CREATE_PHYSICAL_SKELETON + enum SkeletonOption { + SKELETON_OPTION_INIT_POSE, + SKELETON_OPTION_INSERT_KEYS, + SKELETON_OPTION_INSERT_KEYS_EXISTED, + SKELETON_OPTION_CREATE_PHYSICAL_SKELETON + }; + + enum RestOption { + REST_OPTION_POSE_TO_REST }; struct BoneInfo { PhysicalBone3D *physical_bone = nullptr; - Transform3D relative_rest; // Relative to skeleton node + Transform3D relative_rest; // Relative to skeleton node. }; EditorNode *editor; @@ -138,15 +121,25 @@ class Skeleton3DEditor : public VBoxContainer { Tree *joint_tree = nullptr; BoneTransformEditor *rest_editor = nullptr; BoneTransformEditor *pose_editor = nullptr; - BoneTransformEditor *custom_pose_editor = nullptr; - MenuButton *options = nullptr; + VSeparator *separator; + MenuButton *skeleton_options = nullptr; + MenuButton *rest_options = nullptr; + Button *edit_mode_button; + + bool edit_mode = false; + EditorFileDialog *file_dialog = nullptr; - UndoRedo *undo_redo = nullptr; + bool keyable; - void _on_click_option(int p_option); + static Skeleton3DEditor *singleton; + + void _on_click_skeleton_option(int p_skeleton_option); + void _on_click_rest_option(int p_rest_option); void _file_selected(const String &p_file); + TreeItem *_find(TreeItem *p_node, const NodePath &p_path); + void edit_mode_toggled(const bool pressed); EditorFileDialog *file_export_lib = nullptr; @@ -155,6 +148,10 @@ class Skeleton3DEditor : public VBoxContainer { void create_editors(); + void init_pose(); + void insert_keys(bool p_all_bones); + void pose_to_rest(); + void create_physical_skeleton(); PhysicalBone3D *create_physical_bone(int bone_id, int bone_child_id, const Vector<BoneInfo> &bones_infos); @@ -162,20 +159,57 @@ class Skeleton3DEditor : public VBoxContainer { bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const; void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from); + void set_keyable(const bool p_keyable); + void set_rest_options_enabled(const bool p_rest_options_enabled); + + // Handle. + MeshInstance3D *handles_mesh_instance; + Ref<ImmediateMesh> handles_mesh; + Ref<ShaderMaterial> handle_material; + Ref<Shader> handle_shader; + + Vector3 bone_original_position; + Quaternion bone_original_rotation; + Vector3 bone_original_scale; + + void _update_gizmo_visible(); + void _bone_enabled_changed(const int p_bone_id); + + void _hide_handles(); + + void _draw_gizmo(); + void _draw_handles(); + + void _joint_tree_selection_changed(); + void _joint_tree_rmb_select(const Vector2 &p_pos); + void _update_properties(); + + void _subgizmo_selection_change(); + + int selected_bone = -1; + protected: void _notification(int p_what); void _node_removed(Node *p_node); static void _bind_methods(); public: + static Skeleton3DEditor *get_singleton() { return singleton; } + + void select_bone(int p_idx); + + int get_selected_bone() const; + void move_skeleton_bone(NodePath p_skeleton_path, int32_t p_selected_boneidx, int32_t p_target_boneidx); Skeleton3D *get_skeleton() const { return skeleton; }; - void _joint_tree_selection_changed(); - void _joint_tree_rmb_select(const Vector2 &p_pos); + bool is_edit_mode() const { return edit_mode; } - void _update_properties(); + void update_bone_original(); + Vector3 get_bone_original_position() const { return bone_original_position; }; + Quaternion get_bone_original_rotation() const { return bone_original_rotation; }; + Vector3 get_bone_original_scale() const { return bone_original_scale; }; Skeleton3DEditor(EditorInspectorPluginSkeleton *e_plugin, EditorNode *p_editor, Skeleton3D *skeleton); ~Skeleton3DEditor(); @@ -186,6 +220,7 @@ class EditorInspectorPluginSkeleton : public EditorInspectorPlugin { friend class Skeleton3DEditorPlugin; + Skeleton3DEditor *skel_editor; EditorNode *editor; public: @@ -196,12 +231,40 @@ public: class Skeleton3DEditorPlugin : public EditorPlugin { GDCLASS(Skeleton3DEditorPlugin, EditorPlugin); + EditorInspectorPluginSkeleton *skeleton_plugin; EditorNode *editor; public: - Skeleton3DEditorPlugin(EditorNode *p_node); + virtual EditorPlugin::AfterGUIInput forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) override; + + bool has_main_screen() const override { return false; } + virtual bool handles(Object *p_object) const override; virtual String get_name() const override { return "Skeleton3D"; } + + Skeleton3DEditorPlugin(EditorNode *p_node); +}; + +class Skeleton3DGizmoPlugin : public EditorNode3DGizmoPlugin { + GDCLASS(Skeleton3DGizmoPlugin, EditorNode3DGizmoPlugin); + + Ref<StandardMaterial3D> unselected_mat; + Ref<ShaderMaterial> selected_mat; + Ref<Shader> selected_sh; + +public: + bool has_gizmo(Node3D *p_spatial) override; + String get_gizmo_name() const override; + int get_priority() const override; + + int subgizmos_intersect_ray(const EditorNode3DGizmo *p_gizmo, Camera3D *p_camera, const Vector2 &p_point) const override; + Transform3D get_subgizmo_transform(const EditorNode3DGizmo *p_gizmo, int p_id) const override; + void set_subgizmo_transform(const EditorNode3DGizmo *p_gizmo, int p_id, Transform3D p_transform) override; + void commit_subgizmos(const EditorNode3DGizmo *p_gizmo, const Vector<int> &p_ids, const Vector<Transform3D> &p_restore, bool p_cancel) override; + + void redraw(EditorNode3DGizmo *p_gizmo) override; + + Skeleton3DGizmoPlugin(); }; #endif // SKELETON_3D_EDITOR_PLUGIN_H diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp index 06ba8a6168..1fc7eb98e0 100644 --- a/editor/plugins/text_editor.cpp +++ b/editor/plugins/text_editor.cpp @@ -407,10 +407,6 @@ void TextEditor::_convert_case(CodeTextEditor::CaseStyle p_case) { code_editor->convert_case(p_case); } -void TextEditor::_bind_methods() { - ClassDB::bind_method(D_METHOD("add_syntax_highlighter", "highlighter"), &TextEditor::add_syntax_highlighter); -} - static ScriptEditorBase *create_editor(const RES &p_resource) { if (Object::cast_to<TextFile>(*p_resource)) { return memnew(TextEditor); diff --git a/editor/plugins/text_editor.h b/editor/plugins/text_editor.h index 9308fec210..7404557f46 100644 --- a/editor/plugins/text_editor.h +++ b/editor/plugins/text_editor.h @@ -87,8 +87,6 @@ private: }; protected: - static void _bind_methods(); - void _edit_option(int p_op); void _make_context_menu(bool p_selection, bool p_can_fold, bool p_is_folded, Vector2 p_position); void _text_edit_gui_input(const Ref<InputEvent> &ev); diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp index cfb2d63bc7..ce90d61616 100644 --- a/editor/plugins/texture_region_editor_plugin.cpp +++ b/editor/plugins/texture_region_editor_plugin.cpp @@ -50,7 +50,7 @@ void draw_margin_line(Control *edit_draw, Vector2 from, Vector2 to) { EditorNode::get_singleton()->get_theme_base()->get_theme_color(SNAME("mono_color"), SNAME("Editor")).inverted() * Color(1, 1, 1, 0.5), Math::round(2 * EDSCALE)); - while ((to - from).length_squared() > 200) { + while (from.distance_squared_to(to) > 200) { edit_draw->draw_line( from, from + line, @@ -674,8 +674,7 @@ void TextureRegionEditor::_zoom_on_position(float p_zoom, Point2 p_position) { draw_zoom = p_zoom; Point2 ofs = p_position; ofs = ofs / prev_zoom - ofs / draw_zoom; - draw_ofs.x = Math::round(draw_ofs.x + ofs.x); - draw_ofs.y = Math::round(draw_ofs.y + ofs.y); + draw_ofs = (draw_ofs + ofs).round(); edit_draw->update(); } diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index 165a381407..127219546d 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -437,8 +437,8 @@ void ThemeItemImportTree::_update_total_selected(Theme::DataType p_data_type) { } int count = 0; - for (Map<ThemeItem, ItemCheckedState>::Element *E = selected_items.front(); E; E = E->next()) { - ThemeItem ti = E->key(); + for (const KeyValue<ThemeItem, ItemCheckedState> &E : selected_items) { + ThemeItem ti = E.key; if (ti.data_type == p_data_type) { count++; } @@ -759,7 +759,7 @@ void ThemeItemImportTree::_import_selected() { ProgressDialog::get_singleton()->add_task("import_theme_items", TTR("Importing Theme Items"), selected_items.size() + 2); int idx = 0; - for (Map<ThemeItem, ItemCheckedState>::Element *E = selected_items.front(); E; E = E->next()) { + for (KeyValue<ThemeItem, ItemCheckedState> &E : selected_items) { // Arbitrary number of items to skip from reporting. // Reduces the number of UI updates that this causes when copying large themes. if (idx % 10 == 0) { @@ -769,8 +769,8 @@ void ThemeItemImportTree::_import_selected() { ProgressDialog::get_singleton()->task_step("import_theme_items", TTR("Importing items {n}/{n}").format(arr, "{n}"), idx); } - ItemCheckedState cs = E->get(); - ThemeItem ti = E->key(); + ItemCheckedState cs = E.value; + ThemeItem ti = E.key; if (cs == SELECT_IMPORT_DEFINITION || cs == SELECT_IMPORT_FULL) { Variant item_value = Variant(); @@ -3204,7 +3204,7 @@ void ThemeEditor::_add_preview_tab(ThemeEditorPreview *p_preview_tab, const Stri preview_tabs->add_tab(p_preview_name, p_icon); preview_tabs_content->add_child(p_preview_tab); - preview_tabs->set_tab_right_button(preview_tabs->get_tab_count() - 1, EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("close"), SNAME("Tabs"))); + preview_tabs->set_tab_right_button(preview_tabs->get_tab_count() - 1, EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("close"), SNAME("TabBar"))); p_preview_tab->connect("control_picked", callable_mp(this, &ThemeEditor::_preview_control_picked)); preview_tabs->set_current_tab(preview_tabs->get_tab_count() - 1); @@ -3328,12 +3328,12 @@ ThemeEditor::ThemeEditor() { preview_tabs_content->set_draw_behind_parent(true); preview_tabs_vb->add_child(preview_tabs_content); - preview_tabs = memnew(Tabs); - preview_tabs->set_tab_align(Tabs::ALIGN_LEFT); + preview_tabs = memnew(TabBar); + preview_tabs->set_tab_align(TabBar::ALIGN_LEFT); preview_tabs->set_h_size_flags(SIZE_EXPAND_FILL); preview_tabbar_hb->add_child(preview_tabs); preview_tabs->connect("tab_changed", callable_mp(this, &ThemeEditor::_change_preview_tab)); - preview_tabs->connect("right_button_pressed", callable_mp(this, &ThemeEditor::_remove_preview_tab)); + preview_tabs->connect("tab_rmb_clicked", callable_mp(this, &ThemeEditor::_remove_preview_tab)); HBoxContainer *add_preview_button_hb = memnew(HBoxContainer); preview_tabbar_hb->add_child(add_preview_button_hb); diff --git a/editor/plugins/theme_editor_plugin.h b/editor/plugins/theme_editor_plugin.h index 5b0357e3f8..60f9e09536 100644 --- a/editor/plugins/theme_editor_plugin.h +++ b/editor/plugins/theme_editor_plugin.h @@ -34,7 +34,7 @@ #include "scene/gui/margin_container.h" #include "scene/gui/option_button.h" #include "scene/gui/scroll_container.h" -#include "scene/gui/tabs.h" +#include "scene/gui/tab_bar.h" #include "scene/gui/texture_rect.h" #include "scene/resources/theme.h" #include "theme_editor_preview.h" @@ -391,7 +391,7 @@ class ThemeEditor : public VBoxContainer { Ref<Theme> theme; - Tabs *preview_tabs; + TabBar *preview_tabs; PanelContainer *preview_tabs_content; Button *add_preview_button; EditorFileDialog *preview_scene_dialog; diff --git a/editor/plugins/theme_editor_preview.cpp b/editor/plugins/theme_editor_preview.cpp index 801ee0eac2..d26d0ec39d 100644 --- a/editor/plugins/theme_editor_preview.cpp +++ b/editor/plugins/theme_editor_preview.cpp @@ -126,8 +126,8 @@ void ThemeEditorPreview::_draw_picker_overlay() { highlight_label_rect.size.x += margin_left + margin_right; highlight_label_rect.size.y += margin_top + margin_bottom; - highlight_label_rect.position.x = CLAMP(highlight_label_rect.position.x, 0.0, picker_overlay->get_size().width); - highlight_label_rect.position.y = CLAMP(highlight_label_rect.position.y, 0.0, picker_overlay->get_size().height); + highlight_label_rect.position = highlight_label_rect.position.clamp(Vector2(), picker_overlay->get_size()); + picker_overlay->draw_style_box(theme_cache.preview_picker_label, highlight_label_rect); Point2 label_pos = highlight_label_rect.position; diff --git a/editor/plugins/tiles/atlas_merging_dialog.cpp b/editor/plugins/tiles/atlas_merging_dialog.cpp index 2a8a3216ed..efccac7b74 100644 --- a/editor/plugins/tiles/atlas_merging_dialog.cpp +++ b/editor/plugins/tiles/atlas_merging_dialog.cpp @@ -118,6 +118,7 @@ void AtlasMergingDialog::_generate_merged(Vector<Ref<TileSetAtlasSource>> p_atla output_image_texture.instantiate(); output_image_texture->create_from_image(output_image); + merged->set_name(p_atlas_sources[0]->get_name()); merged->set_texture(output_image_texture); merged->set_texture_region_size(new_texture_region_size); } diff --git a/editor/plugins/tiles/tile_atlas_view.cpp b/editor/plugins/tiles/tile_atlas_view.cpp index e98bd74b62..c064073b77 100644 --- a/editor/plugins/tiles/tile_atlas_view.cpp +++ b/editor/plugins/tiles/tile_atlas_view.cpp @@ -97,15 +97,6 @@ Size2i TileAtlasView::_compute_base_tiles_control_size() { if (texture.is_valid()) { size = texture->get_size(); } - - // Extend the size to all existing tiles. - Size2i grid_size = tile_set_atlas_source->get_atlas_grid_size(); - for (int i = 0; i < tile_set_atlas_source->get_tiles_count(); i++) { - Vector2i tile_id = tile_set_atlas_source->get_tile_id(i); - grid_size = grid_size.max(tile_id + Vector2i(1, 1)); - } - size = size.max(grid_size * (tile_set_atlas_source->get_texture_region_size() + tile_set_atlas_source->get_separation()) + tile_set_atlas_source->get_margins()); - return size; } @@ -213,43 +204,56 @@ void TileAtlasView::_draw_base_tiles() { Ref<Texture2D> texture = tile_set_atlas_source->get_texture(); if (texture.is_valid()) { Vector2i margins = tile_set_atlas_source->get_margins(); + Vector2i separation = tile_set_atlas_source->get_separation(); Vector2i texture_region_size = tile_set_atlas_source->get_texture_region_size(); - - // Draw the texture, square by square. Size2i grid_size = tile_set_atlas_source->get_atlas_grid_size(); + + // Draw the texture where there is no tile. for (int x = 0; x < grid_size.x; x++) { for (int y = 0; y < grid_size.y; y++) { Vector2i coords = Vector2i(x, y); if (tile_set_atlas_source->get_tile_at_coords(coords) == TileSetSource::INVALID_ATLAS_COORDS) { - Rect2i rect = Rect2i(texture_region_size * coords + margins, texture_region_size); - base_tiles_draw->draw_texture_rect_region(texture, rect, rect); + Rect2i rect = Rect2i((texture_region_size + separation) * coords + margins, texture_region_size + separation); + rect = rect.intersection(Rect2i(Vector2(), texture->get_size())); + if (rect.size.x > 0 && rect.size.y > 0) { + base_tiles_draw->draw_texture_rect_region(texture, rect, rect); + base_tiles_draw->draw_rect(rect, Color(0.0, 0.0, 0.0, 0.5)); + } } } } // Draw the texture around the grid. Rect2i rect; + // Top. rect.position = Vector2i(); rect.set_end(Vector2i(texture->get_size().x, margins.y)); base_tiles_draw->draw_texture_rect_region(texture, rect, rect); + base_tiles_draw->draw_rect(rect, Color(0.0, 0.0, 0.0, 0.5)); + // Bottom - int bottom_border = margins.y + (grid_size.y * texture_region_size.y); + int bottom_border = margins.y + (grid_size.y * (texture_region_size.y + separation.y)); if (bottom_border < texture->get_size().y) { rect.position = Vector2i(0, bottom_border); rect.set_end(texture->get_size()); base_tiles_draw->draw_texture_rect_region(texture, rect, rect); + base_tiles_draw->draw_rect(rect, Color(0.0, 0.0, 0.0, 0.5)); } + // Left rect.position = Vector2i(0, margins.y); - rect.set_end(Vector2i(margins.x, margins.y + (grid_size.y * texture_region_size.y))); + rect.set_end(Vector2i(margins.x, margins.y + (grid_size.y * (texture_region_size.y + separation.y)))); base_tiles_draw->draw_texture_rect_region(texture, rect, rect); + base_tiles_draw->draw_rect(rect, Color(0.0, 0.0, 0.0, 0.5)); + // Right. - int right_border = margins.x + (grid_size.x * texture_region_size.x); + int right_border = margins.x + (grid_size.x * (texture_region_size.x + separation.x)); if (right_border < texture->get_size().x) { rect.position = Vector2i(right_border, margins.y); - rect.set_end(Vector2i(texture->get_size().x, margins.y + (grid_size.y * texture_region_size.y))); + rect.set_end(Vector2i(texture->get_size().x, margins.y + (grid_size.y * (texture_region_size.y + separation.y)))); base_tiles_draw->draw_texture_rect_region(texture, rect, rect); + base_tiles_draw->draw_rect(rect, Color(0.0, 0.0, 0.0, 0.5)); } // Draw actual tiles, using their properties (modulation, etc...) @@ -258,12 +262,30 @@ void TileAtlasView::_draw_base_tiles() { for (int frame = 0; frame < tile_set_atlas_source->get_tile_animation_frames_count(atlas_coords); frame++) { // Update the y to max value. - int animation_columns = tile_set_atlas_source->get_tile_animation_columns(atlas_coords); - Vector2i frame_coords = atlas_coords + (tile_set_atlas_source->get_tile_size_in_atlas(atlas_coords) + tile_set_atlas_source->get_tile_animation_separation(atlas_coords)) * ((animation_columns > 0) ? Vector2i(frame % animation_columns, frame / animation_columns) : Vector2i(frame, 0)); - Vector2i offset_pos = (margins + (frame_coords * texture_region_size) + tile_set_atlas_source->get_tile_texture_region(atlas_coords, frame).size / 2 + tile_set_atlas_source->get_tile_effective_texture_offset(atlas_coords, 0)); + Rect2i base_frame_rect = tile_set_atlas_source->get_tile_texture_region(atlas_coords, frame); + Vector2i offset_pos = base_frame_rect.get_center() + tile_set_atlas_source->get_tile_effective_texture_offset(atlas_coords, 0); // Draw the tile. TileMap::draw_tile(base_tiles_draw->get_canvas_item(), offset_pos, tile_set, source_id, atlas_coords, 0, frame); + + // Draw, the texture in the separation areas + if (separation.x > 0) { + Rect2i right_sep_rect = Rect2i(base_frame_rect.get_position() + Vector2i(base_frame_rect.size.x, 0), Vector2i(separation.x, base_frame_rect.size.y)); + right_sep_rect = right_sep_rect.intersection(Rect2i(Vector2(), texture->get_size())); + if (right_sep_rect.size.x > 0 && right_sep_rect.size.y > 0) { + base_tiles_draw->draw_texture_rect_region(texture, right_sep_rect, right_sep_rect); + base_tiles_draw->draw_rect(right_sep_rect, Color(0.0, 0.0, 0.0, 0.5)); + } + } + + if (separation.y > 0) { + Rect2i bottom_sep_rect = Rect2i(base_frame_rect.get_position() + Vector2i(0, base_frame_rect.size.y), Vector2i(base_frame_rect.size.x + separation.x, separation.y)); + bottom_sep_rect = bottom_sep_rect.intersection(Rect2i(Vector2(), texture->get_size())); + if (bottom_sep_rect.size.x > 0 && bottom_sep_rect.size.y > 0) { + base_tiles_draw->draw_texture_rect_region(texture, bottom_sep_rect, bottom_sep_rect); + base_tiles_draw->draw_rect(bottom_sep_rect, Color(0.0, 0.0, 0.0, 0.5)); + } + } } } } @@ -299,30 +321,6 @@ void TileAtlasView::_draw_base_tiles_texture_grid() { } } -void TileAtlasView::_draw_base_tiles_dark() { - Ref<Texture2D> texture = tile_set_atlas_source->get_texture(); - if (texture.is_valid()) { - Vector2i margins = tile_set_atlas_source->get_margins(); - Vector2i separation = tile_set_atlas_source->get_separation(); - Vector2i texture_region_size = tile_set_atlas_source->get_texture_region_size(); - - Size2i grid_size = tile_set_atlas_source->get_atlas_grid_size(); - - // Draw each tile texture region. - for (int x = 0; x < grid_size.x; x++) { - for (int y = 0; y < grid_size.y; y++) { - Vector2i origin = margins + (Vector2i(x, y) * (texture_region_size + separation)); - Vector2i base_tile_coords = tile_set_atlas_source->get_tile_at_coords(Vector2i(x, y)); - - if (base_tile_coords == TileSetSource::INVALID_ATLAS_COORDS) { - // Draw the grid. - base_tiles_dark->draw_rect(Rect2i(origin, texture_region_size), Color(0.0, 0.0, 0.0, 0.5), true); - } - } - } - } -} - void TileAtlasView::_draw_base_tiles_shape_grid() { // Draw the shapes. Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color"); @@ -453,7 +451,6 @@ void TileAtlasView::set_atlas_source(TileSet *p_tile_set, TileSetAtlasSource *p_ base_tiles_draw->update(); base_tiles_texture_grid->update(); base_tiles_shape_grid->update(); - base_tiles_dark->update(); alternatives_draw->update(); background_left->update(); background_right->update(); @@ -522,10 +519,10 @@ void TileAtlasView::_update_alternative_tiles_rect_cache() { } Vector3i TileAtlasView::get_alternative_tile_at_pos(const Vector2 p_pos) const { - for (Map<Vector2, Map<int, Rect2i>>::Element *E_coords = alternative_tiles_rect_cache.front(); E_coords; E_coords = E_coords->next()) { - for (Map<int, Rect2i>::Element *E_alternative = E_coords->value().front(); E_alternative; E_alternative = E_alternative->next()) { - if (E_alternative->value().has_point(p_pos)) { - return Vector3i(E_coords->key().x, E_coords->key().y, E_alternative->key()); + for (const KeyValue<Vector2, Map<int, Rect2i>> &E_coords : alternative_tiles_rect_cache) { + for (const KeyValue<int, Rect2i> &E_alternative : E_coords.value) { + if (E_alternative.value.has_point(p_pos)) { + return Vector3i(E_coords.key.x, E_coords.key.y, E_alternative.key); } } } @@ -544,7 +541,6 @@ void TileAtlasView::update() { base_tiles_draw->update(); base_tiles_texture_grid->update(); base_tiles_shape_grid->update(); - base_tiles_dark->update(); alternatives_draw->update(); background_left->update(); background_right->update(); @@ -660,12 +656,6 @@ TileAtlasView::TileAtlasView() { base_tiles_shape_grid->connect("draw", callable_mp(this, &TileAtlasView::_draw_base_tiles_shape_grid)); base_tiles_drawing_root->add_child(base_tiles_shape_grid); - base_tiles_dark = memnew(Control); - base_tiles_dark->set_mouse_filter(Control::MOUSE_FILTER_IGNORE); - base_tiles_dark->set_anchors_and_offsets_preset(Control::PRESET_WIDE); - base_tiles_dark->connect("draw", callable_mp(this, &TileAtlasView::_draw_base_tiles_dark)); - base_tiles_drawing_root->add_child(base_tiles_dark); - // Alternative tiles. Label *alternative_tiles_label = memnew(Label); alternative_tiles_label->set_mouse_filter(Control::MOUSE_FILTER_IGNORE); diff --git a/editor/plugins/tiles/tile_atlas_view.h b/editor/plugins/tiles/tile_atlas_view.h index 5b0df366ae..e1ca3eebee 100644 --- a/editor/plugins/tiles/tile_atlas_view.h +++ b/editor/plugins/tiles/tile_atlas_view.h @@ -93,9 +93,6 @@ private: Control *base_tiles_shape_grid; void _draw_base_tiles_shape_grid(); - Control *base_tiles_dark; - void _draw_base_tiles_dark(); - Size2i _compute_base_tiles_control_size(); // Right side. @@ -124,7 +121,6 @@ public: // Left side. void set_texture_grid_visible(bool p_visible) { base_tiles_texture_grid->set_visible(p_visible); }; - void set_dark_visible(bool p_visible) { base_tiles_dark->set_visible(p_visible); }; void set_tile_shape_grid_visible(bool p_visible) { base_tiles_shape_grid->set_visible(p_visible); }; Vector2i get_atlas_tile_coords_at_pos(const Vector2 p_pos) const; diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp index ea7ca787c8..104f46f773 100644 --- a/editor/plugins/tiles/tile_data_editors.cpp +++ b/editor/plugins/tiles/tile_data_editors.cpp @@ -38,8 +38,16 @@ #include "editor/editor_properties.h" #include "editor/editor_scale.h" -void TileDataEditor::_call_tile_set_changed() { - _tile_set_changed(); +void TileDataEditor::_tile_set_changed_plan_update() { + _tile_set_changed_update_needed = true; + call_deferred("_tile_set_changed_deferred_update"); +} + +void TileDataEditor::_tile_set_changed_deferred_update() { + if (_tile_set_changed_update_needed) { + _tile_set_changed(); + _tile_set_changed_update_needed = false; + } } TileData *TileDataEditor::_get_tile_data(TileMapCell p_cell) { @@ -59,18 +67,20 @@ TileData *TileDataEditor::_get_tile_data(TileMapCell p_cell) { } void TileDataEditor::_bind_methods() { + ClassDB::bind_method(D_METHOD("_tile_set_changed_deferred_update"), &TileDataEditor::_tile_set_changed_deferred_update); + ADD_SIGNAL(MethodInfo("needs_redraw")); } void TileDataEditor::set_tile_set(Ref<TileSet> p_tile_set) { if (tile_set.is_valid()) { - tile_set->disconnect("changed", callable_mp(this, &TileDataEditor::_call_tile_set_changed)); + tile_set->disconnect("changed", callable_mp(this, &TileDataEditor::_tile_set_changed_plan_update)); } tile_set = p_tile_set; if (tile_set.is_valid()) { - tile_set->connect("changed", callable_mp(this, &TileDataEditor::_call_tile_set_changed)); + tile_set->connect("changed", callable_mp(this, &TileDataEditor::_tile_set_changed_plan_update)); } - _call_tile_set_changed(); + _tile_set_changed_plan_update(); } bool DummyObject::_set(const StringName &p_name, const Variant &p_value) { @@ -231,10 +241,14 @@ void GenericTilePolygonEditor::_zoom_changed() { void GenericTilePolygonEditor::_advanced_menu_item_pressed(int p_item_pressed) { switch (p_item_pressed) { - case RESET_TO_DEFAULT_TILE: + case RESET_TO_DEFAULT_TILE: { undo_redo->create_action(TTR("Edit Polygons")); undo_redo->add_do_method(this, "clear_polygons"); - undo_redo->add_do_method(this, "add_polygon", tile_set->get_tile_shape_polygon()); + Vector<Vector2> polygon = tile_set->get_tile_shape_polygon(); + for (int i = 0; i < polygon.size(); i++) { + polygon.write[i] = polygon[i] * tile_set->get_tile_size(); + } + undo_redo->add_do_method(this, "add_polygon", polygon); undo_redo->add_do_method(base_control, "update"); undo_redo->add_do_method(this, "emit_signal", "polygons_changed"); undo_redo->add_undo_method(this, "clear_polygons"); @@ -244,8 +258,8 @@ void GenericTilePolygonEditor::_advanced_menu_item_pressed(int p_item_pressed) { undo_redo->add_undo_method(base_control, "update"); undo_redo->add_undo_method(this, "emit_signal", "polygons_changed"); undo_redo->commit_action(true); - break; - case CLEAR_TILE: + } break; + case CLEAR_TILE: { undo_redo->create_action(TTR("Edit Polygons")); undo_redo->add_do_method(this, "clear_polygons"); undo_redo->add_do_method(base_control, "update"); @@ -257,7 +271,7 @@ void GenericTilePolygonEditor::_advanced_menu_item_pressed(int p_item_pressed) { undo_redo->add_undo_method(base_control, "update"); undo_redo->add_undo_method(this, "emit_signal", "polygons_changed"); undo_redo->commit_action(true); - break; + } break; default: break; } @@ -308,6 +322,9 @@ void GenericTilePolygonEditor::_snap_to_tile_shape(Point2 &r_point, float &r_cur ERR_FAIL_COND(!tile_set.is_valid()); Vector<Point2> polygon = tile_set->get_tile_shape_polygon(); + for (int i = 0; i < polygon.size(); i++) { + polygon.write[i] = polygon[i] * tile_set->get_tile_size(); + } Point2 snapped_point = r_point; // Snap to polygon vertices. @@ -539,7 +556,11 @@ void GenericTilePolygonEditor::set_tile_set(Ref<TileSet> p_tile_set) { // Set the default tile shape clear_polygons(); if (p_tile_set.is_valid()) { - add_polygon(p_tile_set->get_tile_shape_polygon()); + Vector<Vector2> polygon = p_tile_set->get_tile_shape_polygon(); + for (int i = 0; i < polygon.size(); i++) { + polygon.write[i] = polygon[i] * p_tile_set->get_tile_size(); + } + add_polygon(polygon); } } tile_set = p_tile_set; @@ -622,7 +643,7 @@ void GenericTilePolygonEditor::_notification(int p_what) { button_delete->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("CurveDelete"), SNAME("EditorIcons"))); button_center_view->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("CenterView"), SNAME("EditorIcons"))); button_pixel_snap->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Snap"), SNAME("EditorIcons"))); - button_advanced_menu->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("GuiTabMenu"), SNAME("EditorIcons"))); + button_advanced_menu->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("GuiTabMenuHl"), SNAME("EditorIcons"))); break; } } @@ -745,10 +766,10 @@ Variant TileDataDefaultEditor::_get_value(TileSetAtlasSource *p_tile_set_atlas_s } void TileDataDefaultEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) { - for (Map<TileMapCell, Variant>::Element *E = p_previous_values.front(); E; E = E->next()) { - Vector2i coords = E->key().get_atlas_coords(); - undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/%s", coords.x, coords.y, E->key().alternative_tile, property), E->get()); - undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/%s", coords.x, coords.y, E->key().alternative_tile, property), p_new_value); + for (const KeyValue<TileMapCell, Variant> &E : p_previous_values) { + Vector2i coords = E.key.get_atlas_coords(); + undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/%s", coords.x, coords.y, E.key.alternative_tile, property), E.value); + undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/%s", coords.x, coords.y, E.key.alternative_tile, property), p_new_value); } } @@ -1180,10 +1201,10 @@ Variant TileDataOcclusionShapeEditor::_get_value(TileSetAtlasSource *p_tile_set_ } void TileDataOcclusionShapeEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) { - for (Map<TileMapCell, Variant>::Element *E = p_previous_values.front(); E; E = E->next()) { - Vector2i coords = E->key().get_atlas_coords(); - undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/occlusion_layer_%d/polygon", coords.x, coords.y, E->key().alternative_tile, occlusion_layer), E->get()); - undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/occlusion_layer_%d/polygon", coords.x, coords.y, E->key().alternative_tile, occlusion_layer), p_new_value); + for (const KeyValue<TileMapCell, Variant> &E : p_previous_values) { + Vector2i coords = E.key.get_atlas_coords(); + undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/occlusion_layer_%d/polygon", coords.x, coords.y, E.key.alternative_tile, occlusion_layer), E.value); + undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/occlusion_layer_%d/polygon", coords.x, coords.y, E.key.alternative_tile, occlusion_layer), p_new_value); } } @@ -1265,17 +1286,21 @@ void TileDataCollisionEditor::_polygons_changed() { } Variant TileDataCollisionEditor::_get_painted_value() { + Dictionary dict; + dict["linear_velocity"] = dummy_object->get("linear_velocity"); + dict["angular_velocity"] = dummy_object->get("angular_velocity"); Array array; for (int i = 0; i < polygon_editor->get_polygon_count(); i++) { ERR_FAIL_COND_V(polygon_editor->get_polygon(i).size() < 3, Variant()); - Dictionary dict; - dict["points"] = polygon_editor->get_polygon(i); - dict["one_way"] = dummy_object->get(vformat("polygon_%d_one_way", i)); - dict["one_way_margin"] = dummy_object->get(vformat("polygon_%d_one_way_margin", i)); - array.push_back(dict); + Dictionary polygon_dict; + polygon_dict["points"] = polygon_editor->get_polygon(i); + polygon_dict["one_way"] = dummy_object->get(vformat("polygon_%d_one_way", i)); + polygon_dict["one_way_margin"] = dummy_object->get(vformat("polygon_%d_one_way_margin", i)); + array.push_back(polygon_dict); } + dict["polygons"] = array; - return array; + return dict; } void TileDataCollisionEditor::_set_painted_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) { @@ -1291,12 +1316,14 @@ void TileDataCollisionEditor::_set_painted_value(TileSetAtlasSource *p_tile_set_ } _polygons_changed(); + dummy_object->set("linear_velocity", tile_data->get_constant_linear_velocity(physics_layer)); + dummy_object->set("angular_velocity", tile_data->get_constant_angular_velocity(physics_layer)); for (int i = 0; i < tile_data->get_collision_polygons_count(physics_layer); i++) { dummy_object->set(vformat("polygon_%d_one_way", i), tile_data->is_collision_polygon_one_way(physics_layer, i)); dummy_object->set(vformat("polygon_%d_one_way_margin", i), tile_data->get_collision_polygon_one_way_margin(physics_layer, i)); } - for (Map<StringName, EditorProperty *>::Element *E = property_editors.front(); E; E = E->next()) { - E->get()->update_property(); + for (const KeyValue<StringName, EditorProperty *> &E : property_editors) { + E.value->update_property(); } polygon_editor->set_background(p_tile_set_atlas_source->get_texture(), p_tile_set_atlas_source->get_tile_texture_region(p_coords), p_tile_set_atlas_source->get_tile_effective_texture_offset(p_coords, p_alternative_tile), tile_data->get_flip_h(), tile_data->get_flip_v(), tile_data->get_transpose(), tile_data->get_modulate()); @@ -1306,13 +1333,16 @@ void TileDataCollisionEditor::_set_value(TileSetAtlasSource *p_tile_set_atlas_so TileData *tile_data = Object::cast_to<TileData>(p_tile_set_atlas_source->get_tile_data(p_coords, p_alternative_tile)); ERR_FAIL_COND(!tile_data); - Array array = p_value; + Dictionary dict = p_value; + tile_data->set_constant_linear_velocity(physics_layer, dict["linear_velocity"]); + tile_data->set_constant_angular_velocity(physics_layer, dict["angular_velocity"]); + Array array = dict["polygons"]; tile_data->set_collision_polygons_count(physics_layer, array.size()); for (int i = 0; i < array.size(); i++) { - Dictionary dict = array[i]; - tile_data->set_collision_polygon_points(physics_layer, i, dict["points"]); - tile_data->set_collision_polygon_one_way(physics_layer, i, dict["one_way"]); - tile_data->set_collision_polygon_one_way_margin(physics_layer, i, dict["one_way_margin"]); + Dictionary polygon_dict = array[i]; + tile_data->set_collision_polygon_points(physics_layer, i, polygon_dict["points"]); + tile_data->set_collision_polygon_one_way(physics_layer, i, polygon_dict["one_way"]); + tile_data->set_collision_polygon_one_way_margin(physics_layer, i, polygon_dict["one_way_margin"]); } polygon_editor->set_background(p_tile_set_atlas_source->get_texture(), p_tile_set_atlas_source->get_tile_texture_region(p_coords), p_tile_set_atlas_source->get_tile_effective_texture_offset(p_coords, p_alternative_tile), tile_data->get_flip_h(), tile_data->get_flip_v(), tile_data->get_transpose(), tile_data->get_modulate()); @@ -1322,37 +1352,41 @@ Variant TileDataCollisionEditor::_get_value(TileSetAtlasSource *p_tile_set_atlas TileData *tile_data = Object::cast_to<TileData>(p_tile_set_atlas_source->get_tile_data(p_coords, p_alternative_tile)); ERR_FAIL_COND_V(!tile_data, Variant()); + Dictionary dict; + dict["linear_velocity"] = tile_data->get_constant_linear_velocity(physics_layer); + dict["angular_velocity"] = tile_data->get_constant_angular_velocity(physics_layer); Array array; for (int i = 0; i < tile_data->get_collision_polygons_count(physics_layer); i++) { - Dictionary dict; - dict["points"] = tile_data->get_collision_polygon_points(physics_layer, i); - dict["one_way"] = tile_data->is_collision_polygon_one_way(physics_layer, i); - dict["one_way_margin"] = tile_data->get_collision_polygon_one_way_margin(physics_layer, i); - array.push_back(dict); + Dictionary polygon_dict; + polygon_dict["points"] = tile_data->get_collision_polygon_points(physics_layer, i); + polygon_dict["one_way"] = tile_data->is_collision_polygon_one_way(physics_layer, i); + polygon_dict["one_way_margin"] = tile_data->get_collision_polygon_one_way_margin(physics_layer, i); + array.push_back(polygon_dict); } - return array; + dict["polygons"] = array; + return dict; } void TileDataCollisionEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) { Array new_array = p_new_value; - for (Map<TileMapCell, Variant>::Element *E = p_previous_values.front(); E; E = E->next()) { - Array old_array = E->get(); + for (KeyValue<TileMapCell, Variant> &E : p_previous_values) { + Array old_array = E.value; - Vector2i coords = E->key().get_atlas_coords(); - undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygons_count", coords.x, coords.y, E->key().alternative_tile, physics_layer), old_array.size()); + Vector2i coords = E.key.get_atlas_coords(); + undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygons_count", coords.x, coords.y, E.key.alternative_tile, physics_layer), old_array.size()); for (int i = 0; i < old_array.size(); i++) { Dictionary dict = old_array[i]; - undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/points", coords.x, coords.y, E->key().alternative_tile, physics_layer, i), dict["points"]); - undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/one_way", coords.x, coords.y, E->key().alternative_tile, physics_layer, i), dict["one_way"]); - undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/one_way_margin", coords.x, coords.y, E->key().alternative_tile, physics_layer, i), dict["one_way_margin"]); + undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/points", coords.x, coords.y, E.key.alternative_tile, physics_layer, i), dict["points"]); + undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/one_way", coords.x, coords.y, E.key.alternative_tile, physics_layer, i), dict["one_way"]); + undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/one_way_margin", coords.x, coords.y, E.key.alternative_tile, physics_layer, i), dict["one_way_margin"]); } - undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygons_count", coords.x, coords.y, E->key().alternative_tile, physics_layer), new_array.size()); + undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygons_count", coords.x, coords.y, E.key.alternative_tile, physics_layer), new_array.size()); for (int i = 0; i < new_array.size(); i++) { Dictionary dict = new_array[i]; - undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/points", coords.x, coords.y, E->key().alternative_tile, physics_layer, i), dict["points"]); - undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/one_way", coords.x, coords.y, E->key().alternative_tile, physics_layer, i), dict["one_way"]); - undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/one_way_margin", coords.x, coords.y, E->key().alternative_tile, physics_layer, i), dict["one_way_margin"]); + undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/points", coords.x, coords.y, E.key.alternative_tile, physics_layer, i), dict["points"]); + undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/one_way", coords.x, coords.y, E.key.alternative_tile, physics_layer, i), dict["one_way"]); + undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/one_way_margin", coords.x, coords.y, E.key.alternative_tile, physics_layer, i), dict["one_way_margin"]); } } } @@ -1378,6 +1412,27 @@ TileDataCollisionEditor::TileDataCollisionEditor() { polygon_editor->connect("polygons_changed", callable_mp(this, &TileDataCollisionEditor::_polygons_changed)); add_child(polygon_editor); + dummy_object->add_dummy_property("linear_velocity"); + dummy_object->set("linear_velocity", Vector2()); + dummy_object->add_dummy_property("angular_velocity"); + dummy_object->set("angular_velocity", 0.0); + + EditorProperty *linear_velocity_editor = EditorInspectorDefaultPlugin::get_editor_for_property(dummy_object, Variant::VECTOR2, "linear_velocity", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT); + linear_velocity_editor->set_object_and_property(dummy_object, "linear_velocity"); + linear_velocity_editor->set_label("linear_velocity"); + linear_velocity_editor->connect("property_changed", callable_mp(this, &TileDataCollisionEditor::_property_value_changed).unbind(1)); + linear_velocity_editor->update_property(); + add_child(linear_velocity_editor); + property_editors["linear_velocity"] = linear_velocity_editor; + + EditorProperty *angular_velocity_editor = EditorInspectorDefaultPlugin::get_editor_for_property(dummy_object, Variant::FLOAT, "angular_velocity", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT); + angular_velocity_editor->set_object_and_property(dummy_object, "angular_velocity"); + angular_velocity_editor->set_label("angular_velocity"); + angular_velocity_editor->connect("property_changed", callable_mp(this, &TileDataCollisionEditor::_property_value_changed).unbind(1)); + angular_velocity_editor->update_property(); + add_child(angular_velocity_editor); + property_editors["angular_velocity"] = linear_velocity_editor; + _polygons_changed(); } @@ -1976,16 +2031,16 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t drag_type = DRAG_TYPE_NONE; } else if (drag_type == DRAG_TYPE_PAINT_TERRAIN_SET) { undo_redo->create_action(TTR("Painting Terrain Set")); - for (Map<TileMapCell, Variant>::Element *E = drag_modified.front(); E; E = E->next()) { - Dictionary dict = E->get(); - Vector2i coords = E->key().get_atlas_coords(); - undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain_set", coords.x, coords.y, E->key().alternative_tile), drag_painted_value); - undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain_set", coords.x, coords.y, E->key().alternative_tile), dict["terrain_set"]); + for (KeyValue<TileMapCell, Variant> &E : drag_modified) { + Dictionary dict = E.value; + Vector2i coords = E.key.get_atlas_coords(); + undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain_set", coords.x, coords.y, E.key.alternative_tile), drag_painted_value); + undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain_set", coords.x, coords.y, E.key.alternative_tile), dict["terrain_set"]); Array array = dict["terrain_peering_bits"]; for (int i = 0; i < array.size(); i++) { TileSet::CellNeighbor bit = TileSet::CellNeighbor(i); if (tile_set->is_valid_peering_bit_terrain(dict["terrain_set"], bit)) { - undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E->key().alternative_tile), array[i]); + undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E.key.alternative_tile), array[i]); } } } @@ -1996,17 +2051,17 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t int terrain_set = int(painted["terrain_set"]); int terrain = int(painted["terrain"]); undo_redo->create_action(TTR("Painting Terrain")); - for (Map<TileMapCell, Variant>::Element *E = drag_modified.front(); E; E = E->next()) { - Dictionary dict = E->get(); - Vector2i coords = E->key().get_atlas_coords(); + for (KeyValue<TileMapCell, Variant> &E : drag_modified) { + Dictionary dict = E.value; + Vector2i coords = E.key.get_atlas_coords(); Array array = dict["terrain_peering_bits"]; for (int i = 0; i < array.size(); i++) { TileSet::CellNeighbor bit = TileSet::CellNeighbor(i); if (tile_set->is_valid_peering_bit_terrain(terrain_set, bit)) { - undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E->key().alternative_tile), terrain); + undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E.key.alternative_tile), terrain); } if (tile_set->is_valid_peering_bit_terrain(dict["terrain_set"], bit)) { - undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E->key().alternative_tile), array[i]); + undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E.key.alternative_tile), array[i]); } } } @@ -2259,14 +2314,14 @@ void TileDataTerrainsEditor::forward_painting_alternatives_gui_input(TileAtlasVi } else { if (drag_type == DRAG_TYPE_PAINT_TERRAIN_SET) { undo_redo->create_action(TTR("Painting Tiles Property")); - for (Map<TileMapCell, Variant>::Element *E = drag_modified.front(); E; E = E->next()) { - Dictionary dict = E->get(); - Vector2i coords = E->key().get_atlas_coords(); - undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain_set", coords.x, coords.y, E->key().alternative_tile), dict["terrain_set"]); - undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain_set", coords.x, coords.y, E->key().alternative_tile), drag_painted_value); + for (KeyValue<TileMapCell, Variant> &E : drag_modified) { + Dictionary dict = E.value; + Vector2i coords = E.key.get_atlas_coords(); + undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain_set", coords.x, coords.y, E.key.alternative_tile), dict["terrain_set"]); + undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain_set", coords.x, coords.y, E.key.alternative_tile), drag_painted_value); Array array = dict["terrain_peering_bits"]; for (int i = 0; i < array.size(); i++) { - undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E->key().alternative_tile), array[i]); + undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E.key.alternative_tile), array[i]); } } undo_redo->commit_action(false); @@ -2276,17 +2331,17 @@ void TileDataTerrainsEditor::forward_painting_alternatives_gui_input(TileAtlasVi int terrain_set = int(painted["terrain_set"]); int terrain = int(painted["terrain"]); undo_redo->create_action(TTR("Painting Terrain")); - for (Map<TileMapCell, Variant>::Element *E = drag_modified.front(); E; E = E->next()) { - Dictionary dict = E->get(); - Vector2i coords = E->key().get_atlas_coords(); + for (KeyValue<TileMapCell, Variant> &E : drag_modified) { + Dictionary dict = E.value; + Vector2i coords = E.key.get_atlas_coords(); Array array = dict["terrain_peering_bits"]; for (int i = 0; i < array.size(); i++) { TileSet::CellNeighbor bit = TileSet::CellNeighbor(i); if (tile_set->is_valid_peering_bit_terrain(terrain_set, bit)) { - undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E->key().alternative_tile), terrain); + undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E.key.alternative_tile), terrain); } if (tile_set->is_valid_peering_bit_terrain(dict["terrain_set"], bit)) { - undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E->key().alternative_tile), array[i]); + undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E.key.alternative_tile), array[i]); } } } @@ -2398,10 +2453,10 @@ Variant TileDataNavigationEditor::_get_value(TileSetAtlasSource *p_tile_set_atla } void TileDataNavigationEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) { - for (Map<TileMapCell, Variant>::Element *E = p_previous_values.front(); E; E = E->next()) { - Vector2i coords = E->key().get_atlas_coords(); - undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/navigation_layer_%d/polygon", coords.x, coords.y, E->key().alternative_tile, navigation_layer), E->get()); - undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/navigation_layer_%d/polygon", coords.x, coords.y, E->key().alternative_tile, navigation_layer), p_new_value); + for (const KeyValue<TileMapCell, Variant> &E : p_previous_values) { + Vector2i coords = E.key.get_atlas_coords(); + undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/navigation_layer_%d/polygon", coords.x, coords.y, E.key.alternative_tile, navigation_layer), E.value); + undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/navigation_layer_%d/polygon", coords.x, coords.y, E.key.alternative_tile, navigation_layer), p_new_value); } } diff --git a/editor/plugins/tiles/tile_data_editors.h b/editor/plugins/tiles/tile_data_editors.h index 99998dc779..acb4c5882d 100644 --- a/editor/plugins/tiles/tile_data_editors.h +++ b/editor/plugins/tiles/tile_data_editors.h @@ -45,7 +45,9 @@ class TileDataEditor : public VBoxContainer { GDCLASS(TileDataEditor, VBoxContainer); private: - void _call_tile_set_changed(); + bool _tile_set_changed_update_needed = false; + void _tile_set_changed_plan_update(); + void _tile_set_changed_deferred_update(); protected: Ref<TileSet> tile_set; diff --git a/editor/plugins/tiles/tile_map_editor.cpp b/editor/plugins/tiles/tile_map_editor.cpp index 8b5b576369..5dfa44a353 100644 --- a/editor/plugins/tiles/tile_map_editor.cpp +++ b/editor/plugins/tiles/tile_map_editor.cpp @@ -36,6 +36,7 @@ #include "editor/editor_scale.h" #include "editor/plugins/canvas_item_editor_plugin.h" +#include "scene/2d/camera_2d.h" #include "scene/gui/center_container.h" #include "scene/gui/split_container.h" @@ -43,31 +44,11 @@ #include "core/math/geometry_2d.h" #include "core/os/keyboard.h" -void TileMapEditorTilesPlugin::_notification(int p_what) { - switch (p_what) { - case NOTIFICATION_ENTER_TREE: - case NOTIFICATION_THEME_CHANGED: - select_tool_button->set_icon(get_theme_icon(SNAME("ToolSelect"), SNAME("EditorIcons"))); - paint_tool_button->set_icon(get_theme_icon(SNAME("Edit"), SNAME("EditorIcons"))); - line_tool_button->set_icon(get_theme_icon(SNAME("CurveLinear"), SNAME("EditorIcons"))); - rect_tool_button->set_icon(get_theme_icon(SNAME("Rectangle"), SNAME("EditorIcons"))); - bucket_tool_button->set_icon(get_theme_icon(SNAME("Bucket"), SNAME("EditorIcons"))); - - picker_button->set_icon(get_theme_icon(SNAME("ColorPick"), SNAME("EditorIcons"))); - erase_button->set_icon(get_theme_icon(SNAME("Eraser"), SNAME("EditorIcons"))); - - missing_atlas_texture_icon = get_theme_icon(SNAME("TileSet"), SNAME("EditorIcons")); - break; - case NOTIFICATION_VISIBILITY_CHANGED: - _stop_dragging(); - break; - } -} - void TileMapEditorTilesPlugin::tile_set_changed() { _update_fix_selected_and_hovered(); _update_tile_set_sources_list(); - _update_bottom_panel(); + _update_source_display(); + _update_patterns_list(); } void TileMapEditorTilesPlugin::_on_random_tile_checkbox_toggled(bool p_pressed) { @@ -125,8 +106,19 @@ void TileMapEditorTilesPlugin::_update_toolbar() { } } -Control *TileMapEditorTilesPlugin::get_toolbar() const { - return toolbar; +Vector<TileMapEditorPlugin::TabData> TileMapEditorTilesPlugin::get_tabs() const { + Vector<TileMapEditorPlugin::TabData> tabs; + tabs.push_back({ toolbar, tiles_bottom_panel }); + tabs.push_back({ toolbar, patterns_bottom_panel }); + return tabs; +} + +void TileMapEditorTilesPlugin::_tab_changed() { + if (tiles_bottom_panel->is_visible_in_tree()) { + _update_selection_pattern_from_tileset_tiles_selection(); + } else if (patterns_bottom_panel->is_visible_in_tree()) { + _update_selection_pattern_from_tileset_pattern_selection(); + } } void TileMapEditorTilesPlugin::_update_tile_set_sources_list() { @@ -152,22 +144,31 @@ void TileMapEditorTilesPlugin::_update_tile_set_sources_list() { Ref<Texture2D> texture; String item_text; + // Common to all type of sources. + if (!source->get_name().is_empty()) { + item_text = vformat(TTR("%s (id:%d)"), source->get_name(), source_id); + } + // Atlas source. TileSetAtlasSource *atlas_source = Object::cast_to<TileSetAtlasSource>(source); if (atlas_source) { texture = atlas_source->get_texture(); - if (texture.is_valid()) { - item_text = vformat("%s (ID: %d)", texture->get_path().get_file(), source_id); - } else { - item_text = vformat("No Texture Atlas Source (ID: %d)", source_id); + if (item_text.is_empty()) { + if (texture.is_valid()) { + item_text = vformat("%s (ID: %d)", texture->get_path().get_file(), source_id); + } else { + item_text = vformat("No Texture Atlas Source (ID: %d)", source_id); + } } } // Scene collection source. TileSetScenesCollectionSource *scene_collection_source = Object::cast_to<TileSetScenesCollectionSource>(source); if (scene_collection_source) { - texture = get_theme_icon(SNAME("PackedScene"), SNAME("EditorIcons")); - item_text = vformat(TTR("Scene Collection Source (ID: %d)"), source_id); + texture = tiles_bottom_panel->get_theme_icon(SNAME("PackedScene"), SNAME("EditorIcons")); + if (item_text.is_empty()) { + item_text = vformat(TTR("Scene Collection Source (ID: %d)"), source_id); + } } // Use default if not valid. @@ -193,10 +194,10 @@ void TileMapEditorTilesPlugin::_update_tile_set_sources_list() { } // Synchronize - TilesEditor::get_singleton()->set_sources_lists_current(sources_list->get_current()); + TilesEditorPlugin::get_singleton()->set_sources_lists_current(sources_list->get_current()); } -void TileMapEditorTilesPlugin::_update_bottom_panel() { +void TileMapEditorTilesPlugin::_update_source_display() { // Update the atlas display. TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { @@ -243,6 +244,81 @@ void TileMapEditorTilesPlugin::_update_bottom_panel() { } } +void TileMapEditorTilesPlugin::_patterns_item_list_gui_input(const Ref<InputEvent> &p_event) { + 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; + } + + if (ED_IS_SHORTCUT("tiles_editor/paste", p_event) && p_event->is_pressed() && !p_event->is_echo()) { + select_last_pattern = true; + int new_pattern_index = tile_set->get_patterns_count(); + undo_redo->create_action(TTR("Add TileSet pattern")); + undo_redo->add_do_method(*tile_set, "add_pattern", tile_map_clipboard, new_pattern_index); + undo_redo->add_undo_method(*tile_set, "remove_pattern", new_pattern_index); + undo_redo->commit_action(); + patterns_item_list->accept_event(); + } + + if (ED_IS_SHORTCUT("tiles_editor/delete", p_event) && p_event->is_pressed() && !p_event->is_echo()) { + Vector<int> selected = patterns_item_list->get_selected_items(); + undo_redo->create_action(TTR("Remove TileSet patterns")); + for (int i = 0; i < selected.size(); i++) { + int pattern_index = selected[i]; + undo_redo->add_do_method(*tile_set, "remove_pattern", pattern_index); + undo_redo->add_undo_method(*tile_set, "add_pattern", tile_set->get_pattern(pattern_index), pattern_index); + } + undo_redo->commit_action(); + patterns_item_list->accept_event(); + } +} + +void TileMapEditorTilesPlugin::_pattern_preview_done(Ref<TileMapPattern> p_pattern, Ref<Texture2D> p_texture) { + // TODO optimize ? + for (int i = 0; i < patterns_item_list->get_item_count(); i++) { + if (patterns_item_list->get_item_metadata(i) == p_pattern) { + patterns_item_list->set_item_icon(i, p_texture); + break; + } + } +} + +void TileMapEditorTilesPlugin::_update_patterns_list() { + 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; + } + + // Recreate the items. + patterns_item_list->clear(); + for (int i = 0; i < tile_set->get_patterns_count(); i++) { + int id = patterns_item_list->add_item(""); + patterns_item_list->set_item_metadata(id, tile_set->get_pattern(i)); + TilesEditorPlugin::get_singleton()->queue_pattern_preview(tile_set, tile_set->get_pattern(i), callable_mp(this, &TileMapEditorTilesPlugin::_pattern_preview_done)); + } + + // Update the label visibility. + patterns_help_label->set_visible(patterns_item_list->get_item_count() == 0); + + // Added a new pattern, thus select the last one. + if (select_last_pattern) { + patterns_item_list->select(tile_set->get_patterns_count() - 1); + patterns_item_list->grab_focus(); + _update_selection_pattern_from_tileset_pattern_selection(); + } + select_last_pattern = false; +} + void TileMapEditorTilesPlugin::_update_atlas_view() { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { @@ -260,7 +336,7 @@ void TileMapEditorTilesPlugin::_update_atlas_view() { ERR_FAIL_COND(!atlas_source); tile_atlas_view->set_atlas_source(*tile_map->get_tileset(), atlas_source, source_id); - TilesEditor::get_singleton()->synchronize_atlas_view(tile_atlas_view); + TilesEditorPlugin::get_singleton()->synchronize_atlas_view(tile_atlas_view); tile_atlas_control->update(); } @@ -295,7 +371,7 @@ void TileMapEditorTilesPlugin::_update_scenes_collection_view() { Variant udata = i; EditorResourcePreview::get_singleton()->queue_edited_resource_preview(scene, this, "_scene_thumbnail_done", udata); } else { - item_index = scene_tiles_list->add_item(TTR("Tile with Invalid Scene"), get_theme_icon(SNAME("PackedScene"), SNAME("EditorIcons"))); + item_index = scene_tiles_list->add_item(TTR("Tile with Invalid Scene"), tiles_bottom_panel->get_theme_icon(SNAME("PackedScene"), SNAME("EditorIcons"))); } scene_tiles_list->set_item_metadata(item_index, scene_id); @@ -351,19 +427,32 @@ void TileMapEditorTilesPlugin::_scenes_list_multi_selected(int p_index, bool p_s } } - _update_selection_pattern_from_tileset_selection(); + _update_selection_pattern_from_tileset_tiles_selection(); } void TileMapEditorTilesPlugin::_scenes_list_nothing_selected() { scene_tiles_list->deselect_all(); tile_set_selection.clear(); tile_map_selection.clear(); - selection_pattern->clear(); - _update_selection_pattern_from_tileset_selection(); + selection_pattern.instantiate(); + _update_selection_pattern_from_tileset_tiles_selection(); +} + +void TileMapEditorTilesPlugin::_update_theme() { + select_tool_button->set_icon(tiles_bottom_panel->get_theme_icon(SNAME("ToolSelect"), SNAME("EditorIcons"))); + paint_tool_button->set_icon(tiles_bottom_panel->get_theme_icon(SNAME("Edit"), SNAME("EditorIcons"))); + line_tool_button->set_icon(tiles_bottom_panel->get_theme_icon(SNAME("CurveLinear"), SNAME("EditorIcons"))); + rect_tool_button->set_icon(tiles_bottom_panel->get_theme_icon(SNAME("Rectangle"), SNAME("EditorIcons"))); + bucket_tool_button->set_icon(tiles_bottom_panel->get_theme_icon(SNAME("Bucket"), SNAME("EditorIcons"))); + + picker_button->set_icon(tiles_bottom_panel->get_theme_icon(SNAME("ColorPick"), SNAME("EditorIcons"))); + erase_button->set_icon(tiles_bottom_panel->get_theme_icon(SNAME("Eraser"), SNAME("EditorIcons"))); + + missing_atlas_texture_icon = tiles_bottom_panel->get_theme_icon(SNAME("TileSet"), SNAME("EditorIcons")); } bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p_event) { - if (!is_visible_in_tree()) { + if (!(tiles_bottom_panel->is_visible_in_tree() || patterns_bottom_panel->is_visible_in_tree())) { // If the bottom editor is not visible, we ignore inputs. return false; } @@ -391,7 +480,7 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p if (ED_IS_SHORTCUT("tiles_editor/cut", p_event) || ED_IS_SHORTCUT("tiles_editor/copy", p_event)) { // Fill in the clipboard. if (!tile_map_selection.is_empty()) { - memdelete(tile_map_clipboard); + tile_map_clipboard.instantiate(); TypedArray<Vector2i> coords_array; for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { coords_array.push_back(E->get()); @@ -455,34 +544,36 @@ 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); - for (Map<Vector2i, TileMapCell>::Element *E = to_draw.front(); E; E = E->next()) { - if (!erase_button->is_pressed() && E->get().source_id == TileSet::INVALID_SOURCE) { + for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { + if (!_is_erasing() && E.value.source_id == TileSet::INVALID_SOURCE) { continue; } - Vector2i coords = E->key(); + 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->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); + tile_map->set_cell(tile_map_layer, coords, E.value.source_id, E.value.get_atlas_coords(), E.value.alternative_tile); } + _fix_invalid_tiles_in_tile_map_selection(); } break; case DRAG_TYPE_BUCKET: { 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()); - for (Map<Vector2i, TileMapCell>::Element *E = to_draw.front(); E; E = E->next()) { - if (!erase_button->is_pressed() && E->get().source_id == TileSet::INVALID_SOURCE) { + for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { + if (!_is_erasing() && E.value.source_id == TileSet::INVALID_SOURCE) { continue; } - Vector2i coords = E->key(); + 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->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); + tile_map->set_cell(tile_map_layer, coords, E.value.source_id, E.value.get_atlas_coords(), E.value.alternative_tile); } } } + _fix_invalid_tiles_in_tile_map_selection(); } break; default: break; @@ -499,8 +590,12 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p 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()) { + if (mb->get_button_index() == MOUSE_BUTTON_RIGHT) { + rmb_erasing = true; + } + // Pressed if (drag_type == DRAG_TYPE_CLIPBOARD_PASTE) { // Do nothing. @@ -508,6 +603,7 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p drag_start_mouse_pos = mpos; if (tile_map_selection.has(tile_map->world_to_map(drag_start_mouse_pos)) && !mb->is_shift_pressed()) { // Move the selection + _update_selection_pattern_from_tilemap_selection(); // Make sure the pattern is up to date before moving. drag_type = DRAG_TYPE_MOVE; drag_modified.clear(); for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { @@ -521,31 +617,32 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p } } else { // Check if we are picking a tile. - if (picker_button->is_pressed()) { + if (picker_button->is_pressed() || (Input::get_singleton()->is_key_pressed(KEY_CTRL) && !Input::get_singleton()->is_key_pressed(KEY_SHIFT))) { drag_type = DRAG_TYPE_PICK; drag_start_mouse_pos = mpos; } else { // Paint otherwise. - if (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)) { 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); - for (Map<Vector2i, TileMapCell>::Element *E = to_draw.front(); E; E = E->next()) { - if (!erase_button->is_pressed() && E->get().source_id == TileSet::INVALID_SOURCE) { + for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { + if (!_is_erasing() && E.value.source_id == TileSet::INVALID_SOURCE) { continue; } - Vector2i coords = E->key(); + 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->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); + tile_map->set_cell(tile_map_layer, coords, E.value.source_id, E.value.get_atlas_coords(), E.value.alternative_tile); } - } else if (tool_buttons_group->get_pressed_button() == line_tool_button) { + _fix_invalid_tiles_in_tile_map_selection(); + } 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))) { drag_type = DRAG_TYPE_LINE; drag_start_mouse_pos = mpos; drag_modified.clear(); - } else if (tool_buttons_group->get_pressed_button() == rect_tool_button) { + } 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))) { drag_type = DRAG_TYPE_RECT; drag_start_mouse_pos = mpos; drag_modified.clear(); @@ -557,18 +654,19 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p 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()); - for (Map<Vector2i, TileMapCell>::Element *E = to_draw.front(); E; E = E->next()) { - if (!erase_button->is_pressed() && E->get().source_id == TileSet::INVALID_SOURCE) { + for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { + if (!_is_erasing() && E.value.source_id == TileSet::INVALID_SOURCE) { continue; } - Vector2i coords = E->key(); + 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->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); + tile_map->set_cell(tile_map_layer, coords, E.value.source_id, E.value.get_atlas_coords(), E.value.alternative_tile); } } } + _fix_invalid_tiles_in_tile_map_selection(); } } } @@ -576,6 +674,9 @@ 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; + } } CanvasItemEditor::get_singleton()->update_viewport(); @@ -612,7 +713,7 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over Vector2i tile_shape_size = tile_set->get_tile_size(); // Draw the selection. - if (is_visible_in_tree() && tool_buttons_group->get_pressed_button() == select_tool_button) { + if ((tiles_bottom_panel->is_visible_in_tree() || patterns_bottom_panel->is_visible_in_tree()) && tool_buttons_group->get_pressed_button() == select_tool_button) { // In select mode, we only draw the current selection if we are modifying it (pressing control or shift). if (drag_type == DRAG_TYPE_MOVE || (drag_type == DRAG_TYPE_SELECT && !Input::get_singleton()->is_key_pressed(KEY_CTRL) && !Input::get_singleton()->is_key_pressed(KEY_SHIFT))) { // Do nothing @@ -624,7 +725,7 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over } // Handle the preview of the tiles to be placed. - if (is_visible_in_tree() && has_mouse) { // Only if the tilemap editor is opened and the viewport is hovered. + if ((tiles_bottom_panel->is_visible_in_tree() || patterns_bottom_panel->is_visible_in_tree()) && has_mouse) { // Only if the tilemap editor is opened and the viewport is hovered. Map<Vector2i, TileMapCell> preview; Rect2i drawn_grid_rect; @@ -658,21 +759,23 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over } tile_map->draw_cells_outline(p_overlay, to_draw, Color(1.0, 1.0, 1.0), xform); } else if (drag_type == DRAG_TYPE_MOVE) { - // Preview when moving. - Vector2i top_left; - if (!tile_map_selection.is_empty()) { - top_left = tile_map_selection.front()->get(); - } - for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { - top_left = top_left.min(E->get()); - } - Vector2i offset = drag_start_mouse_pos - tile_map->map_to_world(top_left); - offset = tile_map->world_to_map(drag_last_mouse_pos - offset) - tile_map->world_to_map(drag_start_mouse_pos - offset); + if (!(patterns_item_list->is_visible_in_tree() && patterns_item_list->has_point(patterns_item_list->get_local_mouse_position()))) { + // Preview when moving. + Vector2i top_left; + if (!tile_map_selection.is_empty()) { + top_left = tile_map_selection.front()->get(); + } + for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { + top_left = top_left.min(E->get()); + } + Vector2i offset = drag_start_mouse_pos - tile_map->map_to_world(top_left); + offset = tile_map->world_to_map(drag_last_mouse_pos - offset) - tile_map->world_to_map(drag_start_mouse_pos - offset); - TypedArray<Vector2i> selection_used_cells = selection_pattern->get_used_cells(); - for (int i = 0; i < selection_used_cells.size(); i++) { - Vector2i coords = tile_map->map_pattern(offset + top_left, selection_used_cells[i], selection_pattern); - preview[coords] = TileMapCell(selection_pattern->get_cell_source_id(selection_used_cells[i]), selection_pattern->get_cell_atlas_coords(selection_used_cells[i]), selection_pattern->get_cell_alternative_tile(selection_used_cells[i])); + TypedArray<Vector2i> selection_used_cells = selection_pattern->get_used_cells(); + for (int i = 0; i < selection_used_cells.size(); i++) { + Vector2i coords = tile_map->map_pattern(offset + top_left, selection_used_cells[i], selection_pattern); + preview[coords] = TileMapCell(selection_pattern->get_cell_source_id(selection_used_cells[i]), selection_pattern->get_cell_atlas_coords(selection_used_cells[i]), selection_pattern->get_cell_alternative_tile(selection_used_cells[i])); + } } } else if (drag_type == DRAG_TYPE_CLIPBOARD_PASTE) { // Preview when pasting. @@ -682,13 +785,13 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over Vector2i coords = tile_map->map_pattern(tile_map->world_to_map(drag_last_mouse_pos - mouse_offset), clipboard_used_cells[i], tile_map_clipboard); preview[coords] = TileMapCell(tile_map_clipboard->get_cell_source_id(clipboard_used_cells[i]), tile_map_clipboard->get_cell_atlas_coords(clipboard_used_cells[i]), tile_map_clipboard->get_cell_alternative_tile(clipboard_used_cells[i])); } - } else if (!picker_button->is_pressed()) { + } 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 pattern. preview = _draw_line(drag_last_mouse_pos, drag_last_mouse_pos, drag_last_mouse_pos); expand_grid = true; - } else if (tool_buttons_group->get_pressed_button() == line_tool_button) { + } 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); @@ -698,20 +801,20 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over preview = _draw_line(drag_start_mouse_pos, drag_start_mouse_pos, drag_last_mouse_pos); expand_grid = true; } - } else if (tool_buttons_group->get_pressed_button() == rect_tool_button && drag_type == DRAG_TYPE_RECT) { - // Preview for a line pattern. + } 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)); expand_grid = true; } else if (tool_buttons_group->get_pressed_button() == bucket_tool_button && drag_type == DRAG_TYPE_NONE) { - // Preview for a line pattern. + // Preview for a fill pattern. preview = _draw_bucket_fill(tile_map->world_to_map(drag_last_mouse_pos), bucket_continuous_checkbox->is_pressed()); } // Expand the grid if needed if (expand_grid && !preview.is_empty()) { drawn_grid_rect = Rect2i(preview.front()->key(), Vector2i(1, 1)); - for (Map<Vector2i, TileMapCell>::Element *E = preview.front(); E; E = E->next()) { - drawn_grid_rect.expand_to(E->key()); + for (const KeyValue<Vector2i, TileMapCell> &E : preview) { + drawn_grid_rect.expand_to(E.key); } } } @@ -748,23 +851,23 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over } // Draw the preview. - for (Map<Vector2i, TileMapCell>::Element *E = preview.front(); E; E = E->next()) { + for (const KeyValue<Vector2i, TileMapCell> &E : preview) { Transform2D tile_xform; - tile_xform.set_origin(tile_map->map_to_world(E->key())); + tile_xform.set_origin(tile_map->map_to_world(E.key)); tile_xform.set_scale(tile_set->get_tile_size()); - if (!erase_button->is_pressed() && random_tile_checkbox->is_pressed()) { + if (!_is_erasing() && 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->get().source_id)) { - TileSetSource *source = *tile_set->get_source(E->get().source_id); + if (tile_set->has_source(E.value.source_id)) { + TileSetSource *source = *tile_set->get_source(E.value.source_id); TileSetAtlasSource *atlas_source = Object::cast_to<TileSetAtlasSource>(source); if (atlas_source) { // Get tile data. - TileData *tile_data = Object::cast_to<TileData>(atlas_source->get_tile_data(E->get().get_atlas_coords(), E->get().alternative_tile)); + TileData *tile_data = Object::cast_to<TileData>(atlas_source->get_tile_data(E.value.get_atlas_coords(), E.value.alternative_tile)); // Compute the offset - Rect2i source_rect = atlas_source->get_tile_texture_region(E->get().get_atlas_coords()); - Vector2i tile_offset = atlas_source->get_tile_effective_texture_offset(E->get().get_atlas_coords(), E->get().alternative_tile); + Rect2i source_rect = atlas_source->get_tile_texture_region(E.value.get_atlas_coords()); + Vector2i tile_offset = atlas_source->get_tile_effective_texture_offset(E.value.get_atlas_coords(), E.value.alternative_tile); // Compute the destination rectangle in the CanvasItem. Rect2 dest_rect; @@ -772,9 +875,9 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over bool transpose = tile_data->get_transpose(); if (transpose) { - dest_rect.position = (tile_map->map_to_world(E->key()) - Vector2(dest_rect.size.y, dest_rect.size.x) / 2 - tile_offset); + dest_rect.position = (tile_map->map_to_world(E.key) - Vector2(dest_rect.size.y, dest_rect.size.x) / 2 - tile_offset); } else { - dest_rect.position = (tile_map->map_to_world(E->key()) - dest_rect.size / 2 - tile_offset); + dest_rect.position = (tile_map->map_to_world(E.key) - dest_rect.size / 2 - tile_offset); } dest_rect = xform.xform(dest_rect); @@ -811,7 +914,7 @@ void TileMapEditorTilesPlugin::_mouse_exited_viewport() { CanvasItemEditor::get_singleton()->update_viewport(); } -TileMapCell TileMapEditorTilesPlugin::_pick_random_tile(const TileMapPattern *p_pattern) { +TileMapCell TileMapEditorTilesPlugin::_pick_random_tile(Ref<TileMapPattern> p_pattern) { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { return TileMapCell(); @@ -875,14 +978,15 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_line(Vector2 p_start_ } // Get or create the pattern. - TileMapPattern erase_pattern; - erase_pattern.set_cell(Vector2i(0, 0), TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE); - TileMapPattern *pattern = erase_button->is_pressed() ? &erase_pattern : selection_pattern; + 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; Map<Vector2i, TileMapCell> output; if (!pattern->is_empty()) { // Paint the tiles on the tile map. - if (!erase_button->is_pressed() && random_tile_checkbox->is_pressed()) { + if (!_is_erasing() && 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++) { @@ -927,9 +1031,11 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_rect(Vector2i p_start rect.size += Vector2i(1, 1); // Get or create the pattern. - TileMapPattern erase_pattern; - erase_pattern.set_cell(Vector2i(0, 0), TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE); - TileMapPattern *pattern = erase_button->is_pressed() ? &erase_pattern : selection_pattern; + 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; + Map<Vector2i, TileMapCell> err_output; ERR_FAIL_COND_V(pattern->is_empty(), err_output); @@ -940,7 +1046,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_rect(Vector2i p_start Map<Vector2i, TileMapCell> output; if (!pattern->is_empty()) { - if (!erase_button->is_pressed() && random_tile_checkbox->is_pressed()) { + if (!_is_erasing() && 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++) { @@ -986,9 +1092,10 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_bucket_fill(Vector2i } // Get or create the pattern. - TileMapPattern erase_pattern; - erase_pattern.set_cell(Vector2i(0, 0), TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE); - TileMapPattern *pattern = erase_button->is_pressed() ? &erase_pattern : selection_pattern; + 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; if (!pattern->is_empty()) { TileMapCell source = tile_map->get_cell(tile_map_layer, p_coords); @@ -1012,7 +1119,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_bucket_fill(Vector2i 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 (!erase_button->is_pressed() && random_tile_checkbox->is_pressed()) { + if (!_is_erasing() && random_tile_checkbox->is_pressed()) { // Paint a random tile. output.insert(coords, _pick_random_tile(pattern)); } else { @@ -1041,7 +1148,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_bucket_fill(Vector2i TypedArray<Vector2i> to_check; if (source.source_id == TileSet::INVALID_SOURCE) { Rect2i rect = tile_map->get_used_rect(); - if (rect.size.x <= 0 || rect.size.y <= 0) { + if (rect.has_no_area()) { rect = Rect2i(p_coords, Vector2i(1, 1)); } for (int x = boundaries.position.x; x < boundaries.get_end().x; x++) { @@ -1058,7 +1165,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_bucket_fill(Vector2i 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 (!erase_button->is_pressed() && random_tile_checkbox->is_pressed()) { + if (!_is_erasing() && random_tile_checkbox->is_pressed()) { // Paint a random tile. output.insert(coords, _pick_random_tile(pattern)); } else { @@ -1132,60 +1239,80 @@ void TileMapEditorTilesPlugin::_stop_dragging() { _update_tileset_selection_from_selection_pattern(); } break; case DRAG_TYPE_MOVE: { - Vector2i top_left; - if (!tile_map_selection.is_empty()) { - top_left = tile_map_selection.front()->get(); - } - for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { - top_left = top_left.min(E->get()); - } + if (patterns_item_list->is_visible_in_tree() && patterns_item_list->has_point(patterns_item_list->get_local_mouse_position())) { + // Restore the cells. + for (KeyValue<Vector2i, TileMapCell> kv : drag_modified) { + tile_map->set_cell(tile_map_layer, kv.key, kv.value.source_id, kv.value.get_atlas_coords(), kv.value.alternative_tile); + } - Vector2i offset = drag_start_mouse_pos - tile_map->map_to_world(top_left); - offset = tile_map->world_to_map(mpos - offset) - tile_map->world_to_map(drag_start_mouse_pos - offset); + // Creating a pattern in the pattern list. + select_last_pattern = true; + int new_pattern_index = tile_set->get_patterns_count(); + undo_redo->create_action(TTR("Add TileSet pattern")); + undo_redo->add_do_method(*tile_set, "add_pattern", selection_pattern, new_pattern_index); + undo_redo->add_undo_method(*tile_set, "remove_pattern", new_pattern_index); + undo_redo->commit_action(); + } else { + // Get the top-left cell. + Vector2i top_left; + if (!tile_map_selection.is_empty()) { + top_left = tile_map_selection.front()->get(); + } + for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { + top_left = top_left.min(E->get()); + } - TypedArray<Vector2i> selection_used_cells = selection_pattern->get_used_cells(); + // Get the offset from the mouse. + Vector2i offset = drag_start_mouse_pos - tile_map->map_to_world(top_left); + offset = tile_map->world_to_map(mpos - offset) - tile_map->world_to_map(drag_start_mouse_pos - offset); - Vector2i coords; - Map<Vector2i, TileMapCell> cells_undo; - for (int i = 0; i < selection_used_cells.size(); i++) { - coords = tile_map->map_pattern(top_left, selection_used_cells[i], selection_pattern); - cells_undo[coords] = TileMapCell(drag_modified[coords].source_id, drag_modified[coords].get_atlas_coords(), drag_modified[coords].alternative_tile); - coords = tile_map->map_pattern(top_left + offset, selection_used_cells[i], selection_pattern); - cells_undo[coords] = TileMapCell(tile_map->get_cell_source_id(tile_map_layer, coords), tile_map->get_cell_atlas_coords(tile_map_layer, coords), tile_map->get_cell_alternative_tile(tile_map_layer, coords)); - } + TypedArray<Vector2i> selection_used_cells = selection_pattern->get_used_cells(); - Map<Vector2i, TileMapCell> cells_do; - for (int i = 0; i < selection_used_cells.size(); i++) { - coords = tile_map->map_pattern(top_left, selection_used_cells[i], selection_pattern); - cells_do[coords] = TileMapCell(); - } - for (int i = 0; i < selection_used_cells.size(); i++) { - coords = tile_map->map_pattern(top_left + offset, selection_used_cells[i], selection_pattern); - cells_do[coords] = TileMapCell(selection_pattern->get_cell_source_id(selection_used_cells[i]), selection_pattern->get_cell_atlas_coords(selection_used_cells[i]), selection_pattern->get_cell_alternative_tile(selection_used_cells[i])); - } - undo_redo->create_action(TTR("Move tiles")); - // Move the tiles. - for (Map<Vector2i, TileMapCell>::Element *E = cells_do.front(); E; E = E->next()) { - undo_redo->add_do_method(tile_map, "set_cell", tile_map_layer, E->key(), E->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); - } - for (Map<Vector2i, TileMapCell>::Element *E = cells_undo.front(); E; E = E->next()) { - undo_redo->add_undo_method(tile_map, "set_cell", tile_map_layer, E->key(), E->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); - } + // Build the list of cells to undo. + Vector2i coords; + Map<Vector2i, TileMapCell> cells_undo; + for (int i = 0; i < selection_used_cells.size(); i++) { + coords = tile_map->map_pattern(top_left, selection_used_cells[i], selection_pattern); + cells_undo[coords] = TileMapCell(drag_modified[coords].source_id, drag_modified[coords].get_atlas_coords(), drag_modified[coords].alternative_tile); + coords = tile_map->map_pattern(top_left + offset, selection_used_cells[i], selection_pattern); + cells_undo[coords] = TileMapCell(tile_map->get_cell_source_id(tile_map_layer, coords), tile_map->get_cell_atlas_coords(tile_map_layer, coords), tile_map->get_cell_alternative_tile(tile_map_layer, coords)); + } - // Update the selection. - undo_redo->add_undo_method(this, "_set_tile_map_selection", _get_tile_map_selection()); - tile_map_selection.clear(); - for (int i = 0; i < selection_used_cells.size(); i++) { - coords = tile_map->map_pattern(top_left + offset, selection_used_cells[i], selection_pattern); - tile_map_selection.insert(coords); + // Build the list of cells to do. + Map<Vector2i, TileMapCell> cells_do; + for (int i = 0; i < selection_used_cells.size(); i++) { + coords = tile_map->map_pattern(top_left, selection_used_cells[i], selection_pattern); + cells_do[coords] = TileMapCell(); + } + for (int i = 0; i < selection_used_cells.size(); i++) { + coords = tile_map->map_pattern(top_left + offset, selection_used_cells[i], selection_pattern); + cells_do[coords] = TileMapCell(selection_pattern->get_cell_source_id(selection_used_cells[i]), selection_pattern->get_cell_atlas_coords(selection_used_cells[i]), selection_pattern->get_cell_alternative_tile(selection_used_cells[i])); + } + + // Move the tiles. + undo_redo->create_action(TTR("Move tiles")); + for (Map<Vector2i, TileMapCell>::Element *E = cells_do.front(); E; E = E->next()) { + undo_redo->add_do_method(tile_map, "set_cell", tile_map_layer, E->key(), E->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); + } + for (Map<Vector2i, TileMapCell>::Element *E = cells_undo.front(); E; E = E->next()) { + undo_redo->add_undo_method(tile_map, "set_cell", tile_map_layer, E->key(), E->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); + } + + // Update the selection. + undo_redo->add_undo_method(this, "_set_tile_map_selection", _get_tile_map_selection()); + tile_map_selection.clear(); + for (int i = 0; i < selection_used_cells.size(); i++) { + coords = tile_map->map_pattern(top_left + offset, selection_used_cells[i], selection_pattern); + tile_map_selection.insert(coords); + } + undo_redo->add_do_method(this, "_set_tile_map_selection", _get_tile_map_selection()); + undo_redo->commit_action(); } - undo_redo->add_do_method(this, "_set_tile_map_selection", _get_tile_map_selection()); - undo_redo->commit_action(); } break; case DRAG_TYPE_PICK: { Rect2i rect = Rect2i(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(mpos) - tile_map->world_to_map(drag_start_mouse_pos)).abs(); rect.size += Vector2i(1, 1); - memdelete(selection_pattern); + TypedArray<Vector2i> coords_array; for (int x = rect.position.x; x < rect.get_end().x; x++) { for (int y = rect.position.y; y < rect.get_end().y; y++) { @@ -1195,51 +1322,50 @@ void TileMapEditorTilesPlugin::_stop_dragging() { } } } - selection_pattern = tile_map->get_pattern(tile_map_layer, coords_array); - if (!selection_pattern->is_empty()) { + Ref<TileMapPattern> new_selection_pattern = tile_map->get_pattern(tile_map_layer, coords_array); + if (!new_selection_pattern->is_empty()) { + selection_pattern = new_selection_pattern; _update_tileset_selection_from_selection_pattern(); - } else { - _update_selection_pattern_from_tileset_selection(); } picker_button->set_pressed(false); } break; case DRAG_TYPE_PAINT: { undo_redo->create_action(TTR("Paint tiles")); - for (Map<Vector2i, TileMapCell>::Element *E = drag_modified.front(); E; E = E->next()) { - 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->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); + 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; case DRAG_TYPE_LINE: { Map<Vector2i, TileMapCell> to_draw = _draw_line(drag_start_mouse_pos, drag_start_mouse_pos, mpos); undo_redo->create_action(TTR("Paint tiles")); - for (Map<Vector2i, TileMapCell>::Element *E = to_draw.front(); E; E = E->next()) { - if (!erase_button->is_pressed() && E->get().source_id == TileSet::INVALID_SOURCE) { + for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { + if (!_is_erasing() && E.value.source_id == TileSet::INVALID_SOURCE) { continue; } - undo_redo->add_do_method(tile_map, "set_cell", tile_map_layer, E->key(), E->get().source_id, E->get().get_atlas_coords(), E->get().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->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)); undo_redo->create_action(TTR("Paint tiles")); - for (Map<Vector2i, TileMapCell>::Element *E = to_draw.front(); E; E = E->next()) { - if (!erase_button->is_pressed() && E->get().source_id == TileSet::INVALID_SOURCE) { + for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { + if (!_is_erasing() && E.value.source_id == TileSet::INVALID_SOURCE) { continue; } - undo_redo->add_do_method(tile_map, "set_cell", tile_map_layer, E->key(), E->get().source_id, E->get().get_atlas_coords(), E->get().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->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 tiles")); - for (Map<Vector2i, TileMapCell>::Element *E = drag_modified.front(); E; E = E->next()) { - 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->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); + 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; @@ -1267,8 +1393,9 @@ void TileMapEditorTilesPlugin::_update_fix_selected_and_hovered() { hovered_tile.set_atlas_coords(TileSetSource::INVALID_ATLAS_COORDS); hovered_tile.alternative_tile = TileSetSource::INVALID_TILE_ALTERNATIVE; tile_set_selection.clear(); + patterns_item_list->deselect_all(); tile_map_selection.clear(); - selection_pattern->clear(); + selection_pattern.instantiate(); return; } @@ -1278,8 +1405,9 @@ void TileMapEditorTilesPlugin::_update_fix_selected_and_hovered() { hovered_tile.set_atlas_coords(TileSetSource::INVALID_ATLAS_COORDS); hovered_tile.alternative_tile = TileSetSource::INVALID_TILE_ALTERNATIVE; tile_set_selection.clear(); + patterns_item_list->deselect_all(); tile_map_selection.clear(); - selection_pattern->clear(); + selection_pattern.instantiate(); return; } @@ -1289,8 +1417,9 @@ void TileMapEditorTilesPlugin::_update_fix_selected_and_hovered() { hovered_tile.set_atlas_coords(TileSetSource::INVALID_ATLAS_COORDS); hovered_tile.alternative_tile = TileSetSource::INVALID_TILE_ALTERNATIVE; tile_set_selection.clear(); + patterns_item_list->deselect_all(); tile_map_selection.clear(); - selection_pattern->clear(); + selection_pattern.instantiate(); return; } @@ -1318,9 +1447,34 @@ void TileMapEditorTilesPlugin::_update_fix_selected_and_hovered() { if (!tile_map_selection.is_empty()) { _update_selection_pattern_from_tilemap_selection(); + } else if (tiles_bottom_panel->is_visible_in_tree()) { + _update_selection_pattern_from_tileset_tiles_selection(); } else { - _update_selection_pattern_from_tileset_selection(); + _update_selection_pattern_from_tileset_pattern_selection(); + } +} + +void TileMapEditorTilesPlugin::_fix_invalid_tiles_in_tile_map_selection() { + TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); + if (!tile_map) { + return; } + + Set<Vector2i> to_remove; + for (Vector2i selected : tile_map_selection) { + TileMapCell cell = tile_map->get_cell(tile_map_layer, selected); + if (cell.source_id == TileSet::INVALID_SOURCE && cell.get_atlas_coords() == TileSetSource::INVALID_ATLAS_COORDS && cell.alternative_tile == TileSetAtlasSource::INVALID_TILE_ALTERNATIVE) { + to_remove.insert(selected); + } + } + + for (Vector2i cell : to_remove) { + tile_map_selection.erase(cell); + } +} + +bool TileMapEditorTilesPlugin::_is_erasing() const { + return erase_button->is_pressed() || rmb_erasing; } void TileMapEditorTilesPlugin::_update_selection_pattern_from_tilemap_selection() { @@ -1329,9 +1483,14 @@ void TileMapEditorTilesPlugin::_update_selection_pattern_from_tilemap_selection( return; } + Ref<TileSet> tile_set = tile_map->get_tileset(); + if (!tile_set.is_valid()) { + return; + } + ERR_FAIL_INDEX(tile_map_layer, tile_map->get_layers_count()); - memdelete(selection_pattern); + selection_pattern.instantiate(); TypedArray<Vector2i> coords_array; for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { @@ -1340,7 +1499,7 @@ void TileMapEditorTilesPlugin::_update_selection_pattern_from_tilemap_selection( selection_pattern = tile_map->get_pattern(tile_map_layer, coords_array); } -void TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_selection() { +void TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_tiles_selection() { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { return; @@ -1355,7 +1514,7 @@ void TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_selection( tile_map_selection.clear(); // Clear the selected pattern. - selection_pattern->clear(); + selection_pattern.instantiate(); // Group per source. Map<int, List<const TileMapCell *>> per_source; @@ -1364,17 +1523,17 @@ void TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_selection( } int vertical_offset = 0; - for (Map<int, List<const TileMapCell *>>::Element *E_source = per_source.front(); E_source; E_source = E_source->next()) { + for (const KeyValue<int, List<const TileMapCell *>> &E_source : per_source) { // Per source. List<const TileMapCell *> unorganized; Rect2i encompassing_rect_coords; Map<Vector2i, const TileMapCell *> organized_pattern; - TileSetSource *source = *tile_set->get_source(E_source->key()); + TileSetSource *source = *tile_set->get_source(E_source.key); TileSetAtlasSource *atlas_source = Object::cast_to<TileSetAtlasSource>(source); if (atlas_source) { // Organize using coordinates. - for (const TileMapCell *current : E_source->get()) { + for (const TileMapCell *current : E_source.value) { if (current->alternative_tile == 0) { organized_pattern[current->get_atlas_coords()] = current; } else { @@ -1393,14 +1552,14 @@ void TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_selection( } } else { // Add everything unorganized. - for (const TileMapCell *cell : E_source->get()) { + for (const TileMapCell *cell : E_source.value) { unorganized.push_back(cell); } } // Now add everything to the output pattern. - for (Map<Vector2i, const TileMapCell *>::Element *E_cell = organized_pattern.front(); E_cell; E_cell = E_cell->next()) { - selection_pattern->set_cell(E_cell->key() - encompassing_rect_coords.position + Vector2i(0, vertical_offset), E_cell->get()->source_id, E_cell->get()->get_atlas_coords(), E_cell->get()->alternative_tile); + for (const KeyValue<Vector2i, const TileMapCell *> &E_cell : organized_pattern) { + selection_pattern->set_cell(E_cell.key - encompassing_rect_coords.position + Vector2i(0, vertical_offset), E_cell.value->source_id, E_cell.value->get_atlas_coords(), E_cell.value->alternative_tile); } Vector2i organized_size = selection_pattern->get_size(); int unorganized_index = 0; @@ -1413,6 +1572,30 @@ void TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_selection( CanvasItemEditor::get_singleton()->update_viewport(); } +void TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_pattern_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; + } + + // Clear the tilemap selection. + tile_map_selection.clear(); + + // Clear the selected pattern. + selection_pattern.instantiate(); + + if (patterns_item_list->get_selected_items().size() >= 1) { + selection_pattern = patterns_item_list->get_item_metadata(patterns_item_list->get_selected_items()[0]); + } + + CanvasItemEditor::get_singleton()->update_viewport(); +} + void TileMapEditorTilesPlugin::_update_tileset_selection_from_selection_pattern() { tile_set_selection.clear(); TypedArray<Vector2i> used_cells = selection_pattern->get_used_cells(); @@ -1422,7 +1605,9 @@ void TileMapEditorTilesPlugin::_update_tileset_selection_from_selection_pattern( tile_set_selection.insert(TileMapCell(selection_pattern->get_cell_source_id(coords), selection_pattern->get_cell_atlas_coords(coords), selection_pattern->get_cell_alternative_tile(coords))); } } - _update_bottom_panel(); + _update_source_display(); + tile_atlas_control->update(); + alternative_tiles_control->update(); } void TileMapEditorTilesPlugin::_tile_atlas_control_draw() { @@ -1570,7 +1755,7 @@ void TileMapEditorTilesPlugin::_tile_atlas_control_gui_input(const Ref<InputEven tile_set_selection.insert(TileMapCell(source_id, hovered_tile.get_atlas_coords(), 0)); } } - _update_selection_pattern_from_tileset_selection(); + _update_selection_pattern_from_tileset_tiles_selection(); } else { // Released if (tile_set_dragging_selection) { if (!mb->is_shift_pressed()) { @@ -1607,7 +1792,7 @@ void TileMapEditorTilesPlugin::_tile_atlas_control_gui_input(const Ref<InputEven } } } - _update_selection_pattern_from_tileset_selection(); + _update_selection_pattern_from_tileset_tiles_selection(); } tile_set_dragging_selection = false; } @@ -1727,7 +1912,7 @@ void TileMapEditorTilesPlugin::_tile_alternatives_control_gui_input(const Ref<In tile_set_selection.insert(TileMapCell(source_id, hovered_tile.get_atlas_coords(), hovered_tile.alternative_tile)); } } - _update_selection_pattern_from_tileset_selection(); + _update_selection_pattern_from_tileset_tiles_selection(); } tile_atlas_control->update(); alternative_tiles_control->update(); @@ -1760,8 +1945,9 @@ void TileMapEditorTilesPlugin::edit(ObjectID p_tile_map_id, int p_tile_map_layer // Clear the selection. tile_set_selection.clear(); + patterns_item_list->deselect_all(); tile_map_selection.clear(); - selection_pattern->clear(); + selection_pattern.instantiate(); } tile_map_layer = p_tile_map_layer; @@ -1783,9 +1969,13 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { ED_SHORTCUT("tiles_editor/cancel", TTR("Cancel"), KEY_ESCAPE); ED_SHORTCUT("tiles_editor/delete", TTR("Delete"), KEY_DELETE); + // --- Initialize references --- + tile_map_clipboard.instantiate(); + selection_pattern.instantiate(); + // --- Toolbar --- toolbar = memnew(HBoxContainer); - toolbar->set_h_size_flags(SIZE_EXPAND_FILL); + toolbar->set_h_size_flags(Control::SIZE_EXPAND_FILL); HBoxContainer *tilemap_tiles_tools_buttons = memnew(HBoxContainer); @@ -1804,6 +1994,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { paint_tool_button->set_toggle_mode(true); paint_tool_button->set_button_group(tool_buttons_group); paint_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/paint_tool", "Paint", KEY_D)); + paint_tool_button->set_tooltip(TTR("Shift: Draw line.") + "\n" + TTR("Shift+Ctrl: Draw rectangle.")); paint_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTilesPlugin::_update_toolbar)); tilemap_tiles_tools_buttons->add_child(paint_tool_button); @@ -1844,6 +2035,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { picker_button->set_flat(true); picker_button->set_toggle_mode(true); picker_button->set_shortcut(ED_SHORTCUT("tiles_editor/picker", "Picker", KEY_P)); + picker_button->set_tooltip(TTR("Alternatively hold Ctrl with other tools to pick tile.")); picker_button->connect("pressed", callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport)); tools_settings->add_child(picker_button); @@ -1852,6 +2044,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { erase_button->set_flat(true); erase_button->set_toggle_mode(true); erase_button->set_shortcut(ED_SHORTCUT("tiles_editor/eraser", "Eraser", KEY_E)); + erase_button->set_tooltip(TTR("Alternatively use RMB to erase tiles.")); erase_button->connect("pressed", callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport)); tools_settings->add_child(erase_button); @@ -1893,42 +2086,47 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { paint_tool_button->set_pressed(true); _update_toolbar(); - // --- Bottom panel --- - set_name("Tiles"); + // --- Bottom panel tiles --- + tiles_bottom_panel = memnew(VBoxContainer); + tiles_bottom_panel->connect("tree_entered", callable_mp(this, &TileMapEditorTilesPlugin::_update_theme)); + tiles_bottom_panel->connect("theme_changed", callable_mp(this, &TileMapEditorTilesPlugin::_update_theme)); + tiles_bottom_panel->connect("visibility_changed", callable_mp(this, &TileMapEditorTilesPlugin::_stop_dragging)); + tiles_bottom_panel->connect("visibility_changed", callable_mp(this, &TileMapEditorTilesPlugin::_tab_changed)); + tiles_bottom_panel->set_name(TTR("Tiles")); missing_source_label = memnew(Label); missing_source_label->set_text(TTR("This TileMap's TileSet has no source configured. Edit the TileSet resource to add one.")); - missing_source_label->set_h_size_flags(SIZE_EXPAND_FILL); - missing_source_label->set_v_size_flags(SIZE_EXPAND_FILL); + missing_source_label->set_h_size_flags(Control::SIZE_EXPAND_FILL); + missing_source_label->set_v_size_flags(Control::SIZE_EXPAND_FILL); missing_source_label->set_align(Label::ALIGN_CENTER); missing_source_label->set_valign(Label::VALIGN_CENTER); missing_source_label->hide(); - add_child(missing_source_label); + tiles_bottom_panel->add_child(missing_source_label); atlas_sources_split_container = memnew(HSplitContainer); - atlas_sources_split_container->set_h_size_flags(SIZE_EXPAND_FILL); - atlas_sources_split_container->set_v_size_flags(SIZE_EXPAND_FILL); - add_child(atlas_sources_split_container); + atlas_sources_split_container->set_h_size_flags(Control::SIZE_EXPAND_FILL); + atlas_sources_split_container->set_v_size_flags(Control::SIZE_EXPAND_FILL); + tiles_bottom_panel->add_child(atlas_sources_split_container); sources_list = memnew(ItemList); sources_list->set_fixed_icon_size(Size2i(60, 60) * EDSCALE); - sources_list->set_h_size_flags(SIZE_EXPAND_FILL); + sources_list->set_h_size_flags(Control::SIZE_EXPAND_FILL); sources_list->set_stretch_ratio(0.25); sources_list->set_custom_minimum_size(Size2i(70, 0) * EDSCALE); sources_list->set_texture_filter(CanvasItem::TEXTURE_FILTER_NEAREST); sources_list->connect("item_selected", callable_mp(this, &TileMapEditorTilesPlugin::_update_fix_selected_and_hovered).unbind(1)); - sources_list->connect("item_selected", callable_mp(this, &TileMapEditorTilesPlugin::_update_bottom_panel).unbind(1)); - sources_list->connect("item_selected", callable_mp(TilesEditor::get_singleton(), &TilesEditor::set_sources_lists_current)); - sources_list->connect("visibility_changed", callable_mp(TilesEditor::get_singleton(), &TilesEditor::synchronize_sources_list), varray(sources_list)); + sources_list->connect("item_selected", callable_mp(this, &TileMapEditorTilesPlugin::_update_source_display).unbind(1)); + sources_list->connect("item_selected", callable_mp(TilesEditorPlugin::get_singleton(), &TilesEditorPlugin::set_sources_lists_current)); + sources_list->connect("visibility_changed", callable_mp(TilesEditorPlugin::get_singleton(), &TilesEditorPlugin::synchronize_sources_list), varray(sources_list)); atlas_sources_split_container->add_child(sources_list); // Tile atlas source. tile_atlas_view = memnew(TileAtlasView); - tile_atlas_view->set_h_size_flags(SIZE_EXPAND_FILL); - tile_atlas_view->set_v_size_flags(SIZE_EXPAND_FILL); + tile_atlas_view->set_h_size_flags(Control::SIZE_EXPAND_FILL); + tile_atlas_view->set_v_size_flags(Control::SIZE_EXPAND_FILL); tile_atlas_view->set_texture_grid_visible(false); tile_atlas_view->set_tile_shape_grid_visible(false); - tile_atlas_view->connect("transform_changed", callable_mp(TilesEditor::get_singleton(), &TilesEditor::set_atlas_view_transform)); + tile_atlas_view->connect("transform_changed", callable_mp(TilesEditorPlugin::get_singleton(), &TilesEditorPlugin::set_atlas_view_transform)); atlas_sources_split_container->add_child(tile_atlas_view); tile_atlas_control = memnew(Control); @@ -1945,8 +2143,8 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { // Scenes collection source. scene_tiles_list = memnew(ItemList); - scene_tiles_list->set_h_size_flags(SIZE_EXPAND_FILL); - scene_tiles_list->set_v_size_flags(SIZE_EXPAND_FILL); + scene_tiles_list->set_h_size_flags(Control::SIZE_EXPAND_FILL); + scene_tiles_list->set_v_size_flags(Control::SIZE_EXPAND_FILL); scene_tiles_list->set_drag_forwarding(this); scene_tiles_list->set_select_mode(ItemList::SELECT_MULTI); scene_tiles_list->connect("multi_selected", callable_mp(this, &TileMapEditorTilesPlugin::_scenes_list_multi_selected)); @@ -1957,30 +2155,42 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { // Invalid source label. invalid_source_label = memnew(Label); invalid_source_label->set_text(TTR("Invalid source selected.")); - invalid_source_label->set_h_size_flags(SIZE_EXPAND_FILL); - invalid_source_label->set_v_size_flags(SIZE_EXPAND_FILL); + invalid_source_label->set_h_size_flags(Control::SIZE_EXPAND_FILL); + invalid_source_label->set_v_size_flags(Control::SIZE_EXPAND_FILL); invalid_source_label->set_align(Label::ALIGN_CENTER); invalid_source_label->set_valign(Label::VALIGN_CENTER); invalid_source_label->hide(); atlas_sources_split_container->add_child(invalid_source_label); - _update_bottom_panel(); + // --- Bottom panel patterns --- + patterns_bottom_panel = memnew(VBoxContainer); + patterns_bottom_panel->set_name(TTR("Patterns")); + patterns_bottom_panel->connect("visibility_changed", callable_mp(this, &TileMapEditorTilesPlugin::_tab_changed)); + + int thumbnail_size = 64; + patterns_item_list = memnew(ItemList); + patterns_item_list->set_max_columns(0); + patterns_item_list->set_icon_mode(ItemList::ICON_MODE_TOP); + patterns_item_list->set_fixed_column_width(thumbnail_size * 3 / 2); + patterns_item_list->set_max_text_lines(2); + patterns_item_list->set_fixed_icon_size(Size2(thumbnail_size, thumbnail_size)); + patterns_item_list->set_v_size_flags(Control::SIZE_EXPAND_FILL); + patterns_item_list->connect("gui_input", callable_mp(this, &TileMapEditorTilesPlugin::_patterns_item_list_gui_input)); + patterns_item_list->connect("item_selected", callable_mp(this, &TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_pattern_selection).unbind(1)); + patterns_item_list->connect("item_activated", callable_mp(this, &TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_pattern_selection)); + patterns_item_list->connect("nothing_selected", callable_mp(this, &TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_pattern_selection)); + patterns_bottom_panel->add_child(patterns_item_list); + + patterns_help_label = memnew(Label); + patterns_help_label->set_text(TTR("Drag and drop or paste a TileMap selection here to store a pattern.")); + patterns_help_label->set_anchors_and_offsets_preset(Control::PRESET_CENTER); + patterns_item_list->add_child(patterns_help_label); + + // Update. + _update_source_display(); } TileMapEditorTilesPlugin::~TileMapEditorTilesPlugin() { - memdelete(selection_pattern); - memdelete(tile_map_clipboard); -} - -void TileMapEditorTerrainsPlugin::_notification(int p_what) { - switch (p_what) { - case NOTIFICATION_ENTER_TREE: - case NOTIFICATION_THEME_CHANGED: - paint_tool_button->set_icon(get_theme_icon(SNAME("Edit"), SNAME("EditorIcons"))); - picker_button->set_icon(get_theme_icon(SNAME("ColorPick"), SNAME("EditorIcons"))); - erase_button->set_icon(get_theme_icon(SNAME("Eraser"), SNAME("EditorIcons"))); - break; - } } void TileMapEditorTerrainsPlugin::tile_set_changed() { @@ -2003,8 +2213,10 @@ void TileMapEditorTerrainsPlugin::_update_toolbar() { } } -Control *TileMapEditorTerrainsPlugin::get_toolbar() const { - return toolbar; +Vector<TileMapEditorPlugin::TabData> TileMapEditorTerrainsPlugin::get_tabs() const { + Vector<TileMapEditorPlugin::TabData> tabs; + tabs.push_back({ toolbar, main_vbox_container }); + return tabs; } Map<Vector2i, TileSet::CellNeighbor> TileMapEditorTerrainsPlugin::Constraint::get_overlapping_coords_and_peering_bits() const { @@ -2308,14 +2520,14 @@ Set<TileMapEditorTerrainsPlugin::TerrainsTilePattern> TileMapEditorTerrainsPlugi // Returns all tiles compatible with the given constraints. Set<TerrainsTilePattern> compatible_terrain_tile_patterns; - for (Map<TerrainsTilePattern, Set<TileMapCell>>::Element *E = per_terrain_terrains_tile_patterns_tiles[p_terrain_set].front(); E; E = E->next()) { + for (const KeyValue<TerrainsTilePattern, Set<TileMapCell>> &E : per_terrain_terrains_tile_patterns_tiles[p_terrain_set]) { int valid = true; int in_pattern_count = 0; for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) { TileSet::CellNeighbor bit = TileSet::CellNeighbor(i); if (tile_set->is_valid_peering_bit_terrain(p_terrain_set, bit)) { // Check if the bit is compatible with the constraints. - Constraint terrain_bit_constraint = Constraint(tile_map, p_position, bit, E->key()[in_pattern_count]); + Constraint terrain_bit_constraint = Constraint(tile_map, p_position, bit, E.key[in_pattern_count]); Set<Constraint>::Element *in_set_constraint_element = p_constraints.find(terrain_bit_constraint); if (in_set_constraint_element && in_set_constraint_element->get().get_terrain() != terrain_bit_constraint.get_terrain()) { @@ -2327,7 +2539,7 @@ Set<TileMapEditorTerrainsPlugin::TerrainsTilePattern> TileMapEditorTerrainsPlugi } if (valid) { - compatible_terrain_tile_patterns.insert(E->key()); + compatible_terrain_tile_patterns.insert(E.key); } } @@ -2368,15 +2580,15 @@ Set<TileMapEditorTerrainsPlugin::Constraint> TileMapEditorTerrainsPlugin::_get_c // Count the number of occurrences per terrain. Map<Vector2i, TileSet::CellNeighbor> overlapping_terrain_bits = c.get_overlapping_coords_and_peering_bits(); - for (Map<Vector2i, TileSet::CellNeighbor>::Element *E_overlapping = overlapping_terrain_bits.front(); E_overlapping; E_overlapping = E_overlapping->next()) { - if (!p_to_replace.has(E_overlapping->key())) { - TileMapCell neighbor_cell = tile_map->get_cell(tile_map_layer, E_overlapping->key()); + for (const KeyValue<Vector2i, TileSet::CellNeighbor> &E_overlapping : overlapping_terrain_bits) { + if (!p_to_replace.has(E_overlapping.key)) { + TileMapCell neighbor_cell = tile_map->get_cell(tile_map_layer, E_overlapping.key); TileData *neighbor_tile_data = nullptr; if (terrain_tiles.has(neighbor_cell) && terrain_tiles[neighbor_cell]->get_terrain_set() == p_terrain_set) { neighbor_tile_data = terrain_tiles[neighbor_cell]; } - int terrain = neighbor_tile_data ? neighbor_tile_data->get_peering_bit_terrain(TileSet::CellNeighbor(E_overlapping->get())) : -1; + int terrain = neighbor_tile_data ? neighbor_tile_data->get_peering_bit_terrain(TileSet::CellNeighbor(E_overlapping.value)) : -1; if (terrain_count.has(terrain)) { terrain_count[terrain] = 0; } @@ -2387,10 +2599,10 @@ Set<TileMapEditorTerrainsPlugin::Constraint> TileMapEditorTerrainsPlugin::_get_c // Get the terrain with the max number of occurrences. int max = 0; int max_terrain = -1; - for (Map<int, int>::Element *E_terrain_count = terrain_count.front(); E_terrain_count; E_terrain_count = E_terrain_count->next()) { - if (E_terrain_count->get() > max) { - max = E_terrain_count->get(); - max_terrain = E_terrain_count->key(); + for (const KeyValue<int, int> &E_terrain_count : terrain_count) { + if (E_terrain_count.value > max) { + max = E_terrain_count.value; + max_terrain = E_terrain_count.key; } } @@ -2458,15 +2670,15 @@ Map<Vector2i, TileMapEditorTerrainsPlugin::TerrainsTilePattern> TileMapEditorTer while (!to_replace.is_empty()) { // Compute the minimum number of tile possibilities for each cell. int min_nb_possibilities = 100000000; - for (Map<Vector2i, Set<TerrainsTilePattern>>::Element *E = per_cell_acceptable_tiles.front(); E; E = E->next()) { - min_nb_possibilities = MIN(min_nb_possibilities, E->get().size()); + for (const KeyValue<Vector2i, Set<TerrainsTilePattern>> &E : per_cell_acceptable_tiles) { + min_nb_possibilities = MIN(min_nb_possibilities, E.value.size()); } // Get the set of possible cells to fill. LocalVector<Vector2i> to_choose_from; - for (Map<Vector2i, Set<TerrainsTilePattern>>::Element *E = per_cell_acceptable_tiles.front(); E; E = E->next()) { - if (E->get().size() == min_nb_possibilities) { - to_choose_from.push_back(E->key()); + for (const KeyValue<Vector2i, Set<TerrainsTilePattern>> &E : per_cell_acceptable_tiles) { + if (E.value.size() == min_nb_possibilities) { + to_choose_from.push_back(E.key); } } @@ -2584,9 +2796,9 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map // Add the constraints from the added tiles. Set<TileMapEditorTerrainsPlugin::Constraint> added_tiles_constraints_set; - for (Map<Vector2i, TerrainsTilePattern>::Element *E_to_paint = p_to_paint.front(); E_to_paint; E_to_paint = E_to_paint->next()) { - Vector2i coords = E_to_paint->key(); - TerrainsTilePattern terrains_tile_pattern = E_to_paint->get(); + for (const KeyValue<Vector2i, TerrainsTilePattern> &E_to_paint : p_to_paint) { + Vector2i coords = E_to_paint.key; + TerrainsTilePattern terrains_tile_pattern = E_to_paint.value; Set<TileMapEditorTerrainsPlugin::Constraint> cell_constraints = _get_constraints_from_added_tile(coords, p_terrain_set, terrains_tile_pattern); for (Set<TileMapEditorTerrainsPlugin::Constraint>::Element *E = cell_constraints.front(); E; E = E->next()) { @@ -2596,8 +2808,8 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map // Build the list of potential tiles to replace. Set<Vector2i> potential_to_replace; - for (Map<Vector2i, TerrainsTilePattern>::Element *E_to_paint = p_to_paint.front(); E_to_paint; E_to_paint = E_to_paint->next()) { - Vector2i coords = E_to_paint->key(); + for (const KeyValue<Vector2i, TerrainsTilePattern> &E_to_paint : p_to_paint) { + Vector2i coords = E_to_paint.key; for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) { if (tile_map->is_existing_neighbor(TileSet::CellNeighbor(i))) { Vector2i neighbor = tile_map->get_neighbor_cell(coords, TileSet::CellNeighbor(i)); @@ -2612,8 +2824,8 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map Set<Vector2i> to_replace; // Add the central tiles to the one to replace. TODO: maybe change that. - for (Map<Vector2i, TerrainsTilePattern>::Element *E_to_paint = p_to_paint.front(); E_to_paint; E_to_paint = E_to_paint->next()) { - to_replace.insert(E_to_paint->key()); + for (const KeyValue<Vector2i, TerrainsTilePattern> &E_to_paint : p_to_paint) { + to_replace.insert(E_to_paint.key); } // Add the constraints from the surroundings of the modified areas. @@ -2627,9 +2839,9 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map Map<Constraint, Set<Vector2i>> source_tiles_of_constraint; for (Set<Constraint>::Element *E = removed_cells_constraints_set.front(); E; E = E->next()) { Map<Vector2i, TileSet::CellNeighbor> sources_of_constraint = E->get().get_overlapping_coords_and_peering_bits(); - for (Map<Vector2i, TileSet::CellNeighbor>::Element *E_source_tile_of_constraint = sources_of_constraint.front(); E_source_tile_of_constraint; E_source_tile_of_constraint = E_source_tile_of_constraint->next()) { - if (potential_to_replace.has(E_source_tile_of_constraint->key())) { - source_tiles_of_constraint[E->get()].insert(E_source_tile_of_constraint->key()); + for (const KeyValue<Vector2i, TileSet::CellNeighbor> &E_source_tile_of_constraint : sources_of_constraint) { + if (potential_to_replace.has(E_source_tile_of_constraint.key)) { + source_tiles_of_constraint[E->get()].insert(E_source_tile_of_constraint.key); } } } @@ -2646,8 +2858,8 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map potential_to_replace.erase(to_add_to_remove); to_replace.insert(to_add_to_remove); to_replace_modified = true; - for (Map<Constraint, Set<Vector2i>>::Element *E_source_tiles_of_constraint = source_tiles_of_constraint.front(); E_source_tiles_of_constraint; E_source_tiles_of_constraint = E_source_tiles_of_constraint->next()) { - E_source_tiles_of_constraint->get().erase(to_add_to_remove); + for (KeyValue<Constraint, Set<Vector2i>> &E_source_tiles_of_constraint : source_tiles_of_constraint) { + E_source_tiles_of_constraint.value.erase(to_add_to_remove); } break; } @@ -2665,13 +2877,13 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map Map<Vector2i, TerrainsTilePattern> wfc_output = _wave_function_collapse(to_replace, p_terrain_set, constraints); // Use the WFC run for the output. - for (Map<Vector2i, TerrainsTilePattern>::Element *E = wfc_output.front(); E; E = E->next()) { - output[E->key()] = _get_random_tile_from_pattern(p_terrain_set, E->get()); + for (const KeyValue<Vector2i, TerrainsTilePattern> &E : wfc_output) { + output[E.key] = _get_random_tile_from_pattern(p_terrain_set, E.value); } // Override the WFC results to make sure at least the painted tiles are actually painted. - for (Map<Vector2i, TerrainsTilePattern>::Element *E_to_paint = p_to_paint.front(); E_to_paint; E_to_paint = E_to_paint->next()) { - output[E_to_paint->key()] = _get_random_tile_from_pattern(p_terrain_set, E_to_paint->get()); + for (const KeyValue<Vector2i, TerrainsTilePattern> &E_to_paint : p_to_paint) { + output[E_to_paint.key] = _get_random_tile_from_pattern(p_terrain_set, E_to_paint.value); } return output; @@ -2749,9 +2961,9 @@ void TileMapEditorTerrainsPlugin::_stop_dragging() { } break; case DRAG_TYPE_PAINT: { undo_redo->create_action(TTR("Paint terrain")); - for (Map<Vector2i, TileMapCell>::Element *E = drag_modified.front(); E; E = E->next()) { - 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->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); + 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; @@ -2762,7 +2974,7 @@ void TileMapEditorTerrainsPlugin::_stop_dragging() { } bool TileMapEditorTerrainsPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p_event) { - if (!is_visible_in_tree()) { + if (!main_vbox_container->is_visible_in_tree()) { // If the bottom editor is not visible, we ignore inputs. return false; } @@ -2825,11 +3037,11 @@ bool TileMapEditorTerrainsPlugin::forward_canvas_gui_input(const Ref<InputEvent> to_draw[line[i]] = selected_terrains_tile_pattern; } Map<Vector2i, TileMapCell> modified = _draw_terrains(to_draw, selected_terrain_set); - for (Map<Vector2i, TileMapCell>::Element *E = modified.front(); E; E = E->next()) { - if (!drag_modified.has(E->key())) { - drag_modified[E->key()] = tile_map->get_cell(tile_map_layer, E->key()); + for (const KeyValue<Vector2i, TileMapCell> &E : modified) { + if (!drag_modified.has(E.key)) { + drag_modified[E.key] = tile_map->get_cell(tile_map_layer, E.key); } - tile_map->set_cell(tile_map_layer, E->key(), E->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); + tile_map->set_cell(tile_map_layer, E.key, E.value.source_id, E.value.get_atlas_coords(), E.value.alternative_tile); } } } break; @@ -2864,9 +3076,9 @@ bool TileMapEditorTerrainsPlugin::forward_canvas_gui_input(const Ref<InputEvent> terrains_to_draw[tile_map->world_to_map(mpos)] = selected_terrains_tile_pattern; Map<Vector2i, TileMapCell> to_draw = _draw_terrains(terrains_to_draw, selected_terrain_set); - for (Map<Vector2i, TileMapCell>::Element *E = to_draw.front(); E; E = E->next()) { - drag_modified[E->key()] = tile_map->get_cell(tile_map_layer, E->key()); - tile_map->set_cell(tile_map_layer, E->key(), E->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); + 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); } } } @@ -3034,13 +3246,13 @@ void TileMapEditorTerrainsPlugin::_update_terrains_tree() { TreeItem *terrain_set_tree_item = terrains_tree->create_item(); String matches; if (tile_set->get_terrain_set_mode(terrain_set_index) == TileSet::TERRAIN_MODE_MATCH_CORNERS_AND_SIDES) { - terrain_set_tree_item->set_icon(0, get_theme_icon(SNAME("TerrainMatchCornersAndSides"), SNAME("EditorIcons"))); + terrain_set_tree_item->set_icon(0, main_vbox_container->get_theme_icon(SNAME("TerrainMatchCornersAndSides"), SNAME("EditorIcons"))); matches = String(TTR("Matches Corners and Sides")); } else if (tile_set->get_terrain_set_mode(terrain_set_index) == TileSet::TERRAIN_MODE_MATCH_CORNERS) { - terrain_set_tree_item->set_icon(0, get_theme_icon(SNAME("TerrainMatchCorners"), SNAME("EditorIcons"))); + terrain_set_tree_item->set_icon(0, main_vbox_container->get_theme_icon(SNAME("TerrainMatchCorners"), SNAME("EditorIcons"))); matches = String(TTR("Matches Corners Only")); } else { - terrain_set_tree_item->set_icon(0, get_theme_icon(SNAME("TerrainMatchSides"), SNAME("EditorIcons"))); + terrain_set_tree_item->set_icon(0, main_vbox_container->get_theme_icon(SNAME("TerrainMatchSides"), SNAME("EditorIcons"))); matches = String(TTR("Matches Sides Only")); } terrain_set_tree_item->set_text(0, vformat("Terrain Set %d (%s)", terrain_set_index, matches)); @@ -3145,6 +3357,12 @@ void TileMapEditorTerrainsPlugin::_update_tiles_list() { } } +void TileMapEditorTerrainsPlugin::_update_theme() { + paint_tool_button->set_icon(main_vbox_container->get_theme_icon(SNAME("Edit"), 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"))); +} + void TileMapEditorTerrainsPlugin::edit(ObjectID p_tile_map_id, int p_tile_map_layer) { _stop_dragging(); // Avoids staying in a wrong drag state. @@ -3157,15 +3375,18 @@ void TileMapEditorTerrainsPlugin::edit(ObjectID p_tile_map_id, int p_tile_map_la } TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() { - set_name("Terrains"); + main_vbox_container = memnew(VBoxContainer); + main_vbox_container->connect("tree_entered", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_theme)); + main_vbox_container->connect("theme_changed", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_theme)); + main_vbox_container->set_name("Terrains"); HSplitContainer *tilemap_tab_terrains = memnew(HSplitContainer); - tilemap_tab_terrains->set_h_size_flags(SIZE_EXPAND_FILL); - tilemap_tab_terrains->set_v_size_flags(SIZE_EXPAND_FILL); - add_child(tilemap_tab_terrains); + tilemap_tab_terrains->set_h_size_flags(Control::SIZE_EXPAND_FILL); + tilemap_tab_terrains->set_v_size_flags(Control::SIZE_EXPAND_FILL); + main_vbox_container->add_child(tilemap_tab_terrains); terrains_tree = memnew(Tree); - terrains_tree->set_h_size_flags(SIZE_EXPAND_FILL); + terrains_tree->set_h_size_flags(Control::SIZE_EXPAND_FILL); terrains_tree->set_stretch_ratio(0.25); terrains_tree->set_custom_minimum_size(Size2i(70, 0) * EDSCALE); terrains_tree->set_texture_filter(CanvasItem::TEXTURE_FILTER_NEAREST); @@ -3174,7 +3395,7 @@ TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() { tilemap_tab_terrains->add_child(terrains_tree); terrains_tile_list = memnew(ItemList); - terrains_tile_list->set_h_size_flags(SIZE_EXPAND_FILL); + terrains_tile_list->set_h_size_flags(Control::SIZE_EXPAND_FILL); terrains_tile_list->set_max_columns(0); terrains_tile_list->set_same_column_width(true); terrains_tile_list->set_fixed_icon_size(Size2(30, 30) * EDSCALE); @@ -3241,7 +3462,7 @@ void TileMapEditor::_notification(int p_what) { if (is_visible_in_tree() && tileset_changed_needs_update) { _update_bottom_panel(); _update_layers_selection(); - tile_map_editor_plugins[tabs->get_current_tab()]->tile_set_changed(); + tabs_plugins[tabs_bar->get_current_tab()]->tile_set_changed(); CanvasItemEditor::get_singleton()->update_viewport(); tileset_changed_needs_update = false; } @@ -3365,14 +3586,11 @@ void TileMapEditor::_update_bottom_panel() { // Update the visibility of controls. missing_tileset_label->set_visible(!tile_set.is_valid()); - if (!tile_set.is_valid()) { - for (int i = 0; i < tile_map_editor_plugins.size(); i++) { - tile_map_editor_plugins[i]->hide(); - } - } else { - for (int i = 0; i < tile_map_editor_plugins.size(); i++) { - tile_map_editor_plugins[i]->set_visible(i == tabs->get_current_tab()); - } + for (unsigned int tab_index = 0; tab_index < tabs_data.size(); tab_index++) { + tabs_data[tab_index].panel->hide(); + } + if (tile_set.is_valid()) { + tabs_data[tabs_bar->get_current_tab()].panel->show(); } } @@ -3455,27 +3673,25 @@ void TileMapEditor::_tile_map_changed() { void TileMapEditor::_tab_changed(int p_tab_id) { // Make the plugin edit the correct tilemap. - tile_map_editor_plugins[tabs->get_current_tab()]->edit(tile_map_id, tile_map_layer); + tabs_plugins[tabs_bar->get_current_tab()]->edit(tile_map_id, tile_map_layer); // Update toolbar. - for (int i = 0; i < tile_map_editor_plugins.size(); i++) { - tile_map_editor_plugins[i]->get_toolbar()->set_visible(i == p_tab_id); + for (unsigned int tab_index = 0; tab_index < tabs_data.size(); tab_index++) { + tabs_data[tab_index].toolbar->hide(); } + tabs_data[p_tab_id].toolbar->show(); // Update visible panel. TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); - if (!tile_map || !tile_map->get_tileset().is_valid()) { - for (int i = 0; i < tile_map_editor_plugins.size(); i++) { - tile_map_editor_plugins[i]->hide(); - } - } else { - for (int i = 0; i < tile_map_editor_plugins.size(); i++) { - tile_map_editor_plugins[i]->set_visible(i == tabs->get_current_tab()); - } + for (unsigned int tab_index = 0; tab_index < tabs_data.size(); tab_index++) { + tabs_data[tab_index].panel->hide(); + } + if (tile_map && tile_map->get_tileset().is_valid()) { + tabs_data[tabs_bar->get_current_tab()].panel->show(); } // Graphical update. - tile_map_editor_plugins[tabs->get_current_tab()]->update(); + tabs_data[tabs_bar->get_current_tab()].panel->update(); CanvasItemEditor::get_singleton()->update_viewport(); } @@ -3562,7 +3778,7 @@ void TileMapEditor::_update_layers_selection() { layers_selection_button->set_custom_minimum_size(min_button_size); layers_selection_button->update(); - tile_map_editor_plugins[tabs->get_current_tab()]->edit(tile_map_id, tile_map_layer); + tabs_plugins[tabs_bar->get_current_tab()]->edit(tile_map_id, tile_map_layer); } void TileMapEditor::_move_tile_map_array_element(Object *p_undo_redo, Object *p_edited, String p_array_prefix, int p_from_index, int p_to_pos) { @@ -3648,7 +3864,7 @@ bool TileMapEditor::forward_canvas_gui_input(const Ref<InputEvent> &p_event) { return true; } - return tile_map_editor_plugins[tabs->get_current_tab()]->forward_canvas_gui_input(p_event); + return tabs_plugins[tabs_bar->get_current_tab()]->forward_canvas_gui_input(p_event); } void TileMapEditor::forward_canvas_draw_over_viewport(Control *p_overlay) { @@ -3783,7 +3999,7 @@ void TileMapEditor::forward_canvas_draw_over_viewport(Control *p_overlay) { }*/ // Draw the plugins. - tile_map_editor_plugins[tabs->get_current_tab()]->forward_canvas_draw_over_viewport(p_overlay); + tabs_plugins[tabs_bar->get_current_tab()]->forward_canvas_draw_over_viewport(p_overlay); } void TileMapEditor::edit(TileMap *p_tile_map) { @@ -3817,7 +4033,7 @@ void TileMapEditor::edit(TileMap *p_tile_map) { _update_layers_selection(); // Call the plugins. - tile_map_editor_plugins[tabs->get_current_tab()]->edit(tile_map_id, tile_map_layer); + tabs_plugins[tabs_bar->get_current_tab()]->edit(tile_map_id, tile_map_layer); _tile_map_changed(); } @@ -3833,25 +4049,33 @@ TileMapEditor::TileMapEditor() { tile_map_editor_plugins.push_back(memnew(TileMapEditorTilesPlugin)); tile_map_editor_plugins.push_back(memnew(TileMapEditorTerrainsPlugin)); - // Tabs. - tabs = memnew(Tabs); - tabs->set_clip_tabs(false); - for (int i = 0; i < tile_map_editor_plugins.size(); i++) { - tabs->add_tab(tile_map_editor_plugins[i]->get_name()); + // TabBar. + tabs_bar = memnew(TabBar); + tabs_bar->set_clip_tabs(false); + for (int plugin_index = 0; plugin_index < tile_map_editor_plugins.size(); plugin_index++) { + Vector<TileMapEditorPlugin::TabData> tabs_vector = tile_map_editor_plugins[plugin_index]->get_tabs(); + for (int tab_index = 0; tab_index < tabs_vector.size(); tab_index++) { + tabs_bar->add_tab(tabs_vector[tab_index].panel->get_name()); + tabs_data.push_back(tabs_vector[tab_index]); + tabs_plugins.push_back(tile_map_editor_plugins[plugin_index]); + } } - tabs->connect("tab_changed", callable_mp(this, &TileMapEditor::_tab_changed)); + tabs_bar->connect("tab_changed", callable_mp(this, &TileMapEditor::_tab_changed)); // --- TileMap toolbar --- tile_map_toolbar = memnew(HBoxContainer); tile_map_toolbar->set_h_size_flags(SIZE_EXPAND_FILL); + add_child(tile_map_toolbar); // Tabs. - tile_map_toolbar->add_child(tabs); + tile_map_toolbar->add_child(tabs_bar); // Tabs toolbars. - for (int i = 0; i < tile_map_editor_plugins.size(); i++) { - tile_map_editor_plugins[i]->get_toolbar()->hide(); - tile_map_toolbar->add_child(tile_map_editor_plugins[i]->get_toolbar()); + for (unsigned int tab_index = 0; tab_index < tabs_data.size(); tab_index++) { + tabs_data[tab_index].toolbar->hide(); + if (!tabs_data[tab_index].toolbar->get_parent()) { + tile_map_toolbar->add_child(tabs_data[tab_index].toolbar); + } } // Wide empty separation control. @@ -3907,11 +4131,11 @@ TileMapEditor::TileMapEditor() { missing_tileset_label->hide(); add_child(missing_tileset_label); - for (int i = 0; i < tile_map_editor_plugins.size(); i++) { - add_child(tile_map_editor_plugins[i]); - tile_map_editor_plugins[i]->set_h_size_flags(SIZE_EXPAND_FILL); - tile_map_editor_plugins[i]->set_v_size_flags(SIZE_EXPAND_FILL); - tile_map_editor_plugins[i]->set_visible(i == 0); + for (unsigned int tab_index = 0; tab_index < tabs_data.size(); tab_index++) { + add_child(tabs_data[tab_index].panel); + tabs_data[tab_index].panel->set_v_size_flags(SIZE_EXPAND_FILL); + tabs_data[tab_index].panel->set_visible(tab_index == 0); + tabs_data[tab_index].panel->set_h_size_flags(SIZE_EXPAND_FILL); } _tab_changed(0); @@ -3921,4 +4145,7 @@ TileMapEditor::TileMapEditor() { } TileMapEditor::~TileMapEditor() { + for (int i = 0; i < tile_map_editor_plugins.size(); i++) { + memdelete(tile_map_editor_plugins[i]); + } } diff --git a/editor/plugins/tiles/tile_map_editor.h b/editor/plugins/tiles/tile_map_editor.h index 6126db59e9..1f1a560113 100644 --- a/editor/plugins/tiles/tile_map_editor.h +++ b/editor/plugins/tiles/tile_map_editor.h @@ -33,17 +33,24 @@ #include "tile_atlas_view.h" +#include "core/os/thread.h" #include "core/typedefs.h" #include "editor/editor_node.h" #include "scene/2d/tile_map.h" #include "scene/gui/box_container.h" -#include "scene/gui/tabs.h" +#include "scene/gui/tab_bar.h" -class TileMapEditorPlugin : public VBoxContainer { +class TileMapEditorPlugin : public Object { public: - virtual Control *get_toolbar() const { - return memnew(Control); + struct TabData { + Control *toolbar; + Control *panel; }; + + virtual Vector<TabData> get_tabs() const { + return Vector<TabData>(); + }; + virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) { return false; }; virtual void forward_canvas_draw_over_viewport(Control *p_overlay){}; virtual void tile_set_changed(){}; @@ -104,28 +111,36 @@ private: Vector2 drag_start_mouse_pos; Vector2 drag_last_mouse_pos; Map<Vector2i, TileMapCell> drag_modified; + bool rmb_erasing = false; - TileMapCell _pick_random_tile(const TileMapPattern *p_pattern); + 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); void _stop_dragging(); + bool _is_erasing() const; ///// Selection system. ///// Set<Vector2i> tile_map_selection; - TileMapPattern *tile_map_clipboard = memnew(TileMapPattern); - TileMapPattern *selection_pattern = memnew(TileMapPattern); + Ref<TileMapPattern> tile_map_clipboard; + Ref<TileMapPattern> selection_pattern; void _set_tile_map_selection(const TypedArray<Vector2i> &p_selection); TypedArray<Vector2i> _get_tile_map_selection() const; Set<TileMapCell> tile_set_selection; void _update_selection_pattern_from_tilemap_selection(); - void _update_selection_pattern_from_tileset_selection(); + void _update_selection_pattern_from_tileset_tiles_selection(); + void _update_selection_pattern_from_tileset_pattern_selection(); void _update_tileset_selection_from_selection_pattern(); void _update_fix_selected_and_hovered(); + void _fix_invalid_tiles_in_tile_map_selection(); - ///// Bottom panel. ////. + ///// Bottom panel common //// + void _tab_changed(); + + ///// Bottom panel tiles //// + VBoxContainer *tiles_bottom_panel; Label *missing_source_label; Label *invalid_source_label; @@ -134,7 +149,7 @@ private: Ref<Texture2D> missing_atlas_texture_icon; void _update_tile_set_sources_list(); - void _update_bottom_panel(); + void _update_source_display(); // Atlas sources. TileMapCell hovered_tile; @@ -164,15 +179,26 @@ private: void _scenes_list_multi_selected(int p_index, bool p_selected); void _scenes_list_nothing_selected(); + ///// Bottom panel patterns //// + VBoxContainer *patterns_bottom_panel; + ItemList *patterns_item_list; + Label *patterns_help_label; + void _patterns_item_list_gui_input(const Ref<InputEvent> &p_event); + void _pattern_preview_done(Ref<TileMapPattern> p_pattern, Ref<Texture2D> p_texture); + bool select_last_pattern = false; + void _update_patterns_list(); + + // General + void _update_theme(); + // Update callback virtual void tile_set_changed() override; protected: - void _notification(int p_what); static void _bind_methods(); public: - virtual Control *get_toolbar() const override; + 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; @@ -202,6 +228,9 @@ private: void _update_toolbar(); + // Main vbox. + VBoxContainer *main_vbox_container; + // TileMap editing. enum DragType { DRAG_TYPE_NONE = 0, @@ -278,16 +307,13 @@ private: void _update_terrains_cache(); void _update_terrains_tree(); void _update_tiles_list(); + void _update_theme(); // Update callback virtual void tile_set_changed() override; -protected: - void _notification(int p_what); - // static void _bind_methods(); - public: - virtual Control *get_toolbar() const override; + 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; @@ -325,7 +351,9 @@ private: // Bottom panel. Label *missing_tileset_label; - Tabs *tabs; + TabBar *tabs_bar; + LocalVector<TileMapEditorPlugin::TabData> tabs_data; + LocalVector<TileMapEditorPlugin *> tabs_plugins; void _update_bottom_panel(); // TileMap. @@ -352,7 +380,6 @@ public: void forward_canvas_draw_over_viewport(Control *p_overlay); void edit(TileMap *p_tile_map); - Control *get_toolbar() { return tile_map_toolbar; }; TileMapEditor(); ~TileMapEditor(); diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp index 76a05449db..c8892bceaa 100644 --- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp +++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp @@ -66,10 +66,15 @@ int TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::get_id() { } bool TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::_set(const StringName &p_name, const Variant &p_value) { + String name = p_name; + if (name == "name") { + // Use the resource_name property to store the source's name. + name = "resource_name"; + } bool valid = false; - tile_set_atlas_source->set(p_name, p_value, &valid); + tile_set_atlas_source->set(name, p_value, &valid); if (valid) { - emit_signal(SNAME("changed"), String(p_name).utf8().get_data()); + emit_signal(SNAME("changed"), String(name).utf8().get_data()); } return valid; } @@ -78,16 +83,22 @@ bool TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::_get(const StringN if (!tile_set_atlas_source) { return false; } + String name = p_name; + if (name == "name") { + // Use the resource_name property to store the source's name. + name = "resource_name"; + } bool valid = false; - r_ret = tile_set_atlas_source->get(p_name, &valid); + r_ret = tile_set_atlas_source->get(name, &valid); return valid; } void TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::_get_property_list(List<PropertyInfo> *p_list) const { + p_list->push_back(PropertyInfo(Variant::STRING, "name", PROPERTY_HINT_NONE, "")); p_list->push_back(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D")); p_list->push_back(PropertyInfo(Variant::VECTOR2I, "margins", PROPERTY_HINT_NONE, "")); p_list->push_back(PropertyInfo(Variant::VECTOR2I, "separation", PROPERTY_HINT_NONE, "")); - p_list->push_back(PropertyInfo(Variant::VECTOR2I, "tile_size", PROPERTY_HINT_NONE, "")); + p_list->push_back(PropertyInfo(Variant::VECTOR2I, "texture_region_size", PROPERTY_HINT_NONE, "")); } void TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::_bind_methods() { @@ -106,6 +117,10 @@ void TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::edit(Ref<TileSet> ERR_FAIL_COND(p_source_id < 0); ERR_FAIL_COND(p_tile_set->get_source(p_source_id) != p_tile_set_atlas_source); + if (p_tile_set == tile_set && p_tile_set_atlas_source == tile_set_atlas_source && p_source_id == source_id) { + return; + } + // Disconnect to changes. if (tile_set_atlas_source) { tile_set_atlas_source->disconnect(CoreStringNames::get_singleton()->property_list_changed, callable_mp((Object *)this, &Object::notify_property_list_changed)); @@ -131,6 +146,7 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_set(const StringName &p_na return false; } + // ID and size related properties. if (tiles.size() == 1) { const Vector2i &coords = tiles.front()->get().tile; const int &alternative = tiles.front()->get().alternative; @@ -156,40 +172,10 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_set(const StringName &p_na } else if (p_name == "size_in_atlas") { Vector2i as_vector2i = Vector2i(p_value); bool has_room_for_tile = tile_set_atlas_source->has_room_for_tile(coords, as_vector2i, tile_set_atlas_source->get_tile_animation_columns(coords), tile_set_atlas_source->get_tile_animation_separation(coords), tile_set_atlas_source->get_tile_animation_frames_count(coords), coords); - ERR_FAIL_COND_V(!has_room_for_tile, false); + ERR_FAIL_COND_V_EDMSG(!has_room_for_tile, false, "Invalid size or not enough room in the atlas for the tile."); tile_set_atlas_source->move_tile_in_atlas(coords, TileSetSource::INVALID_ATLAS_COORDS, as_vector2i); emit_signal(SNAME("changed"), "size_in_atlas"); return true; - } else if (p_name == "animation_columns") { - bool has_room_for_tile = tile_set_atlas_source->has_room_for_tile(coords, tile_set_atlas_source->get_tile_size_in_atlas(coords), p_value, tile_set_atlas_source->get_tile_animation_separation(coords), tile_set_atlas_source->get_tile_animation_frames_count(coords), coords); - ERR_FAIL_COND_V(!has_room_for_tile, false); - tile_set_atlas_source->set_tile_animation_columns(coords, p_value); - emit_signal(SNAME("changed"), "animation_columns"); - return true; - } else if (p_name == "animation_separation") { - bool has_room_for_tile = tile_set_atlas_source->has_room_for_tile(coords, tile_set_atlas_source->get_tile_size_in_atlas(coords), tile_set_atlas_source->get_tile_animation_columns(coords), p_value, tile_set_atlas_source->get_tile_animation_frames_count(coords), coords); - ERR_FAIL_COND_V(!has_room_for_tile, false); - tile_set_atlas_source->set_tile_animation_separation(coords, p_value); - emit_signal(SNAME("changed"), "animation_separation"); - return true; - } else if (p_name == "animation_speed") { - tile_set_atlas_source->set_tile_animation_speed(coords, p_value); - emit_signal(SNAME("changed"), "animation_speed"); - return true; - } else if (p_name == "animation_frames_count") { - bool has_room_for_tile = tile_set_atlas_source->has_room_for_tile(coords, tile_set_atlas_source->get_tile_size_in_atlas(coords), tile_set_atlas_source->get_tile_animation_columns(coords), tile_set_atlas_source->get_tile_animation_separation(coords), p_value, coords); - ERR_FAIL_COND_V(!has_room_for_tile, false); - tile_set_atlas_source->set_tile_animation_frames_count(coords, p_value); - notify_property_list_changed(); - emit_signal(SNAME("changed"), "animation_separation"); - return true; - } else if (components.size() == 2 && components[0].begins_with("animation_frame_") && components[0].trim_prefix("animation_frame_").is_valid_int()) { - int frame = components[0].trim_prefix("animation_frame_").to_int(); - ERR_FAIL_INDEX_V(frame, tile_set_atlas_source->get_tile_animation_frames_count(coords), false); - if (components[1] == "duration") { - tile_set_atlas_source->set_tile_animation_frame_duration(coords, frame, p_value); - return true; - } } } else if (alternative > 0) { if (p_name == "alternative_id") { @@ -213,6 +199,74 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_set(const StringName &p_na } } + // Animation. + // Check if all tiles have an alternative_id of 0. + bool all_alternatve_id_zero = true; + for (TileSelection tile : tiles) { + if (tile.alternative != 0) { + all_alternatve_id_zero = false; + break; + } + } + + if (all_alternatve_id_zero) { + Vector<String> components = String(p_name).split("/", true, 2); + if (p_name == "animation_columns") { + for (TileSelection tile : tiles) { + bool has_room_for_tile = tile_set_atlas_source->has_room_for_tile(tile.tile, tile_set_atlas_source->get_tile_size_in_atlas(tile.tile), p_value, tile_set_atlas_source->get_tile_animation_separation(tile.tile), tile_set_atlas_source->get_tile_animation_frames_count(tile.tile), tile.tile); + if (!has_room_for_tile) { + ERR_PRINT("No room for tile"); + } else { + tile_set_atlas_source->set_tile_animation_columns(tile.tile, p_value); + } + } + emit_signal(SNAME("changed"), "animation_columns"); + return true; + } else if (p_name == "animation_separation") { + for (TileSelection tile : tiles) { + bool has_room_for_tile = tile_set_atlas_source->has_room_for_tile(tile.tile, tile_set_atlas_source->get_tile_size_in_atlas(tile.tile), tile_set_atlas_source->get_tile_animation_columns(tile.tile), p_value, tile_set_atlas_source->get_tile_animation_frames_count(tile.tile), tile.tile); + if (!has_room_for_tile) { + ERR_PRINT("No room for tile"); + } else { + tile_set_atlas_source->set_tile_animation_separation(tile.tile, p_value); + } + } + emit_signal(SNAME("changed"), "animation_separation"); + return true; + } else if (p_name == "animation_speed") { + for (TileSelection tile : tiles) { + tile_set_atlas_source->set_tile_animation_speed(tile.tile, p_value); + } + emit_signal(SNAME("changed"), "animation_speed"); + return true; + } else if (p_name == "animation_frames_count") { + for (TileSelection tile : tiles) { + bool has_room_for_tile = tile_set_atlas_source->has_room_for_tile(tile.tile, tile_set_atlas_source->get_tile_size_in_atlas(tile.tile), tile_set_atlas_source->get_tile_animation_columns(tile.tile), tile_set_atlas_source->get_tile_animation_separation(tile.tile), p_value, tile.tile); + if (!has_room_for_tile) { + ERR_PRINT("No room for tile"); + } else { + tile_set_atlas_source->set_tile_animation_frames_count(tile.tile, p_value); + } + } + notify_property_list_changed(); + emit_signal(SNAME("changed"), "animation_separation"); + return true; + } else if (components.size() == 2 && components[0].begins_with("animation_frame_") && components[0].trim_prefix("animation_frame_").is_valid_int()) { + for (TileSelection tile : tiles) { + int frame = components[0].trim_prefix("animation_frame_").to_int(); + if (frame < 0 || frame >= tile_set_atlas_source->get_tile_animation_frames_count(tile.tile)) { + ERR_PRINT(vformat("No tile animation frame with index %d", frame)); + } else { + if (components[1] == "duration") { + tile_set_atlas_source->set_tile_animation_frame_duration(tile.tile, frame, p_value); + return true; + } + } + } + } + } + + // Other properties. bool any_valid = false; for (Set<TileSelection>::Element *E = tiles.front(); E; E = E->next()) { const Vector2i &coords = E->get().tile; @@ -238,6 +292,7 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_get(const StringName &p_na return false; } + // ID and size related properties.s if (tiles.size() == 1) { const Vector2i &coords = tiles.front()->get().tile; const int &alternative = tiles.front()->get().alternative; @@ -250,27 +305,6 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_get(const StringName &p_na } else if (p_name == "size_in_atlas") { r_ret = tile_set_atlas_source->get_tile_size_in_atlas(coords); return true; - } else if (p_name == "animation_columns") { - r_ret = tile_set_atlas_source->get_tile_animation_columns(coords); - return true; - } else if (p_name == "animation_separation") { - r_ret = tile_set_atlas_source->get_tile_animation_separation(coords); - return true; - } else if (p_name == "animation_speed") { - r_ret = tile_set_atlas_source->get_tile_animation_speed(coords); - return true; - } else if (p_name == "animation_frames_count") { - r_ret = tile_set_atlas_source->get_tile_animation_frames_count(coords); - return true; - } else if (components.size() == 2 && components[0].begins_with("animation_frame_") && components[0].trim_prefix("animation_frame_").is_valid_int()) { - int frame = components[0].trim_prefix("animation_frame_").to_int(); - if (components[1] == "duration") { - if (frame < 0 || frame >= tile_set_atlas_source->get_tile_animation_frames_count(coords)) { - return false; - } - r_ret = tile_set_atlas_source->get_tile_animation_frame_duration(coords, frame); - return true; - } } } else if (alternative > 0) { if (p_name == "alternative_id") { @@ -280,6 +314,44 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_get(const StringName &p_na } } + // Animation. + // Check if all tiles have an alternative_id of 0. + bool all_alternatve_id_zero = true; + for (TileSelection tile : tiles) { + if (tile.alternative != 0) { + all_alternatve_id_zero = false; + break; + } + } + + if (all_alternatve_id_zero) { + const Vector2i &coords = tiles.front()->get().tile; + + Vector<String> components = String(p_name).split("/", true, 2); + if (p_name == "animation_columns") { + r_ret = tile_set_atlas_source->get_tile_animation_columns(coords); + return true; + } else if (p_name == "animation_separation") { + r_ret = tile_set_atlas_source->get_tile_animation_separation(coords); + return true; + } else if (p_name == "animation_speed") { + r_ret = tile_set_atlas_source->get_tile_animation_speed(coords); + return true; + } else if (p_name == "animation_frames_count") { + r_ret = tile_set_atlas_source->get_tile_animation_frames_count(coords); + return true; + } else if (components.size() == 2 && components[0].begins_with("animation_frame_") && components[0].trim_prefix("animation_frame_").is_valid_int()) { + int frame = components[0].trim_prefix("animation_frame_").to_int(); + if (components[1] == "duration") { + if (frame < 0 || frame >= tile_set_atlas_source->get_tile_animation_frames_count(coords)) { + return false; + } + r_ret = tile_set_atlas_source->get_tile_animation_frame_duration(coords, frame); + return true; + } + } + } + for (Set<TileSelection>::Element *E = tiles.front(); E; E = E->next()) { // Return the first tile with a property matching the name. // Note: It's a little bit annoying, but the behavior is the same the one in MultiNodeEdit. @@ -304,29 +376,42 @@ void TileSetAtlasSourceEditor::AtlasTileProxyObject::_get_property_list(List<Pro return; } + // ID and size related properties. if (tiles.size() == 1) { if (tiles.front()->get().alternative == 0) { p_list->push_back(PropertyInfo(Variant::VECTOR2I, "atlas_coords", PROPERTY_HINT_NONE, "")); p_list->push_back(PropertyInfo(Variant::VECTOR2I, "size_in_atlas", PROPERTY_HINT_NONE, "")); - - // Animation. - p_list->push_back(PropertyInfo(Variant::NIL, "Animation", PROPERTY_HINT_NONE, "animation_", PROPERTY_USAGE_GROUP)); - p_list->push_back(PropertyInfo(Variant::INT, "animation_columns", PROPERTY_HINT_NONE, "")); - p_list->push_back(PropertyInfo(Variant::VECTOR2I, "animation_separation", PROPERTY_HINT_NONE, "")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "animation_speed", PROPERTY_HINT_NONE, "")); - p_list->push_back(PropertyInfo(Variant::INT, "animation_frames_count", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_ARRAY, "Frames,animation_frame_")); - if (tile_set_atlas_source->get_tile_animation_frames_count(tiles.front()->get().tile) == 1) { - p_list->push_back(PropertyInfo(Variant::FLOAT, "animation_frame_0/duration", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_READ_ONLY)); - } else { - for (int i = 0; i < tile_set_atlas_source->get_tile_animation_frames_count(tiles.front()->get().tile); i++) { - p_list->push_back(PropertyInfo(Variant::FLOAT, vformat("animation_frame_%d/duration", i), PROPERTY_HINT_NONE, "")); - } - } } else { p_list->push_back(PropertyInfo(Variant::INT, "alternative_id", PROPERTY_HINT_NONE, "")); } } + // Animation. + // Check if all tiles have an alternative_id of 0. + bool all_alternatve_id_zero = true; + for (TileSelection tile : tiles) { + if (tile.alternative != 0) { + all_alternatve_id_zero = false; + break; + } + } + + if (all_alternatve_id_zero) { + p_list->push_back(PropertyInfo(Variant::NIL, "Animation", PROPERTY_HINT_NONE, "animation_", PROPERTY_USAGE_GROUP)); + p_list->push_back(PropertyInfo(Variant::INT, "animation_columns", PROPERTY_HINT_NONE, "")); + p_list->push_back(PropertyInfo(Variant::VECTOR2I, "animation_separation", PROPERTY_HINT_NONE, "")); + p_list->push_back(PropertyInfo(Variant::FLOAT, "animation_speed", PROPERTY_HINT_NONE, "")); + p_list->push_back(PropertyInfo(Variant::INT, "animation_frames_count", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_ARRAY, "Frames,animation_frame_")); + // Not optimal, but returns value for the first tile. This is similar to what MultiNodeEdit does. + if (tile_set_atlas_source->get_tile_animation_frames_count(tiles.front()->get().tile) == 1) { + p_list->push_back(PropertyInfo(Variant::FLOAT, "animation_frame_0/duration", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_READ_ONLY)); + } else { + for (int i = 0; i < tile_set_atlas_source->get_tile_animation_frames_count(tiles.front()->get().tile); i++) { + p_list->push_back(PropertyInfo(Variant::FLOAT, vformat("animation_frame_%d/duration", i), PROPERTY_HINT_NONE, "")); + } + } + } + // Get the list of properties common to all tiles (similar to what's done in MultiNodeEdit). struct PropertyId { int occurence_id = 0; @@ -450,9 +535,6 @@ void TileSetAtlasSourceEditor::_update_tile_id_label() { void TileSetAtlasSourceEditor::_update_source_inspector() { // Update the proxy object. atlas_source_proxy_object->edit(tile_set, tile_set_atlas_source, tile_set_atlas_source_id); - - // Update the "clear outside texture" button. - tool_advanced_menu_buttom->get_popup()->set_item_disabled(0, !tile_set_atlas_source->has_tiles_outside_texture()); } void TileSetAtlasSourceEditor::_update_fix_selected_and_hovered_tiles() { @@ -674,9 +756,9 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() { #undef ADD_TILE_DATA_EDITOR // Add tile data editors as children. - for (Map<String, TileDataEditor *>::Element *E = tile_data_editors.front(); E; E = E->next()) { + for (KeyValue<String, TileDataEditor *> &E : tile_data_editors) { // Tile Data Editor. - TileDataEditor *tile_data_editor = E->get(); + TileDataEditor *tile_data_editor = E.value; if (!tile_data_editor->is_inside_tree()) { tile_data_painting_editor_container->add_child(tile_data_editor); } @@ -693,7 +775,11 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() { // Update visibility. bool is_visible = tools_button_group->get_pressed_button() == tool_paint_button; tile_data_editor_dropdown_button->set_visible(is_visible); - tile_data_editor_dropdown_button->set_text(TTR("Select a property editor")); + if (tile_data_editors_tree->get_selected()) { + tile_data_editor_dropdown_button->set_text(tile_data_editors_tree->get_selected()->get_text(0)); + } else { + tile_data_editor_dropdown_button->set_text(TTR("Select a property editor")); + } tile_data_editors_label->set_visible(is_visible); } @@ -716,9 +802,9 @@ void TileSetAtlasSourceEditor::_update_current_tile_data_editor() { } // Hide all editors but the current one. - for (Map<String, TileDataEditor *>::Element *E = tile_data_editors.front(); E; E = E->next()) { - E->get()->hide(); - E->get()->get_toolbar()->hide(); + for (const KeyValue<String, TileDataEditor *> &E : tile_data_editors) { + E.value->hide(); + E.value->get_toolbar()->hide(); } if (tile_data_editors.has(property)) { current_tile_data_editor = tile_data_editors[property]; @@ -838,7 +924,7 @@ void TileSetAtlasSourceEditor::_update_atlas_view() { tile_atlas_view->update(); // Synchronize atlas view. - TilesEditor::get_singleton()->synchronize_atlas_view(tile_atlas_view); + TilesEditorPlugin::get_singleton()->synchronize_atlas_view(tile_atlas_view); } void TileSetAtlasSourceEditor::_update_toolbar() { @@ -889,7 +975,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<InputEven current_tile_data_editor->forward_painting_atlas_gui_input(tile_atlas_view, tile_set_atlas_source, p_event); } // Update only what's needed. - tile_set_atlas_source_changed_needs_update = false; + tile_set_changed_needs_update = false; tile_atlas_control->update(); tile_atlas_control_unscaled->update(); @@ -991,7 +1077,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<InputEven drag_current_tile = coords; // Update only what's needed. - tile_set_atlas_source_changed_needs_update = false; + tile_set_changed_needs_update = false; _update_tile_inspector(); _update_atlas_view(); _update_tile_id_label(); @@ -1031,7 +1117,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<InputEven drag_current_tile = new_rect.position; // Update only what's needed. - tile_set_atlas_source_changed_needs_update = false; + tile_set_changed_needs_update = false; _update_tile_inspector(); _update_atlas_view(); _update_tile_id_label(); @@ -1530,9 +1616,6 @@ void TileSetAtlasSourceEditor::_menu_option(int p_option) { undo_redo->commit_action(); _update_tile_id_label(); } break; - case ADVANCED_CLEANUP_TILES_OUTSIDE_TEXTURE: { - tile_set_atlas_source->clear_tiles_outside_texture(); - } break; case ADVANCED_AUTO_CREATE_TILES: { _auto_create_tiles(); } break; @@ -1942,8 +2025,13 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_unscaled_draw() { } } -void TileSetAtlasSourceEditor::_tile_set_atlas_source_changed() { - tile_set_atlas_source_changed_needs_update = true; +void TileSetAtlasSourceEditor::_tile_set_changed() { + tile_set_changed_needs_update = true; +} + +void TileSetAtlasSourceEditor::_tile_proxy_object_changed(String p_what) { + tile_set_changed_needs_update = false; // Avoid updating too many things. + _update_atlas_view(); } void TileSetAtlasSourceEditor::_atlas_source_proxy_object_changed(String p_what) { @@ -1960,30 +2048,66 @@ void TileSetAtlasSourceEditor::_undo_redo_inspector_callback(Object *p_undo_redo #define ADD_UNDO(obj, property) undo_redo->add_undo_property(obj, property, obj->get(property)); - AtlasTileProxyObject *tile_data = Object::cast_to<AtlasTileProxyObject>(p_edited); - if (tile_data) { + undo_redo->start_force_keep_in_merge_ends(); + AtlasTileProxyObject *tile_data_proxy = Object::cast_to<AtlasTileProxyObject>(p_edited); + if (tile_data_proxy) { Vector<String> components = String(p_property).split("/", true, 2); if (components.size() == 2 && components[1] == "polygons_count") { int layer_index = components[0].trim_prefix("physics_layer_").to_int(); int new_polygons_count = p_new_value; - int old_polygons_count = tile_data->get(vformat("physics_layer_%d/polygons_count", layer_index)); + int old_polygons_count = tile_data_proxy->get(vformat("physics_layer_%d/polygons_count", layer_index)); if (new_polygons_count < old_polygons_count) { for (int i = new_polygons_count - 1; i < old_polygons_count; i++) { - ADD_UNDO(tile_data, vformat("physics_layer_%d/polygon_%d/points", layer_index, i)); - ADD_UNDO(tile_data, vformat("physics_layer_%d/polygon_%d/one_way", layer_index, i)); - ADD_UNDO(tile_data, vformat("physics_layer_%d/polygon_%d/one_way_margin", layer_index, i)); + ADD_UNDO(tile_data_proxy, vformat("physics_layer_%d/polygon_%d/points", layer_index, i)); + ADD_UNDO(tile_data_proxy, vformat("physics_layer_%d/polygon_%d/one_way", layer_index, i)); + ADD_UNDO(tile_data_proxy, vformat("physics_layer_%d/polygon_%d/one_way_margin", layer_index, i)); } } } else if (p_property == "terrain_set") { - int current_terrain_set = tile_data->get("terrain_set"); + int current_terrain_set = tile_data_proxy->get("terrain_set"); for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) { TileSet::CellNeighbor bit = TileSet::CellNeighbor(i); if (tile_set->is_valid_peering_bit_terrain(current_terrain_set, bit)) { - ADD_UNDO(tile_data, "terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i])); + ADD_UNDO(tile_data_proxy, "terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i])); } } } } + + TileSetAtlasSourceProxyObject *atlas_source_proxy = Object::cast_to<TileSetAtlasSourceProxyObject>(p_edited); + if (atlas_source_proxy) { + TileSetAtlasSource *atlas_source = atlas_source_proxy->get_edited(); + ERR_FAIL_COND(!atlas_source); + + PackedVector2Array arr; + if (p_property == "texture") { + arr = atlas_source->get_tiles_to_be_removed_on_change(p_new_value, atlas_source->get_margins(), atlas_source->get_separation(), atlas_source->get_texture_region_size()); + } else if (p_property == "margins") { + arr = atlas_source->get_tiles_to_be_removed_on_change(atlas_source->get_texture(), p_new_value, atlas_source->get_separation(), atlas_source->get_texture_region_size()); + } else if (p_property == "separation") { + arr = atlas_source->get_tiles_to_be_removed_on_change(atlas_source->get_texture(), atlas_source->get_margins(), p_new_value, atlas_source->get_texture_region_size()); + } else if (p_property == "texture_region_size") { + arr = atlas_source->get_tiles_to_be_removed_on_change(atlas_source->get_texture(), atlas_source->get_margins(), atlas_source->get_separation(), p_new_value); + } + + if (!arr.is_empty()) { + // Get all properties assigned to a tile. + List<PropertyInfo> properties; + atlas_source->get_property_list(&properties); + + for (int i = 0; i < arr.size(); i++) { + Vector2i coords = arr[i]; + String prefix = vformat("%d:%d/", coords.x, coords.y); + for (PropertyInfo pi : properties) { + if (pi.name.begins_with(prefix)) { + ADD_UNDO(atlas_source, pi.name); + } + } + } + } + } + undo_redo->end_force_keep_in_merge_ends(); + #undef ADD_UNDO } @@ -1998,8 +2122,8 @@ void TileSetAtlasSourceEditor::edit(Ref<TileSet> p_tile_set, TileSetAtlasSource } // Remove listener for old objects. - if (tile_set_atlas_source) { - tile_set_atlas_source->disconnect("changed", callable_mp(this, &TileSetAtlasSourceEditor::_tile_set_atlas_source_changed)); + if (tile_set.is_valid()) { + tile_set->disconnect("changed", callable_mp(this, &TileSetAtlasSourceEditor::_tile_set_changed)); } // Clear the selection. @@ -2011,8 +2135,8 @@ void TileSetAtlasSourceEditor::edit(Ref<TileSet> p_tile_set, TileSetAtlasSource tile_set_atlas_source_id = p_source_id; // Add the listener again. - if (tile_set_atlas_source) { - tile_set_atlas_source->connect("changed", callable_mp(this, &TileSetAtlasSourceEditor::_tile_set_atlas_source_changed)); + if (tile_set.is_valid()) { + tile_set->connect("changed", callable_mp(this, &TileSetAtlasSourceEditor::_tile_set_changed)); } // Update everything. @@ -2153,7 +2277,7 @@ void TileSetAtlasSourceEditor::_notification(int p_what) { resize_handle_disabled = get_theme_icon(SNAME("EditorHandleDisabled"), SNAME("EditorIcons")); break; case NOTIFICATION_INTERNAL_PROCESS: - if (tile_set_atlas_source_changed_needs_update) { + if (tile_set_changed_needs_update) { // Update everything. _update_source_inspector(); @@ -2166,7 +2290,7 @@ void TileSetAtlasSourceEditor::_notification(int p_what) { _update_tile_data_editors(); _update_current_tile_data_editor(); - tile_set_atlas_source_changed_needs_update = false; + tile_set_changed_needs_update = false; } break; default: @@ -2206,7 +2330,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() { middle_vbox_container->add_child(tile_inspector_label); tile_proxy_object = memnew(AtlasTileProxyObject(this)); - tile_proxy_object->connect("changed", callable_mp(this, &TileSetAtlasSourceEditor::_update_atlas_view).unbind(1)); + tile_proxy_object->connect("changed", callable_mp(this, &TileSetAtlasSourceEditor::_tile_proxy_object_changed)); tile_inspector = memnew(EditorInspector); tile_inspector->set_undo_redo(undo_redo); @@ -2331,8 +2455,6 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() { tool_advanced_menu_buttom = memnew(MenuButton); tool_advanced_menu_buttom->set_flat(true); - tool_advanced_menu_buttom->get_popup()->add_item(TTR("Cleanup Tiles Outside Texture"), ADVANCED_CLEANUP_TILES_OUTSIDE_TEXTURE); - tool_advanced_menu_buttom->get_popup()->set_item_disabled(0, true); tool_advanced_menu_buttom->get_popup()->add_item(TTR("Create Tiles in Non-Transparent Texture Regions"), ADVANCED_AUTO_CREATE_TILES); tool_advanced_menu_buttom->get_popup()->add_item(TTR("Remove Tiles in Fully Transparent Texture Regions"), ADVANCED_AUTO_REMOVE_TILES); tool_advanced_menu_buttom->get_popup()->connect("id_pressed", callable_mp(this, &TileSetAtlasSourceEditor::_menu_option)); @@ -2354,7 +2476,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() { tile_atlas_view = memnew(TileAtlasView); tile_atlas_view->set_h_size_flags(SIZE_EXPAND_FILL); tile_atlas_view->set_v_size_flags(SIZE_EXPAND_FILL); - tile_atlas_view->connect("transform_changed", callable_mp(TilesEditor::get_singleton(), &TilesEditor::set_atlas_view_transform)); + tile_atlas_view->connect("transform_changed", callable_mp(TilesEditorPlugin::get_singleton(), &TilesEditorPlugin::set_atlas_view_transform)); tile_atlas_view->connect("transform_changed", callable_mp(this, &TileSetAtlasSourceEditor::_tile_atlas_view_transform_changed).unbind(2)); right_panel->add_child(tile_atlas_view); @@ -2406,6 +2528,8 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() { tile_atlas_view_missing_source_label->set_v_size_flags(SIZE_EXPAND_FILL); tile_atlas_view_missing_source_label->hide(); right_panel->add_child(tile_atlas_view_missing_source_label); + + EditorNode::get_singleton()->get_editor_data().add_undo_redo_inspector_hook_callback(callable_mp(this, &TileSetAtlasSourceEditor::_undo_redo_inspector_callback)); } TileSetAtlasSourceEditor::~TileSetAtlasSourceEditor() { diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.h b/editor/plugins/tiles/tile_set_atlas_source_editor.h index 501416c340..ea6f2847ae 100644 --- a/editor/plugins/tiles/tile_set_atlas_source_editor.h +++ b/editor/plugins/tiles/tile_set_atlas_source_editor.h @@ -78,6 +78,7 @@ private: int get_id(); void edit(Ref<TileSet> p_tile_set, TileSetAtlasSource *p_tile_set_atlas_source, int p_source_id); + TileSetAtlasSource *get_edited() { return tile_set_atlas_source; }; }; // -- Proxy object for a tile, needed by the inspector -- @@ -112,7 +113,7 @@ private: UndoRedo *undo_redo = EditorNode::get_undo_redo(); - bool tile_set_atlas_source_changed_needs_update = false; + bool tile_set_changed_needs_update = false; // -- Properties painting -- VBoxContainer *tile_data_painting_editor_container; @@ -189,7 +190,6 @@ private: TILE_CREATE_ALTERNATIVE, TILE_DELETE, - ADVANCED_CLEANUP_TILES_OUTSIDE_TEXTURE, ADVANCED_AUTO_CREATE_TILES, ADVANCED_AUTO_REMOVE_TILES, }; @@ -263,7 +263,8 @@ private: void _auto_remove_tiles(); AcceptDialog *confirm_auto_create_tiles; - void _tile_set_atlas_source_changed(); + void _tile_set_changed(); + void _tile_proxy_object_changed(String p_what); void _atlas_source_proxy_object_changed(String p_what); void _undo_redo_inspector_callback(Object *p_undo_redo, Object *p_edited, String p_property, Variant p_new_value); diff --git a/editor/plugins/tiles/tile_set_editor.cpp b/editor/plugins/tiles/tile_set_editor.cpp index 48d0d9b333..0fbb9a98c7 100644 --- a/editor/plugins/tiles/tile_set_editor.cpp +++ b/editor/plugins/tiles/tile_set_editor.cpp @@ -145,14 +145,21 @@ void TileSetEditor::_update_sources_list(int force_selected_id) { Ref<Texture2D> texture; String item_text; + // Common to all type of sources. + if (!source->get_name().is_empty()) { + item_text = vformat(TTR("%s (id:%d)"), source->get_name(), source_id); + } + // Atlas source. TileSetAtlasSource *atlas_source = Object::cast_to<TileSetAtlasSource>(source); if (atlas_source) { texture = atlas_source->get_texture(); - if (texture.is_valid()) { - item_text = vformat("%s (id:%d)", texture->get_path().get_file(), source_id); - } else { - item_text = vformat(TTR("No Texture Atlas Source (id:%d)"), source_id); + if (item_text.is_empty()) { + if (texture.is_valid()) { + item_text = vformat("%s (ID:%d)", texture->get_path().get_file(), source_id); + } else { + item_text = vformat(TTR("No Texture Atlas Source (ID:%d)"), source_id); + } } } @@ -160,12 +167,14 @@ void TileSetEditor::_update_sources_list(int force_selected_id) { TileSetScenesCollectionSource *scene_collection_source = Object::cast_to<TileSetScenesCollectionSource>(source); if (scene_collection_source) { texture = get_theme_icon(SNAME("PackedScene"), SNAME("EditorIcons")); - item_text = vformat(TTR("Scene Collection Source (id:%d)"), source_id); + if (item_text.is_empty()) { + item_text = vformat(TTR("Scene Collection Source (ID:%d)"), source_id); + } } // Use default if not valid. if (item_text.is_empty()) { - item_text = vformat(TTR("Unknown Type Source (id:%d)"), source_id); + item_text = vformat(TTR("Unknown Type Source (ID:%d)"), source_id); } if (!texture.is_valid()) { texture = missing_texture_texture; @@ -200,7 +209,7 @@ void TileSetEditor::_update_sources_list(int force_selected_id) { _source_selected(sources_list->get_current()); // Synchronize the lists. - TilesEditor::get_singleton()->set_sources_lists_current(sources_list->get_current()); + TilesEditorPlugin::get_singleton()->set_sources_lists_current(sources_list->get_current()); } void TileSetEditor::_source_selected(int p_source_index) { @@ -318,6 +327,7 @@ void TileSetEditor::_notification(int p_what) { tile_set->set_edited(true); } _update_sources_list(); + _update_patterns_list(); tile_set_changed_needs_update = false; } break; @@ -326,10 +336,56 @@ void TileSetEditor::_notification(int p_what) { } } +void TileSetEditor::_patterns_item_list_gui_input(const Ref<InputEvent> &p_event) { + ERR_FAIL_COND(!tile_set.is_valid()); + + if (ED_IS_SHORTCUT("tiles_editor/delete", p_event) && p_event->is_pressed() && !p_event->is_echo()) { + Vector<int> selected = patterns_item_list->get_selected_items(); + undo_redo->create_action(TTR("Remove TileSet patterns")); + for (int i = 0; i < selected.size(); i++) { + int pattern_index = selected[i]; + undo_redo->add_do_method(*tile_set, "remove_pattern", pattern_index); + undo_redo->add_undo_method(*tile_set, "add_pattern", tile_set->get_pattern(pattern_index), pattern_index); + } + undo_redo->commit_action(); + patterns_item_list->accept_event(); + } +} + +void TileSetEditor::_pattern_preview_done(Ref<TileMapPattern> p_pattern, Ref<Texture2D> p_texture) { + // TODO optimize ? + for (int i = 0; i < patterns_item_list->get_item_count(); i++) { + if (patterns_item_list->get_item_metadata(i) == p_pattern) { + patterns_item_list->set_item_icon(i, p_texture); + break; + } + } +} + +void TileSetEditor::_update_patterns_list() { + ERR_FAIL_COND(!tile_set.is_valid()); + + // Recreate the items. + patterns_item_list->clear(); + for (int i = 0; i < tile_set->get_patterns_count(); i++) { + int id = patterns_item_list->add_item(""); + patterns_item_list->set_item_metadata(id, tile_set->get_pattern(i)); + TilesEditorPlugin::get_singleton()->queue_pattern_preview(tile_set, tile_set->get_pattern(i), callable_mp(this, &TileSetEditor::_pattern_preview_done)); + } + + // Update the label visibility. + patterns_help_label->set_visible(patterns_item_list->get_item_count() == 0); +} + void TileSetEditor::_tile_set_changed() { tile_set_changed_needs_update = true; } +void TileSetEditor::_tab_changed(int p_tab_changed) { + split_container->set_visible(p_tab_changed == 0); + patterns_item_list->set_visible(p_tab_changed == 1); +} + void TileSetEditor::_move_tile_set_array_element(Object *p_undo_redo, Object *p_edited, String p_array_prefix, int p_from_index, int p_to_pos) { UndoRedo *undo_redo = Object::cast_to<UndoRedo>(p_undo_redo); ERR_FAIL_COND(!undo_redo); @@ -573,6 +629,7 @@ void TileSetEditor::edit(Ref<TileSet> p_tile_set) { if (tile_set.is_valid()) { tile_set->connect("changed", callable_mp(this, &TileSetEditor::_tile_set_changed)); _update_sources_list(); + _update_patterns_list(); } tile_set_atlas_source_editor->hide(); @@ -585,8 +642,21 @@ TileSetEditor::TileSetEditor() { set_process_internal(true); + // TabBar. + tabs_bar = memnew(TabBar); + tabs_bar->set_clip_tabs(false); + tabs_bar->add_tab(TTR("Tiles")); + tabs_bar->add_tab(TTR("Patterns")); + tabs_bar->connect("tab_changed", callable_mp(this, &TileSetEditor::_tab_changed)); + + tile_set_toolbar = memnew(HBoxContainer); + tile_set_toolbar->set_h_size_flags(SIZE_EXPAND_FILL); + tile_set_toolbar->add_child(tabs_bar); + add_child(tile_set_toolbar); + + //// Tiles //// // Split container. - HSplitContainer *split_container = memnew(HSplitContainer); + split_container = memnew(HSplitContainer); split_container->set_name(TTR("Tiles")); split_container->set_h_size_flags(SIZE_EXPAND_FILL); split_container->set_v_size_flags(SIZE_EXPAND_FILL); @@ -605,8 +675,8 @@ TileSetEditor::TileSetEditor() { sources_list->set_h_size_flags(SIZE_EXPAND_FILL); sources_list->set_v_size_flags(SIZE_EXPAND_FILL); sources_list->connect("item_selected", callable_mp(this, &TileSetEditor::_source_selected)); - sources_list->connect("item_selected", callable_mp(TilesEditor::get_singleton(), &TilesEditor::set_sources_lists_current)); - sources_list->connect("visibility_changed", callable_mp(TilesEditor::get_singleton(), &TilesEditor::synchronize_sources_list), varray(sources_list)); + sources_list->connect("item_selected", callable_mp(TilesEditorPlugin::get_singleton(), &TilesEditorPlugin::set_sources_lists_current)); + sources_list->connect("visibility_changed", callable_mp(TilesEditorPlugin::get_singleton(), &TilesEditorPlugin::synchronize_sources_list), varray(sources_list)); sources_list->set_texture_filter(CanvasItem::TEXTURE_FILTER_NEAREST); sources_list->set_drag_forwarding(this); split_container_left_side->add_child(sources_list); @@ -672,6 +742,24 @@ TileSetEditor::TileSetEditor() { split_container_right_side->add_child(tile_set_scenes_collection_source_editor); tile_set_scenes_collection_source_editor->hide(); + //// Patterns //// + int thumbnail_size = 64; + patterns_item_list = memnew(ItemList); + patterns_item_list->set_max_columns(0); + patterns_item_list->set_icon_mode(ItemList::ICON_MODE_TOP); + patterns_item_list->set_fixed_column_width(thumbnail_size * 3 / 2); + patterns_item_list->set_max_text_lines(2); + patterns_item_list->set_fixed_icon_size(Size2(thumbnail_size, thumbnail_size)); + patterns_item_list->set_v_size_flags(Control::SIZE_EXPAND_FILL); + patterns_item_list->connect("gui_input", callable_mp(this, &TileSetEditor::_patterns_item_list_gui_input)); + add_child(patterns_item_list); + patterns_item_list->hide(); + + patterns_help_label = memnew(Label); + patterns_help_label->set_text(TTR("Add new patterns in the TileMap editing mode.")); + patterns_help_label->set_anchors_and_offsets_preset(Control::PRESET_CENTER); + patterns_item_list->add_child(patterns_help_label); + // Registers UndoRedo inspector callback. EditorNode::get_singleton()->get_editor_data().add_move_array_element_function(SNAME("TileSet"), callable_mp(this, &TileSetEditor::_move_tile_set_array_element)); EditorNode::get_singleton()->get_editor_data().add_undo_redo_inspector_hook_callback(callable_mp(this, &TileSetEditor::_undo_redo_inspector_callback)); diff --git a/editor/plugins/tiles/tile_set_editor.h b/editor/plugins/tiles/tile_set_editor.h index fe854b2281..cda38760cf 100644 --- a/editor/plugins/tiles/tile_set_editor.h +++ b/editor/plugins/tiles/tile_set_editor.h @@ -46,7 +46,13 @@ class TileSetEditor : public VBoxContainer { private: Ref<TileSet> tile_set; bool tile_set_changed_needs_update = false; + HSplitContainer *split_container; + // TabBar. + HBoxContainer *tile_set_toolbar; + TabBar *tabs_bar; + + // Tiles. Label *no_source_selected_label; TileSetAtlasSourceEditor *tile_set_atlas_source_editor; TileSetScenesCollectionSourceEditor *tile_set_scenes_collection_source_editor; @@ -69,7 +75,16 @@ private: AtlasMergingDialog *atlas_merging_dialog; TileProxiesManagerDialog *tile_proxies_manager_dialog; + // Patterns. + ItemList *patterns_item_list; + Label *patterns_help_label; + void _patterns_item_list_gui_input(const Ref<InputEvent> &p_event); + void _pattern_preview_done(Ref<TileMapPattern> p_pattern, Ref<Texture2D> p_texture); + bool select_last_pattern = false; + void _update_patterns_list(); + void _tile_set_changed(); + void _tab_changed(int p_tab_changed); void _move_tile_set_array_element(Object *p_undo_redo, Object *p_edited, String p_array_prefix, int p_from_index, int p_to_pos); void _undo_redo_inspector_callback(Object *p_undo_redo, Object *p_edited, String p_property, Variant p_new_value); @@ -82,6 +97,7 @@ public: _FORCE_INLINE_ static TileSetEditor *get_singleton() { return singleton; } 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; 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 f74b3bf9c2..dc26d380b8 100644 --- a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp +++ b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp @@ -56,10 +56,15 @@ int TileSetScenesCollectionSourceEditor::TileSetScenesCollectionProxyObject::get } bool TileSetScenesCollectionSourceEditor::TileSetScenesCollectionProxyObject::_set(const StringName &p_name, const Variant &p_value) { + String name = p_name; + if (name == "name") { + // Use the resource_name property to store the source's name. + name = "resource_name"; + } bool valid = false; - tile_set_scenes_collection_source->set(p_name, p_value, &valid); + tile_set_scenes_collection_source->set(name, p_value, &valid); if (valid) { - emit_signal(SNAME("changed"), String(p_name).utf8().get_data()); + emit_signal(SNAME("changed"), String(name).utf8().get_data()); } return valid; } @@ -68,11 +73,20 @@ bool TileSetScenesCollectionSourceEditor::TileSetScenesCollectionProxyObject::_g if (!tile_set_scenes_collection_source) { return false; } + String name = p_name; + if (name == "name") { + // Use the resource_name property to store the source's name. + name = "resource_name"; + } bool valid = false; - r_ret = tile_set_scenes_collection_source->get(p_name, &valid); + r_ret = tile_set_scenes_collection_source->get(name, &valid); return valid; } +void TileSetScenesCollectionSourceEditor::TileSetScenesCollectionProxyObject::_get_property_list(List<PropertyInfo> *p_list) const { + p_list->push_back(PropertyInfo(Variant::STRING, "name", PROPERTY_HINT_NONE, "")); +} + void TileSetScenesCollectionSourceEditor::TileSetScenesCollectionProxyObject::_bind_methods() { // -- Shape and layout -- ClassDB::bind_method(D_METHOD("set_id", "id"), &TileSetScenesCollectionSourceEditor::TileSetScenesCollectionProxyObject::set_id); @@ -89,6 +103,10 @@ void TileSetScenesCollectionSourceEditor::TileSetScenesCollectionProxyObject::ed ERR_FAIL_COND(p_source_id < 0); ERR_FAIL_COND(p_tile_set->get_source(p_source_id) != p_tile_set_scenes_collection_source); + if (tile_set == p_tile_set && tile_set_scenes_collection_source == p_tile_set_scenes_collection_source && source_id == p_source_id) { + return; + } + // Disconnect to changes. if (tile_set_scenes_collection_source) { tile_set_scenes_collection_source->disconnect(CoreStringNames::get_singleton()->property_list_changed, callable_mp((Object *)this, &Object::notify_property_list_changed)); @@ -174,6 +192,10 @@ void TileSetScenesCollectionSourceEditor::SceneTileProxyObject::edit(TileSetScen ERR_FAIL_COND(!p_tile_set_scenes_collection_source); ERR_FAIL_COND(!p_tile_set_scenes_collection_source->has_scene_tile_id(p_scene_id)); + if (tile_set_scenes_collection_source == p_tile_set_scenes_collection_source && scene_id == p_scene_id) { + return; + } + tile_set_scenes_collection_source = p_tile_set_scenes_collection_source; scene_id = p_scene_id; 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 195aa79bc4..3be7bee714 100644 --- a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.h +++ b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.h @@ -51,6 +51,7 @@ private: 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; static void _bind_methods(); public: diff --git a/editor/plugins/tiles/tiles_editor_plugin.cpp b/editor/plugins/tiles/tiles_editor_plugin.cpp index f51f4625a9..f1918073fb 100644 --- a/editor/plugins/tiles/tiles_editor_plugin.cpp +++ b/editor/plugins/tiles/tiles_editor_plugin.cpp @@ -30,99 +30,183 @@ #include "tiles_editor_plugin.h" +#include "core/os/mutex.h" + #include "editor/editor_node.h" #include "editor/editor_scale.h" #include "editor/plugins/canvas_item_editor_plugin.h" #include "scene/2d/tile_map.h" -#include "scene/resources/tile_set.h" - #include "scene/gui/box_container.h" #include "scene/gui/button.h" #include "scene/gui/control.h" #include "scene/gui/separator.h" +#include "scene/resources/tile_set.h" #include "tile_set_editor.h" -TilesEditor *TilesEditor::singleton = nullptr; +TilesEditorPlugin *TilesEditorPlugin::singleton = nullptr; + +void TilesEditorPlugin::_pattern_preview_done(const Variant &p_udata) { + pattern_preview_done.set(); +} + +void TilesEditorPlugin::_thread_func(void *ud) { + TilesEditorPlugin *te = (TilesEditorPlugin *)ud; + te->_thread(); +} + +void TilesEditorPlugin::_thread() { + pattern_thread_exited.clear(); + while (!pattern_thread_exit.is_set()) { + pattern_preview_sem.wait(); + + pattern_preview_mutex.lock(); + if (pattern_preview_queue.size()) { + QueueItem item = pattern_preview_queue.front()->get(); + pattern_preview_queue.pop_front(); + pattern_preview_mutex.unlock(); + + int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size"); + thumbnail_size *= EDSCALE; + Vector2 thumbnail_size2 = Vector2(thumbnail_size, thumbnail_size); + + if (item.pattern.is_valid() && !item.pattern->is_empty()) { + // Generate the pattern preview + SubViewport *viewport = memnew(SubViewport); + viewport->set_size(thumbnail_size2); + viewport->set_disable_input(true); + viewport->set_transparent_background(true); + viewport->set_update_mode(SubViewport::UPDATE_ONCE); + + TileMap *tile_map = memnew(TileMap); + tile_map->set_tileset(item.tile_set); + tile_map->set_pattern(0, Vector2(), item.pattern); + viewport->add_child(tile_map); + + TypedArray<Vector2i> used_cells = tile_map->get_used_cells(0); + + Rect2 encompassing_rect = Rect2(); + encompassing_rect.set_position(tile_map->map_to_world(used_cells[0])); + for (int i = 0; i < used_cells.size(); i++) { + Vector2i cell = used_cells[i]; + Vector2 world_pos = tile_map->map_to_world(cell); + encompassing_rect.expand_to(world_pos); + + // Texture. + Ref<TileSetAtlasSource> atlas_source = tile_set->get_source(tile_map->get_cell_source_id(0, cell)); + if (atlas_source.is_valid()) { + Vector2i coords = tile_map->get_cell_atlas_coords(0, cell); + int alternative = tile_map->get_cell_alternative_tile(0, cell); + + Vector2 center = world_pos - atlas_source->get_tile_effective_texture_offset(coords, alternative); + encompassing_rect.expand_to(center - atlas_source->get_tile_texture_region(coords).size / 2); + encompassing_rect.expand_to(center + atlas_source->get_tile_texture_region(coords).size / 2); + } + } + + Vector2 scale = thumbnail_size2 / MAX(encompassing_rect.size.x, encompassing_rect.size.y); + tile_map->set_scale(scale); + tile_map->set_position(-(scale * encompassing_rect.get_center()) + thumbnail_size2 / 2); -void TilesEditor::_notification(int p_what) { + // 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()); + + while (!pattern_preview_done.is_set()) { + OS::get_singleton()->delay_usec(10); + } + + Ref<Image> image = viewport->get_texture()->get_image(); + Ref<ImageTexture> image_texture; + image_texture.instantiate(); + image_texture->create_from_image(image); + + // Find the index for the given pattern. TODO: optimize. + Variant args[] = { item.pattern, image_texture }; + const Variant *args_ptr[] = { &args[0], &args[1] }; + Variant r; + Callable::CallError error; + item.callback.call(args_ptr, 2, r, error); + + viewport->queue_delete(); + } else { + pattern_preview_mutex.unlock(); + } + } + } + pattern_thread_exited.set(); +} + +void TilesEditorPlugin::_tile_map_changed() { + tile_map_changed_needs_update = true; +} + +void TilesEditorPlugin::_update_editors() { + // If tile_map is not edited, we change the edited only if we are not editing a tile_set. + tileset_editor->edit(tile_set); + TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); + if (tile_map) { + tilemap_editor->edit(tile_map); + } else { + tilemap_editor->edit(nullptr); + } + + // Update the viewport. + CanvasItemEditor::get_singleton()->update_viewport(); +} + +void TilesEditorPlugin::_notification(int p_what) { switch (p_what) { - case NOTIFICATION_ENTER_TREE: - case NOTIFICATION_THEME_CHANGED: { - tileset_tilemap_switch_button->set_icon(get_theme_icon(SNAME("TileSet"), SNAME("EditorIcons"))); - } break; case NOTIFICATION_INTERNAL_PROCESS: { if (tile_map_changed_needs_update) { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (tile_map) { tile_set = tile_map->get_tileset(); } - _update_switch_button(); _update_editors(); + tile_map_changed_needs_update = false; } } break; } } -void TilesEditor::_tile_map_changed() { - tile_map_changed_needs_update = true; -} - -void TilesEditor::_update_switch_button() { - // Force the buttons status if needed. - TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); - if (tile_map && !tile_set.is_valid()) { - tileset_tilemap_switch_button->set_pressed(false); - } else if (!tile_map && tile_set.is_valid()) { - tileset_tilemap_switch_button->set_pressed(true); - } -} - -void TilesEditor::_update_editors() { - // Set editors visibility. - tilemap_toolbar->set_visible(!tileset_tilemap_switch_button->is_pressed()); - tilemap_editor->set_visible(!tileset_tilemap_switch_button->is_pressed()); - tileset_editor->set_visible(tileset_tilemap_switch_button->is_pressed()); - - // Enable/disable the switch button. - if (!tileset_tilemap_switch_button->is_pressed()) { - if (!tile_set.is_valid()) { - tileset_tilemap_switch_button->set_disabled(true); - tileset_tilemap_switch_button->set_tooltip(TTR("This TileMap has no assigned TileSet, assign a TileSet to this TileMap to edit it.")); - } else { - tileset_tilemap_switch_button->set_disabled(false); - tileset_tilemap_switch_button->set_tooltip(TTR("Switch between TileSet/TileMap editor.")); - } - } else { +void TilesEditorPlugin::make_visible(bool p_visible) { + if (p_visible) { + // Disable and hide invalid editors. TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); - if (!tile_map) { - tileset_tilemap_switch_button->set_disabled(true); - tileset_tilemap_switch_button->set_tooltip(TTR("You are editing a TileSet resource. Select a TileMap node to paint.")); + tileset_editor_button->set_visible(tile_set.is_valid()); + tilemap_editor_button->set_visible(tile_map); + if (tile_map) { + editor_node->make_bottom_panel_item_visible(tilemap_editor); } else { - tileset_tilemap_switch_button->set_disabled(false); - tileset_tilemap_switch_button->set_tooltip(TTR("Switch between TileSet/TileMap editor.")); + editor_node->make_bottom_panel_item_visible(tileset_editor); } - } - // If tile_map is not edited, we change the edited only if we are not editing a tile_set. - TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); - if (tile_map) { - tilemap_editor->edit(tile_map); } else { - tilemap_editor->edit(nullptr); + tileset_editor_button->hide(); + tilemap_editor_button->hide(); + editor_node->hide_bottom_panel(); } - tileset_editor->edit(tile_set); +} - // Update the viewport - CanvasItemEditor::get_singleton()->update_viewport(); +void TilesEditorPlugin::queue_pattern_preview(Ref<TileSet> p_tile_set, Ref<TileMapPattern> p_pattern, Callable p_callback) { + ERR_FAIL_COND(!p_tile_set.is_valid()); + ERR_FAIL_COND(!p_pattern.is_valid()); + { + MutexLock lock(pattern_preview_mutex); + pattern_preview_queue.push_back({ p_tile_set, p_pattern, p_callback }); + } + pattern_preview_sem.post(); } -void TilesEditor::set_sources_lists_current(int p_current) { +void TilesEditorPlugin::set_sources_lists_current(int p_current) { atlas_sources_lists_current = p_current; } -void TilesEditor::synchronize_sources_list(Object *p_current) { +void TilesEditorPlugin::synchronize_sources_list(Object *p_current) { ItemList *item_list = Object::cast_to<ItemList>(p_current); ERR_FAIL_COND(!item_list); @@ -136,12 +220,12 @@ void TilesEditor::synchronize_sources_list(Object *p_current) { } } -void TilesEditor::set_atlas_view_transform(float p_zoom, Vector2 p_scroll) { +void TilesEditorPlugin::set_atlas_view_transform(float p_zoom, Vector2 p_scroll) { atlas_view_zoom = p_zoom; atlas_view_scroll = p_scroll; } -void TilesEditor::synchronize_atlas_view(Object *p_current) { +void TilesEditorPlugin::synchronize_atlas_view(Object *p_current) { TileAtlasView *tile_atlas_view = Object::cast_to<TileAtlasView>(p_current); ERR_FAIL_COND(!tile_atlas_view); @@ -150,11 +234,11 @@ void TilesEditor::synchronize_atlas_view(Object *p_current) { } } -void TilesEditor::edit(Object *p_object) { +void TilesEditorPlugin::edit(Object *p_object) { // Disconnect to changes. TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (tile_map) { - tile_map->disconnect("changed", callable_mp(this, &TilesEditor::_tile_map_changed)); + tile_map->disconnect("changed", callable_mp(this, &TilesEditorPlugin::_tile_map_changed)); } // Update edited objects. @@ -164,114 +248,79 @@ void TilesEditor::edit(Object *p_object) { tile_map_id = p_object->get_instance_id(); tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); tile_set = tile_map->get_tileset(); + editor_node->make_bottom_panel_item_visible(tilemap_editor); } else if (p_object->is_class("TileSet")) { tile_set = Ref<TileSet>(p_object); if (tile_map) { - if (tile_map->get_tileset() != tile_set) { + if (tile_map->get_tileset() != tile_set || !tile_map->is_inside_tree()) { tile_map = nullptr; + tile_map_id = ObjectID(); } } - } - - // Update pressed status button. - if (p_object->is_class("TileMap")) { - tileset_tilemap_switch_button->set_pressed(false); - } else if (p_object->is_class("TileSet")) { - tileset_tilemap_switch_button->set_pressed(true); + editor_node->make_bottom_panel_item_visible(tileset_editor); } } // Update the editors. - _update_switch_button(); _update_editors(); // Add change listener. if (tile_map) { - tile_map->connect("changed", callable_mp(this, &TilesEditor::_tile_map_changed)); + tile_map->connect("changed", callable_mp(this, &TilesEditorPlugin::_tile_map_changed)); } } -void TilesEditor::_bind_methods() { +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); } -TilesEditor::TilesEditor(EditorNode *p_editor) { +TilesEditorPlugin::TilesEditorPlugin(EditorNode *p_node) { set_process_internal(true); // Update the singleton. singleton = this; - // Toolbar. - HBoxContainer *toolbar = memnew(HBoxContainer); - toolbar->set_h_size_flags(SIZE_EXPAND_FILL); - add_child(toolbar); + editor_node = p_node; - // Switch button. - tileset_tilemap_switch_button = memnew(Button); - tileset_tilemap_switch_button->set_flat(true); - tileset_tilemap_switch_button->set_toggle_mode(true); - tileset_tilemap_switch_button->connect("toggled", callable_mp(this, &TilesEditor::_update_editors).unbind(1)); - toolbar->add_child(tileset_tilemap_switch_button); + // Tileset editor. + tileset_editor = memnew(TileSetEditor); + tileset_editor->set_h_size_flags(Control::SIZE_EXPAND_FILL); + tileset_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL); + tileset_editor->set_custom_minimum_size(Size2(0, 200) * EDSCALE); + tileset_editor->hide(); // Tilemap editor. tilemap_editor = memnew(TileMapEditor); - tilemap_editor->set_h_size_flags(SIZE_EXPAND_FILL); - tilemap_editor->set_v_size_flags(SIZE_EXPAND_FILL); + tilemap_editor->set_h_size_flags(Control::SIZE_EXPAND_FILL); + tilemap_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL); + tilemap_editor->set_custom_minimum_size(Size2(0, 200) * EDSCALE); tilemap_editor->hide(); - add_child(tilemap_editor); - tilemap_toolbar = tilemap_editor->get_toolbar(); - toolbar->add_child(tilemap_toolbar); + // Pattern preview generation thread. + pattern_preview_thread.start(_thread_func, this); - // Tileset editor. - tileset_editor = memnew(TileSetEditor); - tileset_editor->set_h_size_flags(SIZE_EXPAND_FILL); - tileset_editor->set_v_size_flags(SIZE_EXPAND_FILL); - tileset_editor->hide(); - add_child(tileset_editor); + // Bottom buttons. + tileset_editor_button = p_node->add_bottom_panel_item(TTR("TileSet"), tileset_editor); + tileset_editor_button->hide(); + tilemap_editor_button = p_node->add_bottom_panel_item(TTR("TileMap"), tilemap_editor); + tilemap_editor_button->hide(); // Initialization. - _update_switch_button(); _update_editors(); } -TilesEditor::~TilesEditor() { -} - -/////////////////////////////////////////////////////////////// - -void TilesEditorPlugin::_notification(int p_what) { -} - -void TilesEditorPlugin::make_visible(bool p_visible) { - if (p_visible) { - tiles_editor_button->show(); - editor_node->make_bottom_panel_item_visible(tiles_editor); - //get_tree()->connect_compat("idle_frame", tileset_editor, "_on_workspace_process"); - } else { - editor_node->hide_bottom_panel(); - tiles_editor_button->hide(); - //get_tree()->disconnect_compat("idle_frame", tileset_editor, "_on_workspace_process"); - } -} - -void TilesEditorPlugin::edit(Object *p_object) { - tiles_editor->edit(p_object); -} - -bool TilesEditorPlugin::handles(Object *p_object) const { - return p_object->is_class("TileMap") || p_object->is_class("TileSet"); -} - -TilesEditorPlugin::TilesEditorPlugin(EditorNode *p_node) { - editor_node = p_node; - - tiles_editor = memnew(TilesEditor(p_node)); - tiles_editor->set_custom_minimum_size(Size2(0, 200) * EDSCALE); - tiles_editor->hide(); - - tiles_editor_button = p_node->add_bottom_panel_item(TTR("Tiles"), tiles_editor); - tiles_editor_button->hide(); -} - TilesEditorPlugin::~TilesEditorPlugin() { + if (pattern_preview_thread.is_started()) { + pattern_thread_exit.set(); + pattern_preview_sem.post(); + while (!pattern_thread_exited.is_set()) { + OS::get_singleton()->delay_usec(10000); + RenderingServer::get_singleton()->sync(); //sync pending stuff, as thread may be blocked on visual server + } + pattern_preview_thread.wait_to_finish(); + } } diff --git a/editor/plugins/tiles/tiles_editor_plugin.h b/editor/plugins/tiles/tiles_editor_plugin.h index f976d68938..dd52bdc31a 100644 --- a/editor/plugins/tiles/tiles_editor_plugin.h +++ b/editor/plugins/tiles/tiles_editor_plugin.h @@ -38,24 +38,24 @@ #include "tile_map_editor.h" #include "tile_set_editor.h" -class TilesEditor : public VBoxContainer { - GDCLASS(TilesEditor, VBoxContainer); +class TilesEditorPlugin : public EditorPlugin { + GDCLASS(TilesEditorPlugin, EditorPlugin); - static TilesEditor *singleton; + static TilesEditorPlugin *singleton; private: + EditorNode *editor_node; + bool tile_map_changed_needs_update = false; ObjectID tile_map_id; Ref<TileSet> tile_set; - Button *tileset_tilemap_switch_button; - - Control *tilemap_toolbar; + Button *tilemap_editor_button; TileMapEditor *tilemap_editor; + Button *tileset_editor_button; TileSetEditor *tileset_editor; - void _update_switch_button(); void _update_editors(); // For synchronization. @@ -65,15 +65,35 @@ private: void _tile_map_changed(); + // Patterns preview generation. + struct QueueItem { + Ref<TileSet> tile_set; + Ref<TileMapPattern> pattern; + Callable callback; + }; + List<QueueItem> pattern_preview_queue; + Mutex pattern_preview_mutex; + Semaphore pattern_preview_sem; + 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); + static void _thread_func(void *ud); + void _thread(); + protected: void _notification(int p_what); static void _bind_methods(); public: - _FORCE_INLINE_ static TilesEditor *get_singleton() { return singleton; } + _FORCE_INLINE_ static TilesEditorPlugin *get_singleton() { return singleton; } - bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) { return tilemap_editor->forward_canvas_gui_input(p_event); } - void forward_canvas_draw_over_viewport(Control *p_overlay) { tilemap_editor->forward_canvas_draw_over_viewport(p_overlay); } + virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) override { return tilemap_editor->forward_canvas_gui_input(p_event); } + virtual void forward_canvas_draw_over_viewport(Control *p_overlay) override { tilemap_editor->forward_canvas_draw_over_viewport(p_overlay); } + + // Pattern preview API. + void queue_pattern_preview(Ref<TileSet> p_tile_set, Ref<TileMapPattern> p_pattern, Callable p_callback); // To synchronize the atlas sources lists. void set_sources_lists_current(int p_current); @@ -82,27 +102,6 @@ public: void set_atlas_view_transform(float p_zoom, Vector2 p_scroll); void synchronize_atlas_view(Object *p_current); - void edit(Object *p_object); - - TilesEditor(EditorNode *p_editor); - ~TilesEditor(); -}; - -class TilesEditorPlugin : public EditorPlugin { - GDCLASS(TilesEditorPlugin, EditorPlugin); - -private: - EditorNode *editor_node; - TilesEditor *tiles_editor; - Button *tiles_editor_button; - -protected: - void _notification(int p_what); - -public: - virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) override { return tiles_editor->forward_canvas_gui_input(p_event); } - virtual void forward_canvas_draw_over_viewport(Control *p_overlay) override { tiles_editor->forward_canvas_draw_over_viewport(p_overlay); } - virtual void edit(Object *p_object) override; virtual bool handles(Object *p_object) const override; virtual void make_visible(bool p_visible) override; diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index 27f30479cf..0a067dfc17 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -123,9 +123,9 @@ void VisualShaderGraphPlugin::set_connections(List<VisualShader::Connection> &p_ void VisualShaderGraphPlugin::show_port_preview(VisualShader::Type p_type, int p_node_id, int p_port_id) { if (visual_shader->get_shader_type() == p_type && links.has(p_node_id) && links[p_node_id].output_ports.has(p_port_id)) { - for (Map<int, Port>::Element *E = links[p_node_id].output_ports.front(); E; E = E->next()) { - if (E->value().preview_button != nullptr) { - E->value().preview_button->set_pressed(false); + for (const KeyValue<int, Port> &E : links[p_node_id].output_ports) { + if (E.value.preview_button != nullptr) { + E.value.preview_button->set_pressed(false); } } @@ -264,11 +264,11 @@ void VisualShaderGraphPlugin::register_curve_editor(int p_node_id, int p_index, } void VisualShaderGraphPlugin::update_uniform_refs() { - for (Map<int, Link>::Element *E = links.front(); E; E = E->next()) { - VisualShaderNodeUniformRef *ref = Object::cast_to<VisualShaderNodeUniformRef>(E->get().visual_node); + for (KeyValue<int, Link> &E : links) { + VisualShaderNodeUniformRef *ref = Object::cast_to<VisualShaderNodeUniformRef>(E.value.visual_node); if (ref) { - remove_node(E->get().type, E->key()); - add_node(E->get().type, E->key()); + remove_node(E.value.type, E.key); + add_node(E.value.type, E.key); } } } @@ -491,6 +491,35 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) { bool is_curve = curve.is_valid() || curve_xyz.is_valid(); if (is_curve) { + // a default value handling + { + Variant default_value; + bool port_left_used = false; + + for (const VisualShader::Connection &E : connections) { + if (E.to_node == p_id && E.to_port == 0) { + port_left_used = true; + break; + } + } + + if (!port_left_used) { + default_value = vsnode->get_input_port_default_value(0); + } + + Button *button = memnew(Button); + custom_editor->add_child(button); + register_default_input_button(p_id, 0, button); + custom_editor->move_child(button, 0); + + button->connect("pressed", callable_mp(VisualShaderEditor::get_singleton(), &VisualShaderEditor::_edit_port_default_input), varray(button, p_id, 0)); + if (default_value.get_type() != Variant::NIL) { + set_input_port_default_value(p_type, p_id, 0, default_value); + } else { + button->hide(); + } + } + VisualShaderEditor::get_singleton()->graph->add_child(node); VisualShaderEditor::get_singleton()->_update_created_node(node); @@ -643,6 +672,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) { for (const VisualShader::Connection &E : connections) { if (E.to_node == p_id && E.to_port == j) { port_left_used = true; + break; } } } @@ -777,7 +807,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) { expand->connect("pressed", callable_mp(VisualShaderEditor::get_singleton(), &VisualShaderEditor::_expand_output_port), varray(p_id, i, !vsnode->_is_output_port_expanded(i)), CONNECT_DEFERRED); hb->add_child(expand); } - if (visual_shader->get_shader_type() == VisualShader::TYPE_FRAGMENT && port_right != VisualShaderNode::PORT_TYPE_TRANSFORM && port_right != VisualShaderNode::PORT_TYPE_SAMPLER) { + if (vsnode->has_output_port_preview(i) && port_right != VisualShaderNode::PORT_TYPE_TRANSFORM && port_right != VisualShaderNode::PORT_TYPE_SAMPLER) { TextureButton *preview = memnew(TextureButton); preview->set_toggle_mode(true); preview->set_normal_texture(VisualShaderEditor::get_singleton()->get_theme_icon(SNAME("GuiVisibilityHidden"), SNAME("EditorIcons"))); diff --git a/editor/plugins/voxel_gi_editor_plugin.cpp b/editor/plugins/voxel_gi_editor_plugin.cpp index 5bbc0c9dd5..9a44d40dcb 100644 --- a/editor/plugins/voxel_gi_editor_plugin.cpp +++ b/editor/plugins/voxel_gi_editor_plugin.cpp @@ -33,7 +33,7 @@ void VoxelGIEditorPlugin::_bake() { if (voxel_gi) { if (voxel_gi->get_probe_data().is_null()) { - String path = get_tree()->get_edited_scene_root()->get_filename(); + String path = get_tree()->get_edited_scene_root()->get_scene_file_path(); if (path == String()) { path = "res://" + voxel_gi->get_name() + "_data.res"; } else { diff --git a/editor/progress_dialog.cpp b/editor/progress_dialog.cpp index 3441060fad..95a5646013 100644 --- a/editor/progress_dialog.cpp +++ b/editor/progress_dialog.cpp @@ -63,9 +63,9 @@ void BackgroundProgress::_add_task(const String &p_task, const String &p_label, void BackgroundProgress::_update() { _THREAD_SAFE_METHOD_ - for (Map<String, int>::Element *E = updates.front(); E; E = E->next()) { - if (tasks.has(E->key())) { - _task_step(E->key(), E->get()); + for (const KeyValue<String, int> &E : updates) { + if (tasks.has(E.key)) { + _task_step(E.key, E.value); } } diff --git a/editor/project_export.cpp b/editor/project_export.cpp index 14158b02c8..ad9c81458f 100644 --- a/editor/project_export.cpp +++ b/editor/project_export.cpp @@ -752,6 +752,9 @@ bool ProjectExportDialog::_fill_tree(EditorFileSystemDirectory *p_dir, TreeItem if (p_only_scenes && type != "PackedScene") { continue; } + if (type == "TextFile") { + continue; + } TreeItem *file = include_files->create_item(p_item); file->set_cell_mode(0, TreeItem::CELL_MODE_CHECK); diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 81554c9550..e8fd3070c2 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -2123,8 +2123,8 @@ void ProjectManager::_run_project_confirm() { const String &selected = selected_list[i].project_key; String path = EditorSettings::get_singleton()->get("projects/" + selected); - // `.substr(6)` on `IMPORTED_FILES_PATH` strips away the leading "res://". - if (!DirAccess::exists(path.plus_file(ProjectSettings::IMPORTED_FILES_PATH.substr(6)))) { + // `.substr(6)` on `ProjectSettings::get_singleton()->get_imported_files_path()` strips away the leading "res://". + if (!DirAccess::exists(path.plus_file(ProjectSettings::get_singleton()->get_imported_files_path().substr(6)))) { run_error_diag->set_text(TTR("Can't run project: Assets need to be imported.\nPlease edit the project to trigger the initial import.")); run_error_diag->popup_centered(); continue; diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp index 9063b5c6f8..a5e1b0eab8 100644 --- a/editor/rename_dialog.cpp +++ b/editor/rename_dialog.cpp @@ -459,7 +459,7 @@ String RenameDialog::_substitute(const String &subject, const Node *node, int co return result; } -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, ErrorHandlerType p_type) { +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); diff --git a/editor/rename_dialog.h b/editor/rename_dialog.h index 7990862b37..4db3ef6740 100644 --- a/editor/rename_dialog.h +++ b/editor/rename_dialog.h @@ -63,7 +63,7 @@ class RenameDialog : public ConfirmationDialog { String _postprocess(const String &subject); void _update_preview(String new_text = ""); void _update_preview_int(int new_value = 0); - static void _error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, ErrorHandlerType p_type); + static void _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); SceneTreeEditor *scene_tree_editor; UndoRedo *undo_redo; diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 4bc0905163..4a59eb4fb3 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -187,8 +187,8 @@ void SceneTreeDock::_perform_instantiate_scenes(const Vector<String> &p_files, N break; } - if (edited_scene->get_filename() != "") { - if (_cyclical_dependency_exists(edited_scene->get_filename(), instantiated_scene)) { + if (edited_scene->get_scene_file_path() != "") { + if (_cyclical_dependency_exists(edited_scene->get_scene_file_path(), instantiated_scene)) { accept->set_text(vformat(TTR("Cannot instance the scene '%s' because the current scene exists within one of its nodes."), p_files[i])); accept->popup_centered(); error = true; @@ -196,7 +196,7 @@ void SceneTreeDock::_perform_instantiate_scenes(const Vector<String> &p_files, N } } - instantiated_scene->set_filename(ProjectSettings::get_singleton()->localize_path(p_files[i])); + instantiated_scene->set_scene_file_path(ProjectSettings::get_singleton()->localize_path(p_files[i])); instances.push_back(instantiated_scene); } @@ -307,7 +307,7 @@ bool SceneTreeDock::_track_inherit(const String &p_target_scene_path, Node *p_de bool result = false; Vector<Node *> instances; while (true) { - if (p->get_filename() == p_target_scene_path) { + if (p->get_scene_file_path() == p_target_scene_path) { result = true; break; } @@ -411,10 +411,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { } } break; case TOOL_EXPAND_COLLAPSE: { - if (!scene_tree->get_selected()) { - break; - } - Tree *tree = scene_tree->get_scene_tree(); TreeItem *selected_item = tree->get_selected(); @@ -442,7 +438,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { if (!node_clipboard.is_empty()) { _clear_clipboard(); } - clipboard_source_scene = editor->get_edited_scene()->get_filename(); + clipboard_source_scene = editor->get_edited_scene()->get_scene_file_path(); selection.sort_custom<Node::Comparator>(); @@ -465,9 +461,9 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { } bool has_cycle = false; - if (edited_scene->get_filename() != String()) { + if (edited_scene->get_scene_file_path() != String()) { for (Node *E : node_clipboard) { - if (edited_scene->get_filename() == E->get_filename()) { + if (edited_scene->get_scene_file_path() == E->get_scene_file_path()) { has_cycle = true; break; } @@ -496,7 +492,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { editor_data->get_undo_redo().add_do_method(editor_selection, "clear"); Map<RES, RES> resource_remap; - String target_scene = editor->get_edited_scene()->get_filename(); + String target_scene = editor->get_edited_scene()->get_scene_file_path(); if (target_scene != clipboard_source_scene) { if (!clipboard_resource_remap.has(target_scene)) { Map<RES, RES> remap; @@ -517,8 +513,8 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { editor_data->get_undo_redo().add_do_method(paste_parent, "add_child", dup); - for (Map<const Node *, Node *>::Element *E2 = duplimap.front(); E2; E2 = E2->next()) { - Node *d = E2->value(); + for (KeyValue<const Node *, Node *> &E2 : duplimap) { + Node *d = E2.value; editor_data->get_undo_redo().add_do_method(d, "set_owner", owner); } @@ -808,7 +804,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { return; } - if (node->get_filename() != String()) { + if (node->get_scene_file_path() != String()) { accept->set_text(TTR("Instantiated scenes can't become root")); accept->popup_centered(); return; @@ -818,14 +814,14 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { 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, "set_filename", root->get_filename()); - editor_data->get_undo_redo().add_do_method(root, "set_filename", String()); + 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); editor_data->get_undo_redo().add_do_method(root, "set_owner", node); _node_replace_owner(root, root, node, MODE_DO); - editor_data->get_undo_redo().add_undo_method(root, "set_filename", root->get_filename()); - editor_data->get_undo_redo().add_undo_method(node, "set_filename", String()); + editor_data->get_undo_redo().add_undo_method(root, "set_scene_file_path", root->get_scene_file_path()); + 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); @@ -848,8 +844,8 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { break; } Ref<MultiNodeEdit> mne = memnew(MultiNodeEdit); - for (const Map<Node *, Object *>::Element *E = EditorNode::get_singleton()->get_editor_selection()->get_selection().front(); E; E = E->next()) { - mne->add_node(root->get_path_to(E->key())); + for (const KeyValue<Node *, Object *> &E : editor_selection->get_selection()) { + mne->add_node(root->get_path_to(E.key)); } EditorNode::get_singleton()->push_item(mne.ptr()); @@ -887,7 +883,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { Node *node = remove_list[0]; if (node == editor_data->get_edited_scene_root()) { msg = vformat(TTR("Delete the root node \"%s\"?"), node->get_name()); - } else if (node->get_filename() == "" && node->get_child_count() > 0) { + } else if (node->get_scene_file_path() == "" && node->get_child_count() > 0) { // Display this message only for non-instantiated scenes msg = vformat(TTR("Delete node \"%s\" and its children?"), node->get_name()); } else { @@ -934,7 +930,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { break; } - if (tocopy != editor_data->get_edited_scene_root() && tocopy->get_filename() != "") { + if (tocopy != editor_data->get_edited_scene_root() && tocopy->get_scene_file_path() != "") { accept->set_text(TTR("Can't save the branch of an already instantiated scene.\nTo create a variation of a scene, you can make an inherited scene based on the instantiated scene using Scene > New Inherited Scene... instead.")); accept->popup_centered(); break; @@ -979,6 +975,9 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { } EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT); } break; + case TOOL_AUTO_EXPAND: { + scene_tree->set_auto_expand_selected(!EditorSettings::get_singleton()->get("docks/scene_tree/auto_expand_to_selected"), true); + } break; case TOOL_SCENE_EDITABLE_CHILDREN: { if (!profile_allow_editing) { break; @@ -1047,10 +1046,10 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { break; } - ERR_FAIL_COND(node->get_filename() == String()); + ERR_FAIL_COND(node->get_scene_file_path() == String()); undo_redo->create_action(TTR("Make Local")); - undo_redo->add_do_method(node, "set_filename", ""); - undo_redo->add_undo_method(node, "set_filename", node->get_filename()); + undo_redo->add_do_method(node, "set_scene_file_path", ""); + undo_redo->add_undo_method(node, "set_scene_file_path", node->get_scene_file_path()); _node_replace_owner(node, node, root); undo_redo->add_do_method(scene_tree, "update_tree"); undo_redo->add_undo_method(scene_tree, "update_tree"); @@ -1064,7 +1063,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { if (e) { Node *node = e->get(); if (node) { - scene_tree->emit_signal(SNAME("open"), node->get_filename()); + scene_tree->emit_signal(SNAME("open"), node->get_scene_file_path()); } } } break; @@ -1223,6 +1222,7 @@ void SceneTreeDock::_notification(int p_what) { button_instance->set_icon(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons"))); button_create_script->set_icon(get_theme_icon(SNAME("ScriptCreate"), SNAME("EditorIcons"))); button_detach_script->set_icon(get_theme_icon(SNAME("ScriptRemove"), SNAME("EditorIcons"))); + button_tree_menu->set_icon(get_theme_icon(SNAME("GuiTabMenuHl"), SNAME("EditorIcons"))); filter->set_right_icon(get_theme_icon(SNAME("Search"), SNAME("EditorIcons"))); filter->set_clear_button_enabled(true); @@ -1291,12 +1291,14 @@ void SceneTreeDock::_notification(int p_what) { case NOTIFICATION_ENTER_TREE: { clear_inherit_confirm->connect("confirmed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_SCENE_CLEAR_INHERITANCE_CONFIRM, false)); + scene_tree->set_auto_expand_selected(EditorSettings::get_singleton()->get("docks/scene_tree/auto_expand_to_selected"), false); } break; case NOTIFICATION_EXIT_TREE: { clear_inherit_confirm->disconnect("confirmed", callable_mp(this, &SceneTreeDock::_tool_selected)); } break; case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { + scene_tree->set_auto_expand_selected(EditorSettings::get_singleton()->get("docks/scene_tree/auto_expand_to_selected"), false); button_add->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons"))); button_instance->set_icon(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons"))); button_create_script->set_icon(get_theme_icon(SNAME("ScriptCreate"), SNAME("EditorIcons"))); @@ -1694,7 +1696,7 @@ bool SceneTreeDock::_validate_no_instance() { List<Node *> selection = editor_selection->get_selected_node_list(); for (Node *E : selection) { - if (E != edited_scene && E->get_filename() != "") { + if (E != edited_scene && E->get_scene_file_path() != "") { accept->set_text(TTR("This operation can't be done on instantiated scenes.")); accept->popup_centered(); return false; @@ -1833,8 +1835,8 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V editor_data->get_undo_redo().add_do_method(this, "_set_owners", edited_scene, owners); - if (AnimationPlayerEditor::singleton->get_track_editor()->get_root() == node) { - editor_data->get_undo_redo().add_do_method(AnimationPlayerEditor::singleton->get_track_editor(), "set_root", node); + if (AnimationPlayerEditor::get_singleton()->get_track_editor()->get_root() == node) { + editor_data->get_undo_redo().add_do_method(AnimationPlayerEditor::get_singleton()->get_track_editor(), "set_root", node); } editor_data->get_undo_redo().add_undo_method(new_parent, "remove_child", node); @@ -1859,8 +1861,8 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V 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(), "move_child", node, child_pos); editor_data->get_undo_redo().add_undo_method(this, "_set_owners", edited_scene, owners); - if (AnimationPlayerEditor::singleton->get_track_editor()->get_root() == node) { - editor_data->get_undo_redo().add_undo_method(AnimationPlayerEditor::singleton->get_track_editor(), "set_root", node); + if (AnimationPlayerEditor::get_singleton()->get_track_editor()->get_root() == node) { + editor_data->get_undo_redo().add_undo_method(AnimationPlayerEditor::get_singleton()->get_track_editor(), "set_root", node); } if (p_keep_global_xform) { @@ -2071,8 +2073,8 @@ 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(), "move_child", n, n->get_index()); - if (AnimationPlayerEditor::singleton->get_track_editor()->get_root() == n) { - editor_data->get_undo_redo().add_undo_method(AnimationPlayerEditor::singleton->get_track_editor(), "set_root", n); + 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); } editor_data->get_undo_redo().add_undo_method(this, "_set_owners", edited_scene, owners); editor_data->get_undo_redo().add_undo_reference(n); @@ -2101,11 +2103,11 @@ void SceneTreeDock::_update_script_button() { if (!profile_allow_script_editing) { button_create_script->hide(); button_detach_script->hide(); - } else if (EditorNode::get_singleton()->get_editor_selection()->get_selection().size() == 0) { + } else if (editor_selection->get_selection().size() == 0) { button_create_script->hide(); button_detach_script->hide(); - } else if (EditorNode::get_singleton()->get_editor_selection()->get_selection().size() == 1) { - Node *n = EditorNode::get_singleton()->get_editor_selection()->get_selected_node_list()[0]; + } else if (editor_selection->get_selection().size() == 1) { + Node *n = editor_selection->get_selected_node_list()[0]; if (n->get_script().is_null()) { button_create_script->show(); button_detach_script->hide(); @@ -2128,10 +2130,12 @@ void SceneTreeDock::_update_script_button() { } void SceneTreeDock::_selection_changed() { - int selection_size = EditorNode::get_singleton()->get_editor_selection()->get_selection().size(); + int selection_size = editor_selection->get_selection().size(); if (selection_size > 1) { //automatically turn on multi-edit _tool_selected(TOOL_MULTI_EDIT); + } else if (selection_size == 1) { + editor->push_item(editor_selection->get_selection().front()->key()); } else if (selection_size == 0) { editor->push_item(nullptr); } @@ -2692,7 +2696,6 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) { menu->add_icon_shortcut(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/add_child_node"), TOOL_NEW); menu->add_icon_shortcut(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/instance_scene"), TOOL_INSTANTIATE); } - menu->add_icon_shortcut(get_theme_icon(SNAME("Collapse"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/expand_collapse_all"), TOOL_EXPAND_COLLAPSE); menu->add_separator(); existing_script = selected->get_script(); @@ -2751,7 +2754,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) { bool can_replace = true; for (Node *E : selection) { - if (E != edited_scene && (E->get_owner() != edited_scene || E->get_filename() != "")) { + if (E != edited_scene && (E->get_owner() != edited_scene || E->get_scene_file_path() != "")) { can_replace = false; break; } @@ -2783,7 +2786,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) { menu->add_icon_shortcut(get_theme_icon(SNAME("CopyNodePath"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/copy_node_path"), TOOL_COPY_NODE_PATH); } - bool is_external = (selection[0]->get_filename() != ""); + bool is_external = (selection[0]->get_scene_file_path() != ""); if (is_external) { bool is_inherited = selection[0]->get_scene_inherited_state() != nullptr; bool is_top_level = selection[0]->get_owner() == nullptr; @@ -2830,6 +2833,18 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) { menu->popup(); } +void SceneTreeDock::_open_tree_menu() { + menu->clear(); + + menu->add_icon_shortcut(get_theme_icon(SNAME("Collapse"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/expand_collapse_all"), TOOL_EXPAND_COLLAPSE); + menu->add_check_item(TTR("Auto Expand to Selected"), TOOL_AUTO_EXPAND); + menu->set_item_checked(menu->get_item_idx_from_text(TTR("Auto Expand to Selected")), EditorSettings::get_singleton()->get("docks/scene_tree/auto_expand_to_selected")); + + menu->set_size(Size2(1, 1)); + menu->set_position(get_screen_position() + get_local_mouse_position()); + menu->popup(); +} + void SceneTreeDock::_filter_changed(const String &p_filter) { scene_tree->set_filter(p_filter); } @@ -2883,9 +2898,9 @@ void SceneTreeDock::attach_script_to_selected(bool p_extend) { Ref<Script> existing = selected->get_script(); - String path = selected->get_filename(); + String path = selected->get_scene_file_path(); if (path == "") { - String root_path = editor_data->get_edited_scene_root()->get_filename(); + String root_path = editor_data->get_edited_scene_root()->get_scene_file_path(); if (root_path == "") { path = String("res://").plus_file(selected->get_name()); } else { @@ -2937,7 +2952,7 @@ void SceneTreeDock::attach_shader_to_selected() { if (path == "") { String root_path; if (editor_data->get_edited_scene_root()) { - root_path = editor_data->get_edited_scene_root()->get_filename(); + root_path = editor_data->get_edited_scene_root()->get_scene_file_path(); } String shader_name; if (selected_shader_material->get_name().is_empty()) { @@ -3269,6 +3284,11 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel filter_hbc->add_child(button_detach_script); button_detach_script->hide(); + button_tree_menu = memnew(Button); + button_tree_menu->set_flat(true); + button_tree_menu->connect("pressed", callable_mp(this, &SceneTreeDock::_open_tree_menu)); + filter_hbc->add_child(button_tree_menu); + button_hb = memnew(HBoxContainer); vbc->add_child(button_hb); diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h index ece0ca5ca4..255e026887 100644 --- a/editor/scene_tree_dock.h +++ b/editor/scene_tree_dock.h @@ -81,6 +81,7 @@ class SceneTreeDock : public VBoxContainer { TOOL_COPY_NODE_PATH, TOOL_BUTTON_MAX, TOOL_OPEN_DOCUMENTATION, + TOOL_AUTO_EXPAND, TOOL_SCENE_EDITABLE_CHILDREN, TOOL_SCENE_USE_PLACEHOLDER, TOOL_SCENE_MAKE_LOCAL, @@ -115,6 +116,7 @@ class SceneTreeDock : public VBoxContainer { Button *button_instance; Button *button_create_script; Button *button_detach_script; + Button *button_tree_menu; Button *button_2d; Button *button_3d; @@ -237,6 +239,7 @@ class SceneTreeDock : public VBoxContainer { void _quick_open(); void _tree_rmb(const Vector2 &p_menu_pos); + void _open_tree_menu(); void _filter_changed(const String &p_filter); diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index 3de87d9df7..73523474ef 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -66,7 +66,7 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i emit_signal(SNAME("open"), n->get_scene_inherited_state()->get_path()); } } else { - emit_signal(SNAME("open"), n->get_filename()); + emit_signal(SNAME("open"), n->get_scene_file_path()); } } else if (p_id == BUTTON_SCRIPT) { Ref<Script> script_typed = n->get_script(); @@ -102,7 +102,7 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i undo_redo->commit_action(); } else if (p_id == BUTTON_PIN) { if (n->is_class("AnimationPlayer")) { - AnimationPlayerEditor::singleton->unpin(); + AnimationPlayerEditor::get_singleton()->unpin(); _update_tree(); } @@ -302,10 +302,10 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent, bool p_scroll } item->set_tooltip(0, tooltip); - } else if (p_node != get_scene_node() && p_node->get_filename() != "" && can_open_instance) { + } else if (p_node != get_scene_node() && p_node->get_scene_file_path() != "" && can_open_instance) { item->add_button(0, get_theme_icon(SNAME("InstanceOptions"), SNAME("EditorIcons")), BUTTON_SUBSCENE, false, TTR("Open in Editor")); - String tooltip = String(p_node->get_name()) + "\n" + TTR("Instance:") + " " + p_node->get_filename() + "\n" + TTR("Type:") + " " + p_node->get_class(); + String tooltip = String(p_node->get_name()) + "\n" + TTR("Instance:") + " " + p_node->get_scene_file_path() + "\n" + TTR("Type:") + " " + p_node->get_class(); if (p_node->get_editor_description() != String()) { tooltip += "\n\n" + p_node->get_editor_description(); } @@ -386,7 +386,7 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent, bool p_scroll _update_visibility_color(p_node, item); } else if (p_node->is_class("AnimationPlayer")) { - bool is_pinned = AnimationPlayerEditor::singleton->get_player() == p_node && AnimationPlayerEditor::singleton->is_pinned(); + bool is_pinned = AnimationPlayerEditor::get_singleton()->get_player() == p_node && AnimationPlayerEditor::get_singleton()->is_pinned(); if (is_pinned) { item->add_button(0, get_theme_icon(SNAME("Pin"), SNAME("EditorIcons")), BUTTON_PIN, false, TTR("AnimationPlayer is pinned.\nClick to unpin.")); @@ -527,7 +527,7 @@ void SceneTreeEditor::_node_removed(Node *p_node) { } void SceneTreeEditor::_node_renamed(Node *p_node) { - if (!get_scene_node()->is_ancestor_of(p_node)) { + if (p_node != get_scene_node() && !get_scene_node()->is_ancestor_of(p_node)) { return; } @@ -737,17 +737,18 @@ void SceneTreeEditor::set_selected(Node *p_node, bool p_emit_selected) { TreeItem *item = p_node ? _find(tree->get_root(), p_node->get_path()) : nullptr; if (item) { - // make visible when it's collapsed - TreeItem *node = item->get_parent(); - while (node && node != tree->get_root()) { - node->set_collapsed(false); - node = node->get_parent(); + if (auto_expand_selected) { + // Make visible when it's collapsed. + TreeItem *node = item->get_parent(); + while (node && node != tree->get_root()) { + node->set_collapsed(false); + node = node->get_parent(); + } + item->select(0); + item->set_as_cursor(0); + selected = p_node; + tree->ensure_cursor_is_visible(); } - item->select(0); - item->set_as_cursor(0); - selected = p_node; - tree->ensure_cursor_is_visible(); - } else { if (!p_node) { selected = nullptr; @@ -954,7 +955,7 @@ Variant SceneTreeEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from Node *n = get_node(np); if (n) { // Only allow selection if not part of an instantiated scene. - if (!n->get_owner() || n->get_owner() == get_scene_node() || n->get_owner()->get_filename() == String()) { + if (!n->get_owner() || n->get_owner() == get_scene_node() || n->get_owner()->get_scene_file_path() == String()) { selected.push_back(n); icons.push_back(next->get_icon(0)); } @@ -1127,11 +1128,19 @@ void SceneTreeEditor::_rmb_select(const Vector2 &p_pos) { void SceneTreeEditor::update_warning() { _warning_changed(nullptr); } + void SceneTreeEditor::_warning_changed(Node *p_for_node) { //should use a timer update_timer->start(); } +void SceneTreeEditor::set_auto_expand_selected(bool p_auto, bool p_update_settings) { + if (p_update_settings) { + EditorSettings::get_singleton()->set("docks/scene_tree/auto_expand_to_selected", p_auto); + } + auto_expand_selected = p_auto; +} + void SceneTreeEditor::set_connect_to_script_mode(bool p_enable) { connect_to_script_mode = p_enable; update_tree(); diff --git a/editor/scene_tree_editor.h b/editor/scene_tree_editor.h index acd49e8d92..4acd5d8486 100644 --- a/editor/scene_tree_editor.h +++ b/editor/scene_tree_editor.h @@ -64,6 +64,7 @@ class SceneTreeEditor : public Control { AcceptDialog *error; AcceptDialog *warning; + bool auto_expand_selected = true; bool connect_to_script_mode; bool connecting_signal; @@ -152,6 +153,7 @@ public: void update_tree() { _update_tree(); } + void set_auto_expand_selected(bool p_auto, bool p_update_settings); void set_connect_to_script_mode(bool p_enable); void set_connecting_signal(bool p_enable); diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index 4cbc859e0c..1e19d9bd47 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -425,8 +425,8 @@ void ScriptCreateDialog::_lang_changed(int l) { templates[i].id = new_id; } // Disable overridden - for (Map<String, Vector<int>>::Element *E = template_overrides.front(); E; E = E->next()) { - const Vector<int> &overrides = E->get(); + for (const KeyValue<String, Vector<int>> &E : template_overrides) { + const Vector<int> &overrides = E.value; if (overrides.size() == 1) { continue; // doesn't override anything diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp index f024589ef1..78dc85aa7d 100644 --- a/editor/settings_config_dialog.cpp +++ b/editor/settings_config_dialog.cpp @@ -193,35 +193,25 @@ void EditorSettingsDialog::_event_config_confirmed() { return; } - if (editing_action) { - if (current_action_event_index == -1) { - // Add new event - current_action_events.push_back(k); - } else { - // Edit existing event - current_action_events[current_action_event_index] = k; - } + if (current_event_index == -1) { + // Add new event + current_events.push_back(k); + } else { + // Edit existing event + current_events[current_event_index] = k; + } - _update_builtin_action(current_action, current_action_events); + if (is_editing_action) { + _update_builtin_action(current_edited_identifier, current_events); } else { - k = k->duplicate(); - Ref<Shortcut> current_sc = EditorSettings::get_singleton()->get_shortcut(shortcut_being_edited); - - undo_redo->create_action(TTR("Change Shortcut") + " '" + shortcut_being_edited + "'"); - undo_redo->add_do_method(current_sc.ptr(), "set_event", k); - undo_redo->add_undo_method(current_sc.ptr(), "set_event", current_sc->get_event()); - undo_redo->add_do_method(this, "_update_shortcuts"); - undo_redo->add_undo_method(this, "_update_shortcuts"); - undo_redo->add_do_method(this, "_settings_changed"); - undo_redo->add_undo_method(this, "_settings_changed"); - undo_redo->commit_action(); + _update_shortcut_events(current_edited_identifier, current_events); } } void EditorSettingsDialog::_update_builtin_action(const String &p_name, const Array &p_events) { - Array old_input_array = EditorSettings::get_singleton()->get_builtin_action_overrides(current_action); + Array old_input_array = EditorSettings::get_singleton()->get_builtin_action_overrides(p_name); - undo_redo->create_action(TTR("Edit Built-in Action")); + undo_redo->create_action(TTR("Edit Built-in Action") + " '" + p_name + "'"); undo_redo->add_do_method(EditorSettings::get_singleton(), "set_builtin_action_override", p_name, p_events); undo_redo->add_undo_method(EditorSettings::get_singleton(), "set_builtin_action_override", p_name, old_input_array); undo_redo->add_do_method(this, "_settings_changed"); @@ -231,15 +221,125 @@ void EditorSettingsDialog::_update_builtin_action(const String &p_name, const Ar _update_shortcuts(); } +void EditorSettingsDialog::_update_shortcut_events(const String &p_path, const Array &p_events) { + Ref<Shortcut> current_sc = EditorSettings::get_singleton()->get_shortcut(p_path); + + undo_redo->create_action(TTR("Edit Shortcut") + " '" + p_path + "'"); + undo_redo->add_do_method(current_sc.ptr(), "set_events", p_events); + undo_redo->add_undo_method(current_sc.ptr(), "set_events", current_sc->get_events()); + undo_redo->add_do_method(this, "_update_shortcuts"); + undo_redo->add_undo_method(this, "_update_shortcuts"); + undo_redo->add_do_method(this, "_settings_changed"); + undo_redo->add_undo_method(this, "_settings_changed"); + undo_redo->commit_action(); +} + +Array EditorSettingsDialog::_event_list_to_array_helper(List<Ref<InputEvent>> &p_events) { + Array events; + + // Convert the list to an array, and only keep key events as this is for the editor. + for (List<Ref<InputEvent>>::Element *E = p_events.front(); E; E = E->next()) { + Ref<InputEventKey> k = E->get(); + if (k.is_valid()) { + events.append(E->get()); + } + } + + return events; +} + +void EditorSettingsDialog::_create_shortcut_treeitem(TreeItem *p_parent, const String &p_shortcut_identifier, const String &p_display, Array &p_events, bool p_allow_revert, bool p_is_action, bool p_is_collapsed) { + TreeItem *shortcut_item = shortcuts->create_item(p_parent); + shortcut_item->set_collapsed(p_is_collapsed); + shortcut_item->set_text(0, p_display); + + Ref<InputEvent> primary = p_events.size() > 0 ? Ref<InputEvent>(p_events[0]) : Ref<InputEvent>(); + Ref<InputEvent> secondary = p_events.size() > 1 ? Ref<InputEvent>(p_events[1]) : Ref<InputEvent>(); + + String sc_text = "None"; + if (primary.is_valid()) { + sc_text = primary->as_text(); + + if (secondary.is_valid()) { + sc_text += ", " + secondary->as_text(); + + if (p_events.size() > 2) { + sc_text += " (+" + itos(p_events.size() - 2) + ")"; + } + } + } + + shortcut_item->set_text(1, sc_text); + if (sc_text == "None") { + // Fade out unassigned shortcut labels for easier visual grepping. + shortcut_item->set_custom_color(1, shortcuts->get_theme_color("font_color", "Label") * Color(1, 1, 1, 0.5)); + } + + if (p_allow_revert) { + shortcut_item->add_button(1, shortcuts->get_theme_icon("Reload", "EditorIcons"), SHORTCUT_REVERT); + } + + shortcut_item->add_button(1, shortcuts->get_theme_icon("Add", "EditorIcons"), SHORTCUT_ADD); + shortcut_item->add_button(1, shortcuts->get_theme_icon("Close", "EditorIcons"), SHORTCUT_ERASE); + + shortcut_item->set_meta("is_action", p_is_action); + shortcut_item->set_meta("type", "shortcut"); + shortcut_item->set_meta("shortcut_identifier", p_shortcut_identifier); + shortcut_item->set_meta("events", p_events); + + // Shortcut Input Events + for (int i = 0; i < p_events.size(); i++) { + Ref<InputEvent> ie = p_events[i]; + if (ie.is_null()) { + continue; + } + + TreeItem *event_item = shortcuts->create_item(shortcut_item); + + event_item->set_text(0, shortcut_item->get_child_count() == 1 ? "Primary" : ""); + event_item->set_text(1, ie->as_text()); + + event_item->add_button(1, shortcuts->get_theme_icon("Edit", "EditorIcons"), SHORTCUT_EDIT); + event_item->add_button(1, shortcuts->get_theme_icon("Close", "EditorIcons"), SHORTCUT_ERASE); + + event_item->set_custom_bg_color(0, shortcuts->get_theme_color("dark_color_3", "Editor")); + event_item->set_custom_bg_color(1, shortcuts->get_theme_color("dark_color_3", "Editor")); + + event_item->set_meta("is_action", p_is_action); + event_item->set_meta("type", "event"); + event_item->set_meta("event_index", i); + } +} + void EditorSettingsDialog::_update_shortcuts() { // Before clearing the tree, take note of which categories are collapsed so that this state can be maintained when the tree is repopulated. Map<String, bool> collapsed; if (shortcuts->get_root() && shortcuts->get_root()->get_first_child()) { - for (TreeItem *item = shortcuts->get_root()->get_first_child(); item; item = item->get_next()) { - collapsed[item->get_text(0)] = item->is_collapsed(); + TreeItem *ti = shortcuts->get_root()->get_first_child(); + while (ti) { + // Not all items have valid or unique text in the first column - so if it has an identifier, use that, as it should be unique. + if (ti->get_first_child() && ti->has_meta("shortcut_identifier")) { + collapsed[ti->get_meta("shortcut_identifier")] = ti->is_collapsed(); + } else { + collapsed[ti->get_text(0)] = ti->is_collapsed(); + } + + // Try go down tree + TreeItem *ti_next = ti->get_first_child(); + // Try go across tree + if (!ti_next) { + ti_next = ti->get_next(); + } + // Try go up tree, to next node + if (!ti_next) { + ti_next = ti->get_parent()->get_next(); + } + + ti = ti_next; } } + shortcuts->clear(); TreeItem *root = shortcuts->create_item(); @@ -247,7 +347,6 @@ void EditorSettingsDialog::_update_shortcuts() { // Set up section for Common/Built-in actions TreeItem *common_section = shortcuts->create_item(root); - sections["Common"] = common_section; common_section->set_text(0, TTR("Common")); common_section->set_selectable(0, false); @@ -262,7 +361,6 @@ void EditorSettingsDialog::_update_shortcuts() { OrderedHashMap<StringName, InputMap::Action> action_map = InputMap::get_singleton()->get_action_map(); for (OrderedHashMap<StringName, InputMap::Action>::Element E = action_map.front(); E; E = E.next()) { String action_name = E.key(); - InputMap::Action action = E.get(); Array events; // Need to get the list of events into an array so it can be set as metadata on the item. @@ -278,21 +376,6 @@ void EditorSettingsDialog::_update_shortcuts() { } } - bool same_as_defaults = key_default_events.size() == action.inputs.size(); // Initially this is set to just whether the arrays are equal. Later we check the events if needed. - - int count = 0; - for (List<Ref<InputEvent>>::Element *I = action.inputs.front(); I; I = I->next()) { - // Add event and event text to respective arrays. - events.push_back(I->get()); - event_strings.push_back(I->get()->as_text()); - - // Only check if the events have been the same so far - once one fails, we don't need to check any more. - if (same_as_defaults && !key_default_events[count]->is_match(I->get())) { - same_as_defaults = false; - } - count++; - } - // Join the text of the events with a delimiter so they can all be displayed in one cell. String events_display_string = event_strings.is_empty() ? "None" : String("; ").join(event_strings); @@ -300,25 +383,12 @@ void EditorSettingsDialog::_update_shortcuts() { continue; } - TreeItem *item = shortcuts->create_item(common_section); - item->set_text(0, action_name); - item->set_text(1, events_display_string); - - if (!same_as_defaults) { - item->add_button(1, shortcuts->get_theme_icon(SNAME("Reload"), SNAME("EditorIcons")), 2); - } - - if (events_display_string == "None") { - // Fade out unassigned shortcut labels for easier visual grepping. - item->set_custom_color(1, shortcuts->get_theme_color(SNAME("font_color"), SNAME("Label")) * Color(1, 1, 1, 0.5)); - } + Array action_events = _event_list_to_array_helper(action.inputs); + Array default_events = _event_list_to_array_helper(all_default_events); + bool same_as_defaults = Shortcut::is_event_array_equal(default_events, action_events); + bool collapse = !collapsed.has(action_name) || (collapsed.has(action_name) && collapsed[action_name]); - item->add_button(1, shortcuts->get_theme_icon(SNAME("Edit"), SNAME("EditorIcons")), 0); - item->add_button(1, shortcuts->get_theme_icon(SNAME("Close"), SNAME("EditorIcons")), 1); - item->set_tooltip(0, action_name); - item->set_tooltip(1, events_display_string); - item->set_metadata(0, "Common"); - item->set_metadata(1, events); + _create_shortcut_treeitem(common_section, action_name, action_name, action_events, !same_as_defaults, true, collapse); } // Editor Shortcuts @@ -332,11 +402,10 @@ void EditorSettingsDialog::_update_shortcuts() { continue; } - Ref<InputEvent> original = sc->get_meta("original"); - - String section_name = E.get_slice("/", 0); + // Shortcut Section TreeItem *section; + String section_name = E.get_slice("/", 0); if (sections.has(section_name)) { section = sections[section_name]; @@ -357,33 +426,23 @@ void EditorSettingsDialog::_update_shortcuts() { sections[section_name] = section; } - // Don't match unassigned shortcuts when searching for assigned keys in search results. - // This prevents all unassigned shortcuts from appearing when searching a string like "no". - if (shortcut_filter.is_subsequence_ofi(sc->get_name()) || (sc->get_as_text() != "None" && shortcut_filter.is_subsequence_ofi(sc->get_as_text()))) { - TreeItem *item = shortcuts->create_item(section); - - item->set_text(0, sc->get_name()); - item->set_text(1, sc->get_as_text()); + // Shortcut Item - if (!sc->matches_event(original) && !(sc->get_event().is_null() && original.is_null())) { - item->add_button(1, shortcuts->get_theme_icon(SNAME("Reload"), SNAME("EditorIcons")), 2); - } + if (!shortcut_filter.is_subsequence_ofi(sc->get_name())) { + continue; + } - if (sc->get_as_text() == "None") { - // Fade out unassigned shortcut labels for easier visual grepping. - item->set_custom_color(1, shortcuts->get_theme_color(SNAME("font_color"), SNAME("Label")) * Color(1, 1, 1, 0.5)); - } + Array original = sc->get_meta("original"); + Array shortcuts_array = sc->get_events().duplicate(true); + bool same_as_defaults = Shortcut::is_event_array_equal(original, shortcuts_array); + bool collapse = !collapsed.has(E) || (collapsed.has(E) && collapsed[E]); - item->add_button(1, shortcuts->get_theme_icon(SNAME("Edit"), SNAME("EditorIcons")), 0); - item->add_button(1, shortcuts->get_theme_icon(SNAME("Close"), SNAME("EditorIcons")), 1); - item->set_tooltip(0, E); - item->set_metadata(0, E); - } + _create_shortcut_treeitem(section, E, sc->get_name(), shortcuts_array, !same_as_defaults, false, collapse); } // remove sections with no shortcuts - for (Map<String, TreeItem *>::Element *E = sections.front(); E; E = E->next()) { - TreeItem *section = E->get(); + for (KeyValue<String, TreeItem *> &E : sections) { + TreeItem *section = E.value; if (section->get_first_child() == nullptr) { root->remove_child(section); } @@ -392,123 +451,130 @@ void EditorSettingsDialog::_update_shortcuts() { void EditorSettingsDialog::_shortcut_button_pressed(Object *p_item, int p_column, int p_idx) { TreeItem *ti = Object::cast_to<TreeItem>(p_item); - ERR_FAIL_COND(!ti); - - button_idx = p_idx; + ERR_FAIL_COND_MSG(!ti, "Object passed is not a TreeItem"); - if (ti->get_metadata(0) == "Common") { - // Editing a Built-in action, which can have multiple bindings. - editing_action = true; - current_action = ti->get_text(0); + ShortcutButton button_idx = (ShortcutButton)p_idx; - switch (button_idx) { - case SHORTCUT_REVERT: { - Array events; - List<Ref<InputEvent>> defaults = InputMap::get_singleton()->get_builtins_with_feature_overrides_applied()[current_action]; + is_editing_action = ti->get_meta("is_action"); - // Convert the list to an array, and only keep key events as this is for the editor. - for (const Ref<InputEvent> &k : defaults) { - if (k.is_valid()) { - events.append(k); - } - } + String type = ti->get_meta("type"); - _update_builtin_action(current_action, events); - } break; - case SHORTCUT_EDIT: - case SHORTCUT_ERASE: { - // For Edit end Delete, we will show a popup which displays each event so the user can select which one to edit/delete. - current_action_events = ti->get_metadata(1); - action_popup->clear(); - - for (int i = 0; i < current_action_events.size(); i++) { - Ref<InputEvent> ie = current_action_events[i]; - action_popup->add_item(ie->as_text()); - action_popup->set_item_metadata(i, ie); - } - - if (button_idx == SHORTCUT_EDIT) { - // If editing, add a button which can be used to add an additional event. - action_popup->add_icon_item(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")), TTR("Add")); - } + if (type == "event") { + current_edited_identifier = ti->get_parent()->get_meta("shortcut_identifier"); + current_events = ti->get_parent()->get_meta("events"); + current_event_index = ti->get_meta("event_index"); + } else { // Type is "shortcut" + current_edited_identifier = ti->get_meta("shortcut_identifier"); + current_events = ti->get_meta("events"); + current_event_index = -1; + } - action_popup->set_position(get_position() + get_mouse_position()); - action_popup->take_mouse_focus(); - action_popup->popup(); - action_popup->set_as_minsize(); - } break; - default: - break; - } - } else { - // Editing an Editor Shortcut, which can only have 1 binding. - String item = ti->get_metadata(0); - Ref<Shortcut> sc = EditorSettings::get_singleton()->get_shortcut(item); - editing_action = false; - - switch (button_idx) { - case EditorSettingsDialog::SHORTCUT_EDIT: - shortcut_editor->popup_and_configure(sc->get_event()); - shortcut_being_edited = item; - break; - case EditorSettingsDialog::SHORTCUT_ERASE: { - if (!sc.is_valid()) { - return; //pointless, there is nothing + switch (button_idx) { + case EditorSettingsDialog::SHORTCUT_ADD: { + // Only for "shortcut" types + shortcut_editor->popup_and_configure(); + } break; + case EditorSettingsDialog::SHORTCUT_EDIT: { + // Only for "event" types + shortcut_editor->popup_and_configure(current_events[current_event_index]); + } break; + case EditorSettingsDialog::SHORTCUT_ERASE: { + if (type == "shortcut") { + if (is_editing_action) { + _update_builtin_action(current_edited_identifier, Array()); + } else { + _update_shortcut_events(current_edited_identifier, Array()); } + } else if (type == "event") { + current_events.remove(current_event_index); - undo_redo->create_action(TTR("Erase Shortcut")); - undo_redo->add_do_method(sc.ptr(), "set_event", Ref<InputEvent>()); - undo_redo->add_undo_method(sc.ptr(), "set_event", sc->get_event()); - undo_redo->add_do_method(this, "_update_shortcuts"); - undo_redo->add_undo_method(this, "_update_shortcuts"); - undo_redo->add_do_method(this, "_settings_changed"); - undo_redo->add_undo_method(this, "_settings_changed"); - undo_redo->commit_action(); - } break; - case EditorSettingsDialog::SHORTCUT_REVERT: { - if (!sc.is_valid()) { - return; //pointless, there is nothing + if (is_editing_action) { + _update_builtin_action(current_edited_identifier, current_events); + } else { + _update_shortcut_events(current_edited_identifier, current_events); } + } + } break; + case EditorSettingsDialog::SHORTCUT_REVERT: { + // Only for "shortcut" types + if (is_editing_action) { + List<Ref<InputEvent>> defaults = InputMap::get_singleton()->get_builtins_with_feature_overrides_applied()[current_edited_identifier]; + Array events = _event_list_to_array_helper(defaults); - Ref<InputEvent> original = sc->get_meta("original"); - - undo_redo->create_action(TTR("Restore Shortcut")); - undo_redo->add_do_method(sc.ptr(), "set_event", original); - undo_redo->add_undo_method(sc.ptr(), "set_event", sc->get_event()); - undo_redo->add_do_method(this, "_update_shortcuts"); - undo_redo->add_undo_method(this, "_update_shortcuts"); - undo_redo->add_do_method(this, "_settings_changed"); - undo_redo->add_undo_method(this, "_settings_changed"); - undo_redo->commit_action(); - } break; - default: - break; - } - } -} - -void EditorSettingsDialog::_builtin_action_popup_index_pressed(int p_index) { - switch (button_idx) { - case SHORTCUT_EDIT: { - if (p_index == action_popup->get_item_count() - 1) { - // Selected last item in list (Add button), therefore add new - current_action_event_index = -1; - shortcut_editor->popup_and_configure(); + _update_builtin_action(current_edited_identifier, events); } else { - // Configure existing - current_action_event_index = p_index; - shortcut_editor->popup_and_configure(action_popup->get_item_metadata(p_index)); + Ref<Shortcut> sc = EditorSettings::get_singleton()->get_shortcut(current_edited_identifier); + Array original = sc->get_meta("original"); + _update_shortcut_events(current_edited_identifier, original); } } break; - case SHORTCUT_ERASE: { - current_action_events.remove(p_index); - _update_builtin_action(current_action, current_action_events); - } break; default: break; } } +Variant EditorSettingsDialog::get_drag_data_fw(const Point2 &p_point, Control *p_from) { + TreeItem *selected = shortcuts->get_selected(); + + // Only allow drag for events + if (!selected || !selected->has_meta("type") || selected->get_meta("type") != "event") { + return Variant(); + } + + String label_text = "Event " + itos(selected->get_meta("event_index")); + Label *label = memnew(Label(label_text)); + label->set_modulate(Color(1, 1, 1, 1.0f)); + shortcuts->set_drag_preview(label); + + shortcuts->set_drop_mode_flags(Tree::DROP_MODE_INBETWEEN); + + return Dictionary(); // No data required +} + +bool EditorSettingsDialog::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const { + TreeItem *selected = shortcuts->get_selected(); + TreeItem *item = shortcuts->get_item_at_position(p_point); + if (!selected || !item || item == selected || !item->has_meta("type") || item->get_meta("type") != "event") { + return false; + } + + // Don't allow moving an events in-between shortcuts. + if (selected->get_parent()->get_meta("shortcut_identifier") != item->get_parent()->get_meta("shortcut_identifier")) { + return false; + } + + return true; +} + +void EditorSettingsDialog::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; + } + + TreeItem *selected = shortcuts->get_selected(); + TreeItem *target = shortcuts->get_item_at_position(p_point); + + if (!target) { + return; + } + + int target_event_index = target->get_meta("event_index"); + int index_moving_from = selected->get_meta("event_index"); + + Array events = selected->get_parent()->get_meta("events"); + + Variant event_moved = events[index_moving_from]; + events.remove(index_moving_from); + events.insert(target_event_index, event_moved); + + String ident = selected->get_parent()->get_meta("shortcut_identifier"); + if (selected->get_meta("is_action")) { + _update_builtin_action(ident, events); + } else { + _update_shortcut_events(ident, events); + } +} + void EditorSettingsDialog::_tabs_tab_changed(int p_tab) { _focus_current_search_box(); } @@ -544,13 +610,13 @@ void EditorSettingsDialog::_editor_restart_close() { void EditorSettingsDialog::_bind_methods() { ClassDB::bind_method(D_METHOD("_update_shortcuts"), &EditorSettingsDialog::_update_shortcuts); ClassDB::bind_method(D_METHOD("_settings_changed"), &EditorSettingsDialog::_settings_changed); + + ClassDB::bind_method(D_METHOD("_get_drag_data_fw"), &EditorSettingsDialog::get_drag_data_fw); + ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &EditorSettingsDialog::can_drop_data_fw); + ClassDB::bind_method(D_METHOD("_drop_data_fw"), &EditorSettingsDialog::drop_data_fw); } EditorSettingsDialog::EditorSettingsDialog() { - action_popup = memnew(PopupMenu); - action_popup->connect("index_pressed", callable_mp(this, &EditorSettingsDialog::_builtin_action_popup_index_pressed)); - add_child(action_popup); - set_title(TTR("Editor Settings")); undo_redo = memnew(UndoRedo); @@ -628,6 +694,8 @@ EditorSettingsDialog::EditorSettingsDialog() { shortcuts->connect("button_pressed", callable_mp(this, &EditorSettingsDialog::_shortcut_button_pressed)); tab_shortcuts->add_child(shortcuts); + shortcuts->set_drag_forwarding(this); + // Adding event dialog shortcut_editor = memnew(InputEventConfigurationDialog); shortcut_editor->connect("confirmed", callable_mp(this, &EditorSettingsDialog::_event_config_confirmed)); diff --git a/editor/settings_config_dialog.h b/editor/settings_config_dialog.h index 2b6c9b3e1d..7317a014b2 100644 --- a/editor/settings_config_dialog.h +++ b/editor/settings_config_dialog.h @@ -53,29 +53,28 @@ class EditorSettingsDialog : public AcceptDialog { LineEdit *shortcut_search_box; SectionedInspector *inspector; + // Shortcuts enum ShortcutButton { + SHORTCUT_ADD, SHORTCUT_EDIT, SHORTCUT_ERASE, SHORTCUT_REVERT }; - int button_idx; - int current_action_event_index = -1; - bool editing_action = false; - String current_action; - Array current_action_events; - PopupMenu *action_popup; + Tree *shortcuts; + String shortcut_filter; + + InputEventConfigurationDialog *shortcut_editor; + + bool is_editing_action = false; + String current_edited_identifier; + Array current_events; + int current_event_index = -1; Timer *timer; UndoRedo *undo_redo; - // Shortcuts - String shortcut_filter; - Tree *shortcuts; - InputEventConfigurationDialog *shortcut_editor; - String shortcut_being_edited; - virtual void cancel_pressed() override; virtual void ok_pressed() override; @@ -89,7 +88,14 @@ class EditorSettingsDialog : public AcceptDialog { void _event_config_confirmed(); + void _create_shortcut_treeitem(TreeItem *p_parent, const String &p_shortcut_identifier, const String &p_display, Array &p_events, bool p_allow_revert, bool p_is_common, bool p_is_collapsed); + Array _event_list_to_array_helper(List<Ref<InputEvent>> &p_events); void _update_builtin_action(const String &p_name, const Array &p_events); + void _update_shortcut_events(const String &p_path, const Array &p_events); + + Variant get_drag_data_fw(const Point2 &p_point, Control *p_from); + bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const; + void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from); void _tabs_tab_changed(int p_tab); void _focus_current_search_box(); diff --git a/editor/translations/Makefile b/editor/translations/Makefile index 1843114f06..82b3d49c59 100644 --- a/editor/translations/Makefile +++ b/editor/translations/Makefile @@ -18,3 +18,24 @@ merge: check: @for po in $(POFILES); do msgfmt -c $$po -o /dev/null; done + +# Generate completion ratio from statistics string such as: +# 2775 translated messages, 272 fuzzy translations, 151 untranslated messages. +# First number can be 0, second and third numbers are only present if non-zero. +include-list: + @list=""; \ + threshold=0.30; \ + for po in $(POFILES); do \ + res=`msgfmt --statistics $$po -o /dev/null 2>&1 | sed 's/[^0-9,]*//g'`; \ + complete=`cut -d',' -f1 <<< $$res`; \ + fuzzy_or_untranslated=`cut -d',' -f2 <<< $$res`; \ + untranslated_maybe=`cut -d',' -f3 <<< $$res`; \ + if [ -z "$$fuzzy_or_untranslated" ]; then fuzzy_or_untranslated=0; fi; \ + if [ -z "$$untranslated_maybe" ]; then untranslated_maybe=0; fi; \ + incomplete=`expr $$fuzzy_or_untranslated + $$untranslated_maybe`; \ + if `awk "BEGIN {exit !($$complete / ($$complete + $$incomplete) > $$threshold)}"`; then \ + lang=`basename $$po .po`; \ + list+="$$lang,"; \ + fi; \ + done; \ + echo $$list; diff --git a/editor/translations/af.po b/editor/translations/af.po index 223a1b1c45..a38a5103d2 100644 --- a/editor/translations/af.po +++ b/editor/translations/af.po @@ -10,6 +10,7 @@ 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-04-05 14:28+0000\n" "Last-Translator: Henry LeRoux <henry.leroux@ocsbstudent.ca>\n" @@ -2475,6 +2476,15 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +#, fuzzy +msgid "Save All Scenes" +msgstr "Stoor As" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2592,6 +2602,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2918,11 +2932,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -#, fuzzy -msgid "Save All Scenes" -msgstr "Stoor As" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4389,6 +4398,18 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "" @@ -4398,10 +4419,6 @@ msgid "Preset" msgstr "Herset Zoem" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "" @@ -7412,12 +7429,14 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" -msgstr "" +#, fuzzy +msgid "Next Script" +msgstr "Deursoek Hulp" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" -msgstr "" +#, fuzzy +msgid "Previous Script" +msgstr "Voorskou:" #: editor/plugins/script_editor_plugin.cpp msgid "File" @@ -7852,7 +7871,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7860,6 +7879,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -8204,6 +8227,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -14320,6 +14363,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14329,7 +14380,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/ar.po b/editor/translations/ar.po index 16cc1fd0a7..1ba7d4f786 100644 --- a/editor/translations/ar.po +++ b/editor/translations/ar.po @@ -59,6 +59,7 @@ 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-19 11:14+0000\n" "Last-Translator: Mohammed Mubarak <modymu9@gmail.com>\n" @@ -2441,6 +2442,15 @@ msgid "" "be satisfied." msgstr "لا يمكن حفظ المشهد. على الأرجح لا يمكن إستيفاء التبعيات (مجسّدات)." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "لا يمكن بدء عملية جانبية!" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "حفظ جميع المشاهد" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "لا يمكن الكتابة عنوة (استبدال overwrite ) المشهد كونه ما زال مفتوحاً!" @@ -2577,6 +2587,10 @@ msgid "Save changes to '%s' before closing?" msgstr "هل تريد حفظ التغييرات إلي'%s' قبل الإغلاق؟" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2924,10 +2938,6 @@ msgid "Save Scene" msgstr "حفظ المشهد" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "حفظ جميع المشاهد" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "تحويل إلى..." @@ -4425,6 +4435,18 @@ msgid "Clear Default for '%s'" msgstr "إخلاء الإفتراضي ل '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "إعادة إستيراد" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "إستيراد ك:" @@ -4433,10 +4455,6 @@ msgid "Preset" msgstr "إعداد مُسبق" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "إعادة إستيراد" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "احفظ المشاهد، إعادة-الإستيراد، وإعادة التشغيل" @@ -7430,11 +7448,13 @@ msgid "Move Down" msgstr "تحريك لأسفل" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "النص البرمجي التالي" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "النص البرمجي السابق" #: editor/plugins/script_editor_plugin.cpp @@ -7857,7 +7877,7 @@ msgstr "متعامد" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "منظوري" #: editor/plugins/spatial_editor_plugin.cpp @@ -7867,6 +7887,11 @@ msgstr "متعامد" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy +msgid "Right Perspective" +msgstr "منظوري" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Front Orthogonal" msgstr "متعامد" @@ -8230,6 +8255,27 @@ msgid "Right View" msgstr "الواجهة View اليُمنى" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "الواجهة View الأمامية" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "التبديل بين الرؤية المنظورية / الإسقاطية Orthogonal" @@ -14648,6 +14694,14 @@ msgstr "" "تعذر تحميل البيئة الافتراضية كما هو محدد في إعدادات المشروع (التقديم -> " "البيئة -> البيئة الافتراضية)." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14660,7 +14714,10 @@ msgstr "" "اجعلها RenderTarget وقم بتعيين نسيجها الداخلي لبعض العقد لعرضها." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "ينبغي أن يكون حجم إطار العرض أكبر من 0 ليتم الإخراج البصري لأي شيء." #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/az.po b/editor/translations/az.po index 1965e41921..76fb760ac1 100644 --- a/editor/translations/az.po +++ b/editor/translations/az.po @@ -8,6 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" +"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "PO-Revision-Date: 2021-09-16 14:36+0000\n" "Last-Translator: Lucifer25x <umudyt2006@gmail.com>\n" "Language-Team: Azerbaijani <https://hosted.weblate.org/projects/godot-engine/" @@ -2403,6 +2404,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2519,6 +2528,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2838,10 +2851,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4245,15 +4254,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7146,12 +7163,14 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" -msgstr "" +#, fuzzy +msgid "Next Script" +msgstr "Skriptə qoşulun:" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" -msgstr "" +#, fuzzy +msgid "Previous Script" +msgstr "Əvvəlki addıma keç" #: editor/plugins/script_editor_plugin.cpp msgid "File" @@ -7560,7 +7579,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7568,6 +7587,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7905,6 +7928,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13771,6 +13814,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13780,7 +13831,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/bg.po b/editor/translations/bg.po index 7aab99c847..c4ad5a3993 100644 --- a/editor/translations/bg.po +++ b/editor/translations/bg.po @@ -16,8 +16,9 @@ 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-20 14:46+0000\n" +"PO-Revision-Date: 2021-10-11 15:44+0000\n" "Last-Translator: Любомир Василев <lyubomirv@gmx.com>\n" "Language-Team: Bulgarian <https://hosted.weblate.org/projects/godot-engine/" "godot/bg/>\n" @@ -2336,6 +2337,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Запазване на всички сцени" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2452,6 +2461,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2793,10 +2806,6 @@ msgid "Save Scene" msgstr "Запазване на сцената" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Запазване на всички сцени" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4202,6 +4211,18 @@ msgid "Clear Default for '%s'" msgstr "Изчистване на подразбирането за „%s“" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Повторно внасяне" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Внасяне като:" @@ -4210,10 +4231,6 @@ msgid "Preset" msgstr "" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Повторно внасяне" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "" @@ -5481,15 +5498,13 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Locked" -msgstr "Заключване на избраното" +msgstr "Заключено" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Grouped" -msgstr "Групи" +msgstr "Групирано" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -7143,11 +7158,13 @@ msgid "Move Down" msgstr "Преместване надолу" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Следващ скрипт" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Предишен скрипт" #: editor/plugins/script_editor_plugin.cpp @@ -7564,8 +7581,9 @@ msgid "Left Orthogonal" msgstr "Ляв бутон" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" -msgstr "" +#, fuzzy +msgid "Left Perspective" +msgstr "Долу вляво" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy @@ -7573,6 +7591,10 @@ msgid "Right Orthogonal" msgstr "Десен бутон" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7910,6 +7932,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13854,6 +13896,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13863,7 +13913,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/bn.po b/editor/translations/bn.po index 6c958956bc..96a57f9dd5 100644 --- a/editor/translations/bn.po +++ b/editor/translations/bn.po @@ -14,6 +14,7 @@ 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-03 06:20+0000\n" "Last-Translator: Oymate <dhruboadittya96@gmail.com>\n" @@ -2513,6 +2514,16 @@ msgstr "" "দৃশ্যটি সংরক্ষণ করা সম্ভব হচ্ছে না। সম্ভবত যেসবের (ইন্সট্যান্স) উপর নির্ভর করছে তাদের " "সন্তুষ্ট করা সম্ভব হচ্ছে না।" +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "রূপান্তরিত গঠনবিন্যাস সংরক্ষণ করা সম্ভব হচ্ছে না:" + +#: editor/editor_node.cpp +#, fuzzy +msgid "Save All Scenes" +msgstr "সকল দৃশ্য সংরক্ষণ করুন" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2646,6 +2657,10 @@ msgid "Save changes to '%s' before closing?" msgstr "'%s' বন্ধ করার পূর্বে পরিবর্তনসমূহ সংরক্ষণ করবেন?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -3009,11 +3024,6 @@ msgid "Save Scene" msgstr "দৃশ্য সংরক্ষণ করুন" #: editor/editor_node.cpp -#, fuzzy -msgid "Save All Scenes" -msgstr "সকল দৃশ্য সংরক্ষণ করুন" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "এতে রূপান্তর করুন..." @@ -4622,6 +4632,19 @@ msgstr "'%s' এর জন্য ডিফল্ট ক্লিয়ার ক #: editor/import_dock.cpp #, fuzzy +msgid "Reimport" +msgstr "পুন-ইম্পোর্ট" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp +#, fuzzy msgid "Import As:" msgstr "ইম্পোর্ট" @@ -4631,11 +4654,6 @@ msgid "Preset" msgstr "প্রিসেট..." #: editor/import_dock.cpp -#, fuzzy -msgid "Reimport" -msgstr "পুন-ইম্পোর্ট" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "" @@ -7820,11 +7838,13 @@ msgid "Move Down" msgstr "নীচে যান" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "পরবর্তী স্ক্রিপ্ট" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "পূর্ববর্তী স্ক্রিপ্ট" #: editor/plugins/script_editor_plugin.cpp @@ -8285,7 +8305,7 @@ msgstr "সমকোণীয় (Orthogonal)" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "পরিপ্রেক্ষিত (Perspective)" #: editor/plugins/spatial_editor_plugin.cpp @@ -8295,6 +8315,11 @@ msgstr "সমকোণীয় (Orthogonal)" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy +msgid "Right Perspective" +msgstr "পরিপ্রেক্ষিত (Perspective)" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Front Orthogonal" msgstr "সমকোণীয় (Orthogonal)" @@ -8669,6 +8694,27 @@ msgid "Right View" msgstr "ডান দর্শন" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "সন্মুখ দর্শন" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp #, fuzzy msgid "Switch Perspective/Orthogonal View" msgstr "পরিপ্রেক্ষিত/সমকোণীয় (Perspective/Orthogonal) দর্শন পরিবর্তন করুন" @@ -15215,6 +15261,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -15228,7 +15282,9 @@ msgstr "" "দৃশ্যাবলিকে (texture) দৃশ্যমান করতে কোনো নোডে হস্তান্তর করুন।" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp @@ -16860,9 +16916,6 @@ msgstr "" #~ msgid "Couldn't save atlas image:" #~ msgstr "এটলাস/মানচিত্রাবলীর ছবি সংরক্ষণ করা সম্ভব হচ্ছে না:" -#~ msgid "Couldn't save converted texture:" -#~ msgstr "রূপান্তরিত গঠনবিন্যাস সংরক্ষণ করা সম্ভব হচ্ছে না:" - #~ msgid "Invalid translation source!" #~ msgstr "অকার্যকর অনুবাদের উৎস!" diff --git a/editor/translations/br.po b/editor/translations/br.po index 4db566b371..071e1f021c 100644 --- a/editor/translations/br.po +++ b/editor/translations/br.po @@ -7,6 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" +"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "PO-Revision-Date: 2020-12-29 15:03+0000\n" "Last-Translator: Feufoll <feufoll@gmail.com>\n" "Language-Team: Breton <https://hosted.weblate.org/projects/godot-engine/" @@ -2337,6 +2338,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2453,6 +2462,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2772,10 +2785,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4177,15 +4186,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7069,11 +7086,11 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +msgid "Next Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +msgid "Previous Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp @@ -7483,7 +7500,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7491,6 +7508,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7828,6 +7849,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13686,6 +13727,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13695,7 +13744,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/ca.po b/editor/translations/ca.po index e2580e35d9..e6fd202dde 100644 --- a/editor/translations/ca.po +++ b/editor/translations/ca.po @@ -9,7 +9,7 @@ # roger <616steam@gmail.com>, 2019, 2020. # Roger BR <drai_kin@hotmail.com>, 2019. # Adolfo Jayme Barrientos <fitojb@ubuntu.com>, 2020. -# Xavier Gomez <hiulit@gmail.com>, 2020. +# Xavier Gomez <hiulit@gmail.com>, 2020, 2021. # Aina <ainasoga@gmail.com>, 2020. # Alex Mancha <codingstain@gmail.com>, 2020, 2021. # Carles Pastor Badosa <cpbadosa@gmail.com>, 2021. @@ -19,9 +19,10 @@ 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-06-29 12:48+0000\n" -"Last-Translator: DFC <damiafluixacanals28@gmail.com>\n" +"PO-Revision-Date: 2021-10-13 09:34+0000\n" +"Last-Translator: Xavier Gomez <hiulit@gmail.com>\n" "Language-Team: Catalan <https://hosted.weblate.org/projects/godot-engine/" "godot/ca/>\n" "Language: ca\n" @@ -29,7 +30,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.1-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 @@ -52,7 +53,7 @@ msgstr "L'entrada %i en l'expressió no és vàlida (no transmesa)" #: core/math/expression.cpp msgid "self can't be used because instance is null (not passed)" -msgstr "No es pot emprar \"self\" car l'instància és nul·la (no transmesa)" +msgstr "self no es pot utilitzar perquè la instància és nul·la (no aprovada)" #: core/math/expression.cpp msgid "Invalid operands to operator %s, %s and %s." @@ -588,7 +589,7 @@ msgstr "Escala amb el Cursor" #: editor/animation_track_editor.cpp editor/plugins/script_text_editor.cpp #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Duplicate Selection" -msgstr "Duplicar la Selecció" +msgstr "Duplica la Selecció" #: editor/animation_track_editor.cpp msgid "Duplicate Transposed" @@ -596,7 +597,7 @@ msgstr "Duplica'l Transposat" #: editor/animation_track_editor.cpp msgid "Delete Selection" -msgstr "Suprimir la Selecció" +msgstr "Suprimeix la Selecció" #: editor/animation_track_editor.cpp msgid "Go to Next Step" @@ -979,7 +980,7 @@ msgstr "No hi ha cap resultat per a «%s»." #: editor/create_dialog.cpp editor/property_selector.cpp msgid "No description available for %s." -msgstr "" +msgstr "Cap descripció disponible per a %s." #: editor/create_dialog.cpp editor/editor_file_dialog.cpp #: editor/filesystem_dock.cpp @@ -1079,15 +1080,16 @@ msgid "Owners Of:" msgstr "Propietaris de:" #: 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 "Eliminar els fitxers seleccionats del projecte? (No es pot restaurar)" +msgstr "" +"Voleu eliminar els fitxers seleccionats del projecte? (No es pot desfer.)\n" +"Depenent de la configuració del vostre sistema de fitxers, els fitxers es " +"mouran a la paperera del sistema o se suprimiran permanentment." #: editor/dependency_editor.cpp -#, fuzzy msgid "" "The files being removed are required by other resources in order for them to " "work.\n" @@ -1095,8 +1097,11 @@ msgid "" "Depending on your filesystem configuration, the files will either be moved " "to the system trash or deleted permanently." msgstr "" -"Els fitxers seleccionats són utilitzats per altres recursos.\n" -"Voleu Eliminar-los de totes maneres? (No es pot desfer!)" +"Els fitxers que s’eliminen són requerits per altres recursos perquè " +"funcionin.\n" +"Voleu eliminar-los de totes maneres? (No es pot desfer.)\n" +"Depenent de la configuració del vostre sistema de fitxers, els fitxers es " +"mouran a la paperera del sistema o se suprimiran permanentment." #: editor/dependency_editor.cpp msgid "Cannot remove:" @@ -1750,7 +1755,6 @@ msgid "Node Dock" msgstr "Nodes" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "FileSystem Dock" msgstr "Sistema de Fitxers" @@ -1892,7 +1896,7 @@ msgstr "Fés l'actual" #: editor/editor_feature_profile.cpp editor/editor_node.cpp #: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp msgid "Import" -msgstr "Importa" +msgstr "Importar" #: editor/editor_feature_profile.cpp editor/project_export.cpp msgid "Export" @@ -2171,9 +2175,8 @@ msgstr "" "$color][url=$url] totaportant-ne una[/url][/color]!" #: editor/editor_help.cpp -#, fuzzy msgid "Method Descriptions" -msgstr "Descripcions del Mètode" +msgstr "Descripcions dels Mètodes" #: editor/editor_help.cpp msgid "" @@ -2435,6 +2438,15 @@ msgstr "" "No s'ha pogut desar l'escena. Probablement, no s'han pogut establir totes " "les dependències (instàncies o herències)." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "No s'ha pogut començar el subprocés!" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Desar Totes les Escenes" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "No es pot sobreescriure la escena si encara està oberta!" @@ -2570,6 +2582,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Desar els canvis a '%s' abans de tancar?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2727,14 +2743,14 @@ msgid "Unable to load addon script from path: '%s'." msgstr "Error carregant l'Script complement des del camí: '%s'." #: editor/editor_node.cpp -#, fuzzy msgid "" "Unable to load addon script from path: '%s'. This might be due to a code " "error in that script.\n" "Disabling the addon at '%s' to prevent further errors." msgstr "" -"No es pot carregar l'script d'addon des del camí: '%s' Sembla que hi ha un " -"error en el codi, si us plau comproveu la sintaxi." +"No es pot carregar l'script de complement (addon) del camí: '%s'. Això pot " +"ser degut a un error de codi en aquest script.\n" +"Es desactivarà el complement (addon) a '% s' per a evitar més errors." #: editor/editor_node.cpp msgid "" @@ -2927,10 +2943,6 @@ msgid "Save Scene" msgstr "Desa Escena" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Desar Totes les Escenes" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Converteix a..." @@ -3254,9 +3266,8 @@ msgid "Update When Changed" msgstr "Actualitzar quan es canvia" #: editor/editor_node.cpp -#, fuzzy msgid "Hide Update Spinner" -msgstr "Desactiva l'Indicador d'Actualització" +msgstr "Amaga l'Indicador d'Actualització" #: editor/editor_node.cpp msgid "FileSystem" @@ -3268,7 +3279,7 @@ msgstr "Inspector" #: editor/editor_node.cpp msgid "Expand Bottom Panel" -msgstr "Expandeix el Quadre inferior" +msgstr "Desplega el Tauler Inferior" #: editor/editor_node.cpp msgid "Output" @@ -3289,14 +3300,12 @@ msgid "Manage Templates" msgstr "Administrar Plantilles" #: editor/editor_node.cpp -#, fuzzy msgid "Install from file" -msgstr "Instal·lar des d'un Fitxer" +msgstr "Instal·la des d'un fitxer" #: editor/editor_node.cpp -#, fuzzy msgid "Select android sources file" -msgstr "Selecciona una Malla d'Origen:" +msgstr "Selecciona el fitxer de fonts d'Android" #: editor/editor_node.cpp msgid "" @@ -3316,7 +3325,6 @@ msgstr "" "d'exportació per a Android per personalitzar la compilació." #: editor/editor_node.cpp -#, fuzzy msgid "" "The Android build template is already installed in this project and it won't " "be overwritten.\n" @@ -3325,17 +3333,16 @@ msgid "" msgstr "" "La plantilla de compilació d'Android ja està instal·lada i no se " "sobreescriurà.\n" -"Elimineu el directori 'build' manualment abans de tornar a intentar aquesta " -"operació." +"Elimineu el directori \"res://android/build\" manualment abans de tornar a " +"intentar aquesta operació." #: editor/editor_node.cpp msgid "Import Templates From ZIP File" msgstr "Importa Plantilles des d'un Fitxer ZIP" #: editor/editor_node.cpp -#, fuzzy msgid "Template Package" -msgstr "Gestor de Plantilles d'Exportació" +msgstr "Paquet de Plantilles" #: editor/editor_node.cpp modules/gltf/editor_scene_exporter_gltf_plugin.cpp msgid "Export Library" @@ -3346,9 +3353,8 @@ msgid "Merge With Existing" msgstr "Combina amb Existents" #: editor/editor_node.cpp -#, fuzzy msgid "Apply MeshInstance Transforms" -msgstr "Modifica la Transformació de l'Animació" +msgstr "Apliqueu Transformacions de MeshInstance" #: editor/editor_node.cpp msgid "Open & Run a Script" @@ -3385,9 +3391,8 @@ msgid "Select" msgstr "Selecciona" #: editor/editor_node.cpp -#, fuzzy msgid "Select Current" -msgstr "Selecciona el Directori Actual" +msgstr "Selecciona Actual" #: editor/editor_node.cpp msgid "Open 2D Editor" @@ -3414,9 +3419,8 @@ msgid "Open the previous Editor" msgstr "Obre l'Editor precedent" #: editor/editor_node.h -#, fuzzy msgid "Warning!" -msgstr "Avís" +msgstr "Atenció!" #: editor/editor_path.cpp #, fuzzy @@ -4472,6 +4476,18 @@ msgid "Clear Default for '%s'" msgstr "Neteja el valor Predeterminat de '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "ReImportar" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Importar com a:" @@ -4481,10 +4497,6 @@ msgid "Preset" msgstr "Configuracions prestablertes" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "ReImportar" - -#: editor/import_dock.cpp #, fuzzy msgid "Save Scenes, Re-Import, and Restart" msgstr "Guardar escenes, reimportar i reiniciar" @@ -6018,11 +6030,10 @@ msgstr "Eliminar el node o transició seleccionats." #: 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 "" -"Mostra la llista de tots els objectes en la posició clicada\n" -"(Tal com Alt+Clic Dreta en el mode de Selecció)." +"Alt + RMB: Mostra la llista de tots els nodes a la posició en què es fa " +"clic, inclòs el bloquejat." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "RMB: Add node at position clicked." @@ -6436,20 +6447,18 @@ msgstr "Píxels sòlids" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp -#, fuzzy msgid "Border Pixels" -msgstr "Píxels de la vora" +msgstr "Píxels de la Vora" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp -#, fuzzy msgid "Directed Border Pixels" -msgstr "Directoris i Fitxers:" +msgstr "Píxels de la Vora Dirigits" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp msgid "Capture from Pixel" -msgstr "Captura des d'un Píxel" +msgstr "Captura des de Píxel" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp @@ -6457,9 +6466,8 @@ msgid "Emission Colors" msgstr "Colors d'Emissió" #: editor/plugins/cpu_particles_editor_plugin.cpp -#, fuzzy msgid "CPUParticles" -msgstr "ParticulesCPU" +msgstr "PartículesCPU" #: editor/plugins/cpu_particles_editor_plugin.cpp #: editor/plugins/particles_editor_plugin.cpp @@ -6472,14 +6480,12 @@ msgid "Create Emission Points From Node" msgstr "Crea Punts d'Emissió des d'un Node" #: editor/plugins/curve_editor_plugin.cpp -#, fuzzy msgid "Flat 0" -msgstr "Flat0" +msgstr "Flat 0" #: editor/plugins/curve_editor_plugin.cpp -#, fuzzy msgid "Flat 1" -msgstr "Flat1" +msgstr "Flat 1" #: editor/plugins/curve_editor_plugin.cpp editor/property_editor.cpp msgid "Ease In" @@ -7552,11 +7558,13 @@ msgid "Move Down" msgstr "Mou avall" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Script Següent" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Script Anterior" #: editor/plugins/script_editor_plugin.cpp @@ -7828,9 +7836,8 @@ msgid "Complete Symbol" msgstr "Completa el Símbol" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Evaluate Selection" -msgstr "Escala la Selecció" +msgstr "Evalua la Selecció" #: editor/plugins/script_text_editor.cpp msgid "Trim Trailing Whitespace" @@ -7992,7 +7999,7 @@ msgstr "Ortogonal" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Perspectiva" #: editor/plugins/spatial_editor_plugin.cpp @@ -8002,6 +8009,11 @@ msgstr "Ortogonal" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy +msgid "Right Perspective" +msgstr "Perspectiva" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Front Orthogonal" msgstr "Ortogonal" @@ -8102,9 +8114,8 @@ msgid "Yaw:" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Size:" -msgstr "Mida: " +msgstr "Mida:" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy @@ -8367,6 +8378,27 @@ msgid "Right View" msgstr "Vista Dreta" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Vista Frontal" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "Canviar Vista Perspectiva/Ortogonal" @@ -8424,7 +8456,6 @@ msgid "4 Viewports" msgstr "4 Vistes" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Gizmos" msgstr "Gizmos" @@ -8831,18 +8862,16 @@ msgid "{num} font(s)" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "No fonts found." -msgstr "No s'ha trobat!" +msgstr "No s'ha trobat cap tipus de lletra." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} icon(s)" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "No icons found." -msgstr "No s'ha trobat!" +msgstr "No s'ha trobat cap icona." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} stylebox(es)" @@ -8871,9 +8900,8 @@ msgid "Importing items {n}/{n}" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Updating the editor" -msgstr "Voleu Sortir de l'editor?" +msgstr "S'està actualitzant l'editor" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -8881,9 +8909,8 @@ msgid "Finalizing" msgstr "S'està Analitzant" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Filter:" -msgstr "Filtre: " +msgstr "Filtre:" #: editor/plugins/theme_editor_plugin.cpp msgid "With Data" @@ -8895,9 +8922,8 @@ msgid "Select by data type:" msgstr "Selecciona un Node" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible color items." -msgstr "Cal seleccionar un Element!" +msgstr "Seleccioneu tots els elements de color visibles." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible color items and their data." @@ -8908,9 +8934,8 @@ msgid "Deselect all visible color items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible constant items." -msgstr "Cal seleccionar un Element!" +msgstr "Seleccioneu tots els elements constants visibles." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible constant items and their data." @@ -8921,9 +8946,8 @@ msgid "Deselect all visible constant items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible font items." -msgstr "Cal seleccionar un Element!" +msgstr "Seleccioneu tots els elements de tipus de lletra visibles." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible font items and their data." @@ -8934,19 +8958,16 @@ msgid "Deselect all visible font items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible icon items." -msgstr "Cal seleccionar un Element!" +msgstr "Seleccioneu tots els elements d'icona visibles." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible icon items and their data." -msgstr "Cal seleccionar un Element!" +msgstr "Seleccioneu tots els elements d'icona visibles i les seves dades." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Deselect all visible icon items." -msgstr "Cal seleccionar un Element!" +msgstr "Desmarqueu tots els elements d'icona visibles." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible stylebox items." @@ -9423,7 +9444,7 @@ msgstr "Pinta Rectangle" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Bucket Fill" -msgstr "Cubell de pintura" +msgstr "Cubell de Farcit" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Erase TileMap" @@ -9431,7 +9452,7 @@ msgstr "Elimina Mapa de Rajoles" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Find Tile" -msgstr "Trobar Rajola" +msgstr "Troba el Tile" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Transpose" @@ -9479,23 +9500,23 @@ msgstr "" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Pick Tile" -msgstr "Escollir Rajola" +msgstr "Escollir Tile" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Rotate Left" -msgstr "Girar a l'Esquerra" +msgstr "Gira cap a l'Esquerra" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Rotate Right" -msgstr "Girar a la Dreta" +msgstr "Gira cap a la Dreta" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Flip Horizontally" -msgstr "Invertir Horitzontalment" +msgstr "Volteja Horitzontalment" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Flip Vertically" -msgstr "Invertir Verticalment" +msgstr "Volteja Verticalment" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Clear Transform" @@ -9607,24 +9628,20 @@ msgid "Navigation Mode" msgstr "Mode Navegació" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Bitmask Mode" msgstr "Mode màscara de bits" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Priority Mode" msgstr "Mode Prioritat" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Icon Mode" msgstr "Mode Icona" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Z Index Mode" -msgstr "Mode Index Z" +msgstr "Mode Índex Z" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Copy bitmask." @@ -9916,9 +9933,8 @@ msgid "Detect new changes" msgstr "Detectar nous canvis" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Changes" -msgstr "Modifica" +msgstr "Canvis" #: editor/plugins/version_control_editor_plugin.cpp msgid "Modified" @@ -9961,9 +9977,8 @@ msgstr "" "versió" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "No file diff is active" -msgstr "Cap fitxer seleccionat!" +msgstr "No hi ha cap diferència de fitxer activa" #: editor/plugins/version_control_editor_plugin.cpp msgid "Detect changes in file diff" @@ -10372,7 +10387,7 @@ msgstr "Retorna l'arc sinus del paràmetre." #: editor/plugins/visual_shader_editor_plugin.cpp #, fuzzy msgid "Returns the inverse hyperbolic sine of the parameter." -msgstr "(Només GLES3) Retorna el sinus hiperbòlic invers del paràmetre." +msgstr "Retorna el sinus hiperbòlic invers del paràmetre." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the arc-tangent of the parameter." @@ -10887,7 +10902,7 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "VisualShader" -msgstr "VisualShader" +msgstr "ShaderVisual" #: editor/plugins/visual_shader_editor_plugin.cpp #, fuzzy @@ -11349,14 +11364,12 @@ msgid "Are you sure to run %d projects at once?" msgstr "Esteu segur que voleu executar %d projectes de cop?" #: editor/project_manager.cpp -#, fuzzy msgid "Remove %d projects from the list?" -msgstr "Selecciona un dispositiu de la llista" +msgstr "Voleu eliminar %d projectes de la llista?" #: editor/project_manager.cpp -#, fuzzy msgid "Remove this project from the list?" -msgstr "Selecciona un dispositiu de la llista" +msgstr "Voleu eliminar aquest projecte de la llista?" #: editor/project_manager.cpp #, fuzzy @@ -11890,9 +11903,8 @@ msgid "Select Method" msgstr "Selecciona un Mètode" #: editor/rename_dialog.cpp editor/scene_tree_dock.cpp -#, fuzzy msgid "Batch Rename" -msgstr "Reanomena" +msgstr "Reanomena en lot" #: editor/rename_dialog.cpp msgid "Replace:" @@ -12096,9 +12108,8 @@ msgid "Instance Child Scene" msgstr "Instancia una Escena Filla" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Can't paste root node into the same scene." -msgstr "No es pot operar en Nodes d'una escena externa!" +msgstr "No es pot enganxar el node arrel a la mateixa escena." #: editor/scene_tree_dock.cpp #, fuzzy @@ -12334,9 +12345,8 @@ msgid "Reparent to New Node" msgstr "Torna a Parentar el Node" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Make Scene Root" -msgstr "Entesos!" +msgstr "Convertir a Arrel d'Escena" #: editor/scene_tree_dock.cpp msgid "Merge From Scene" @@ -12596,9 +12606,8 @@ msgid "Will load an existing script file." msgstr "Es carregarà un fitxer de script existent." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Script file already exists." -msgstr "L'Acció '%s' ja existeix!" +msgstr "El fitxer script ja existeix." #: editor/script_create_dialog.cpp msgid "" @@ -13765,9 +13774,8 @@ msgid "Installing to device, please wait..." msgstr "S'estan buscant rèpliques..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not install to device: %s" -msgstr "No s'ha pogut començar el subprocés!" +msgstr "No s'ha pogut instal·lar al dispositiu: %s" #: platform/android/export/export_plugin.cpp #, fuzzy @@ -13889,11 +13897,8 @@ msgid "Signing debug %s..." msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Signing release %s..." -msgstr "" -"Analitzant Fitxers,\n" -"Si Us Plau Espereu..." +msgstr "S'està signant la versió %s ..." #: platform/android/export/export_plugin.cpp #, fuzzy @@ -13963,14 +13968,12 @@ msgid "" msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not export project files to gradle project\n" -msgstr "No es pot trobat el el fitxer 'project.godot' en el camí del projecte." +msgstr "No s'han pogut exportar fitxers de projecte a gradle project\n" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not write expansion package file!" -msgstr "No s'ha pogut escriure el fitxer:" +msgstr "No s'ha pogut escriure el fitxer del paquet d'expansió!" #: platform/android/export/export_plugin.cpp #, fuzzy @@ -14009,11 +14012,12 @@ msgid "Creating APK..." msgstr "Creant els contorns..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "" "Could not find template APK to export:\n" "%s" -msgstr "No es pot obrir la plantilla per exportar:" +msgstr "" +"No s'ha trobat la plantilla APK per a exportar:\n" +"%s" #: platform/android/export/export_plugin.cpp msgid "" @@ -14303,9 +14307,9 @@ msgstr "" "(occluder) faci efecte." #: scene/2d/light_occluder_2d.cpp -#, fuzzy msgid "The occluder polygon for this occluder is empty. Please draw a polygon." -msgstr "El polígon oclusiu és buit. Dibuixeu un polígon!" +msgstr "" +"El polígon oclusor d'aquest oclusor és buit. Si us plau, dibuixeu un polígon." #: scene/2d/navigation_polygon.cpp msgid "" @@ -14508,13 +14512,12 @@ msgstr "" "StaticBody, RigidBody, KinematicBody, etc." #: scene/3d/collision_shape.cpp -#, fuzzy msgid "" "A shape must be provided for CollisionShape to function. Please create a " "shape resource for it." msgstr "" -"Cal proveir una forma perquè CollisionShape funcioni. Creeu-li un recurs de " -"forma!" +"Cal proporcionar una forma perquè CollisionShape funcioni. Creeu-ne un " +"recurs de forma." #: scene/3d/collision_shape.cpp #, fuzzy @@ -14777,9 +14780,8 @@ msgid "" "VehicleWheel serves to provide a wheel system to a VehicleBody. Please use " "it as a child of a VehicleBody." msgstr "" -"El motor de físiques sobreescriurà els canvis en la mida dels nodes " -"RigidBody(Caràcter o Rígid). \n" -"Modifica la mida de les Formes de Col·lisió Filles." +"VehicleWheel serveix per a proporcionar un sistema de rodes a un " +"VehicleBody. Utilitzeu-lo com a fill d'un VehicleBody." #: scene/3d/world_environment.cpp msgid "" @@ -14910,7 +14912,7 @@ msgstr "Cal utilitzar una extensió vàlida." #: scene/gui/graph_edit.cpp msgid "Enable grid minimap." -msgstr "Activar graella del minimapa" +msgstr "Activa el minimapa de quadrícula." #: scene/gui/nine_patch_rect.cpp msgid "" @@ -14959,6 +14961,14 @@ msgstr "" "No es pot carregar l'Entorn per Defecte especificat en la Configuració del " "Projecte (Renderització->Entorn->Entorn Per Defecte)." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14972,7 +14982,9 @@ msgstr "" "de Renderització i assigneu-ne la textura interna a algun node." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/cs.po b/editor/translations/cs.po index eb257b0af6..598ff4163c 100644 --- a/editor/translations/cs.po +++ b/editor/translations/cs.po @@ -29,6 +29,7 @@ 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" @@ -2431,6 +2432,15 @@ msgstr "" "Nepodařilo se uložit scénu. Nejspíše se nepodařilo uspokojit závislosti " "(instance nebo dědičnosti)." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Nelze spustit podproces!" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Uložit všechny scény" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Nelze přepsat scénu, která je stále otevřená!" @@ -2566,6 +2576,10 @@ msgid "Save changes to '%s' before closing?" 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 "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2910,10 +2924,6 @@ msgid "Save Scene" msgstr "Uložit scénu" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Uložit všechny scény" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Konvertovat na..." @@ -4420,6 +4430,18 @@ msgid "Clear Default for '%s'" msgstr "Vyčistit výchozí pro '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Znovu importovat" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Importovat jako:" @@ -4428,10 +4450,6 @@ msgid "Preset" msgstr "Profil" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Znovu importovat" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "Uložit scény, znovu importovat a restartovat" @@ -7412,11 +7430,13 @@ msgid "Move Down" msgstr "Přesunout dolů" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Další skript" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Předchozí skript" #: editor/plugins/script_editor_plugin.cpp @@ -7838,7 +7858,7 @@ msgstr "Ortogonální" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Perspektivní" #: editor/plugins/spatial_editor_plugin.cpp @@ -7848,6 +7868,11 @@ msgstr "Ortogonální" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy +msgid "Right Perspective" +msgstr "Perspektivní" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Front Orthogonal" msgstr "Ortogonální" @@ -8209,6 +8234,27 @@ msgid "Right View" msgstr "Pohled zprava" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Pohled zepředu" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "Přepnout perspektivní/ortogonální pohled" @@ -14519,6 +14565,14 @@ msgstr "" "Výchozí prostředí specifikované v nastavení projektu (Vykreslování -> " "Zobrazovací výřez -> Výchozí prostředí) se nepodařilo načíst." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14532,7 +14586,10 @@ msgstr "" "vnitřní texturu nějakému uzlu k zobrazení." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" "Velikost pohledu musí být větší než 0, aby bylo možné cokoliv renderovat." diff --git a/editor/translations/da.po b/editor/translations/da.po index 008f3b947c..af1038552e 100644 --- a/editor/translations/da.po +++ b/editor/translations/da.po @@ -21,6 +21,7 @@ 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-04-26 22:31+0000\n" "Last-Translator: Kim Nielsen <kimmowich@stofanet.dk>\n" @@ -2509,6 +2510,15 @@ msgstr "" "Kunne ikke gemme scene. Der er nogle afhængigheder (forekomster) som ikke " "kunne opfyldes." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Kunne ikke starte underproces!" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Gem alle Scener" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2645,6 +2655,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Gem ændringer til '%s' før lukning?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2995,10 +3009,6 @@ msgid "Save Scene" msgstr "Gem Scene" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Gem alle Scener" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Konverter Til..." @@ -4540,6 +4550,18 @@ msgid "Clear Default for '%s'" msgstr "Fjern Standard for '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Genimporter" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Importer Som:" @@ -4549,10 +4571,6 @@ msgid "Preset" msgstr "Forudindstillet..." #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Genimporter" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "" @@ -7612,12 +7630,14 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" -msgstr "" +#, fuzzy +msgid "Next Script" +msgstr "Åben script" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" -msgstr "" +#, fuzzy +msgid "Previous Script" +msgstr "Forrige fane" #: editor/plugins/script_editor_plugin.cpp msgid "File" @@ -8060,7 +8080,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -8069,6 +8089,10 @@ msgid "Right Orthogonal" msgstr "Højre knap." #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -8419,6 +8443,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -14728,6 +14772,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14741,7 +14793,9 @@ msgstr "" "indre textur til en node så den kan vises." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/de.po b/editor/translations/de.po index b0ca136093..572c2afb2f 100644 --- a/editor/translations/de.po +++ b/editor/translations/de.po @@ -75,9 +75,10 @@ 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-27 08:25+0000\n" -"Last-Translator: Dominik Moos <dominik.moos@protonmail.com>\n" +"PO-Revision-Date: 2021-09-22 20:30+0000\n" +"Last-Translator: So Wieso <sowieso@dukun.de>\n" "Language-Team: German <https://hosted.weblate.org/projects/godot-engine/" "godot/de/>\n" "Language: de\n" @@ -85,7 +86,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.1-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 @@ -2485,6 +2486,15 @@ msgstr "" "Szene konnte nicht gespeichert werden. Wahrscheinlich werden Abhängigkeiten " "(Instanzen oder Vererbungen) nicht erfüllt." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Konvertierte Textur konnte nicht gespeichert werden:" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Alle Szenen speichern" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Momentan geöffnete Szenen können nicht überschrieben werden!" @@ -2621,6 +2631,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Änderungen in ‚%s‘ vor dem Schließen speichern?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2666,29 +2680,27 @@ msgstr "Die aktuelle Szene ist nicht gespeichert. Trotzdem öffnen?" #: editor/editor_node.cpp msgid "Can't undo while mouse buttons are pressed." -msgstr "" +msgstr "Kann nicht rückgängig gemacht werden während Maustasten gedrückt sind." #: editor/editor_node.cpp msgid "Nothing to undo." -msgstr "" +msgstr "Nichts rückgängig zu machen." #: editor/editor_node.cpp -#, fuzzy msgid "Undo: %s" -msgstr "Rückgängig machen" +msgstr "Rückgängig machen: %s" #: editor/editor_node.cpp msgid "Can't redo while mouse buttons are pressed." -msgstr "" +msgstr "Kann nicht wiederhergestellt werden solange Maustasten gedrückt sind." #: editor/editor_node.cpp msgid "Nothing to redo." -msgstr "" +msgstr "Nichts wiederherzustellen." #: editor/editor_node.cpp -#, fuzzy msgid "Redo: %s" -msgstr "Wiederherstellen" +msgstr "Wiederherstellen: %s" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." @@ -2983,10 +2995,6 @@ msgid "Save Scene" msgstr "Szene speichern" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Alle Szenen speichern" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Umwandeln zu..." @@ -3388,9 +3396,8 @@ msgid "Merge With Existing" msgstr "Mit existierendem vereinen" #: editor/editor_node.cpp -#, fuzzy msgid "Apply MeshInstance Transforms" -msgstr "Transformation bearbeiten" +msgstr "MeshInstance-Transforms anwenden" #: editor/editor_node.cpp msgid "Open & Run a Script" @@ -3653,7 +3660,7 @@ msgstr "" #: editor/editor_resource_picker.cpp msgid "Quick Load" -msgstr "" +msgstr "Schnell laden" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "Make Unique" @@ -4474,6 +4481,18 @@ msgid "Clear Default for '%s'" msgstr "Standard für ‚%s‘ löschen" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Neuimport" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Importiere als:" @@ -4482,10 +4501,6 @@ msgid "Preset" msgstr "Vorlage" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Neuimport" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "Szenen speichern, reimportieren und neu starten" @@ -5764,15 +5779,13 @@ msgstr "CanvasItem „%s“ zu (%d, d%) verschieben" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Locked" -msgstr "Sperren ausgewählt" +msgstr "Gesperrt" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Grouped" -msgstr "Gruppe" +msgstr "Gruppiert" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -6722,14 +6735,12 @@ msgid "Remove Selected Item" msgstr "Ausgewähltes Element entfernen" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Ignore Transforms)" -msgstr "Aus Szene importieren" +msgstr "Aus Szene importieren (Transforms ignorieren)" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Apply Transforms)" -msgstr "Aus Szene importieren" +msgstr "Aus Szene importieren (Transforms anwenden)" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Update from Scene" @@ -7323,14 +7334,12 @@ msgid "Flip Portal" msgstr "Portal umdrehen" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Occluder Set Transform" -msgstr "Transform leeren" +msgstr "Occluder-Set-Transform" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Center Node" -msgstr "Erzeuge Node" +msgstr "Mittel-Node" #: editor/plugins/root_motion_editor_plugin.cpp msgid "AnimationTree has no path set to an AnimationPlayer" @@ -7467,11 +7476,13 @@ msgid "Move Down" msgstr "Schiebe runter" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Nächstes Skript" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Vorheriges Skript" #: editor/plugins/script_editor_plugin.cpp @@ -7838,14 +7849,12 @@ msgid "Skeleton2D" msgstr "Skelett2D" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Reset to Rest Pose" -msgstr "Kochen in Ruhe-Pose setzen" +msgstr "Zu Ruhepose zurücksetzen" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Overwrite Rest Pose" -msgstr "Überschreiben" +msgstr "Ruhepose überschreiben" #: editor/plugins/skeleton_editor_plugin.cpp msgid "Create physical bones" @@ -7872,69 +7881,63 @@ msgid "Perspective" msgstr "Perspektivisch" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Orthogonal" -msgstr "Senkrecht" +msgstr "Oben orthogonal" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Perspective" -msgstr "Perspektivisch" +msgstr "Oben perspektivisch" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Orthogonal" -msgstr "Senkrecht" +msgstr "Unten orthogonal" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Perspective" -msgstr "Perspektivisch" +msgstr "Unten perspektivisch" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Left Orthogonal" -msgstr "Senkrecht" +msgstr "Links orthogonal" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Perspektivisch" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Right Orthogonal" -msgstr "Senkrecht" +msgstr "Rechts orthogonal" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "Rechts perspektivisch" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Orthogonal" -msgstr "Senkrecht" +msgstr "Vorne orthogonal" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Perspective" -msgstr "Perspektivisch" +msgstr "Vorne perspektivisch" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Orthogonal" -msgstr "Senkrecht" +msgstr "Hinten orthogonal" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Perspective" -msgstr "Perspektivisch" +msgstr "Hinten perspektivisch" #. 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 " [Portale aktiv]" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Aborted." @@ -8261,6 +8264,27 @@ msgid "Right View" msgstr "Sicht von rechts" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Sicht von vorne" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "Zwischen perspektivischer und orthogonaler Sicht wechseln" @@ -8334,9 +8358,8 @@ msgid "View Portal Culling" msgstr "Portal-Culling anzeigen" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "View Occlusion Culling" -msgstr "Portal-Culling anzeigen" +msgstr "Occlusion-Culling anzeigen" #: editor/plugins/spatial_editor_plugin.cpp #: modules/gridmap/grid_map_editor_plugin.cpp @@ -8404,9 +8427,8 @@ msgid "Post" msgstr "Nachher" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" -msgstr "Unbenanntes Projekt" +msgstr "Unbenannter Griff" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create Mesh2D" @@ -12552,14 +12574,12 @@ msgid "Set Portal Point Position" msgstr "Portal-Point-Position festlegen" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Set Occluder Sphere Radius" -msgstr "Zylinderformradius ändern" +msgstr "Occluder-Sphärenradius festlegen" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Set Occluder Sphere Position" -msgstr "Kurven-Eingangsposition festlegen" +msgstr "Occluder-Sphärenposition festlegen" #: modules/csg/csg_gizmos.cpp msgid "Change Cylinder Radius" @@ -12844,9 +12864,8 @@ msgid "Class name can't be a reserved keyword" msgstr "Der Klassenname kann nicht ein reserviertes Schlüsselwort sein" #: modules/mono/csharp_script.cpp -#, fuzzy msgid "Build Solution" -msgstr "Auswahl füllen" +msgstr "Solution bauen" #: modules/mono/mono_gd/gd_mono_utils.cpp msgid "End of inner exception stack trace" @@ -14211,11 +14230,11 @@ msgstr "" #: scene/3d/occluder.cpp msgid "No shape is set." -msgstr "" +msgstr "Es wurde keine Form festgelegt." #: scene/3d/occluder.cpp msgid "Only uniform scales are supported." -msgstr "" +msgstr "Es werden nur gleichförmige Skalierungen unterstützt." #: scene/3d/particles.cpp msgid "" @@ -14581,6 +14600,10 @@ msgid "" "The GLES2 backend is currently in use, so these modes will act like Stretch " "instead." msgstr "" +"Die Achsenstreckungsoptionen „Tile“ und „Tile Fit“ sind nur aktiv, wenn das " +"GLES3-Rendering-Backend genutzt wird.\n" +"Zur Zeit wird das GLES2-Backend genutzt und diese Optionen verhalten sich " +"wie „Stretch“." #: scene/gui/popup.cpp msgid "" @@ -14621,6 +14644,14 @@ msgstr "" "Das Standard-Environment wie festgelegt in den Projekteinstellungen " "(Rendering→Environment→Standard-Environment) konnte nicht geladen werden." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14635,13 +14666,16 @@ msgstr "" "irgendeinem Node zum Anzeigen zugewiesen werden." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" "Die Größe des Viewports muss größer als 0 sein um etwas rendern zu können." #: scene/resources/occluder_shape.cpp msgid "OccluderShapeSphere Set Spheres" -msgstr "" +msgstr "OccluderShapeSphere-Spheres festlegen" #: scene/resources/visual_shader_nodes.cpp msgid "" @@ -16530,9 +16564,6 @@ msgstr "Konstanten können nicht verändert werden." #~ msgid "Couldn't save atlas image:" #~ msgstr "Atlas-Bild konnte nicht gespeichert werden:" -#~ msgid "Couldn't save converted texture:" -#~ msgstr "Konvertierte Textur konnte nicht gespeichert werden:" - #~ msgid "Invalid translation source!" #~ msgstr "Fehlerhafte Übersetzungsquelle!" diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot index 47aa1d3a22..60507c472d 100644 --- a/editor/translations/editor.pot +++ b/editor/translations/editor.pot @@ -9,6 +9,8 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" +"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" +"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8-bit\n" @@ -2314,6 +2316,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2430,6 +2440,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2749,10 +2763,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4152,15 +4162,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7041,11 +7059,11 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +msgid "Next Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +msgid "Previous Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp @@ -7455,7 +7473,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7463,6 +7481,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7800,6 +7822,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13657,6 +13699,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13666,7 +13716,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/el.po b/editor/translations/el.po index ea1c91f4b5..d8d6251838 100644 --- a/editor/translations/el.po +++ b/editor/translations/el.po @@ -16,6 +16,7 @@ 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-07-09 14:32+0000\n" "Last-Translator: Shadofer <shadowrlrs@gmail.com>\n" @@ -2432,6 +2433,15 @@ msgstr "" "Αδύνατη η αποθήκευση σκηνής. Πιθανώς οι εξαρτήσεις (στιγμιότυπα ή " "κληρονομιά) να μην μπορούσαν να ικανοποιηθούν." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Δεν ήταν δυνατή η αποθήκευση υφής που έχει μετατραπεί:" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Αποθήκευση Ολων των Σκηνών" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Αδύνατη η αντικατάσταση σκηνής που είναι ακόμα ανοιχτή!" @@ -2573,6 +2583,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Αποθήκευση αλλαγών στο '%s' πριν το κλείσιμο;" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2929,10 +2943,6 @@ msgid "Save Scene" msgstr "Αποθηκεύση σκηνής" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Αποθήκευση Ολων των Σκηνών" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Μετατροπή σε..." @@ -4455,6 +4465,18 @@ msgid "Clear Default for '%s'" msgstr "Εκκαθάριση προεπιλογής για '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Επανεισαγωγή" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Εισαγωγή ώς:" @@ -4463,10 +4485,6 @@ msgid "Preset" msgstr "Προρύθμιση" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Επανεισαγωγή" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "Αποθήκευση Σκηνών, Επανεισαγωγή και Επανεκκίνηση" @@ -7484,11 +7502,13 @@ msgid "Move Down" msgstr "Μετακίνηση κάτω" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Επόμενη Δέμη Ενεργειών" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Προηγούμενη Δέσμη Ενεργειών" #: editor/plugins/script_editor_plugin.cpp @@ -7915,7 +7935,7 @@ msgstr "Αξονομετρική" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Προοπτική" #: editor/plugins/spatial_editor_plugin.cpp @@ -7925,6 +7945,11 @@ msgstr "Αξονομετρική" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy +msgid "Right Perspective" +msgstr "Προοπτική" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Front Orthogonal" msgstr "Αξονομετρική" @@ -8290,6 +8315,27 @@ msgid "Right View" msgstr "Δεξιά όψη" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Εμπρόσθια όψη" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "Εναλλαγή Προοπτικής/Αξονομετρικής Προβολής" @@ -14696,6 +14742,14 @@ msgstr "" "Το προεπιλεγμένο περιβάλλον, όπως έχει ορισθεί στις ρυθμίσεις έργου " "(Rendering -> Environment -> Default Environment) δεν μπορούσε να φορτωθεί." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14709,7 +14763,10 @@ msgstr "" "έναν κόμβο για απεικόνιση." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" "Το μέγεθος της οπτικής γωνίας πρέπει να είναι μεγαλύτερο του 0 για να γίνει " "απόδοση." @@ -16573,9 +16630,6 @@ msgstr "Οι σταθερές δεν μπορούν να τροποποιηθο #~ msgid "Couldn't save atlas image:" #~ msgstr "Δεν ήταν δυνατή η αποθήκευση εικόνας άτλαντα:" -#~ msgid "Couldn't save converted texture:" -#~ msgstr "Δεν ήταν δυνατή η αποθήκευση υφής που έχει μετατραπεί:" - #~ msgid "Invalid translation source!" #~ msgstr "Μη έγκυρη πηγή μετάφρασης!" diff --git a/editor/translations/eo.po b/editor/translations/eo.po index 5987003cb7..c0aa10e89f 100644 --- a/editor/translations/eo.po +++ b/editor/translations/eo.po @@ -17,15 +17,16 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" -"PO-Revision-Date: 2021-08-14 19:04+0000\n" -"Last-Translator: mourning20s <mourning20s@protonmail.com>\n" +"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" +"PO-Revision-Date: 2021-10-06 00:12+0000\n" +"Last-Translator: Manuel González <mgoopazo@gmail.com>\n" "Language-Team: Esperanto <https://hosted.weblate.org/projects/godot-engine/" "godot/eo/>\n" "Language: eo\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8-bit\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 @@ -2404,6 +2405,15 @@ msgstr "" "Ne eble konservi scenon. Verŝajne dependoj (ekzemploj aŭ heredito) ne " "verigus." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Ne eble komencas subprocezon!" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Konservi ĉiujn scenojn" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Ne eble anstataŭigas scenon ke estas ankoraŭ malferma!" @@ -2539,6 +2549,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Konservi ŝanĝojn al '%s' antaŭ fermo?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2584,7 +2598,7 @@ msgstr "Nuna sceno ne estas konservita. Malfermi ĉuikaze?" #: editor/editor_node.cpp msgid "Can't undo while mouse buttons are pressed." -msgstr "" +msgstr "Ne povu malfari dum musbutonoj estas premitaj." #: editor/editor_node.cpp msgid "Nothing to undo." @@ -2888,10 +2902,6 @@ msgid "Save Scene" msgstr "Konservi scenon" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Konservi ĉiujn scenojn" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Konverti al..." @@ -4395,6 +4405,18 @@ msgid "Clear Default for '%s'" msgstr "Vakigi defaŭlton por '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Reenporti" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Enporti kiel:" @@ -4403,10 +4425,6 @@ msgid "Preset" msgstr "Antaŭagordo" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Reenporti" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "Konservi scenojn, reenporti, kaj rekomenci" @@ -7375,12 +7393,14 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" -msgstr "" +#, fuzzy +msgid "Next Script" +msgstr "Nova skripto" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" -msgstr "" +#, fuzzy +msgid "Previous Script" +msgstr "Antaŭa tabo" #: editor/plugins/script_editor_plugin.cpp msgid "File" @@ -7795,8 +7815,9 @@ msgid "Left Orthogonal" msgstr "Maldekstra butono" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" -msgstr "" +#, fuzzy +msgid "Left Perspective" +msgstr "Malsupre maldekstre" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy @@ -7804,6 +7825,10 @@ msgid "Right Orthogonal" msgstr "Dekstra butono" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -8159,6 +8184,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -14196,6 +14241,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14205,7 +14258,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/es.po b/editor/translations/es.po index 95a4a08bfd..522575a8fc 100644 --- a/editor/translations/es.po +++ b/editor/translations/es.po @@ -73,8 +73,9 @@ 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-27 08:25+0000\n" +"PO-Revision-Date: 2021-10-02 10:08+0000\n" "Last-Translator: Javier Ocampos <xavier.ocampos@gmail.com>\n" "Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/" "godot/es/>\n" @@ -83,7 +84,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.1-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 @@ -1574,7 +1575,7 @@ msgstr "Renombrar Autoload" #: editor/editor_autoload_settings.cpp msgid "Toggle AutoLoad Globals" -msgstr "Act./Desact. Globales de Autoload" +msgstr "Act./Desact. Globales de AutoLoad" #: editor/editor_autoload_settings.cpp msgid "Move Autoload" @@ -2481,6 +2482,15 @@ msgstr "" "No se pudo guardar la escena. Las posibles dependencias (instancias o " "herencias) no se pudieron resolver." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "No se pudo guardar la textura convertida:" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Guardar Todas las Escenas" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "¡No se puede sobrescribir una escena que todavía está abierta!" @@ -2618,6 +2628,10 @@ msgid "Save changes to '%s' before closing?" msgstr "¿Guardar cambios de '%s' antes de cerrar?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2663,29 +2677,27 @@ msgstr "Escena actual no guardada ¿Abrir de todos modos?" #: editor/editor_node.cpp msgid "Can't undo while mouse buttons are pressed." -msgstr "" +msgstr "No se puede deshacer mientras se pulsan los botones del mouse." #: editor/editor_node.cpp msgid "Nothing to undo." -msgstr "" +msgstr "No hay nada que deshacer." #: editor/editor_node.cpp -#, fuzzy msgid "Undo: %s" -msgstr "Deshacer" +msgstr "Deshacer: %s" #: editor/editor_node.cpp msgid "Can't redo while mouse buttons are pressed." -msgstr "" +msgstr "No se puede rehacer mientras los botones del mouse están presionados." #: editor/editor_node.cpp msgid "Nothing to redo." -msgstr "" +msgstr "No hay nada que rehacer." #: editor/editor_node.cpp -#, fuzzy msgid "Redo: %s" -msgstr "Rehacer" +msgstr "Rehacer: %s" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." @@ -2975,10 +2987,6 @@ msgid "Save Scene" msgstr "Guardar Escena" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Guardar Todas las Escenas" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Convertir a..." @@ -3383,9 +3391,8 @@ msgid "Merge With Existing" msgstr "Combinar Con Existentes" #: editor/editor_node.cpp -#, fuzzy msgid "Apply MeshInstance Transforms" -msgstr "Cambiar Transformación de la Animación" +msgstr "Aplicar Transformaciones al MeshInstance" #: editor/editor_node.cpp msgid "Open & Run a Script" @@ -3647,7 +3654,7 @@ msgstr "" #: editor/editor_resource_picker.cpp msgid "Quick Load" -msgstr "" +msgstr "Carga Rápida" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "Make Unique" @@ -4474,6 +4481,18 @@ msgid "Clear Default for '%s'" msgstr "Restablecer Predeterminado para '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Reimportar" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Importar como:" @@ -4482,10 +4501,6 @@ msgid "Preset" msgstr "Preajuste" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Reimportar" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "Guardar Escenas, Reimportar y Reiniciar" @@ -5064,7 +5079,7 @@ msgstr "Mostrar la lista de animaciones en el reproductor." #: editor/plugins/animation_player_editor_plugin.cpp msgid "Autoplay on Load" -msgstr "Autoreproducir al Cargar" +msgstr "Reproducción Automática al Cargar" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Enable Onion Skinning" @@ -5766,15 +5781,13 @@ msgstr "Mover CanvasItem \"%s\" a (%d, %d)" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Locked" -msgstr "Bloqueo Seleccionado" +msgstr "Bloqueado" #: 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 "" @@ -6722,14 +6735,12 @@ msgid "Remove Selected Item" msgstr "Eliminar Elemento Seleccionado" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Ignore Transforms)" -msgstr "Importar desde escena" +msgstr "Importar desde Escena (Ignorar Transformaciones)" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Apply Transforms)" -msgstr "Importar desde escena" +msgstr "Importar desde Escena (Aplicar Transformaciones)" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Update from Scene" @@ -7327,14 +7338,12 @@ msgid "Flip Portal" msgstr "Voltear Portal" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Occluder Set Transform" -msgstr "Reestablecer Transformación" +msgstr "Ocluir Conjunto de Transformación" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Center Node" -msgstr "Crear Nodo" +msgstr "Centrar Nodo" #: editor/plugins/root_motion_editor_plugin.cpp msgid "AnimationTree has no path set to an AnimationPlayer" @@ -7470,11 +7479,13 @@ msgid "Move Down" msgstr "Bajar" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Script siguiente" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Script anterior" #: editor/plugins/script_editor_plugin.cpp @@ -7839,14 +7850,12 @@ msgid "Skeleton2D" msgstr "Skeleton2D" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Reset to Rest Pose" -msgstr "Asignar Pose de Descanso a Huesos" +msgstr "Reiniciar a la Pose de Reposo" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Overwrite Rest Pose" -msgstr "Sobreescribir" +msgstr "Sobrescribir la Pose de Reposo" #: editor/plugins/skeleton_editor_plugin.cpp msgid "Create physical bones" @@ -7873,69 +7882,63 @@ msgid "Perspective" msgstr "Perspectiva" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Superior" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Perspective" -msgstr "Perspectiva" +msgstr "Perspectiva Superior" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Inferior" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Perspective" -msgstr "Perspectiva" +msgstr "Perspectiva Inferior" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Left Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Izquierda" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Perspectiva" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Right Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Derecha" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "Perspectiva Derecha" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Frontal" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Perspective" -msgstr "Perspectiva" +msgstr "Perspectiva Frontal" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Trasera" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Perspective" -msgstr "Perspectiva" +msgstr "Perspectiva Trasera" #. 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 " [portals active]" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Aborted." @@ -8259,6 +8262,27 @@ msgid "Right View" msgstr "Vista Derecha" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Vista Frontal" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "Cambiar Vista Perspectiva/Ortogonal" @@ -8332,9 +8356,8 @@ msgid "View Portal Culling" msgstr "Ver Eliminación de Portales" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "View Occlusion Culling" -msgstr "Ver Eliminación de Portales" +msgstr "Ver Eliminación de Oclusión" #: editor/plugins/spatial_editor_plugin.cpp #: modules/gridmap/grid_map_editor_plugin.cpp @@ -8402,9 +8425,8 @@ msgid "Post" msgstr "Posterior" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" -msgstr "Proyecto Sin Nombre" +msgstr "Gizmo Sin Nombre" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create Mesh2D" @@ -11510,7 +11532,7 @@ msgstr "Idiomas:" #: editor/project_settings_editor.cpp msgid "AutoLoad" -msgstr "AutoCarga" +msgstr "AutoLoad" #: editor/project_settings_editor.cpp msgid "Plugins" @@ -12545,14 +12567,12 @@ msgid "Set Portal Point Position" msgstr "Establecer Posición del Portal Point" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Set Occluder Sphere Radius" -msgstr "Cambiar Radio de la Forma del Cilindro" +msgstr "Establecer Radio de la Esfera de Oclusión" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Set Occluder Sphere Position" -msgstr "Establecer Posición de Entrada de Curva" +msgstr "Establecer Posición de la Esfera de Oclusión" #: modules/csg/csg_gizmos.cpp msgid "Change Cylinder Radius" @@ -12840,9 +12860,8 @@ msgid "Class name can't be a reserved keyword" msgstr "El nombre de la clase no puede ser una palabra reservada" #: modules/mono/csharp_script.cpp -#, fuzzy msgid "Build Solution" -msgstr "Rellenar Selección" +msgstr "Crear Solución" #: modules/mono/mono_gd/gd_mono_utils.cpp msgid "End of inner exception stack trace" @@ -14210,11 +14229,11 @@ msgstr "" #: scene/3d/occluder.cpp msgid "No shape is set." -msgstr "" +msgstr "No se ha establecido ninguna forma." #: scene/3d/occluder.cpp msgid "Only uniform scales are supported." -msgstr "" +msgstr "Sólo se admiten escalas uniformes." #: scene/3d/particles.cpp msgid "" @@ -14573,6 +14592,10 @@ msgid "" "The GLES2 backend is currently in use, so these modes will act like Stretch " "instead." msgstr "" +"Las opciones Tile y Tile Fit para las propiedades Axis Stretch sólo son " +"efectivas cuando se utiliza el backend de renderizado GLES3.\n" +"El backend GLES2 está actualmente en uso, por lo que estos modos actuarán " +"como Stretch en su lugar." #: scene/gui/popup.cpp msgid "" @@ -14610,6 +14633,14 @@ msgstr "" "El Entorno por Defecto como se especifica en Configuración del Proyecto " "(Rendering -> Environment -> Default Environment) no se ha podido cargar." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14624,14 +14655,17 @@ msgstr "" "nodo para que se muestre." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" "El tamaño del Viewport debe ser mayor que 0 para poder renderizar cualquier " "cosa." #: scene/resources/occluder_shape.cpp msgid "OccluderShapeSphere Set Spheres" -msgstr "" +msgstr "Establecer Esferas OccluderShapeSphere" #: scene/resources/visual_shader_nodes.cpp msgid "" @@ -16532,9 +16566,6 @@ msgstr "Las constantes no pueden modificarse." #~ msgid "Couldn't save atlas image:" #~ msgstr "No se pudo guardar la imagen de atlas:" -#~ msgid "Couldn't save converted texture:" -#~ msgstr "No se pudo guardar la textura convertida:" - #~ msgid "Invalid translation source!" #~ msgstr "¡Origen de traducción incorrecto!" diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po index 0decc83e9f..76afb25668 100644 --- a/editor/translations/es_AR.po +++ b/editor/translations/es_AR.po @@ -18,12 +18,14 @@ # Skarline <lihue-molina@hotmail.com>, 2020. # Joakker <joaquinandresleon108@gmail.com>, 2020. # M3CG <cgmario1999@gmail.com>, 2021. +# Manuel González <mgoopazo@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-09-06 16:32+0000\n" -"Last-Translator: M3CG <cgmario1999@gmail.com>\n" +"PO-Revision-Date: 2021-10-10 10:18+0000\n" +"Last-Translator: Lisandro Lorea <lisandrolorea@gmail.com>\n" "Language-Team: Spanish (Argentina) <https://hosted.weblate.org/projects/" "godot-engine/godot/es_AR/>\n" "Language: es_AR\n" @@ -31,7 +33,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.1-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 @@ -2424,6 +2426,15 @@ msgstr "" "No se pudo guardar la escena. Probablemente no se hayan podido satisfacer " "dependencias (instancias o herencia)." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "No se pudo guardar la textura convertida:" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Guardar Todas las Escenas" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "No se puede sobrescribir una escena que todavía esta abierta!" @@ -2562,6 +2573,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Guardar cambios a '%s' antes de cerrar?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2607,29 +2622,27 @@ msgstr "Escena actual sin guardar. Abrir de todos modos?" #: editor/editor_node.cpp msgid "Can't undo while mouse buttons are pressed." -msgstr "" +msgstr "No se puede deshacer mientras los botones del mouse están presionados." #: editor/editor_node.cpp msgid "Nothing to undo." -msgstr "" +msgstr "Nada para deshacer." #: editor/editor_node.cpp -#, fuzzy msgid "Undo: %s" -msgstr "Deshacer" +msgstr "Deshacer: %s" #: editor/editor_node.cpp msgid "Can't redo while mouse buttons are pressed." -msgstr "" +msgstr "No se puede rehacer mientras los botones del mouse están presionados." #: editor/editor_node.cpp msgid "Nothing to redo." -msgstr "" +msgstr "No hay nada que rehacer." #: editor/editor_node.cpp -#, fuzzy msgid "Redo: %s" -msgstr "Rehacer" +msgstr "Rehacer: %s" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." @@ -2919,10 +2932,6 @@ msgid "Save Scene" msgstr "Guardar Escena" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Guardar Todas las Escenas" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Convertir A..." @@ -3325,9 +3334,8 @@ msgid "Merge With Existing" msgstr "Mergear Con Existentes" #: editor/editor_node.cpp -#, fuzzy msgid "Apply MeshInstance Transforms" -msgstr "Cambiar Transform de Anim" +msgstr "Aplicar Transformaciones al MeshInstance" #: editor/editor_node.cpp msgid "Open & Run a Script" @@ -3588,7 +3596,7 @@ msgstr "" #: editor/editor_resource_picker.cpp msgid "Quick Load" -msgstr "" +msgstr "Carga Rápida" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "Make Unique" @@ -4415,6 +4423,18 @@ msgid "Clear Default for '%s'" msgstr "Restablecer Predeterminados para '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Reimportar" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Importar Como:" @@ -4423,10 +4443,6 @@ msgid "Preset" msgstr "Preset" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Reimportar" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "Guardar Escenas, Reimportar y Reiniciar" @@ -5708,15 +5724,13 @@ msgstr "Mover CanvasItem \"%s\" a (%d, %d)" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Locked" -msgstr "Bloqueo Seleccionado" +msgstr "Bloqueado" #: 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 "" @@ -6662,14 +6676,12 @@ msgid "Remove Selected Item" msgstr "Remover Item Seleccionado" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Ignore Transforms)" -msgstr "Importar desde Escena" +msgstr "Importar desde Escena (Ignorar Transformaciones)" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Apply Transforms)" -msgstr "Importar desde Escena" +msgstr "Importar desde Escena (Aplicar Transformaciones)" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Update from Scene" @@ -7268,9 +7280,8 @@ msgid "Occluder Set Transform" msgstr "Reestablecer Transform" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Center Node" -msgstr "Crear Nodo" +msgstr "Centrar Nodo" #: editor/plugins/root_motion_editor_plugin.cpp msgid "AnimationTree has no path set to an AnimationPlayer" @@ -7406,11 +7417,13 @@ msgid "Move Down" msgstr "Bajar" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Script siguiente" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Script anterior" #: editor/plugins/script_editor_plugin.cpp @@ -7775,14 +7788,12 @@ msgid "Skeleton2D" msgstr "Skeleton2D" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Reset to Rest Pose" -msgstr "Setear Huesos a la Pose de Descanso" +msgstr "Restablecer a la Pose de Reposo" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Overwrite Rest Pose" -msgstr "Sobreescribir" +msgstr "Sobrescribir la Pose de Reposo" #: editor/plugins/skeleton_editor_plugin.cpp msgid "Create physical bones" @@ -7809,69 +7820,63 @@ msgid "Perspective" msgstr "Perspectiva" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Superior" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Perspective" -msgstr "Perspectiva" +msgstr "Perspectiva Superior" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Inferior" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Perspective" -msgstr "Perspectiva" +msgstr "Perspectiva Inferior" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Left Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Izquierda" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Perspectiva" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Right Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Derecha" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "Perspectiva Derecha" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Frontal" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Perspective" -msgstr "Perspectiva" +msgstr "Perspectiva Frontal" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Trasera" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Perspective" -msgstr "Perspectiva" +msgstr "Perspectiva Trasera" #. 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 " [portales activos]" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Aborted." @@ -7970,7 +7975,7 @@ msgstr "Vértices:" #: 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." @@ -8195,6 +8200,27 @@ msgid "Right View" msgstr "Vista Derecha" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Vista Frontal" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "Intercambiar entre Vista Perspectiva/Orthogonal" @@ -8268,9 +8294,8 @@ msgid "View Portal Culling" msgstr "Ver Culling de Portales" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "View Occlusion Culling" -msgstr "Ver Culling de Portales" +msgstr "Ver Occlusion Culling" #: editor/plugins/spatial_editor_plugin.cpp #: modules/gridmap/grid_map_editor_plugin.cpp @@ -8338,9 +8363,8 @@ msgid "Post" msgstr "Post" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" -msgstr "Proyecto Sin Nombre" +msgstr "Gizmo Sin Nombre" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create Mesh2D" @@ -8608,7 +8632,7 @@ msgstr "Styleboxes" #: editor/plugins/theme_editor_plugin.cpp msgid "{num} color(s)" -msgstr "" +msgstr "{num} color(es)" #: editor/plugins/theme_editor_plugin.cpp msgid "No colors found." @@ -8640,7 +8664,7 @@ msgstr "No se encontraron íconos." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} stylebox(es)" -msgstr "" +msgstr "{num} stylebox(es)" #: editor/plugins/theme_editor_plugin.cpp msgid "No styleboxes found." @@ -8700,11 +8724,11 @@ msgstr "Seleccionar todos elementos constant visibles." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible constant items and their data." -msgstr "" +msgstr "Seleccionar todos los elementos constant visibles y sus datos." #: editor/plugins/theme_editor_plugin.cpp msgid "Deselect all visible constant items." -msgstr "" +msgstr "Deseleccionar todos los elementos constant visibles." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible font items." @@ -8712,11 +8736,11 @@ msgstr "Seleccionar todos los elementos font visibles." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible font items and their data." -msgstr "" +msgstr "Seleccionar todos los elementos font visibles y sus datos." #: editor/plugins/theme_editor_plugin.cpp msgid "Deselect all visible font items." -msgstr "" +msgstr "Deseleccionar todos los elementos font visibles." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible icon items." @@ -8732,21 +8756,23 @@ msgstr "Deseleccionar todos los elementos icon visibles." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible stylebox items." -msgstr "" +msgstr "Seleccionar todos los elementos stylebox visibles." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible stylebox items and their data." -msgstr "" +msgstr "Seleccionar todos los elementos stylebox visibles y sus datos." #: editor/plugins/theme_editor_plugin.cpp msgid "Deselect all visible stylebox items." -msgstr "" +msgstr "Deseleccionar todos los elementos stylebox visibles." #: editor/plugins/theme_editor_plugin.cpp msgid "" "Caution: Adding icon data may considerably increase the size of your Theme " "resource." msgstr "" +"Precaución: Añadir datos de iconos puede aumentar considerablemente el " +"tamaño de su recurso Theme." #: editor/plugins/theme_editor_plugin.cpp msgid "Collapse types." @@ -8786,6 +8812,9 @@ msgid "" "closing this window.\n" "Close anyway?" msgstr "" +"En la pestaña de Elementos de Importación se han seleccionado algunos " +"elementos. La selección se perderá al cerrar esta ventana.\n" +"¿Cerrar de todos modos?" #: editor/plugins/theme_editor_plugin.cpp msgid "" @@ -8825,6 +8854,8 @@ msgid "" "This theme type is empty.\n" "Add more items to it manually or by importing from another theme." msgstr "" +"Este tipo de theme está vacío.\n" +"Añadí más propiedades manualmente o importalas desde otro Theme." #: editor/plugins/theme_editor_plugin.cpp msgid "Add Color Item" @@ -8956,81 +8987,78 @@ msgstr "Reemplazar Elemento" #: editor/plugins/theme_editor_plugin.cpp msgid "Unpin this StyleBox as a main style." -msgstr "" +msgstr "Quitar este StyleBox como estilo principal." #: editor/plugins/theme_editor_plugin.cpp msgid "" "Pin this StyleBox as a main style. Editing its properties will update the " "same properties in all other StyleBoxes of this type." msgstr "" +"Establecer este StyleBox como un estilo principal. La edición de sus " +"propiedades actualizará las mismas propiedades en todos los demás StyleBoxes " +"de este tipo." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Type" -msgstr "Tipo" +msgstr "Añadir Tipo" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Item Type" -msgstr "Agregar Item" +msgstr "Añadir Tipo de Elemento" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Node Types:" -msgstr "Tipo de nodo" +msgstr "Tipos de Nodo:" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Show Default" -msgstr "Cargar Valores por Defecto" +msgstr "Mostrar Valores por Defecto" #: editor/plugins/theme_editor_plugin.cpp msgid "Show default type items alongside items that have been overridden." msgstr "" +"Mostrar los elementos de tipo por defecto junto a los elementos que han sido " +"sobrescritos." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Override All" -msgstr "Reemplazos(Overrides)" +msgstr "Anular Todo" #: editor/plugins/theme_editor_plugin.cpp msgid "Override all default type items." -msgstr "" +msgstr "Anular todos los elementos de tipo por defecto." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Theme:" -msgstr "Tema" +msgstr "Theme:" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Manage Items..." -msgstr "Administrar Plantillas de Exportación..." +msgstr "Administrar Elementos..." #: editor/plugins/theme_editor_plugin.cpp msgid "Add, remove, organize and import Theme items." -msgstr "" +msgstr "Añadir, eliminar, organizar e importar elementos del Theme." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Preview" -msgstr "Vista Previa" +msgstr "Añadir Vista Previa" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Default Preview" -msgstr "Actualizar Vista Previa" +msgstr "Vista Previa Por Defecto" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select UI Scene:" -msgstr "Seleccioná una Mesh de Origen:" +msgstr "Seleccionar Escena de UI:" #: editor/plugins/theme_editor_preview.cpp msgid "" "Toggle the control picker, allowing to visually select control types for " "edit." msgstr "" +"Activar el selector de controles, lo que permite seleccionar visualmente los " +"tipos de control para su edición." #: editor/plugins/theme_editor_preview.cpp msgid "Toggle Button" @@ -9065,9 +9093,8 @@ msgid "Checked Radio Item" msgstr "Radio Ítem Tildado" #: editor/plugins/theme_editor_preview.cpp -#, fuzzy msgid "Named Separator" -msgstr "Separador con nombre." +msgstr "Separador Nomenclado" #: editor/plugins/theme_editor_preview.cpp msgid "Submenu" @@ -9120,19 +9147,19 @@ msgstr "Tiene,Muchas,Opciones" #: editor/plugins/theme_editor_preview.cpp msgid "Invalid path, the PackedScene resource was probably moved or removed." msgstr "" +"Ruta inválida, el recurso PackedScene probablemente fue movido o eliminado." #: editor/plugins/theme_editor_preview.cpp msgid "Invalid PackedScene resource, must have a Control node at its root." -msgstr "" +msgstr "Recurso PackedScene inválido, debe tener un nodo Control en la raíz." #: editor/plugins/theme_editor_preview.cpp -#, fuzzy msgid "Invalid file, not a PackedScene resource." -msgstr "Archivo inválido. No es un layout de bus de audio." +msgstr "Archivo inválido, no es un recurso PackedScene." #: editor/plugins/theme_editor_preview.cpp msgid "Reload the scene to reflect its most actual state." -msgstr "" +msgstr "Recargar la escena para reflejar su estado actual." #: editor/plugins/tile_map_editor_plugin.cpp msgid "Erase Selection" @@ -10534,9 +10561,8 @@ msgid "VisualShader" msgstr "VisualShader" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Edit Visual Property:" -msgstr "Editar Propiedad Visual" +msgstr "Editar Propiedad Visual:" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Visual Shader Mode Changed" @@ -10664,9 +10690,8 @@ msgid "Script" msgstr "Script" #: editor/project_export.cpp -#, fuzzy msgid "GDScript Export Mode:" -msgstr "Modo de Exportación de Scipts:" +msgstr "Modo de Exportación GDScript:" #: editor/project_export.cpp msgid "Text" @@ -10674,21 +10699,21 @@ msgstr "Texto" #: editor/project_export.cpp msgid "Compiled Bytecode (Faster Loading)" -msgstr "" +msgstr "Bytecode Compilado (Carga Más Rápida)" #: editor/project_export.cpp msgid "Encrypted (Provide Key Below)" msgstr "Encriptado (Proveer la Clave Debajo)" #: editor/project_export.cpp -#, fuzzy msgid "Invalid Encryption Key (must be 64 hexadecimal characters long)" -msgstr "Clave de Encriptación Inválida (debe tener 64 caracteres de largo)" +msgstr "" +"Clave de Encriptación Inválida (debe tener 64 caracteres hexadecimales de " +"largo)" #: editor/project_export.cpp -#, fuzzy msgid "GDScript Encryption Key (256-bits as hexadecimal):" -msgstr "Clave de Encriptación de Script (256-bits como hex):" +msgstr "Clave de Encriptación de Script (256-bits en hexadecimal):" #: editor/project_export.cpp msgid "Export PCK/Zip" @@ -10762,9 +10787,8 @@ msgid "Imported Project" msgstr "Proyecto Importado" #: editor/project_manager.cpp -#, fuzzy msgid "Invalid project name." -msgstr "Nombre de Proyecto Inválido." +msgstr "Nombre de proyecto Inválido." #: editor/project_manager.cpp msgid "Couldn't create folder." @@ -10990,14 +11014,12 @@ msgid "Are you sure to run %d projects at once?" msgstr "¿Estás seguro/a que querés ejecutar %d proyectos a la vez?" #: editor/project_manager.cpp -#, fuzzy msgid "Remove %d projects from the list?" -msgstr "Seleccionar dispositivo de la lista" +msgstr "¿Quitar %d proyectos de la lista?" #: editor/project_manager.cpp -#, fuzzy msgid "Remove this project from the list?" -msgstr "Seleccionar dispositivo de la lista" +msgstr "¿Quitar este proyecto de la lista?" #: editor/project_manager.cpp msgid "" @@ -11031,9 +11053,8 @@ msgid "Project Manager" msgstr "Gestor de Proyectos" #: editor/project_manager.cpp -#, fuzzy msgid "Local Projects" -msgstr "Proyectos" +msgstr "Proyectos Locales" #: editor/project_manager.cpp msgid "Loading, please wait..." @@ -11044,23 +11065,20 @@ msgid "Last Modified" msgstr "Ultima Modificación" #: editor/project_manager.cpp -#, fuzzy msgid "Edit Project" -msgstr "Exportar Proyecto" +msgstr "Editar Proyecto" #: editor/project_manager.cpp -#, fuzzy msgid "Run Project" -msgstr "Renombrar Proyecto" +msgstr "Reproducir Proyecto" #: editor/project_manager.cpp msgid "Scan" msgstr "Examinar" #: editor/project_manager.cpp -#, fuzzy msgid "Scan Projects" -msgstr "Proyectos" +msgstr "Encontrar Proyectos" #: editor/project_manager.cpp msgid "Select a Folder to Scan" @@ -11071,14 +11089,12 @@ msgid "New Project" msgstr "Proyecto Nuevo" #: editor/project_manager.cpp -#, fuzzy msgid "Import Project" -msgstr "Proyecto Importado" +msgstr "Importar Proyecto" #: editor/project_manager.cpp -#, fuzzy msgid "Remove Project" -msgstr "Renombrar Proyecto" +msgstr "Eliminar Proyecto" #: editor/project_manager.cpp msgid "Remove Missing" @@ -11089,9 +11105,8 @@ msgid "About" msgstr "Acerca de" #: editor/project_manager.cpp -#, fuzzy msgid "Asset Library Projects" -msgstr "Biblioteca de Assets" +msgstr "Proyectos de la Librería de Assets" #: editor/project_manager.cpp msgid "Restart Now" @@ -11103,7 +11118,7 @@ msgstr "Quitar Todos" #: editor/project_manager.cpp msgid "Also delete project contents (no undo!)" -msgstr "" +msgstr "También eliminar el contenido del proyecto (¡no se puede deshacer!)" #: editor/project_manager.cpp msgid "Can't run project" @@ -11118,21 +11133,19 @@ msgstr "" "¿Te gustaría explorar los ejemplos oficiales en la Biblioteca de Assets?" #: editor/project_manager.cpp -#, fuzzy msgid "Filter projects" -msgstr "Filtrar propiedades" +msgstr "Filtrar proyectos" #: editor/project_manager.cpp -#, fuzzy msgid "" "This field filters projects by name and last path component.\n" "To filter projects by name and full path, the query must contain at least " "one `/` character." msgstr "" -"La casilla de búsqueda filtra los proyectos por nombre y el último " -"componente de la ruta.\n" -"Para filtrar los proyectos por nombre y ruta completa, la consulta debe " -"contener al menos un carácter `/`." +"Este campo filtra los proyectos por nombre y por el último componente de la " +"ruta.\n" +"Para filtrar proyectos por nombre y ruta completa, la consulta debe contener " +"al menos un carácter `/`." #: editor/project_settings_editor.cpp msgid "Key " @@ -11140,7 +11153,7 @@ msgstr "Tecla " #: editor/project_settings_editor.cpp msgid "Physical Key" -msgstr "" +msgstr "Tecla Física" #: editor/project_settings_editor.cpp msgid "Joy Button" @@ -11188,7 +11201,7 @@ msgstr "Dispositivo" #: editor/project_settings_editor.cpp msgid " (Physical)" -msgstr "" +msgstr " (Física)" #: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Press a Key..." @@ -11331,23 +11344,20 @@ msgid "Override for Feature" msgstr "Sobreescribir para Característica" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Add %d Translations" -msgstr "Agregar Traducción" +msgstr "Añadir %d Traducciones" #: editor/project_settings_editor.cpp msgid "Remove Translation" msgstr "Quitar Traducción" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Translation Resource Remap: Add %d Path(s)" -msgstr "Remapear Recurso Agregar Remap" +msgstr "Remapeo de Recursos de Traducción: Añadir %d Ruta(s)" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Translation Resource Remap: Add %d Remap(s)" -msgstr "Remapear Recurso Agregar Remap" +msgstr "Remapeo de Recursos de Traducción: Añadir %d Remapeo(s)" #: editor/project_settings_editor.cpp msgid "Change Resource Remap Language" @@ -11792,12 +11802,16 @@ msgstr "¿Eliminar nodo \"%s\"?" msgid "" "Saving the branch as a scene requires having a scene open in the editor." msgstr "" +"Guardar la rama como una escena requiere tener una escena abierta en el " +"editor." #: editor/scene_tree_dock.cpp msgid "" "Saving the branch as a scene requires selecting only one node, but you have " "selected %d nodes." msgstr "" +"Guardar la rama como una escena requiere seleccionar sólo un nodo, pero " +"seleccionaste %d nodos." #: editor/scene_tree_dock.cpp msgid "" @@ -12295,7 +12309,7 @@ msgstr "Copiar Error" #: editor/script_editor_debugger.cpp msgid "Open C++ Source on GitHub" -msgstr "" +msgstr "Abrir Fuente C++ en GitHub" #: editor/script_editor_debugger.cpp msgid "Video RAM" @@ -14533,6 +14547,14 @@ msgstr "" "El Entorno por Defecto especificado en Configuración del Editor (Rendering -" "> Viewport -> Entorno por Defecto) no pudo ser cargado." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14546,7 +14568,10 @@ msgstr "" "textura interna a algún otro nodo para mostrar." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "El tamaño del viewport debe ser mayor a 0 para poder renderizar." #: scene/resources/occluder_shape.cpp @@ -16244,9 +16269,6 @@ msgstr "Las constantes no pueden modificarse." #~ msgid "Couldn't save atlas image:" #~ msgstr "No se pudo guardar la imagen de atlas:" -#~ msgid "Couldn't save converted texture:" -#~ msgstr "No se pudo guardar la textura convertida:" - #~ msgid "Invalid translation source!" #~ msgstr "Fuente de traducción inválida!" diff --git a/editor/translations/et.po b/editor/translations/et.po index 2c59035681..ccc2681d0f 100644 --- a/editor/translations/et.po +++ b/editor/translations/et.po @@ -10,6 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" +"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "PO-Revision-Date: 2021-07-16 05:47+0000\n" "Last-Translator: Kritzmensch <streef.gtx@gmail.com>\n" "Language-Team: Estonian <https://hosted.weblate.org/projects/godot-engine/" @@ -2377,6 +2378,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Salvesta kõik stseenid" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Avatud stseeni ei saa üle kirjutada!" @@ -2494,6 +2503,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2823,10 +2836,6 @@ msgid "Save Scene" msgstr "Salvesta stseen" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Salvesta kõik stseenid" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Teisenda..." @@ -4245,6 +4254,18 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Taasimpordi" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Impordi kui:" @@ -4253,10 +4274,6 @@ msgid "Preset" msgstr "Eelseadistus" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Taasimpordi" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "" @@ -7145,11 +7162,13 @@ msgid "Move Down" msgstr "Liiguta allapoole" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Järgmine skript" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Eelmine skript" #: editor/plugins/script_editor_plugin.cpp @@ -7563,7 +7582,7 @@ msgstr "" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Perspektiiv" #: editor/plugins/spatial_editor_plugin.cpp @@ -7571,6 +7590,11 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Right Perspective" +msgstr "Perspektiiv" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7922,6 +7946,27 @@ msgid "Right View" msgstr "Paremvaade" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Eesvaade" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13859,6 +13904,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13868,7 +13921,10 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "Vaateakne suurus peab olema suurem kui 0, et kuvada." #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/eu.po b/editor/translations/eu.po index ddcf8f5d37..9a2948582e 100644 --- a/editor/translations/eu.po +++ b/editor/translations/eu.po @@ -9,6 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" +"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "PO-Revision-Date: 2021-07-29 02:34+0000\n" "Last-Translator: Sergio Varela <sergitroll9@gmail.com>\n" "Language-Team: Basque <https://hosted.weblate.org/projects/godot-engine/" @@ -2354,6 +2355,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2470,6 +2479,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2792,10 +2805,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4223,15 +4232,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7123,11 +7140,12 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" -msgstr "" +#, fuzzy +msgid "Next Script" +msgstr "Scripta" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +msgid "Previous Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp @@ -7538,7 +7556,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7546,6 +7564,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7887,6 +7909,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13814,6 +13856,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13823,7 +13873,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/fa.po b/editor/translations/fa.po index 2d086fe827..c300e21510 100644 --- a/editor/translations/fa.po +++ b/editor/translations/fa.po @@ -22,12 +22,14 @@ # YASAN <yasandev@gmail.com>, 2021. # duniyal ras <duniyalr@gmail.com>, 2021. # عبدالرئوف عابدی <abdolraoofabedi@gmail.com>, 2021. +# Alireza Khodabande <alirezakhodabande74@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-08-27 08:25+0000\n" -"Last-Translator: عبدالرئوف عابدی <abdolraoofabedi@gmail.com>\n" +"PO-Revision-Date: 2021-09-29 02:21+0000\n" +"Last-Translator: Alireza Khodabande <alirezakhodabande74@gmail.com>\n" "Language-Team: Persian <https://hosted.weblate.org/projects/godot-engine/" "godot/fa/>\n" "Language: fa\n" @@ -35,7 +37,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.1-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 @@ -2396,6 +2398,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "ذخیره صحنه" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2512,6 +2522,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2834,10 +2848,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "ذخیره صحنه" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4213,11 +4223,11 @@ msgstr "صافی کردن گرهها" #: editor/groups_editor.cpp msgid "Nodes in Group" -msgstr "" +msgstr "گره ها در گروه" #: editor/groups_editor.cpp msgid "Empty groups will be automatically removed." -msgstr "" +msgstr "گروه های خالی به طور خودکار حذف خواهند شد." #: editor/groups_editor.cpp #, fuzzy @@ -4262,7 +4272,7 @@ 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" @@ -4275,7 +4285,7 @@ msgstr "" #: editor/import/resource_importer_scene.cpp msgid "Importing Scene..." -msgstr "" +msgstr "وارد کردن صحنه..." #: editor/import/resource_importer_scene.cpp msgid "Generating Lightmaps" @@ -4342,6 +4352,18 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "وارد کردن دوباره" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "" @@ -4351,10 +4373,6 @@ msgid "Preset" msgstr "بازنشانی بزرگنمایی" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "وارد کردن دوباره" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "" @@ -7413,12 +7431,14 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" -msgstr "" +#, fuzzy +msgid "Next Script" +msgstr "صحنه جدید" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" -msgstr "" +#, fuzzy +msgid "Previous Script" +msgstr "زبانه قبلی" #: editor/plugins/script_editor_plugin.cpp msgid "File" @@ -7862,7 +7882,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7871,6 +7891,10 @@ msgid "Right Orthogonal" msgstr "دکمهٔ راست." #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -8228,6 +8252,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -14452,9 +14496,8 @@ msgid "In node '%s', invalid animation: '%s'." msgstr "" #: scene/animation/animation_tree.cpp -#, fuzzy msgid "Invalid animation: '%s'." -msgstr "اندازهٔ قلم نامعتبر." +msgstr "انیمیشن نامعتبر: 's%'." #: scene/animation/animation_tree.cpp #, fuzzy @@ -14500,7 +14543,7 @@ msgstr "" #: scene/gui/color_picker.cpp msgid "Raw" -msgstr "" +msgstr "خام" #: scene/gui/color_picker.cpp msgid "Switch between hexadecimal and code values." @@ -14537,7 +14580,7 @@ msgstr "باید یک پسوند معتبر بکار گیرید." #: scene/gui/graph_edit.cpp msgid "Enable grid minimap." -msgstr "" +msgstr "فعال سازی شبکه نقشه کوچک." #: scene/gui/nine_patch_rect.cpp msgid "" @@ -14579,6 +14622,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14592,7 +14643,9 @@ msgstr "" "بافت داخلی آن را برای نمایش به تعدادی گره تخصیص دهید." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp @@ -14606,19 +14659,16 @@ msgid "" msgstr "" #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Invalid source for preview." -msgstr "اندازهٔ قلم نامعتبر." +msgstr "منبع نامعتبر برای پیش نمایش." #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Invalid source for shader." -msgstr "اندازهٔ قلم نامعتبر." +msgstr "منبع نامعتبر برای شیدر." #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Invalid comparison function for that type." -msgstr "اندازهٔ قلم نامعتبر." +msgstr "عمل مقایسه نامعتبر بزای این نوع." #: servers/visual/shader_language.cpp msgid "Varying may not be assigned in the '%s' function." diff --git a/editor/translations/fi.po b/editor/translations/fi.po index 79a1e722b5..d24317f129 100644 --- a/editor/translations/fi.po +++ b/editor/translations/fi.po @@ -15,8 +15,9 @@ 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-21 15:22+0000\n" +"PO-Revision-Date: 2021-09-22 20:30+0000\n" "Last-Translator: Tapani Niemi <tapani.niemi@kapsi.fi>\n" "Language-Team: Finnish <https://hosted.weblate.org/projects/godot-engine/" "godot/fi/>\n" @@ -2405,6 +2406,15 @@ msgstr "" "Skeneä ei voitu tallentaa. Mahdollisia riippuvuuksia (ilmentymiä tai " "perintää) ei voida toteuttaa." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Aliprosessia ei voitu käynnistää!" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Tallenna kaikki skenet" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Ei voida ylikirjoittaa vielä auki olevaa skeneä!" @@ -2540,6 +2550,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Tallennetaanko muutokset tiedostoon '%s' ennen sulkemista?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2585,29 +2599,27 @@ msgstr "Nykyistä skeneä ei ole tallennettu. Avaa joka tapauksessa?" #: editor/editor_node.cpp msgid "Can't undo while mouse buttons are pressed." -msgstr "" +msgstr "Ei voida kumota hiiren painikkeiden ollessa painettuina." #: editor/editor_node.cpp msgid "Nothing to undo." -msgstr "" +msgstr "Ei ole mitään kumottavaa." #: editor/editor_node.cpp -#, fuzzy msgid "Undo: %s" -msgstr "Peru" +msgstr "Kumoa: %s" #: editor/editor_node.cpp msgid "Can't redo while mouse buttons are pressed." -msgstr "" +msgstr "Ei voida tehdä uudelleen hiiren painikkeiden ollessa painettuina." #: editor/editor_node.cpp msgid "Nothing to redo." -msgstr "" +msgstr "Ei ole mitään uudelleen tehtävää." #: editor/editor_node.cpp -#, fuzzy msgid "Redo: %s" -msgstr "Tee uudelleen" +msgstr "Tee uudelleen: %s" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." @@ -2886,10 +2898,6 @@ msgid "Save Scene" msgstr "Tallenna skene" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Tallenna kaikki skenet" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Muunna..." @@ -3289,9 +3297,8 @@ msgid "Merge With Existing" msgstr "Yhdistä olemassaolevaan" #: editor/editor_node.cpp -#, fuzzy msgid "Apply MeshInstance Transforms" -msgstr "Animaatio: muuta muunnosta" +msgstr "Käytä MeshInstance muunnoksia" #: editor/editor_node.cpp msgid "Open & Run a Script" @@ -3554,7 +3561,7 @@ msgstr "" #: editor/editor_resource_picker.cpp msgid "Quick Load" -msgstr "" +msgstr "Pikalataus" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "Make Unique" @@ -4373,6 +4380,18 @@ msgid "Clear Default for '%s'" msgstr "Poista oletus valinnalta '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Tuo uudelleen" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Tuo nimellä:" @@ -4381,10 +4400,6 @@ msgid "Preset" msgstr "Esiasetukset" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Tuo uudelleen" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "Tallenna skenet, tuo uudelleen ja käynnistä uudelleen" @@ -5661,15 +5676,13 @@ msgstr "Siirrä CanvasItem \"%s\" koordinaattiin (%d, %d)" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Locked" -msgstr "Lukitse valitut" +msgstr "Lukittu" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Grouped" -msgstr "Ryhmät" +msgstr "Ryhmitetty" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -6612,14 +6625,12 @@ msgid "Remove Selected Item" msgstr "Poista valitut kohteet" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Ignore Transforms)" -msgstr "Tuo skenestä" +msgstr "Tuo skenestä (sivuuta muunnokset)" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Apply Transforms)" -msgstr "Tuo skenestä" +msgstr "Tuo skenestä (käytä muunnoksia)" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Update from Scene" @@ -7213,14 +7224,12 @@ msgid "Flip Portal" msgstr "Käännä portaali" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Occluder Set Transform" -msgstr "Tyhjennä muunnos" +msgstr "Aseta peittäjän muunnos" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Center Node" -msgstr "Luo solmu" +msgstr "Keskitä solmu" #: editor/plugins/root_motion_editor_plugin.cpp msgid "AnimationTree has no path set to an AnimationPlayer" @@ -7357,11 +7366,13 @@ msgid "Move Down" msgstr "Siirrä alas" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Seuraava skripti" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Edellinen skripti" #: editor/plugins/script_editor_plugin.cpp @@ -7725,14 +7736,12 @@ msgid "Skeleton2D" msgstr "Skeleton2D" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Reset to Rest Pose" -msgstr "Aseta luut lepoasentoon" +msgstr "Palauta lepoasentoon" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Overwrite Rest Pose" -msgstr "Ylikirjoita" +msgstr "Ylikirjoita lepoasento" #: editor/plugins/skeleton_editor_plugin.cpp msgid "Create physical bones" @@ -7759,69 +7768,63 @@ msgid "Perspective" msgstr "Perspektiivi" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Orthogonal" -msgstr "Ortogonaalinen" +msgstr "Yläortogonaalinen" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Perspective" -msgstr "Perspektiivi" +msgstr "Yläperspektiivi" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Orthogonal" -msgstr "Ortogonaalinen" +msgstr "Alaortogonaalinen" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Perspective" -msgstr "Perspektiivi" +msgstr "Alaperspektiivi" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Left Orthogonal" -msgstr "Ortogonaalinen" +msgstr "Vasen ortogonaalinen" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Perspektiivi" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Right Orthogonal" -msgstr "Ortogonaalinen" +msgstr "Oikea ortogonaalinen" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "Oikea perspektiivi" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Orthogonal" -msgstr "Ortogonaalinen" +msgstr "Etuortogonaalinen" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Perspective" -msgstr "Perspektiivi" +msgstr "Etuperspektiivi" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Orthogonal" -msgstr "Ortogonaalinen" +msgstr "Takaortogonaalinen" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Perspective" -msgstr "Perspektiivi" +msgstr "Takaperspektiivi" #. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled. #: editor/plugins/spatial_editor_plugin.cpp msgid " [auto]" -msgstr "" +msgstr " [automaattinen]" #. 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 " [portaalit aktiivisia]" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Aborted." @@ -8145,6 +8148,27 @@ msgid "Right View" msgstr "Oikea näkymä" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Etunäkymä" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "Vaihda perspektiiviseen/ortogonaaliseen näkymään" @@ -8215,12 +8239,11 @@ msgstr "Näytä ruudukko" #: editor/plugins/spatial_editor_plugin.cpp msgid "View Portal Culling" -msgstr "Näytä portaalien harvennus" +msgstr "Näytä portaaliharvennus" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "View Occlusion Culling" -msgstr "Näytä portaalien harvennus" +msgstr "Näytä peittoharvennus" #: editor/plugins/spatial_editor_plugin.cpp #: modules/gridmap/grid_map_editor_plugin.cpp @@ -8288,9 +8311,8 @@ msgid "Post" msgstr "Jälki" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" -msgstr "Nimetön projekti" +msgstr "Nimetön muokkain" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create Mesh2D" @@ -12414,14 +12436,12 @@ msgid "Set Portal Point Position" msgstr "Aseta portaalin pisteen sijainti" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Set Occluder Sphere Radius" -msgstr "Muuta sylinterimuodon sädettä" +msgstr "Aseta peittopallon säde" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Set Occluder Sphere Position" -msgstr "Aseta käyrän aloitussijainti" +msgstr "Aseta peittopallon sijainti" #: modules/csg/csg_gizmos.cpp msgid "Change Cylinder Radius" @@ -12709,9 +12729,8 @@ msgid "Class name can't be a reserved keyword" msgstr "Luokan nimi ei voi olla varattu avainsana" #: modules/mono/csharp_script.cpp -#, fuzzy msgid "Build Solution" -msgstr "Täytä valinta" +msgstr "Muodosta ratkaisu" #: modules/mono/mono_gd/gd_mono_utils.cpp msgid "End of inner exception stack trace" @@ -14051,11 +14070,11 @@ msgstr "" #: scene/3d/occluder.cpp msgid "No shape is set." -msgstr "" +msgstr "Mitään muotoa ei ole asetettu." #: scene/3d/occluder.cpp msgid "Only uniform scales are supported." -msgstr "" +msgstr "Vain uniform-skaalat ovat tuettuja." #: scene/3d/particles.cpp msgid "" @@ -14408,6 +14427,10 @@ msgid "" "The GLES2 backend is currently in use, so these modes will act like Stretch " "instead." msgstr "" +"Tile ja Tile Fit valinnat Axis Stretch ominaisuuksille vaikuttavat " +"ainoastaan GLES3 renderöintiä käytettäessä.\n" +"GLES2 on parhaillaan käytössä, joten nämä tilat toimivat sen sijaan samaan " +"tapaan kuin Stretch." #: scene/gui/popup.cpp msgid "" @@ -14445,6 +14468,14 @@ msgstr "" "Projektin asetuksissa määriteltyä oletusympäristöä (Rendering -> Environment " "-> Default Environment) ei voitu ladata." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14458,13 +14489,16 @@ msgstr "" "johonkin solmuun näkyväksi." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" "Näyttöruudun koko on oltava suurempi kuin 0, jotta mitään renderöidään." #: scene/resources/occluder_shape.cpp msgid "OccluderShapeSphere Set Spheres" -msgstr "" +msgstr "Aseta pallot OccluderShapeSpherelle" #: scene/resources/visual_shader_nodes.cpp msgid "" diff --git a/editor/translations/fil.po b/editor/translations/fil.po index c227244f65..44176ea6bc 100644 --- a/editor/translations/fil.po +++ b/editor/translations/fil.po @@ -10,6 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" +"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "PO-Revision-Date: 2021-06-07 23:43+0000\n" "Last-Translator: Sven Sorupia <stsorupia@gmail.com>\n" "Language-Team: Filipino <https://hosted.weblate.org/projects/godot-engine/" @@ -2333,6 +2334,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2449,6 +2458,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2768,10 +2781,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4178,15 +4187,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7077,11 +7094,11 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +msgid "Next Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +msgid "Previous Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp @@ -7491,7 +7508,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7499,6 +7516,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7836,6 +7857,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13717,6 +13758,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13726,7 +13775,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/fr.po b/editor/translations/fr.po index 9416a14cdc..ea1e5dd57e 100644 --- a/editor/translations/fr.po +++ b/editor/translations/fr.po @@ -86,8 +86,9 @@ 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-20 06:04+0000\n" +"PO-Revision-Date: 2021-10-04 13:31+0000\n" "Last-Translator: Pierre Caye <pierrecaye@laposte.net>\n" "Language-Team: French <https://hosted.weblate.org/projects/godot-engine/" "godot/fr/>\n" @@ -96,7 +97,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 @@ -2371,7 +2372,7 @@ msgstr "Monter" #: editor/editor_network_profiler.cpp editor/editor_node.cpp msgid "Node" -msgstr "Nœud" +msgstr "Node" #: editor/editor_network_profiler.cpp msgid "Incoming RPC" @@ -2498,6 +2499,15 @@ msgstr "" "Impossible d'enregistrer la scène. Les dépendances (instances ou héritage) " "n'ont sans doute pas pu être satisfaites." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Impossible de démarrer le sous-processus !" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Enregistrer toutes les scènes" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Impossible de ré-écrire une scène tant que celle-ci est ouverte !" @@ -2640,6 +2650,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Sauvegarder les modifications effectuées à « %s » avant de quitter ?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -3000,10 +3014,6 @@ msgid "Save Scene" msgstr "Enregistrer la scène" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Enregistrer toutes les scènes" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Convertir vers…" @@ -4499,6 +4509,18 @@ msgid "Clear Default for '%s'" msgstr "Effacer le préréglage pour « %s »" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Réimporter" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Importer comme :" @@ -4507,10 +4529,6 @@ msgid "Preset" msgstr "Préréglage" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Réimporter" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "Enregistrer les scènes, réimporter, puis redémarrer" @@ -7503,11 +7521,13 @@ msgid "Move Down" msgstr "Déplacer vers le bas" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Script suivant" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Script précédent" #: editor/plugins/script_editor_plugin.cpp @@ -7933,7 +7953,7 @@ msgstr "Orthogonale" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Perspective" #: editor/plugins/spatial_editor_plugin.cpp @@ -7943,6 +7963,11 @@ msgstr "Orthogonale" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy +msgid "Right Perspective" +msgstr "Perspective" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Front Orthogonal" msgstr "Orthogonale" @@ -8296,6 +8321,27 @@ msgid "Right View" msgstr "Vue de droite" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Vue de devant" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "Basculer entre la vue perspective et orthogonale" @@ -14686,6 +14732,14 @@ msgstr "" "L'environnement par défaut spécifié dans les réglages du projet (Rendu -> " "Environnement -> Environnement par défaut) ne peut pas être chargé." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14699,7 +14753,10 @@ msgstr "" "RenderTarget et assignez sa texture à un nœud pouvant l'afficher." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" "La taille de la fenêtre d'affichage doit être supérieure à 0 pour pouvoir " "afficher quoi que ce soit." diff --git a/editor/translations/ga.po b/editor/translations/ga.po index da5c9051ed..de8d178967 100644 --- a/editor/translations/ga.po +++ b/editor/translations/ga.po @@ -6,6 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" +"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "PO-Revision-Date: 2020-06-15 01:48+0000\n" "Last-Translator: Rónán Quill <ronan085@gmail.com>\n" "Language-Team: Irish <https://hosted.weblate.org/projects/godot-engine/godot/" @@ -2325,6 +2326,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2441,6 +2450,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2761,10 +2774,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4167,15 +4176,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7060,11 +7077,11 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +msgid "Next Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +msgid "Previous Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp @@ -7474,7 +7491,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7482,6 +7499,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7820,6 +7841,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13696,6 +13737,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13705,7 +13754,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/gl.po b/editor/translations/gl.po index 285cdf4e3b..ff6fc36818 100644 --- a/editor/translations/gl.po +++ b/editor/translations/gl.po @@ -10,6 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" +"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "PO-Revision-Date: 2021-08-12 21:32+0000\n" "Last-Translator: davidrogel <david.rogel.pernas@icloud.com>\n" "Language-Team: Galician <https://hosted.weblate.org/projects/godot-engine/" @@ -2412,6 +2413,15 @@ msgstr "" "Non se puido gardar a escena. Posiblemente as dependencias (instancias ou " "herenzas) non puideron satisfacerse." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Non se puido iniciar subproceso!" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Gardar Todas as Escenas" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Non se pode sobreescribir escena que sigue aberta!" @@ -2549,6 +2559,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Gardar os cambios de '%s' antes de pechar?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2904,10 +2918,6 @@ msgid "Save Scene" msgstr "Gardar Escena" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Gardar Todas as Escenas" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Converter a..." @@ -4383,6 +4393,18 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Reimportar" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Importar Como:" @@ -4391,10 +4413,6 @@ msgid "Preset" msgstr "Axustes de Importación" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Reimportar" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "" @@ -7334,11 +7352,13 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Seguinte script" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Anterior script" #: editor/plugins/script_editor_plugin.cpp @@ -7758,7 +7778,7 @@ msgstr "Ortogonal" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Perspetiva" #: editor/plugins/spatial_editor_plugin.cpp @@ -7768,6 +7788,11 @@ msgstr "Ortogonal" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy +msgid "Right Perspective" +msgstr "Perspetiva" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Front Orthogonal" msgstr "Ortogonal" @@ -8130,6 +8155,27 @@ msgid "Right View" msgstr "Vista Dereita" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Vista Frontal" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "Vista Perspectiva/Ortogonal" @@ -14260,6 +14306,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14273,7 +14327,10 @@ msgstr "" "Ou ben, fágao un RenderTarget e asigne a súa textura a algún nodo." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" "As dimensións da Mini-Ventá (Viewport) deben de ser maior que 0 para poder " "renderizar nada." diff --git a/editor/translations/he.po b/editor/translations/he.po index 15c4694949..830033a726 100644 --- a/editor/translations/he.po +++ b/editor/translations/he.po @@ -23,6 +23,7 @@ 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-14 11:20+0000\n" "Last-Translator: Ram Tourgeman <ramtorgeman@gmail.com>\n" @@ -2425,6 +2426,15 @@ msgid "" "be satisfied." msgstr "לא ניתן לשמור את הסצנה. כנראה עקב תלות (מופע או ירושה) שלא מסופקת." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "לא ניתן להפעיל תהליך משנה!" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "שמירת כל הסצנות" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "לא ניתן להחליף סצנה שעדיין פתוחה!" @@ -2553,6 +2563,10 @@ msgid "Save changes to '%s' before closing?" msgstr "לשמור את השינויים ל־'%s' לפני הסגירה?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2893,10 +2907,6 @@ msgid "Save Scene" msgstr "שמירת סצנה" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "שמירת כל הסצנות" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "המרה אל…" @@ -4401,6 +4411,18 @@ msgid "Clear Default for '%s'" msgstr "מחיקת בררת מחדל עבור ‚%s’" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "ייבוא מחדש" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "ייבוא בתור:" @@ -4410,10 +4432,6 @@ msgid "Preset" msgstr "ערכה מוגדרת…" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "ייבוא מחדש" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "" @@ -7433,11 +7451,13 @@ msgid "Move Down" msgstr "העברה למטה" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "הסקריפט הבא" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "הסקריפט הקודם" #: editor/plugins/script_editor_plugin.cpp @@ -7884,8 +7904,9 @@ msgid "Left Orthogonal" msgstr "כפתור שמאלי" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" -msgstr "" +#, fuzzy +msgid "Left Perspective" +msgstr "מבט תחתי" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy @@ -7893,6 +7914,10 @@ msgid "Right Orthogonal" msgstr "כפתור ימני" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -8247,6 +8272,27 @@ msgid "Right View" msgstr "מבט ימני" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "מבט קדמי" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp #, fuzzy msgid "Switch Perspective/Orthogonal View" msgstr "החלפה בין תצוגה פרספקטיבה/אנכית" @@ -14520,6 +14566,14 @@ msgstr "" "לא היתה אפשרות לטעון את הסביבה שנקבעה כברירת המחדל בהגדרות המיזם (Rendering -" "> Environment -> Default Environment)." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14532,7 +14586,10 @@ msgstr "" "הפנימי שלו למפרק כלשהו לתצוגה." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "גודל חלון התצוגה חייב להיות גדול מ-0 על מנת להציג משהו." #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/hi.po b/editor/translations/hi.po index e6a2a76f37..585fb5e33c 100644 --- a/editor/translations/hi.po +++ b/editor/translations/hi.po @@ -17,6 +17,7 @@ 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" @@ -2403,6 +2404,15 @@ msgid "" "be satisfied." msgstr "दृश्य नहीं बचा सका । संभावित निर्भरता (उदाहरण या विरासत) संतुष्ट नहीं हो सकीं।" +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "उपप्रक्रिया शुरू नहीं कर सका!" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "सभी दृश्यों को सहेजें" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "दृश्य है कि अभी भी खुला है ओवरराइट नहीं कर सकते!" @@ -2537,6 +2547,10 @@ msgid "Save changes to '%s' before closing?" msgstr "बंद करने से पहले '%' में परिवर्तन सहेजें?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2876,10 +2890,6 @@ msgid "Save Scene" msgstr "दृश्य बचाओ" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "सभी दृश्यों को सहेजें" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "बदलने के लिए..." @@ -4371,18 +4381,26 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" -msgstr "प्रीसेट" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" msgstr "" #: editor/import_dock.cpp +msgid "Preset" +msgstr "प्रीसेट" + +#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "" @@ -7301,12 +7319,14 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" -msgstr "" +#, fuzzy +msgid "Next Script" +msgstr "नई स्क्रिप्ट" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" -msgstr "" +#, fuzzy +msgid "Previous Script" +msgstr "पिछला टैब" #: editor/plugins/script_editor_plugin.cpp msgid "File" @@ -7725,7 +7745,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7733,6 +7753,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -8076,6 +8100,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -14150,6 +14194,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14159,7 +14211,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/hr.po b/editor/translations/hr.po index c5fcf3ab6e..a61ff60a0e 100644 --- a/editor/translations/hr.po +++ b/editor/translations/hr.po @@ -9,6 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" +"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "PO-Revision-Date: 2021-08-13 19:05+0000\n" "Last-Translator: LeoClose <leoclose575@gmail.com>\n" "Language-Team: Croatian <https://hosted.weblate.org/projects/godot-engine/" @@ -2350,6 +2351,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2466,6 +2475,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2785,10 +2798,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4205,15 +4214,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7107,12 +7124,14 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" -msgstr "" +#, fuzzy +msgid "Next Script" +msgstr "Odspoji Skriptu" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" -msgstr "" +#, fuzzy +msgid "Previous Script" +msgstr "Idi na prethodni korak" #: editor/plugins/script_editor_plugin.cpp msgid "File" @@ -7522,7 +7541,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7530,6 +7549,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7870,6 +7893,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13779,6 +13822,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13788,7 +13839,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/hu.po b/editor/translations/hu.po index 2df1fc98b0..3ceb60fa99 100644 --- a/editor/translations/hu.po +++ b/editor/translations/hu.po @@ -16,12 +16,14 @@ # Czmorek Dávid <czmdav.soft@gmail.com>, 2020. # Újvári Marcell <mmarci72@gmail.com>, 2021. # Gergő Pistai <gergopistai@gmail.com>, 2021. +# Misi <varady.misi@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-03-31 03:53+0000\n" -"Last-Translator: Gergő Pistai <gergopistai@gmail.com>\n" +"PO-Revision-Date: 2021-10-09 16:52+0000\n" +"Last-Translator: Misi <varady.misi@gmail.com>\n" "Language-Team: Hungarian <https://hosted.weblate.org/projects/godot-engine/" "godot/hu/>\n" "Language: hu\n" @@ -29,7 +31,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.6-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 @@ -2137,12 +2139,14 @@ msgid "Methods" msgstr "Metódusok" #: editor/editor_help.cpp +#, fuzzy msgid "Theme Properties" -msgstr "Téma tulajdonságai" +msgstr "Téma Tulajdonságok" #: editor/editor_help.cpp +#, fuzzy msgid "Enumerations" -msgstr "Felsorolások" +msgstr "Számlálók" #: editor/editor_help.cpp editor/plugins/theme_editor_plugin.cpp msgid "Constants" @@ -2150,7 +2154,7 @@ msgstr "Konstansok" #: editor/editor_help.cpp msgid "Property Descriptions" -msgstr "Tulajdonságleírások" +msgstr "Tulajdonság leírások" #: editor/editor_help.cpp msgid "(value)" @@ -2166,7 +2170,7 @@ msgstr "" #: editor/editor_help.cpp msgid "Method Descriptions" -msgstr "Metódusleírások" +msgstr "Metódus leírások" #: editor/editor_help.cpp msgid "" @@ -2429,6 +2433,15 @@ msgstr "" "Nem sikerült a Scene mentése. Valószínű, hogy a függőségei (példányok vagy " "öröklések) nem voltak megfelelőek." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Az alprocesszt nem lehetett elindítani!" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Az összes jelenet mentése" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Nem lehet felülírni a még nyitott jelenetet!" @@ -2571,6 +2584,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Bezárás előtt menti a '%s'-n végzett módosításokat?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2926,10 +2943,6 @@ msgid "Save Scene" msgstr "Jelenet Mentése" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Az összes jelenet mentése" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Átkonvertálás..." @@ -4404,6 +4417,18 @@ msgid "Clear Default for '%s'" msgstr "Alapértelmezett Törlése '%s'-nél" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Újraimportálás" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Importálás Mint:" @@ -4412,10 +4437,6 @@ msgid "Preset" msgstr "Előre beállított" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Újraimportálás" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "Jelenetek mentése, újraimportálás és újraindítás" @@ -7359,11 +7380,13 @@ msgid "Move Down" msgstr "Mozgatás Lefelé" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Következő Szkript" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Előző Szkript" #: editor/plugins/script_editor_plugin.cpp @@ -7783,7 +7806,7 @@ msgstr "Ortogonális" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Perspektíva" #: editor/plugins/spatial_editor_plugin.cpp @@ -7793,6 +7816,11 @@ msgstr "Ortogonális" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy +msgid "Right Perspective" +msgstr "Perspektíva" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Front Orthogonal" msgstr "Ortogonális" @@ -8146,6 +8174,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -14129,6 +14177,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14142,7 +14198,9 @@ msgstr "" "té, és állítsa hozzá a belső textúráját valamilyen node-hoz kirajzolásra." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/id.po b/editor/translations/id.po index 83b80592b1..b45942a7c4 100644 --- a/editor/translations/id.po +++ b/editor/translations/id.po @@ -33,12 +33,14 @@ # Naufal Adriansyah <naufaladrn90@gmail.com>, 2021. # undisputedgoose <diablodvorak@gmail.com>, 2021. # Tsaqib Fadhlurrahman Soka <sokatsaqib@gmail.com>, 2021. +# Hilman Hazazi <hafizd.muhammad.kren.403@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-09-20 14:46+0000\n" -"Last-Translator: Sofyan Sugianto <sofyanartem@gmail.com>\n" +"PO-Revision-Date: 2021-10-15 04:32+0000\n" +"Last-Translator: Tsaqib Fadhlurrahman Soka <sokatsaqib@gmail.com>\n" "Language-Team: Indonesian <https://hosted.weblate.org/projects/godot-engine/" "godot/id/>\n" "Language: id\n" @@ -55,13 +57,13 @@ msgstr "Tipe argumen tidak valid untuk convert(), gunakan konstanta TYPE_*." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp msgid "Expected a string of length 1 (a character)." -msgstr "String dengan panjang 1 (karakter) yang diharapkan." +msgstr "String dengan panjang 1 (karakter) diharapkan." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/mono/glue/gd_glue.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp msgid "Not enough bytes for decoding bytes, or invalid format." -msgstr "Tidak cukup byte untuk mendekode byte, atau format tidak valid." +msgstr "Tidak cukup bita untuk mendekode bita, atau format tidak valid." #: core/math/expression.cpp msgid "Invalid input %i (not passed) in expression" @@ -70,7 +72,7 @@ msgstr "Masukkan tidak sah %i (tidak diberikan) dalam ekspresi" #: core/math/expression.cpp msgid "self can't be used because instance is null (not passed)" msgstr "" -"self tidak dapat digunakan karena instance bernilai null (tidak di-passing)" +"self tidak dapat digunakan karena nilai instansi adalah null (tidak lolos)" #: core/math/expression.cpp msgid "Invalid operands to operator %s, %s and %s." @@ -122,7 +124,7 @@ msgstr "EiB" #: editor/animation_bezier_editor.cpp msgid "Free" -msgstr "Bebaskan" +msgstr "Bebas" #: editor/animation_bezier_editor.cpp msgid "Balanced" @@ -557,7 +559,7 @@ msgstr "Susun Track-track dengan node atau tampilkan sebagai daftar biasa." #: editor/animation_track_editor.cpp msgid "Snap:" -msgstr "Snap:" +msgstr "Senap:" #: editor/animation_track_editor.cpp msgid "Animation step value." @@ -581,7 +583,7 @@ msgstr "FPS" #: editor/project_settings_editor.cpp editor/property_editor.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Edit" -msgstr "Edit" +msgstr "Sunting" #: editor/animation_track_editor.cpp msgid "Animation properties." @@ -1054,7 +1056,7 @@ msgstr "Resource" #: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp #: editor/project_manager.cpp editor/project_settings_editor.cpp msgid "Path" -msgstr "Path" +msgstr "Jalur" #: editor/dependency_editor.cpp msgid "Dependencies:" @@ -1547,7 +1549,7 @@ msgstr "Mengatur kembali Autoload-autoload" #: editor/editor_autoload_settings.cpp msgid "Can't add autoload:" -msgstr "Tidak dapat menambahkan autoload" +msgstr "Tidak dapat menambahkan autoload:" #: editor/editor_autoload_settings.cpp msgid "%s is an invalid path. File does not exist." @@ -1567,7 +1569,7 @@ msgstr "Tambahkan AutoLoad" #: editor/plugins/animation_tree_editor_plugin.cpp #: editor/script_create_dialog.cpp scene/gui/file_dialog.cpp msgid "Path:" -msgstr "Path:" +msgstr "Jalur:" #: editor/editor_autoload_settings.cpp msgid "Node Name:" @@ -2130,7 +2132,7 @@ msgstr "baku:" #: editor/editor_help.cpp msgid "Methods" -msgstr "Method" +msgstr "Metode" #: editor/editor_help.cpp msgid "Theme Properties" @@ -2427,6 +2429,15 @@ msgstr "" "Tidak dapat menyimpan skena Dependensi (instance atau turunannya) mungkin " "tidak terpenuhi." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Tidak dapat memulai subproses!" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Simpan Semua Skena" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Tidak bisa menimpa skena yang masih terbuka!" @@ -2548,7 +2559,7 @@ msgstr "Buka Cepat..." #: editor/editor_node.cpp msgid "Quick Open Scene..." -msgstr "Buka Cepat Skena..." +msgstr "Buka Cepat Skenario..." #: editor/editor_node.cpp msgid "Quick Open Script..." @@ -2563,6 +2574,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Simpan perubahan '%s' sebelum menutupnya?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2608,29 +2623,27 @@ msgstr "Skena saat ini belum disimpan. Buka saja?" #: editor/editor_node.cpp msgid "Can't undo while mouse buttons are pressed." -msgstr "" +msgstr "Tidak bisa membatalkan ketika tombol mouse ditekan." #: editor/editor_node.cpp msgid "Nothing to undo." -msgstr "" +msgstr "Tidak ada yang bisa dibatalkan." #: editor/editor_node.cpp -#, fuzzy msgid "Undo: %s" -msgstr "Batal" +msgstr "Batal: %s" #: editor/editor_node.cpp msgid "Can't redo while mouse buttons are pressed." -msgstr "" +msgstr "Tidak bisa mengulangi ketika tombol mouse ditekan." #: editor/editor_node.cpp msgid "Nothing to redo." -msgstr "" +msgstr "Tidak ada yang perlu diulang." #: editor/editor_node.cpp -#, fuzzy msgid "Redo: %s" -msgstr "Ulangi" +msgstr "Ulangi: %s" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." @@ -2721,8 +2734,9 @@ msgid "" "error in that script.\n" "Disabling the addon at '%s' to prevent further errors." msgstr "" -"Tidak dapat memuat script addon dari path: '%s' Mungkin ada kesalahan dalam " -"kode, mohon periksa sintaks." +"Tidak dapat memuat script addon dari jalur: '%s' Hal ini terjadi karena " +"kesalahan koda dalam skrip.\n" +"Lepaskan addon di '%s' to mencegah kesalahan kedepan." #: editor/editor_node.cpp msgid "" @@ -2913,10 +2927,6 @@ msgid "Save Scene" msgstr "Simpan Skena" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Simpan Semua Skena" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Ubah ke..." @@ -3315,9 +3325,8 @@ msgid "Merge With Existing" msgstr "Gabung dengan yang Ada" #: editor/editor_node.cpp -#, fuzzy msgid "Apply MeshInstance Transforms" -msgstr "Ubah Transformasi Animasi" +msgstr "Aplikasi Transformasi MeshInstance" #: editor/editor_node.cpp msgid "Open & Run a Script" @@ -3468,6 +3477,12 @@ msgid "" "functions called by that function.\n" "Use this to find individual functions to optimize." msgstr "" +"Inklusif: Termasuk waktu dari fungsi lain yang terpanggil oleh fungsi ini.\n" +"Gunakan ini untuk menemukan perlambatan.\n" +"\n" +"Sendiri: Hanya menghitung waktu terpakai oleh fungsi tersendiri, tidak " +"termasuk fungsi yang dipanggil.\n" +"Gunakan ini untuk menemukan fungsi individual untuk optimalisasi." #: editor/editor_profiler.cpp msgid "Frame #:" @@ -3573,7 +3588,7 @@ msgstr "" #: editor/editor_resource_picker.cpp msgid "Quick Load" -msgstr "" +msgstr "Muat Cepat" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "Make Unique" @@ -4026,7 +4041,7 @@ msgstr "Buka Skena" #: editor/filesystem_dock.cpp msgid "Instance" -msgstr "Instance" +msgstr "Instansi" #: editor/filesystem_dock.cpp msgid "Add to Favorites" @@ -4388,6 +4403,18 @@ msgid "Clear Default for '%s'" msgstr "Bersihkan Baku untuk '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Impor ulang" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Impor sebagai:" @@ -4396,10 +4423,6 @@ msgid "Preset" msgstr "Prasetel" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Impor ulang" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "Simpan Skena, Impor Ulang, dan Mulai Ulang" @@ -5521,13 +5544,12 @@ msgstr "" "Simpan skena Anda dan coba lagi." #: 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 "" -"Tidak ada mesh-mesh untuk di bake. Pastikan mereka punya kanal UV2 dan 'Bake " -"Cahaya' menyala." +"Tidak ada mesh untuk di bake. Pastikan mesh mempunyai kanal UV2 dengan flag " +"'Use In Baked Light' dan 'Generate Lightmap' aktif." #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "Failed creating lightmap images, make sure path is writable." @@ -5668,15 +5690,13 @@ msgstr "Pindahkan CanvasItem \"%s\" ke (%d,%d)" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Locked" -msgstr "Kunci yang Dipilih" +msgstr "Terkunci" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Grouped" -msgstr "Kelompok" +msgstr "Terkelompok" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -6529,9 +6549,8 @@ msgstr "" "deteksi collision." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Simplified Convex Collision Sibling" -msgstr "Buat Saudara Tunggal Convex Collision" +msgstr "Buat saudara Convex Collision yang dipermudah" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "" @@ -6539,20 +6558,23 @@ msgid "" "This is similar to single collision shape, but can result in a simpler " "geometry in some cases, at the cost of accuracy." msgstr "" +"Buat bentuk convex collision dipermudah.\n" +"Ini serupa dengan bentuk collision tunggal, namun dapat menghasilkan " +"geometri mudah dalam beberapa kasus, dengan biaya pada akurasi." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Multiple Convex Collision Siblings" msgstr "Buat Beberapa Saudara Convex Collision" #: 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 "" -"Buat collision shape berbasis poligon.\n" -"Opsi ini kinerjanya berada di antara dua opsi di atas." +"Buat bentuk collision berbasis poligon.\n" +"Ini adalah opsi tengah performa antara convex collision tunggal dan " +"collision berbasis poligon." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." @@ -6619,14 +6641,12 @@ msgid "Remove Selected Item" msgstr "Hapus Item yang Dipilih" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Ignore Transforms)" -msgstr "Impor dari Skena" +msgstr "Impor dari Skenario (Hiraukan Transforms)" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Apply Transforms)" -msgstr "Impor dari Skena" +msgstr "Impor dari Skenario (Aplikasikan Transforms)" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Update from Scene" @@ -7207,28 +7227,24 @@ msgid "Flip Portals" msgstr "Balikkan Portal" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Room Generate Points" -msgstr "Jumlah Titik yang Dihasilkan:" +msgstr "Jumlah Titik Dihasilkan" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Generate Points" -msgstr "Jumlah Titik yang Dihasilkan:" +msgstr "Menghasilkan Nilai" #: editor/plugins/room_manager_editor_plugin.cpp msgid "Flip Portal" msgstr "Balikkan Portal" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Occluder Set Transform" -msgstr "Bersihkan Transformasi" +msgstr "Tutup Set Transformasi" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Center Node" -msgstr "Buat Node" +msgstr "Node Tengah" #: editor/plugins/root_motion_editor_plugin.cpp msgid "AnimationTree has no path set to an AnimationPlayer" @@ -7364,11 +7380,13 @@ msgid "Move Down" msgstr "Turunkan" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Skrip berikutnya" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Skrip sebelumnya" #: editor/plugins/script_editor_plugin.cpp @@ -7520,7 +7538,7 @@ msgstr "Sumber" #: editor/plugins/script_text_editor.cpp msgid "Target" -msgstr "Target" +msgstr "Sasaran" #: editor/plugins/script_text_editor.cpp msgid "" @@ -7735,14 +7753,12 @@ msgid "Skeleton2D" msgstr "Skeleton2D" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Reset to Rest Pose" -msgstr "Atur Tulang ke Pose Istirahat" +msgstr "Atur ulang ke Pose Duduk" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Overwrite Rest Pose" -msgstr "Timpa" +msgstr "Timpa Pose Duduk" #: editor/plugins/skeleton_editor_plugin.cpp msgid "Create physical bones" @@ -7769,69 +7785,63 @@ msgid "Perspective" msgstr "Perspektif" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Atas" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Perspective" -msgstr "Perspektif" +msgstr "Perspektif Atas" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Bawah" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Perspective" -msgstr "Perspektif" +msgstr "Perspektif Bawah" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Left Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Kiri" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Perspektif" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Right Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Kanan" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "Perspektif Kanan" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Depan" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Perspective" -msgstr "Perspektif" +msgstr "Perspektif Depan" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Belakang" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Perspective" -msgstr "Perspektif" +msgstr "Perspektif Belakang" #. 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 " [portal aktif]" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Aborted." @@ -7893,9 +7903,8 @@ msgid "Animation Key Inserted." msgstr "Kunci Animasi Dimasukkan." #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Pitch:" -msgstr "Dongak" +msgstr "Dongak:" #: editor/plugins/spatial_editor_plugin.cpp msgid "Yaw:" @@ -7906,34 +7915,28 @@ msgid "Size:" msgstr "Ukuran:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Objects Drawn:" -msgstr "Objek Digambar" +msgstr "Objek Digambar:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Material Changes:" -msgstr "Perubahan Material" +msgstr "Perubahan Material:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Shader Changes:" -msgstr "Perubahan Shader" +msgstr "Perubahan Shader:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Surface Changes:" -msgstr "Perubahan Permukaan" +msgstr "Perubahan Permukaan:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Draw Calls:" -msgstr "Gambarkan Panggilan" +msgstr "Gambarkan Panggilan:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Vertices:" -msgstr "Titik" +msgstr "Sudut:" #: editor/plugins/spatial_editor_plugin.cpp msgid "FPS: %d (%s ms)" @@ -8166,6 +8169,27 @@ msgid "Right View" msgstr "Tampilan Kanan" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Tampilan Depan" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "Beralih Tampilan Ortogonal/Perspektif" @@ -8607,18 +8631,16 @@ msgid "{num} font(s)" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "No fonts found." -msgstr "Tidak ditemukan!" +msgstr "Font tidak ditemukan." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} icon(s)" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "No icons found." -msgstr "Tidak ditemukan!" +msgstr "Ikon tidak ditemukan." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} stylebox(es)" @@ -8647,9 +8669,8 @@ msgid "Importing items {n}/{n}" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Updating the editor" -msgstr "Keluar editor?" +msgstr "Memperbarui editor" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -8666,14 +8687,12 @@ msgid "With Data" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select by data type:" -msgstr "Pilih Node" +msgstr "Pilih berdasarkan tipe data:" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible color items." -msgstr "Pilih Berkas untuk Dipindai" +msgstr "Pilih semua benda warna terlihat." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible color items and their data." @@ -8684,9 +8703,8 @@ msgid "Deselect all visible color items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible constant items." -msgstr "Pilih item pengaturan terlebih dahulu!" +msgstr "Pilih semua benda konstan terlihat." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible constant items and their data." @@ -8697,9 +8715,8 @@ msgid "Deselect all visible constant items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible font items." -msgstr "Pilih item pengaturan terlebih dahulu!" +msgstr "Pilih semua benda font terlihat." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible font items and their data." @@ -8710,19 +8727,16 @@ msgid "Deselect all visible font items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible icon items." -msgstr "Pilih item pengaturan terlebih dahulu!" +msgstr "Pilih semua benda ikon terlihat." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible icon items and their data." -msgstr "Pilih item pengaturan terlebih dahulu!" +msgstr "Pilih semua benda ikon terlihat dan data mereka." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Deselect all visible icon items." -msgstr "Pilih item pengaturan terlebih dahulu!" +msgstr "Batal pilih semua benda ikon terlihat." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible stylebox items." @@ -8743,19 +8757,16 @@ msgid "" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Collapse types." -msgstr "Lipat Semua" +msgstr "Lipat Semua." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Expand types." -msgstr "Bentangkan Semua" +msgstr "Bentangkan Semua." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all Theme items." -msgstr "Pilih berkas templat" +msgstr "Pilih semua benda Tema." #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -8909,9 +8920,8 @@ msgid "Add Type:" msgstr "Jenis:" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Item:" -msgstr "Tambah Item" +msgstr "Tambah benda:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -8919,9 +8929,8 @@ msgid "Add StyleBox Item" msgstr "Tambahkan Semua Item" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Items:" -msgstr "Hapus item" +msgstr "Hapus benda:" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove Class Items" @@ -8962,9 +8971,8 @@ msgid "Editor Theme" msgstr "Sunting Tema" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select Another Theme Resource:" -msgstr "Hapus Resource" +msgstr "Pilih Tema Lain Aset:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9007,9 +9015,8 @@ msgid "Add Item Type" msgstr "Tambah Item" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Node Types:" -msgstr "Jenis node" +msgstr "Tipe node:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9030,9 +9037,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 @@ -9097,9 +9103,8 @@ msgid "Checked Radio Item" msgstr "Item Radio yang Dicentang" #: editor/plugins/theme_editor_preview.cpp -#, fuzzy msgid "Named Separator" -msgstr "Pemisah yang diberi nama." +msgstr "Pemisah yang diberi nama" #: editor/plugins/theme_editor_preview.cpp msgid "Submenu" @@ -10572,9 +10577,8 @@ msgid "VisualShader" msgstr "ShaderVisual" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Edit Visual Property:" -msgstr "Sunting Properti Visual" +msgstr "Sunting Properti Visual:" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Visual Shader Mode Changed" @@ -11023,14 +11027,12 @@ msgid "Are you sure to run %d projects at once?" msgstr "Apakah Anda yakin menjalankan %d proyek sekaligus?" #: editor/project_manager.cpp -#, fuzzy msgid "Remove %d projects from the list?" -msgstr "Pilih perangkat pada daftar" +msgstr "Buang proyek %d dari daftar?" #: editor/project_manager.cpp -#, fuzzy msgid "Remove this project from the list?" -msgstr "Pilih perangkat pada daftar" +msgstr "Buang proyek ini dari daftar?" #: editor/project_manager.cpp msgid "" @@ -11272,7 +11274,7 @@ msgstr "Indeks Sumbu Joypad:" #: editor/project_settings_editor.cpp msgid "Axis" -msgstr "Axis" +msgstr "Sumbu" #: editor/project_settings_editor.cpp msgid "Joypad Button Index:" @@ -11511,11 +11513,11 @@ msgstr "Nol" #: editor/property_editor.cpp msgid "Easing In-Out" -msgstr "Easing In-Out" +msgstr "Mempermudah Masuk-Keluar" #: editor/property_editor.cpp msgid "Easing Out-In" -msgstr "Easing Out-In" +msgstr "Mempermudah Keluar-Masuk" #: editor/property_editor.cpp msgid "File..." @@ -11636,7 +11638,7 @@ msgstr "Jumlah penghitung bertambah untuk setiap node" #: editor/rename_dialog.cpp msgid "Padding" -msgstr "Padding" +msgstr "Lapisan" #: editor/rename_dialog.cpp msgid "" @@ -12306,7 +12308,7 @@ msgstr "Sumber C++ :" #: editor/script_editor_debugger.cpp msgid "Stack Trace" -msgstr "Stack Trace" +msgstr "Jejak Tumpukan" #: editor/script_editor_debugger.cpp msgid "Errors" @@ -12648,7 +12650,7 @@ msgstr "Plane Sebelumnya" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Plane:" -msgstr "Plane:" +msgstr "Dataran:" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Next Floor" @@ -12660,7 +12662,7 @@ msgstr "Floor Sebelumnya" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Floor:" -msgstr "Floor:" +msgstr "Lantai:" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "GridMap Delete Selection" @@ -12685,7 +12687,7 @@ msgstr "Isi Seleksi GridMap" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" -msgstr "Grid Map" +msgstr "Peta Grid" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Snap View" @@ -12815,7 +12817,7 @@ msgstr "Akhir dari inner exception stack trace" #: modules/recast/navigation_mesh_editor_plugin.cpp msgid "Bake NavMesh" -msgstr "Bake NavMesh" +msgstr "Panggang NavMesh" #: modules/recast/navigation_mesh_editor_plugin.cpp msgid "Clear the navigation mesh." @@ -13329,14 +13331,12 @@ msgid "Running on %s" msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Exporting APK..." -msgstr "Mengekspor Semua" +msgstr "Mengekspor APK..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Uninstalling..." -msgstr "Copot Pemasangan" +msgstr "Copot Pemasangan..." #: platform/android/export/export_plugin.cpp #, fuzzy @@ -13344,9 +13344,8 @@ msgid "Installing to device, please wait..." msgstr "Memuat, tunggu sejenak..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not install to device: %s" -msgstr "Tidak dapat memulai subproses!" +msgstr "Tidak dapat instalasi ke perangkat: %s" #: platform/android/export/export_plugin.cpp #, fuzzy @@ -13466,16 +13465,12 @@ msgid "Signing debug %s..." msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Signing release %s..." -msgstr "" -"Memindai Berkas,\n" -"Silakan Tunggu..." +msgstr "Menandatangani rilis %s..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not find keystore, unable to export." -msgstr "Tidak dapat membuka templat untuk ekspor:" +msgstr "Tidak dapat menemukan keystore, tidak bisa ekspor." #: platform/android/export/export_plugin.cpp msgid "'apksigner' returned with error #%d" @@ -13541,9 +13536,8 @@ msgid "Could not export project files to gradle project\n" msgstr "Tidak dapat menyunting proyek gradle dalam lokasi proyek\n" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not write expansion package file!" -msgstr "Tidak dapat menulis berkas:" +msgstr "Tidak dapat menulis berkas paket ekspansi!" #: platform/android/export/export_plugin.cpp msgid "Building Android Project (gradle)" @@ -13580,11 +13574,12 @@ msgid "Creating APK..." msgstr "Membuat kontur..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "" "Could not find template APK to export:\n" "%s" -msgstr "Tidak dapat membuka templat untuk ekspor:" +msgstr "" +"Tidak dapat menemukan contoh APK untuk ekspor:\n" +"%s" #: platform/android/export/export_plugin.cpp msgid "" @@ -13600,9 +13595,8 @@ msgid "Adding files..." msgstr "Menambahkan %s..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not export project files" -msgstr "Tidak dapat menulis berkas:" +msgstr "Tidak dapat ekspor berkas proyek" #: platform/android/export/export_plugin.cpp msgid "Aligning APK..." @@ -13668,14 +13662,12 @@ msgid "Could not read HTML shell:" msgstr "Tidak dapat membaca shell HTML kustom:" #: platform/javascript/export/export.cpp -#, fuzzy msgid "Could not create HTTP server directory:" -msgstr "Tidak dapat membuat folder." +msgstr "Tidak dapat menciptakan direktori server HTTP:" #: platform/javascript/export/export.cpp -#, fuzzy msgid "Error starting HTTP server:" -msgstr "Galat menyimpan skena." +msgstr "Kesalahan memulai server HTTP:" #: platform/osx/export/export.cpp #, fuzzy @@ -14539,6 +14531,14 @@ msgstr "" "Lingkungan Baku yang ditetapkan di Pengaturan Proyek (Rendering -> Viewport -" "> Lingkungan Baku) tidak dapat dimuat." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14553,7 +14553,10 @@ msgstr "" "beberapa node untuk ditampilkan." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "Ukuran viewport harus lebih besar dari 0 untuk me-render apa pun." #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/is.po b/editor/translations/is.po index 33fee00267..0d4f9a00f5 100644 --- a/editor/translations/is.po +++ b/editor/translations/is.po @@ -8,6 +8,7 @@ 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-20 23:08+0000\n" "Last-Translator: Jóhannes G. Þorsteinsson <johannesg@johannesg.com>\n" @@ -2364,6 +2365,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2480,6 +2489,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2801,10 +2814,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4216,15 +4225,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7143,11 +7160,11 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +msgid "Next Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +msgid "Previous Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp @@ -7558,7 +7575,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7566,6 +7583,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7904,6 +7925,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13859,6 +13900,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13868,7 +13917,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/it.po b/editor/translations/it.po index 0b25d41fa0..8ec6f16734 100644 --- a/editor/translations/it.po +++ b/editor/translations/it.po @@ -60,12 +60,14 @@ # Jusef Azzolina <rosarioazzolina33@gmail.com>, 2021. # Daniele Basso <tiziodcaio@gmail.com>, 2021. # Riteo Siuga <riteo@posteo.net>, 2021. +# Luigi <luibass92@live.it>, 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-22 22:46+0000\n" -"Last-Translator: Riteo Siuga <riteo@posteo.net>\n" +"PO-Revision-Date: 2021-10-11 15:44+0000\n" +"Last-Translator: Luigi <luibass92@live.it>\n" "Language-Team: Italian <https://hosted.weblate.org/projects/godot-engine/" "godot/it/>\n" "Language: it\n" @@ -73,7 +75,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.1-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 @@ -652,9 +654,8 @@ msgid "Go to Previous Step" msgstr "Vai al passo precedente" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Apply Reset" -msgstr "Applica reset" +msgstr "Reimposta" #: editor/animation_track_editor.cpp msgid "Optimize Animation" @@ -1555,7 +1556,9 @@ msgstr "Non deve collidere con il nome di una costante globale esistente." #: editor/editor_autoload_settings.cpp #, fuzzy msgid "Keyword cannot be used as an autoload name." -msgstr "Una parola chiave non può essere utilizzata come nome di un Autoload." +msgstr "" +"Una parola chiave non può essere utilizzata come nome di un caricamento " +"automatico." #: editor/editor_autoload_settings.cpp #, fuzzy @@ -1595,17 +1598,18 @@ msgid "Can't add autoload:" msgstr "Non è possibile aggiungere l'autoload:" #: editor/editor_autoload_settings.cpp -#, fuzzy msgid "%s is an invalid path. File does not exist." -msgstr "File inesistente." +msgstr "%s è un path non valido. File inesistente." #: editor/editor_autoload_settings.cpp msgid "%s is an invalid path. Not in resource path (res://)." -msgstr "%s non è una strada valida. Essa non punta nelle risorse (res://)." +msgstr "" +"%s non è un percorso valido. Non si trova nel percorso delle risorse " +"(res://)." #: editor/editor_autoload_settings.cpp msgid "Add AutoLoad" -msgstr "Aggiungi un Autoload" +msgstr "Aggiungi un AutoLoad" #: editor/editor_autoload_settings.cpp editor/editor_file_dialog.cpp #: editor/editor_plugin_settings.cpp @@ -1616,7 +1620,7 @@ msgstr "Percorso:" #: editor/editor_autoload_settings.cpp msgid "Node Name:" -msgstr "Nome del nodo:" +msgstr "Nome del Nodo:" #: editor/editor_autoload_settings.cpp editor/editor_help_search.cpp #: editor/editor_plugin_settings.cpp editor/editor_profiler.cpp @@ -1625,9 +1629,8 @@ msgid "Name" msgstr "Nome" #: editor/editor_autoload_settings.cpp -#, fuzzy msgid "Global Variable" -msgstr "Valiabile" +msgstr "Valiabile globale" #: editor/editor_data.cpp msgid "Paste Params" @@ -1659,7 +1662,7 @@ msgstr "Si prega di selezionare prima una cartella di base." #: editor/editor_dir_dialog.cpp msgid "Choose a Directory" -msgstr "Scegliere una cartella" +msgstr "Scegli una cartella" #: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp #: editor/filesystem_dock.cpp editor/project_manager.cpp @@ -1700,8 +1703,8 @@ msgid "" "Target platform requires 'ETC' texture compression for GLES2. Enable 'Import " "Etc' in Project Settings." msgstr "" -"La piattaforma di destinazione richiede la compressione \"ETC\" delle " -"texture per GLES2. Attiva \"Import Etc\" nelle impostazioni del progetto." +"La piattaforma di destinazione richiede la compressione 'ETC' delle texture " +"per GLES2. Attiva 'Import Etc' nelle impostazioni del progetto." #: editor/editor_export.cpp msgid "" @@ -2496,6 +2499,15 @@ msgstr "" "Impossibile salvare la scena. È probabile che le dipendenze (instanze o " "eredità) non siano state soddisfatte." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Impossibile salvare la texture convertita:" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Salva tutte le scene" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Impossibile sovrascrivere una scena ancora aperta!" @@ -2633,6 +2645,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Salvare le modifiche a \"%s\" prima di chiudere?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2989,10 +3005,6 @@ msgid "Save Scene" msgstr "Salva la scena" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Salva tutte le scene" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Converti in..." @@ -4536,6 +4548,18 @@ msgid "Clear Default for '%s'" msgstr "Elimina Predefinito per \"%s\"" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Reimporta" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Importa Come:" @@ -4544,10 +4568,6 @@ msgid "Preset" msgstr "Preimpostazione" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Reimporta" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "Salva scene, re-importa e riavvia" @@ -7586,11 +7606,13 @@ msgid "Move Down" msgstr "Sposta giù" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Script successivo" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Script precedente" #: editor/plugins/script_editor_plugin.cpp @@ -8017,7 +8039,7 @@ msgstr "Ortogonale" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Prospettiva" #: editor/plugins/spatial_editor_plugin.cpp @@ -8027,6 +8049,11 @@ msgstr "Ortogonale" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy +msgid "Right Perspective" +msgstr "Prospettiva" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Front Orthogonal" msgstr "Ortogonale" @@ -8394,6 +8421,27 @@ msgid "Right View" msgstr "Vista laterale destra" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Vista frontale" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "Cambia tra vista prospettica/ortogonale" @@ -14822,6 +14870,14 @@ msgstr "" "Non è stato possibile caricare l'Ambiente predefinito come specificato nelle " "Impostazioni Progetto (Rendering -> Ambiente -> Ambiente Predefinito)." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14835,7 +14891,10 @@ msgstr "" "RenderTarget e assegnare alla sua texture interna qualche nodo da mostrare." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" "La dimensione del Viewport deve essere maggiore di 0 affinché qualcosa sia " "visibile." @@ -16535,9 +16594,6 @@ msgstr "Le constanti non possono essere modificate." #~ msgid "Couldn't save atlas image:" #~ msgstr "Impossibile salvare l'immagine di atlas:" -#~ msgid "Couldn't save converted texture:" -#~ msgstr "Impossibile salvare la texture convertita:" - #~ msgid "Invalid translation source!" #~ msgstr "Sorgente traduzione invalida!" diff --git a/editor/translations/ja.po b/editor/translations/ja.po index 20cd8fc7da..1eb457926d 100644 --- a/editor/translations/ja.po +++ b/editor/translations/ja.po @@ -34,11 +34,13 @@ # BinotaLIU <me@binota.org>, 2020, 2021. # 都築 本成 <motonari728@gmail.com>, 2021. # Nanjakkun <nanjakkun@gmail.com>, 2021. +# Lemoney <railkill@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-09-11 20:05+0000\n" +"PO-Revision-Date: 2021-10-15 04:33+0000\n" "Last-Translator: nitenook <admin@alterbaum.net>\n" "Language-Team: Japanese <https://hosted.weblate.org/projects/godot-engine/" "godot/ja/>\n" @@ -74,15 +76,15 @@ msgstr "インスタンスが null (渡されない) であるため、self は #: core/math/expression.cpp msgid "Invalid operands to operator %s, %s and %s." -msgstr "演算子 %s に対する無効なオペランドです: %s と %s。" +msgstr "演算子 %s に対するオペランド %s および %s は無効です。" #: core/math/expression.cpp msgid "Invalid index of type %s for base type %s" -msgstr "型 %s のインデックスが無効、これは基底型 %s 用です" +msgstr "%s型のインデックスは、元の%s型に対して無効です" #: core/math/expression.cpp msgid "Invalid named index '%s' for base type %s" -msgstr "インデックス '%s' (基底型 %s) は無効な名前です" +msgstr "名前付きインデックス '%s' は、元の%s型に対して無効です" #: core/math/expression.cpp msgid "Invalid arguments to construct '%s'" @@ -186,7 +188,7 @@ msgstr "アニメーションキーフレームの値を変更" #: editor/animation_track_editor.cpp msgid "Anim Change Call" -msgstr "アニメーション呼出しの変更" +msgstr "アニメーション呼び出しの変更" #: editor/animation_track_editor.cpp msgid "Anim Multi Change Keyframe Time" @@ -206,7 +208,7 @@ msgstr "アニメーションキーフレームの値を複数変更" #: editor/animation_track_editor.cpp msgid "Anim Multi Change Call" -msgstr "アニメーション呼出しを複数変更" +msgstr "アニメーション呼び出しを複数変更" #: editor/animation_track_editor.cpp msgid "Change Animation Length" @@ -227,7 +229,7 @@ msgstr "3Dトランスフォームトラック" #: editor/animation_track_editor.cpp msgid "Call Method Track" -msgstr "メソッド呼出しトラック" +msgstr "メソッド呼び出しトラック" #: editor/animation_track_editor.cpp msgid "Bezier Curve Track" @@ -406,8 +408,8 @@ msgstr "アニメーション" #: editor/animation_track_editor.cpp msgid "AnimationPlayer can't animate itself, only other players." msgstr "" -"アニメーションプレイヤーは他のプレイヤーだけをアニメーション化することはでき" -"ません。" +"AnimationPlayerは自分自身をアニメーションすることはできず、他のプレイヤーをア" +"ニメーションさせることができます。" #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp @@ -452,8 +454,7 @@ msgstr "" #: editor/animation_track_editor.cpp msgid "Animation tracks can only point to AnimationPlayer nodes." -msgstr "" -"アニメーショントラックはアニメーションプレイヤーノードのみ指定できます。" +msgstr "アニメーショントラックはAnimationPlayerノードのみ指定できます。" #: editor/animation_track_editor.cpp msgid "Not possible to add a new track without a root" @@ -546,7 +547,8 @@ msgstr "警告:インポートしたアニメーションを編集していま #: editor/animation_track_editor.cpp msgid "Select an AnimationPlayer node to create and edit animations." msgstr "" -"アニメーションを作って編集するには、 AnimationPlayer ノードを選択して下さい。" +"アニメーションを作って編集するには、 AnimationPlayer ノードを選択してくださ" +"い。" #: editor/animation_track_editor.cpp msgid "Only show tracks from nodes selected in tree." @@ -643,9 +645,8 @@ msgid "Use Bezier Curves" msgstr "ベジェ曲線を使用" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Create RESET Track(s)" -msgstr "トラックを貼り付け" +msgstr "RESETトラックを作成" #: editor/animation_track_editor.cpp msgid "Anim. Optimizer" @@ -742,7 +743,7 @@ msgstr "行番号:" #: editor/code_editor.cpp msgid "%d replaced." -msgstr "%d を置換しました。" +msgstr "%d件を置換しました。" #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -856,11 +857,11 @@ msgstr "除去" #: editor/connections_dialog.cpp msgid "Add Extra Call Argument:" -msgstr "呼出し引数を追加:" +msgstr "呼び出し引数を追加:" #: editor/connections_dialog.cpp msgid "Extra Call Arguments:" -msgstr "追加の呼出し引数:" +msgstr "追加の呼び出し引数:" #: editor/connections_dialog.cpp msgid "Receiver Method:" @@ -1034,7 +1035,7 @@ msgid "" "Changes will only take effect when reloaded." msgstr "" "シーン '%s' は現在編集中です。\n" -"変更は再読込み後に反映されます。" +"変更は再読み込み後に反映されます。" #: editor/dependency_editor.cpp msgid "" @@ -1042,7 +1043,7 @@ msgid "" "Changes will only take effect when reloaded." msgstr "" "リソース '%s' は使用中です。\n" -"変更は再読込み後に反映されます。" +"変更は再読み込み後に反映されます。" #: editor/dependency_editor.cpp #: modules/gdnative/gdnative_library_editor_plugin.cpp @@ -1068,7 +1069,7 @@ msgstr "修復" #: editor/dependency_editor.cpp msgid "Dependency Editor" -msgstr "依存関係エディタ" +msgstr "依存関係エディター" #: editor/dependency_editor.cpp msgid "Search Replacement Resource:" @@ -1117,11 +1118,11 @@ msgstr "除去不可:" #: editor/dependency_editor.cpp msgid "Error loading:" -msgstr "読込みエラー:" +msgstr "読み込みエラー:" #: editor/dependency_editor.cpp msgid "Load failed due to missing dependencies:" -msgstr "依存関係が見つからないため、シーンを読込めません:" +msgstr "依存関係が見つからないため、読み込めません:" #: editor/dependency_editor.cpp editor/editor_node.cpp msgid "Open Anyway" @@ -1292,7 +1293,7 @@ msgstr "アセットの内容 \"%s\" - %d 個のファイルがプロジェク #: editor/editor_asset_installer.cpp msgid "Contents of asset \"%s\" - No files conflict with your project:" -msgstr "アセットの内容 \"%s\" - %d 個のファイルがプロジェクトと競合します:" +msgstr "アセットの内容 \"%s\" - プロジェクトと競合するファイルはありません:" #: editor/editor_asset_installer.cpp msgid "Uncompressing Assets" @@ -1304,7 +1305,7 @@ msgstr "次のファイルをアセット \"%s\" から展開できませんで #: editor/editor_asset_installer.cpp msgid "(and %s more files)" -msgstr "(および %s 個のファイル)" +msgstr "(さらに %s個のファイル)" #: editor/editor_asset_installer.cpp msgid "Asset \"%s\" installed successfully!" @@ -1468,11 +1469,11 @@ msgstr "新規オーディオバスをこのレイアウトに追加する。" #: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp #: editor/script_create_dialog.cpp msgid "Load" -msgstr "読込み" +msgstr "読み込み" #: editor/editor_audio_buses.cpp msgid "Load an existing Bus Layout." -msgstr "既存のバスレイアウトを読込む。" +msgstr "既存のバスレイアウトを読み込む。" #: editor/editor_audio_buses.cpp msgid "Save As" @@ -1484,11 +1485,11 @@ msgstr "このバスレイアウトをファイルに保存。" #: editor/editor_audio_buses.cpp editor/import_dock.cpp msgid "Load Default" -msgstr "デフォルトを読込む" +msgstr "デフォルトを読み込む" #: editor/editor_audio_buses.cpp msgid "Load the default Bus Layout." -msgstr "デフォルトのバスレイアウトを読込みます。" +msgstr "デフォルトのバスレイアウトを読み込む。" #: editor/editor_audio_buses.cpp msgid "Create a new Bus Layout." @@ -1508,7 +1509,7 @@ msgstr "既存のエンジンクラス名と重複してはなりません。" #: editor/editor_autoload_settings.cpp msgid "Must not collide with an existing built-in type name." -msgstr "既存の組込み型名と重複してはいけません。" +msgstr "既存の組み込み型名と重複してはいけません。" #: editor/editor_autoload_settings.cpp msgid "Must not collide with an existing global constant name." @@ -1520,23 +1521,23 @@ msgstr "キーワードは自動ロード名として使用できません。" #: editor/editor_autoload_settings.cpp msgid "Autoload '%s' already exists!" -msgstr "自動読込み '%s' は既に存在します!" +msgstr "自動読み込み '%s' はすでに存在します!" #: editor/editor_autoload_settings.cpp msgid "Rename Autoload" -msgstr "自動読込みの名前変更" +msgstr "自動読み込みの名前変更" #: editor/editor_autoload_settings.cpp msgid "Toggle AutoLoad Globals" -msgstr "グローバルの自動読込みをオン / オフ" +msgstr "グローバルの自動読み込みをオン / オフ" #: editor/editor_autoload_settings.cpp msgid "Move Autoload" -msgstr "自動読込みを移動" +msgstr "自動読み込みを移動" #: editor/editor_autoload_settings.cpp msgid "Remove Autoload" -msgstr "自動読込みを除去" +msgstr "自動読み込みを除去" #: editor/editor_autoload_settings.cpp editor/editor_plugin_settings.cpp msgid "Enable" @@ -1544,7 +1545,7 @@ msgstr "有効" #: editor/editor_autoload_settings.cpp msgid "Rearrange Autoloads" -msgstr "自動読込みの並べ替え" +msgstr "自動読み込みの並べ替え" #: editor/editor_autoload_settings.cpp msgid "Can't add autoload:" @@ -1560,7 +1561,7 @@ msgstr "%s は無効なパスです。リソースパス (res://) に存在し #: editor/editor_autoload_settings.cpp msgid "Add AutoLoad" -msgstr "自動読込みを追加" +msgstr "自動読み込みを追加" #: editor/editor_autoload_settings.cpp editor/editor_file_dialog.cpp #: editor/editor_plugin_settings.cpp @@ -1619,7 +1620,7 @@ msgstr "ディレクトリを選択" #: editor/filesystem_dock.cpp editor/project_manager.cpp #: scene/gui/file_dialog.cpp msgid "Create Folder" -msgstr "フォルダを作成" +msgstr "フォルダーを作成" #: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp #: editor/editor_plugin_settings.cpp editor/filesystem_dock.cpp @@ -1631,7 +1632,7 @@ msgstr "名前:" #: 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 "フォルダーを作成できませんでした。" #: editor/editor_dir_dialog.cpp msgid "Choose" @@ -1729,11 +1730,11 @@ msgstr "" #: editor/editor_feature_profile.cpp msgid "3D Editor" -msgstr "3Dエディタ" +msgstr "3Dエディター" #: editor/editor_feature_profile.cpp msgid "Script Editor" -msgstr "スクリプトエディタ" +msgstr "スクリプトエディター" #: editor/editor_feature_profile.cpp msgid "Asset Library" @@ -1761,7 +1762,7 @@ msgstr "3Dシーンの表示と編集ができます。" #: editor/editor_feature_profile.cpp msgid "Allows to edit scripts using the integrated script editor." -msgstr "内臓のスクリプトエディタを使用してスクリプトを編集できます。" +msgstr "内臓のスクリプトエディターを使用してスクリプトを編集できます。" #: editor/editor_feature_profile.cpp msgid "Provides built-in access to the Asset Library." @@ -1809,11 +1810,11 @@ msgstr "" #: editor/editor_feature_profile.cpp msgid "Profile with this name already exists." -msgstr "この名前のプロファイルは既に存在します。" +msgstr "この名前のプロファイルはすでに存在します。" #: editor/editor_feature_profile.cpp msgid "(Editor Disabled, Properties Disabled)" -msgstr "(エディタ無効、プロパティ無効)" +msgstr "(エディター無効、プロパティ無効)" #: editor/editor_feature_profile.cpp msgid "(Properties Disabled)" @@ -1821,7 +1822,7 @@ msgstr "(プロパティ無効)" #: editor/editor_feature_profile.cpp msgid "(Editor Disabled)" -msgstr "(エディタ無効)" +msgstr "(エディター無効)" #: editor/editor_feature_profile.cpp msgid "Class Options:" @@ -1829,7 +1830,7 @@ msgstr "クラスオプション:" #: editor/editor_feature_profile.cpp msgid "Enable Contextual Editor" -msgstr "コンテキストエディタを有効にする" +msgstr "コンテキストエディターを有効にする" #: editor/editor_feature_profile.cpp msgid "Class Properties:" @@ -1924,19 +1925,19 @@ msgstr "プロファイルのエクスポート" #: editor/editor_feature_profile.cpp msgid "Manage Editor Feature Profiles" -msgstr "エディタ機能のプロファイルの管理" +msgstr "エディター機能のプロファイルの管理" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Select Current Folder" -msgstr "現在のフォルダを選択" +msgstr "現在のフォルダーを選択" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "File exists, overwrite?" -msgstr "ファイルが既に存在します。上書きしますか?" +msgstr "ファイルがすでに存在します。上書きしますか?" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Select This Folder" -msgstr "このフォルダを選択" +msgstr "このフォルダーを選択" #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "Copy Path" @@ -1953,12 +1954,12 @@ msgstr "ファイルマネージャーで表示" #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "New Folder..." -msgstr "新規フォルダ..." +msgstr "新規フォルダー..." #: editor/editor_file_dialog.cpp editor/find_in_files.cpp #: editor/plugins/version_control_editor_plugin.cpp msgid "Refresh" -msgstr "再読込" +msgstr "再読み込み" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "All Recognized" @@ -2018,7 +2019,7 @@ msgstr "お気に入りにする / しない" #: editor/editor_file_dialog.cpp msgid "Toggle Mode" -msgstr "モード切替え" +msgstr "モード切り替え" #: editor/editor_file_dialog.cpp msgid "Focus Path" @@ -2034,15 +2035,15 @@ msgstr "お気に入りを下へ" #: editor/editor_file_dialog.cpp msgid "Go to previous folder." -msgstr "前のフォルダへ移動する。" +msgstr "前のフォルダーへ移動する。" #: editor/editor_file_dialog.cpp msgid "Go to next folder." -msgstr "次のフォルダへ移動する。" +msgstr "次のフォルダーへ移動する。" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Go to parent folder." -msgstr "親フォルダへ移動する。" +msgstr "親フォルダーへ移動する。" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Refresh files." @@ -2050,7 +2051,7 @@ msgstr "ファイルの一覧をリフレッシュする。" #: editor/editor_file_dialog.cpp msgid "(Un)favorite current folder." -msgstr "現在のフォルダをお気に入りにする / しない。" +msgstr "現在のフォルダーをお気に入りにする / しない。" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Toggle the visibility of hidden files." @@ -2086,8 +2087,8 @@ msgid "" "There are multiple importers for different types pointing to file %s, import " "aborted" msgstr "" -"ファイル %s をポイントしている異なるタイプの複数のインポータがあります。イン" -"ポートは中断されました" +"ファイル %s をポイントしている異なるタイプの複数のインポーターがあります。イ" +"ンポートは中断されました" #: editor/editor_file_system.cpp msgid "(Re)Importing Assets" @@ -2294,11 +2295,11 @@ msgstr "%s/s" #: editor/editor_network_profiler.cpp msgid "Down" -msgstr "下" +msgstr "下り" #: editor/editor_network_profiler.cpp msgid "Up" -msgstr "上" +msgstr "上り" #: editor/editor_network_profiler.cpp editor/editor_node.cpp msgid "Node" @@ -2306,19 +2307,19 @@ msgstr "ノード" #: editor/editor_network_profiler.cpp msgid "Incoming RPC" -msgstr "RPC入力" +msgstr "RPC受信" #: editor/editor_network_profiler.cpp msgid "Incoming RSET" -msgstr "入力RSET" +msgstr "RSET受信" #: editor/editor_network_profiler.cpp msgid "Outgoing RPC" -msgstr "出力RPC" +msgstr "RPC送信" #: editor/editor_network_profiler.cpp msgid "Outgoing RSET" -msgstr "出力RSET" +msgstr "RSET送信" #: editor/editor_node.cpp editor/project_manager.cpp msgid "New Window" @@ -2330,13 +2331,13 @@ msgid "" "Update Continuously is enabled, which can increase power usage. Click to " "disable it." msgstr "" -"エディタウィンドウの再描画時にスピンします。\n" +"エディターウィンドウの再描画時にスピンします。\n" "継続的に更新 が有効になっており、電力消費量が増加する可能性があります。クリッ" "クで無効化します。" #: editor/editor_node.cpp msgid "Spins when the editor window redraws." -msgstr "エディタ ウィンドウの再描画時にスピンします。" +msgstr "エディター ウィンドウの再描画時にスピンします。" #: editor/editor_node.cpp msgid "Imported resources can't be saved." @@ -2357,8 +2358,8 @@ msgid "" "This resource can't be saved because it does not belong to the edited scene. " "Make it unique first." msgstr "" -"このリソースは編集したシーンに属していないため保存できません。まず一意にしま" -"す。" +"このリソースは編集したシーンに属していないため保存できません。まずユニーク化" +"してください。" #: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp msgid "Save Resource As..." @@ -2366,7 +2367,7 @@ msgstr "リソースを別名で保存..." #: editor/editor_node.cpp msgid "Can't open file for writing:" -msgstr "書込むファイルを開けません:" +msgstr "書き込むファイルを開けません:" #: editor/editor_node.cpp msgid "Requested file format unknown:" @@ -2391,11 +2392,11 @@ msgstr "ファイル '%s' が予期せず終了しました。" #: editor/editor_node.cpp msgid "Missing '%s' or its dependencies." -msgstr "'%s' 、または依存関係が見つかりません。" +msgstr "'%s' またはその依存関係が見つかりません。" #: editor/editor_node.cpp msgid "Error while loading '%s'." -msgstr "'%s' の読込み中にエラーが発生しました。" +msgstr "'%s' の読み込み中にエラーが発生しました。" #: editor/editor_node.cpp msgid "Saving Scene" @@ -2407,7 +2408,7 @@ msgstr "分析中" #: editor/editor_node.cpp msgid "Creating Thumbnail" -msgstr "サムネイルを作成" +msgstr "サムネイルを作成中" #: editor/editor_node.cpp msgid "This operation can't be done without a tree root." @@ -2429,13 +2430,22 @@ msgstr "" "シーンを保存できませんでした。 おそらく、依存関係 (インスタンスまたは継承) を" "満たせませんでした。" +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "変換したテクスチャを保存できませんでした:" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "すべてのシーンを保存" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "開いているシーンを上書きすることはできません!" #: editor/editor_node.cpp msgid "Can't load MeshLibrary for merging!" -msgstr "マージするメッシュライブラリーが読込めません!" +msgstr "マージするメッシュライブラリーが読み込めません!" #: editor/editor_node.cpp msgid "Error saving MeshLibrary!" @@ -2443,7 +2453,7 @@ msgstr "メッシュライブラリーの保存エラー!" #: editor/editor_node.cpp msgid "Can't load TileSet for merging!" -msgstr "マージするタイルセットが読込めません!" +msgstr "マージするタイルセットが読み込めません!" #: editor/editor_node.cpp msgid "Error saving TileSet!" @@ -2454,8 +2464,8 @@ msgid "" "An error occurred while trying to save the editor layout.\n" "Make sure the editor's user data path is writable." msgstr "" -"エディタのレイアウトを保存しようとした際にエラーが発生しました。\n" -"エディタのユーザーデータ用パスが書き込み可能であることを確認してください。" +"エディターのレイアウトを保存しようとした際にエラーが発生しました。\n" +"エディターのユーザーデータ用パスが書き込み可能であることを確認してください。" #: editor/editor_node.cpp msgid "" @@ -2463,7 +2473,7 @@ msgid "" "To restore the Default layout to its base settings, use the Delete Layout " "option and delete the Default layout." msgstr "" -"既定のエディタレイアウトが上書きされました。\n" +"既定のエディターレイアウトが上書きされました。\n" "既定のレイアウトを基本設定に戻すには、[レイアウトの削除] オプションを使用し" "て、既定のレイアウトを削除します。" @@ -2565,6 +2575,10 @@ msgid "Save changes to '%s' before closing?" msgstr "閉じる前に、'%s' への変更を保存しますか?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2610,29 +2624,27 @@ msgstr "現在のシーンは保存されていません。それでも開きま #: editor/editor_node.cpp msgid "Can't undo while mouse buttons are pressed." -msgstr "" +msgstr "マウスボタンが押されている間は元に戻せません。" #: editor/editor_node.cpp msgid "Nothing to undo." -msgstr "" +msgstr "元に戻すものがありません。" #: editor/editor_node.cpp -#, fuzzy msgid "Undo: %s" -msgstr "元に戻す" +msgstr "元に戻す: %s" #: editor/editor_node.cpp msgid "Can't redo while mouse buttons are pressed." -msgstr "" +msgstr "マウスボタンが押されている間はやり直せません。" #: editor/editor_node.cpp msgid "Nothing to redo." -msgstr "" +msgstr "やり直すものがありません。" #: editor/editor_node.cpp -#, fuzzy msgid "Redo: %s" -msgstr "やり直す" +msgstr "やり直す: %s" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." @@ -2664,7 +2676,7 @@ msgstr "はい" #: editor/editor_node.cpp msgid "Exit the editor?" -msgstr "エディタを終了しますか?" +msgstr "エディターを終了しますか?" #: editor/editor_node.cpp msgid "Open Project Manager?" @@ -2713,7 +2725,7 @@ msgstr "アドオンプラグインのスクリプトフィールドが '%s' で #: editor/editor_node.cpp msgid "Unable to load addon script from path: '%s'." -msgstr "パス '%s' からアドオンスクリプトを読込めません。" +msgstr "パス '%s' からアドオンスクリプトを読み込めません。" #: editor/editor_node.cpp msgid "" @@ -2729,14 +2741,14 @@ msgstr "" msgid "" "Unable to load addon script from path: '%s' Base type is not EditorPlugin." msgstr "" -"パス '%s' からアドオンスクリプトを読込めません。基底型が EditorPlugin ではあ" -"りません。" +"パス '%s' からアドオンスクリプトを読み込めません。基底型が EditorPlugin では" +"ありません。" #: editor/editor_node.cpp msgid "Unable to load addon script from path: '%s' Script is not in tool mode." msgstr "" -"パス '%s' からアドオンスクリプトを読込めません。スクリプトがツールモードでは" -"ありません。" +"パス '%s' からアドオンスクリプトを読み込めません。スクリプトがツールモードで" +"はありません。" #: editor/editor_node.cpp msgid "" @@ -2751,7 +2763,7 @@ msgid "" "Error loading scene, it must be inside the project path. Use 'Import' to " "open the scene, then save it inside the project path." msgstr "" -"シーン読込み中にエラーが発生しました。プロジェクトパス内にある必要がありま" +"シーン読み込み中にエラーが発生しました。プロジェクトパス内にある必要がありま" "す。このシーンを開くには 'インポート' を使用し、プロジェクトパス内に保存して" "ください。" @@ -2839,15 +2851,15 @@ msgstr "シーンタブを切り替え" #: editor/editor_node.cpp msgid "%d more files or folders" -msgstr "%d 以上のファイルとフォルダ" +msgstr "さらに %d個のファイルとフォルダー" #: editor/editor_node.cpp msgid "%d more folders" -msgstr "%d 以上のフォルダ" +msgstr "さらに %d個のフォルダー" #: editor/editor_node.cpp msgid "%d more files" -msgstr "%d 以上のファイル" +msgstr "さらに %d個のファイル" #: editor/editor_node.cpp msgid "Dock Position" @@ -2914,10 +2926,6 @@ msgid "Save Scene" msgstr "シーンを保存" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "すべてのシーンを保存" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "変換..." @@ -2974,7 +2982,7 @@ msgstr "Androidビルドテンプレートのインストール..." #: editor/editor_node.cpp msgid "Open Project Data Folder" -msgstr "プロジェクトのデータフォルダを開く" +msgstr "プロジェクトのデータフォルダーを開く" #: editor/editor_node.cpp editor/plugins/tile_set_editor_plugin.cpp msgid "Tools" @@ -3015,7 +3023,7 @@ msgstr "" "グすることができます。\n" "このオプションは、リモートデバッグに使用することを意図しています (通常はモバ" "イルデバイスにおいて)。\n" -"ローカルで GDScript デバッガを使用するためには有効にする必要はありません。" +"ローカルで GDScript デバッガーを使用するためには有効にする必要はありません。" #: editor/editor_node.cpp msgid "Small Deploy with Network Filesystem" @@ -3032,8 +3040,8 @@ msgid "" msgstr "" "このオプションを有効にすると、Androidへのワンクリック・デプロイ時にプロジェク" "ト用データ無しの実行可能ファイルのみをエクスポートします。\n" -"ファイルシステムは、エディタによってプロジェクトからネットワークを通じて供給" -"されます。\n" +"ファイルシステムは、エディターによってプロジェクトからネットワークを通じて供" +"給されます。\n" "Androidでは、デプロイはUSBケーブルの利用でさらに高速になります。このオプショ" "ンは大きなアセットのあるプロジェクトでテストを高速化できます。" @@ -3072,8 +3080,8 @@ msgid "" "When used remotely on a device, this is more efficient when the network " "filesystem option is enabled." msgstr "" -"このオプションを有効にすると、エディタからシーンに加えられた変更が、実行中の" -"プロジェクトに反映されるようになります。\n" +"このオプションを有効にすると、エディターからシーンに加えられた変更が、実行中" +"のプロジェクトに反映されるようになります。\n" "リモートのデバイス上で使用する場合、ネットワークファイルシステムのオプション" "も有効であればより効率的になります。" @@ -3095,15 +3103,15 @@ msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp msgid "Editor" -msgstr "エディタ" +msgstr "エディター" #: editor/editor_node.cpp msgid "Editor Settings..." -msgstr "エディタ設定..." +msgstr "エディター設定..." #: editor/editor_node.cpp msgid "Editor Layout" -msgstr "エディタレイアウト" +msgstr "エディターレイアウト" #: editor/editor_node.cpp msgid "Take Screenshot" @@ -3111,7 +3119,8 @@ msgstr "スクリーンショットを撮る" #: editor/editor_node.cpp msgid "Screenshots are stored in the Editor Data/Settings Folder." -msgstr "スクリーンショットはEditor Data / Settingsフォルダに保存されています。" +msgstr "" +"スクリーンショットは エディターのデータ / 設定フォルダー に保存されています。" #: editor/editor_node.cpp msgid "Toggle Fullscreen" @@ -3123,19 +3132,19 @@ msgstr "システムコンソールを有効化 / 無効化" #: editor/editor_node.cpp msgid "Open Editor Data/Settings Folder" -msgstr "エディタのデータ / 設定フォルダを開く" +msgstr "エディターのデータ / 設定フォルダーを開く" #: editor/editor_node.cpp msgid "Open Editor Data Folder" -msgstr "エディタのデータフォルダを開く" +msgstr "エディターのデータフォルダーを開く" #: editor/editor_node.cpp msgid "Open Editor Settings Folder" -msgstr "エディタ設定のフォルダを開く" +msgstr "エディター設定のフォルダーを開く" #: editor/editor_node.cpp msgid "Manage Editor Features..." -msgstr "エディタ機能の管理..." +msgstr "エディター機能の管理..." #: editor/editor_node.cpp msgid "Manage Export Templates..." @@ -3215,7 +3224,7 @@ msgstr "カスタムシーンを実行" #: editor/editor_node.cpp msgid "Changing the video driver requires restarting the editor." -msgstr "ビデオドライバの変更にはエディタの再起動が必要です。" +msgstr "ビデオドライバーの変更にはエディターの再起動が必要です。" #: editor/editor_node.cpp editor/project_settings_editor.cpp #: editor/settings_config_dialog.cpp @@ -3240,7 +3249,7 @@ msgstr "ファイルシステム" #: editor/editor_node.cpp msgid "Inspector" -msgstr "インスペクタ" +msgstr "インスペクター" #: editor/editor_node.cpp msgid "Expand Bottom Panel" @@ -3283,12 +3292,12 @@ msgid "" "preset." msgstr "" "この操作は \"res://android/build\" にソーステンプレートをインストールし、" -"Androidのカスタムビルドを設定します。\n" +"Androidのカスタムビルドの設定がプロジェクトにセットアップされます。\n" "後から設定に変更を加えたり、エクスポート時にカスタムAPKをビルドできます (モ" -"ジュールを追加する、AndroidManifest.xmlを変更する等)。\n" -"APKビルドの初期設定の代わりにカスタムビルド設定を使うためには、Androidのエク" -"スポート設定の「Use Custom Build (カスタムビルドを使用する)」のオプションが有" -"効化されている必要があることに注意してください。" +"ジュールを追加する、AndroidManifest.xmlを変更するなど)。\n" +"ビルド済みAPKの代わりにカスタムビルドをするためには、Androidのエクスポート設" +"定の「Use Custom Build (カスタムビルドを使用する)」のオプションが有効化されて" +"いる必要があることに注意してください。" #: editor/editor_node.cpp msgid "" @@ -3318,9 +3327,8 @@ msgid "Merge With Existing" msgstr "既存の(ライブラリを)マージ" #: editor/editor_node.cpp -#, fuzzy msgid "Apply MeshInstance Transforms" -msgstr "アニメーションのトランスフォームを変更" +msgstr "MeshInstanceのトランスフォームを適用" #: editor/editor_node.cpp msgid "Open & Run a Script" @@ -3337,7 +3345,7 @@ msgstr "" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Reload" -msgstr "再読込" +msgstr "再読み込み" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: editor/plugins/shader_editor_plugin.cpp @@ -3350,28 +3358,27 @@ msgstr "新規の継承" #: editor/editor_node.cpp msgid "Load Errors" -msgstr "読込みエラー" +msgstr "読み込みエラー" #: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp msgid "Select" msgstr "選択" #: editor/editor_node.cpp -#, fuzzy msgid "Select Current" -msgstr "現在のフォルダを選択" +msgstr "現在のものを選択" #: editor/editor_node.cpp msgid "Open 2D Editor" -msgstr "2Dエディタを開く" +msgstr "2Dエディターを開く" #: editor/editor_node.cpp msgid "Open 3D Editor" -msgstr "3Dエディタを開く" +msgstr "3Dエディターを開く" #: editor/editor_node.cpp msgid "Open Script Editor" -msgstr "スクリプトエディタを開く" +msgstr "スクリプトエディターを開く" #: editor/editor_node.cpp editor/project_manager.cpp msgid "Open Asset Library" @@ -3379,11 +3386,11 @@ msgstr "アセットライブラリを開く" #: editor/editor_node.cpp msgid "Open the next Editor" -msgstr "次のエディタを開く" +msgstr "次のエディターを開く" #: editor/editor_node.cpp msgid "Open the previous Editor" -msgstr "前のエディタを開く" +msgstr "前のエディターを開く" #: editor/editor_node.h msgid "Warning!" @@ -3399,7 +3406,7 @@ msgstr "サブリソースのリストを開く。" #: editor/editor_plugin.cpp msgid "Creating Mesh Previews" -msgstr "メッシュプレビューを作成" +msgstr "メッシュプレビューを作成中" #: editor/editor_plugin.cpp msgid "Thumbnail..." @@ -3489,7 +3496,7 @@ msgstr "時間" #: editor/editor_profiler.cpp msgid "Calls" -msgstr "呼出し" +msgstr "呼び出し" #: editor/editor_properties.cpp msgid "Edit Text:" @@ -3501,7 +3508,7 @@ msgstr "オン" #: editor/editor_properties.cpp msgid "Layer" -msgstr "レイヤ" +msgstr "レイヤー" #: editor/editor_properties.cpp msgid "Bit %d, value %d" @@ -3517,7 +3524,7 @@ msgstr "割り当て.." #: editor/editor_properties.cpp msgid "Invalid RID" -msgstr "無効な RID" +msgstr "無効なRID" #: editor/editor_properties.cpp msgid "" @@ -3536,8 +3543,8 @@ msgid "" msgstr "" "このリソースはシーンに対してローカルに設定されていないため、ViewportTextureを" "作成できません。\n" -"'シーンにローカル 'プロパティをオンにしてください(ノードまでを含むすべてのリ" -"ソース)。" +"'local to scene'プロパティをオンにしてください(ノードまでを含むすべてのリソー" +"ス)。" #: editor/editor_properties.cpp editor/property_editor.cpp msgid "Pick a Viewport" @@ -3582,7 +3589,7 @@ msgstr "" #: editor/editor_resource_picker.cpp msgid "Quick Load" -msgstr "" +msgstr "クイックロード" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "Make Unique" @@ -3634,7 +3641,7 @@ msgstr "ロジックを _run() メソッドに記述する。" #: editor/editor_run_script.cpp msgid "There is an edited scene already." -msgstr "既に編集されたシーンがあります。" +msgstr "すでに編集されたシーンがあります。" #: editor/editor_run_script.cpp msgid "Couldn't instance script:" @@ -3674,7 +3681,7 @@ msgstr "ノードからインポート:" #: editor/export_template_manager.cpp msgid "Open the folder containing these templates." -msgstr "これらのテンプレートがあるフォルダを開きます。" +msgstr "これらのテンプレートがあるフォルダーを開きます。" #: editor/export_template_manager.cpp msgid "Uninstall these templates." @@ -3751,7 +3758,7 @@ msgstr "ミラーリストのJSONの解析に失敗しました。この問題 #: editor/export_template_manager.cpp msgid "Best available mirror" -msgstr "有効な最良のミラー" +msgstr "利用可能な最良のミラー" #: editor/export_template_manager.cpp msgid "" @@ -3855,11 +3862,12 @@ msgstr "エクスポート テンプレートはインストールされてお #: editor/export_template_manager.cpp msgid "Open Folder" -msgstr "フォルダを開く" +msgstr "フォルダーを開く" #: editor/export_template_manager.cpp msgid "Open the folder containing installed templates for the current version." -msgstr "現在のバージョンのテンプレートがインストールされたフォルダを開きます。" +msgstr "" +"現在のバージョンのテンプレートがインストールされたフォルダーを開きます。" #: editor/export_template_manager.cpp msgid "Uninstall" @@ -3879,7 +3887,7 @@ msgstr "Webブラウザで開く" #: editor/export_template_manager.cpp msgid "Copy Mirror URL" -msgstr "エラーのURLをコピー" +msgstr "ミラーのURLをコピー" #: editor/export_template_manager.cpp msgid "Download and Install" @@ -3895,7 +3903,7 @@ msgstr "" #: editor/export_template_manager.cpp msgid "Official export templates aren't available for development builds." -msgstr "公式の書き出しテンプレートは開発用ビルドの場合は使用できません。" +msgstr "公式のエクスポートテンプレートは開発用ビルドの場合は使用できません。" #: editor/export_template_manager.cpp msgid "Install from File" @@ -3936,7 +3944,7 @@ msgid "" "You may experience a short editor freeze when they finish." msgstr "" "テンプレートのダウンロードは継続されます。\n" -"完了時に、短い間エディタがフリーズする可能性があります。" +"完了時に、短い間エディターがフリーズする可能性があります。" #: editor/filesystem_dock.cpp msgid "Favorites" @@ -3946,7 +3954,7 @@ msgstr "お気に入り" msgid "Status: Import of file failed. Please fix file and reimport manually." msgstr "" "ステータス: ファイルのインポートに失敗しました。ファイルを修正して手動で再イ" -"ンポートして下さい。" +"ンポートしてください。" #: editor/filesystem_dock.cpp msgid "" @@ -3961,7 +3969,7 @@ msgstr "ルートのリソースは移動/リネームできません。" #: editor/filesystem_dock.cpp msgid "Cannot move a folder into itself." -msgstr "フォルダをフォルダ自身の中に移動することはできません。" +msgstr "フォルダーをフォルダー自身の中に移動することはできません。" #: editor/filesystem_dock.cpp msgid "Error moving:" @@ -3985,7 +3993,7 @@ msgstr "名前に使用できない文字が含まれています。" #: editor/filesystem_dock.cpp msgid "A file or folder with this name already exists." -msgstr "同名のファイルまたはフォルダがあります。" +msgstr "同名のファイルまたはフォルダーがあります。" #: editor/filesystem_dock.cpp msgid "Name contains invalid characters." @@ -4000,7 +4008,7 @@ msgid "" "\n" "Do you wish to overwrite them?" msgstr "" -"以下のファイルまたはフォルダは、対象の場所 '%s' にある項目と競合していま" +"以下のファイルまたはフォルダーは、対象の場所 '%s' にある項目と競合していま" "す。\n" "\n" "%s\n" @@ -4013,7 +4021,7 @@ msgstr "ファイル名を変更:" #: editor/filesystem_dock.cpp msgid "Renaming folder:" -msgstr "フォルダ名を変更:" +msgstr "フォルダー名を変更:" #: editor/filesystem_dock.cpp msgid "Duplicating file:" @@ -4021,7 +4029,7 @@ msgstr "ファイルを複製:" #: editor/filesystem_dock.cpp msgid "Duplicating folder:" -msgstr "フォルダを複製:" +msgstr "フォルダーを複製:" #: editor/filesystem_dock.cpp msgid "New Inherited Scene" @@ -4125,11 +4133,11 @@ msgstr "検索ボックスにフォーカス" #: editor/filesystem_dock.cpp msgid "Previous Folder/File" -msgstr "前のフォルダ/ファイル" +msgstr "前のフォルダー/ファイル" #: editor/filesystem_dock.cpp msgid "Next Folder/File" -msgstr "次のフォルダ/ファイル" +msgstr "次のフォルダー/ファイル" #: editor/filesystem_dock.cpp msgid "Re-Scan Filesystem" @@ -4149,7 +4157,7 @@ msgid "" "Please Wait..." msgstr "" "ファイルのスキャン中\n" -"しばらくお待ち下さい..." +"しばらくお待ちください..." #: editor/filesystem_dock.cpp msgid "Move" @@ -4184,11 +4192,11 @@ msgstr "検索:" #: editor/find_in_files.cpp msgid "Folder:" -msgstr "フォルダ:" +msgstr "フォルダー:" #: editor/find_in_files.cpp msgid "Filters:" -msgstr "フィルタ:" +msgstr "フィルター:" #: editor/find_in_files.cpp msgid "" @@ -4244,7 +4252,7 @@ msgstr "グループから除去" #: editor/groups_editor.cpp msgid "Group name already exists." -msgstr "グループ名が既にあります。" +msgstr "グループ名がすでに存在します。" #: editor/groups_editor.cpp msgid "Invalid group name." @@ -4264,12 +4272,12 @@ msgstr "グループ" #: editor/groups_editor.cpp msgid "Nodes Not in Group" -msgstr "グループがノードありません" +msgstr "グループ内にないノード" #: editor/groups_editor.cpp editor/scene_tree_dock.cpp #: editor/scene_tree_editor.cpp msgid "Filter nodes" -msgstr "ノードのフィルタ" +msgstr "ノードを絞り込む" #: editor/groups_editor.cpp msgid "Nodes in Group" @@ -4281,7 +4289,7 @@ msgstr "空のグループは自動的に削除されます。" #: editor/groups_editor.cpp msgid "Group Editor" -msgstr "グループエディタ" +msgstr "グループエディター" #: editor/groups_editor.cpp msgid "Manage Groups" @@ -4289,7 +4297,7 @@ 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" @@ -4350,7 +4358,7 @@ msgstr "カスタムスクリプトの実行中..." #: editor/import/resource_importer_scene.cpp msgid "Couldn't load post-import script:" -msgstr "インポート済のスクリプトを読込めませんでした:" +msgstr "インポート済のスクリプトを読み込めませんでした:" #: editor/import/resource_importer_scene.cpp msgid "Invalid/broken script for post-import (check console):" @@ -4371,11 +4379,11 @@ msgstr "保存中..." #: editor/import_defaults_editor.cpp msgid "Select Importer" -msgstr "インポータを選択" +msgstr "インポーターを選択" #: editor/import_defaults_editor.cpp msgid "Importer:" -msgstr "インポータ:" +msgstr "インポーター:" #: editor/import_defaults_editor.cpp msgid "Reset to Defaults" @@ -4398,6 +4406,18 @@ msgid "Clear Default for '%s'" msgstr "'%s' のデフォルトをクリア" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "再インポート" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "名前を付けてインポート:" @@ -4406,16 +4426,12 @@ msgid "Preset" msgstr "プリセット" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "再インポート" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "シーンを保存し、再インポートしてから、再起動します" #: editor/import_dock.cpp msgid "Changing the type of an imported file requires editor restart." -msgstr "インポートしたファイルのタイプの変更にはエディタの再起動が必要です。" +msgstr "インポートしたファイルのタイプの変更にはエディターの再起動が必要です。" #: editor/import_dock.cpp msgid "" @@ -4426,7 +4442,7 @@ msgstr "" #: editor/inspector_dock.cpp msgid "Failed to load resource." -msgstr "リソースの読込みに失敗しました。" +msgstr "リソースの読み込みに失敗しました。" #: editor/inspector_dock.cpp msgid "Copy Properties" @@ -4446,7 +4462,7 @@ msgstr "新規リソースをメモリ上に作成して編集する。" #: editor/inspector_dock.cpp msgid "Load an existing resource from disk and edit it." -msgstr "既存のリソースをディスクから読込み編集する。" +msgstr "既存のリソースをディスクから読み込み編集する。" #: editor/inspector_dock.cpp msgid "Save the currently edited resource." @@ -4476,11 +4492,11 @@ msgstr "リソースを組み込みにする" #: editor/inspector_dock.cpp msgid "Go to the previous edited object in history." -msgstr "履歴内の編集済オブジェクトを前へ。" +msgstr "履歴内の前に編集したオブジェクトに移動する。" #: editor/inspector_dock.cpp msgid "Go to the next edited object in history." -msgstr "履歴内の編集済オブジェクトを次へ。" +msgstr "履歴内の次に編集したオブジェクトに移動する。" #: editor/inspector_dock.cpp msgid "History of recently edited objects." @@ -4496,7 +4512,7 @@ msgstr "ドキュメントを開く" #: editor/inspector_dock.cpp msgid "Filter properties" -msgstr "フィルタプロパティ" +msgstr "プロパティを絞り込む" #: editor/inspector_dock.cpp msgid "Manage object properties." @@ -4528,7 +4544,7 @@ msgstr "プラグイン名:" #: editor/plugin_config_dialog.cpp msgid "Subfolder:" -msgstr "サブフォルダ:" +msgstr "サブフォルダー:" #: editor/plugin_config_dialog.cpp msgid "Author:" @@ -4654,8 +4670,8 @@ msgid "" "Activate to enable playback, check node warnings if activation fails." msgstr "" "アニメーションツリーが非アクティブです。\n" -"再生を有効にするためにアクティベートします。アクティベートに失敗した場合は" -"ノードの警告を確認してください。" +"再生を有効にするためにアクティブ化します。アクティブ化に失敗した場合はノード" +"の警告を確認してください。" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp @@ -4681,7 +4697,7 @@ msgstr "点" #: editor/plugins/animation_blend_space_2d_editor.cpp #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Open Editor" -msgstr "エディタで開く" +msgstr "エディターで開く" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp @@ -4692,7 +4708,7 @@ msgstr "アニメーションノードを開く" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Triangle already exists." -msgstr "三角形が既に存在します。" +msgstr "三角形がすでに存在します。" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Add Triangle" @@ -4716,7 +4732,7 @@ msgstr "BlendSpace2Dの三角形を削除する" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "BlendSpace2D does not belong to an AnimationTree node." -msgstr "ブレンドシェイプ2Dはアニメーションツリー ノードに属しません。" +msgstr "BlendSpace2Dはアニメーションツリー ノードに属しません。" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "No triangles exist, so no blending can take place." @@ -4745,12 +4761,12 @@ msgstr "ブレンド:" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Parameter Changed:" -msgstr "パラメータが変更されました:" +msgstr "パラメーターが変更されました:" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Edit Filters" -msgstr "フィルタの編集" +msgstr "フィルターの編集" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Output node can't be added to the blend tree." @@ -4794,16 +4810,15 @@ msgstr "ノードを削除" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Toggle Filter On/Off" -msgstr "フィルタの オン/オフ を切り替え" +msgstr "フィルターの オン/オフ を切り替え" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Change Filter" -msgstr "フィルタを変更" +msgstr "フィルターを変更" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "No animation player set, so unable to retrieve track names." -msgstr "" -"アニメーションプレイヤーが設定されていないため、トラック名を取得できません。" +msgstr "AnimationPlayerが設定されていないため、トラック名を取得できません。" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Player path set is invalid, so unable to retrieve track names." @@ -4881,7 +4896,7 @@ msgstr "アニメーション名が無効です!" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Animation name already exists!" -msgstr "アニメーション名は既に存在します!" +msgstr "アニメーション名はすでに存在します!" #: editor/plugins/animation_player_editor_plugin.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -4898,7 +4913,7 @@ msgstr "ブレンド時間の変更" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Load Animation" -msgstr "アニメーション読込み" +msgstr "アニメーション読み込み" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Duplicate Animation" @@ -4971,7 +4986,7 @@ msgstr "トランジションの編集..." #: editor/plugins/animation_player_editor_plugin.cpp msgid "Open in Inspector" -msgstr "インスペクタで開く" +msgstr "インスペクターで開く" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Display list of animations in player." @@ -4979,7 +4994,7 @@ msgstr "プレーヤーのアニメーションリストを表示する。" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Autoplay on Load" -msgstr "読込み後、自動再生" +msgstr "読み込み後、自動再生" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Enable Onion Skinning" @@ -5292,11 +5307,11 @@ msgstr "アニメーションをインポート..." #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Edit Node Filters" -msgstr "ノードフィルタの編集" +msgstr "ノードフィルターの編集" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Filters..." -msgstr "フィルタ..." +msgstr "フィルター..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Contents:" @@ -5348,7 +5363,7 @@ msgstr "レスポンスを保存できません:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Write error." -msgstr "エラーを書いてください。" +msgstr "書き込みエラー。" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Request failed, too many redirects" @@ -5360,11 +5375,11 @@ msgstr "リダイレクトのループ。" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Request failed, timeout" -msgstr "リクエスト失敗、時間切れ" +msgstr "リクエスト失敗、タイムアウト" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Timeout." -msgstr "時間切れ。" +msgstr "タイムアウト。" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Failed:" @@ -5425,7 +5440,7 @@ msgstr "ダウンロードエラー" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Download for this asset is already in progress!" -msgstr "このアセットのダウンロードは既に進行中!" +msgstr "このアセットのダウンロードはすでに進行中です!" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Recently Updated" @@ -5564,7 +5579,7 @@ msgstr "" msgid "" "Godot editor was built without ray tracing support, lightmaps can't be baked." msgstr "" -"Godotエディタがレイトレーシングのサポートなしでビルドされているため、ライト" +"Godotエディターがレイトレーシングのサポートなしでビルドされているため、ライト" "マップのベイクができません。" #: editor/plugins/baked_lightmap_editor_plugin.cpp @@ -5682,15 +5697,13 @@ msgstr "CanvasItem \"%s\" を (%d, %d) に移動" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Locked" -msgstr "選択対象をロック" +msgstr "ロック済み" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Grouped" -msgstr "グループ" +msgstr "グループ化済み" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -5798,8 +5811,8 @@ msgid "" "Overrides the running project's camera with the editor viewport camera." msgstr "" "プロジェクトのカメラのオーバーライド\n" -"実行中のプロジェクトのカメラを、エディタのビューポートカメラでオーバーライド" -"します。" +"実行中のプロジェクトのカメラを、エディターのビューポートカメラでオーバーライ" +"ドします。" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5940,7 +5953,7 @@ msgstr "スマート スナッピングをオン / オフ。" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Use Smart Snap" -msgstr "スマートスナップを使う" +msgstr "スマートスナップを使用" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Toggle grid snapping." @@ -5948,7 +5961,7 @@ msgstr "グリッド スナッピングをオン / オフ。" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Use Grid Snap" -msgstr "グリッドスナップを使う" +msgstr "グリッドスナップを使用" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snapping Options" @@ -5956,11 +5969,11 @@ msgstr "スナッピングオプション" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Use Rotation Snap" -msgstr "回転スナップを使う" +msgstr "回転スナップを使用" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Use Scale Snap" -msgstr "スケールスナップを使う" +msgstr "スケールスナップを使用" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snap Relative" @@ -6263,7 +6276,7 @@ msgstr "放出マスクをクリア" #: editor/plugins/particles_2d_editor_plugin.cpp #: editor/plugins/particles_editor_plugin.cpp msgid "Particles" -msgstr "Particles" +msgstr "パーティクル" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp @@ -6356,11 +6369,11 @@ msgstr "ポイントを削除" #: editor/plugins/curve_editor_plugin.cpp msgid "Left Linear" -msgstr "左線形文法" +msgstr "左線形" #: editor/plugins/curve_editor_plugin.cpp msgid "Right Linear" -msgstr "右線形文法" +msgstr "右線形" #: editor/plugins/curve_editor_plugin.cpp msgid "Load Preset" @@ -6400,7 +6413,7 @@ msgstr "アイテム" #: editor/plugins/item_list_editor_plugin.cpp msgid "Item List Editor" -msgstr "アイテムリストのエディタ" +msgstr "アイテムリストのエディター" #: editor/plugins/light_occluder_2d_editor_plugin.cpp msgid "Create Occluder Polygon" @@ -6608,7 +6621,7 @@ msgstr "UVチャンネル デバッグ" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Remove item %d?" -msgstr "アイテム%dを取り除きますか?" +msgstr "アイテム %d を取り除きますか?" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "" @@ -6631,14 +6644,12 @@ msgid "Remove Selected Item" msgstr "選択したアイテムを取り除く" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Ignore Transforms)" -msgstr "シーンからインポート" +msgstr "シーンからインポート (トランスフォームを無視)" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Apply Transforms)" -msgstr "シーンからインポート" +msgstr "シーンからインポート (トランスフォームを適用)" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Update from Scene" @@ -6693,11 +6704,11 @@ msgstr "ターゲットサーフェスを選択:" #: editor/plugins/multimesh_editor_plugin.cpp msgid "Populate Surface" -msgstr "サーフェスを満たす" +msgstr "サーフェスを投入する" #: editor/plugins/multimesh_editor_plugin.cpp msgid "Populate MultiMesh" -msgstr "マルチメッシュの設定" +msgstr "マルチメッシュを投入する" #: editor/plugins/multimesh_editor_plugin.cpp msgid "Target Surface:" @@ -7024,11 +7035,11 @@ msgstr "ボーンウェイトをペイント" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Open Polygon 2D UV editor." -msgstr "Polygon 2D UV エディタを開く。" +msgstr "Polygon 2D UV エディターを開く。" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Polygon 2D UV Editor" -msgstr "Polygon 2D UV エディタ" +msgstr "Polygon 2D UV エディター" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "UV" @@ -7202,7 +7213,7 @@ msgstr "型:" #: editor/plugins/resource_preloader_editor_plugin.cpp #: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp msgid "Open in Editor" -msgstr "エディタで開く" +msgstr "エディターで開く" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "Load Resource" @@ -7348,7 +7359,7 @@ msgstr "前を検索" #: editor/plugins/script_editor_plugin.cpp msgid "Filter scripts" -msgstr "スクリプトのフィルタ" +msgstr "スクリプトを絞り込む" #: editor/plugins/script_editor_plugin.cpp msgid "Toggle alphabetical sorting of the method list." @@ -7356,7 +7367,7 @@ msgstr "メソッドリストのアルファベット順ソートを切り替え #: editor/plugins/script_editor_plugin.cpp msgid "Filter methods" -msgstr "フィルタメソッド" +msgstr "メソッドを絞り込む" #: editor/plugins/script_editor_plugin.cpp msgid "Sort" @@ -7375,11 +7386,13 @@ msgid "Move Down" msgstr "下に移動" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "次のスクリプト" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "直前のスクリプト" #: editor/plugins/script_editor_plugin.cpp @@ -7470,11 +7483,11 @@ msgstr "続行" #: editor/plugins/script_editor_plugin.cpp msgid "Keep Debugger Open" -msgstr "デバッガを開いたままにする" +msgstr "デバッガーを開いたままにする" #: editor/plugins/script_editor_plugin.cpp msgid "Debug with External Editor" -msgstr "外部エディタでデバッグ" +msgstr "外部エディターでデバッグ" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/shader_editor_plugin.cpp @@ -7511,7 +7524,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp msgid "Debugger" -msgstr "デバッガ" +msgstr "デバッガー" #: editor/plugins/script_editor_plugin.cpp msgid "Search Results" @@ -7738,21 +7751,19 @@ msgstr "ボーンからレストポーズを作成" #: editor/plugins/skeleton_2d_editor_plugin.cpp msgid "Set Rest Pose to Bones" -msgstr "ボーンへレスト・ポーズを設定する" +msgstr "ボーンへレストポーズを設定する" #: editor/plugins/skeleton_2d_editor_plugin.cpp msgid "Skeleton2D" msgstr "Skeleton2D" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Reset to Rest Pose" -msgstr "レスト・ポーズへボーンを設定する" +msgstr "レストポーズへリセット" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Overwrite Rest Pose" -msgstr "上書き" +msgstr "レストポーズを上書き" #: editor/plugins/skeleton_editor_plugin.cpp msgid "Create physical bones" @@ -7768,7 +7779,7 @@ msgstr "物理スケルトンを作成する" #: editor/plugins/skeleton_ik_editor_plugin.cpp msgid "Play IK" -msgstr "IK(Inverse kinematics)を実行する" +msgstr "IKを再生" #: editor/plugins/spatial_editor_plugin.cpp msgid "Orthogonal" @@ -7779,69 +7790,63 @@ msgid "Perspective" msgstr "透視投影" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Orthogonal" -msgstr "平行投影" +msgstr "上面 平行投影" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Perspective" -msgstr "透視投影" +msgstr "上面 透視投影" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Orthogonal" -msgstr "平行投影" +msgstr "下面 平行投影" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Perspective" -msgstr "透視投影" +msgstr "下面 透視投影" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Left Orthogonal" -msgstr "平行投影" +msgstr "左側面 平行投影" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "透視投影" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Right Orthogonal" -msgstr "平行投影" +msgstr "右側面 平行投影" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "右側面 透視投影" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Orthogonal" -msgstr "平行投影" +msgstr "正面 平行投影" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Perspective" -msgstr "透視投影" +msgstr "正面 透視投影" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Orthogonal" -msgstr "平行投影" +msgstr "後面 平行投影" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Perspective" -msgstr "透視投影" +msgstr "後面 透視投影" #. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled. #: editor/plugins/spatial_editor_plugin.cpp msgid " [auto]" -msgstr "" +msgstr " [自動]" #. 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 " [ポータル有効]" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Aborted." @@ -7980,7 +7985,7 @@ msgstr "子をインスタンス化するための親が見つかりません。 #: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp msgid "This operation requires a single selected node." -msgstr "単一の選択されたノードがないと、この操作は行えません。" +msgstr "この操作には選択されたノードが1つ必要です。" #: editor/plugins/spatial_editor_plugin.cpp msgid "Auto Orthogonal Enabled" @@ -8094,7 +8099,7 @@ msgid "" "Note: The FPS value displayed is the editor's framerate.\n" "It cannot be used as a reliable indication of in-game performance." msgstr "" -"注意: 表示されるFPS値は、エディタのフレームレートです。\n" +"注意: 表示されるFPS値は、エディターのフレームレートです。\n" "ゲーム内のパフォーマンスを確実に示すものとして使用することはできません。" #: editor/plugins/spatial_editor_plugin.cpp @@ -8134,7 +8139,7 @@ msgstr "ローカル空間を使用" #: editor/plugins/spatial_editor_plugin.cpp msgid "Use Snap" -msgstr "スナップを使う" +msgstr "スナップを使用" #: editor/plugins/spatial_editor_plugin.cpp msgid "Converts rooms for portal culling." @@ -8165,6 +8170,27 @@ msgid "Right View" msgstr "右側面図" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "前面図" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "透視投影 / 平行投影の切り替え" @@ -8238,9 +8264,8 @@ msgid "View Portal Culling" msgstr "ポータルカリングを表示" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "View Occlusion Culling" -msgstr "ポータルカリングを表示" +msgstr "オクルージョンカリングを表示" #: editor/plugins/spatial_editor_plugin.cpp #: modules/gridmap/grid_map_editor_plugin.cpp @@ -8253,7 +8278,7 @@ msgstr "スナップの設定" #: editor/plugins/spatial_editor_plugin.cpp msgid "Translate Snap:" -msgstr "スナップを移動:" +msgstr "スナップの移動:" #: editor/plugins/spatial_editor_plugin.cpp msgid "Rotate Snap (deg.):" @@ -8308,9 +8333,8 @@ msgid "Post" msgstr "後" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" -msgstr "名無しのプロジェクト" +msgstr "名無しのギズモ" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create Mesh2D" @@ -8634,7 +8658,7 @@ msgstr "アイテムをインポート中 {n}/{n}" #: editor/plugins/theme_editor_plugin.cpp msgid "Updating the editor" -msgstr "エディタをアップデート中" +msgstr "エディターをアップデート中" #: editor/plugins/theme_editor_plugin.cpp msgid "Finalizing" @@ -8642,7 +8666,7 @@ msgstr "終了処理中" #: editor/plugins/theme_editor_plugin.cpp msgid "Filter:" -msgstr "フィルタ:" +msgstr "フィルター:" #: editor/plugins/theme_editor_plugin.cpp msgid "With Data" @@ -8718,21 +8742,20 @@ msgid "" "Caution: Adding icon data may considerably increase the size of your Theme " "resource." msgstr "" -"注意: アイコンデータを追加するとテーマ リソースのサイズが大幅に増加します。" +"注意: アイコンデータを追加するとテーマリソースのサイズが大幅に増加する可能性" +"があります。" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Collapse types." -msgstr "すべて折りたたむ" +msgstr "タイプを折りたたむ" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Expand types." -msgstr "すべて展開" +msgstr "タイプを展開" #: editor/plugins/theme_editor_plugin.cpp msgid "Select all Theme items." -msgstr "すべてのテーマ アイテムを選択する。" +msgstr "すべてのテーマアイテムを選択する。" #: editor/plugins/theme_editor_plugin.cpp msgid "Select With Data" @@ -8740,7 +8763,7 @@ msgstr "データ付きで選択" #: editor/plugins/theme_editor_plugin.cpp msgid "Select all Theme items with item data." -msgstr "すべてのテーマ アイテムを、アイテムのデータ付きで選択する。" +msgstr "すべてのテーマアイテムを、アイテムのデータ付きで選択する。" #: editor/plugins/theme_editor_plugin.cpp msgid "Deselect All" @@ -8748,7 +8771,7 @@ msgstr "すべて選択解除" #: editor/plugins/theme_editor_plugin.cpp msgid "Deselect all Theme items." -msgstr "すべてのテーマ アイテムの選択を解除する。" +msgstr "すべてのテーマアイテムの選択を解除する。" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -8761,12 +8784,18 @@ msgid "" "closing this window.\n" "Close anyway?" msgstr "" +"アイテムのインポート タブでアイテムが選択されています。ウィンドウを閉じると選" +"択は失われます。\n" +"それでも閉じますか?" #: editor/plugins/theme_editor_plugin.cpp msgid "" "Select a theme type from the list to edit its items.\n" "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" @@ -8797,6 +8826,8 @@ msgid "" "This theme type is empty.\n" "Add more items to it manually or by importing from another theme." msgstr "" +"このテーマタイプは空です。\n" +"手動もしくは他のテーマからインポートして、アイテムを追加してください。" #: editor/plugins/theme_editor_plugin.cpp msgid "Add Color Item" @@ -8840,15 +8871,15 @@ msgstr "StyleBox アイテム名の変更" #: editor/plugins/theme_editor_plugin.cpp msgid "Invalid file, not a Theme resource." -msgstr "無効なファイルです。テーマ リソースではありません。" +msgstr "無効なファイルです。テーマリソースではありません。" #: editor/plugins/theme_editor_plugin.cpp msgid "Invalid file, same as the edited Theme resource." -msgstr "" +msgstr "無効なファイルです。編集済みのテーマリソースと同じです。" #: editor/plugins/theme_editor_plugin.cpp msgid "Manage Theme Items" -msgstr "テーマ アイテムの管理" +msgstr "テーマアイテムの管理" #: editor/plugins/theme_editor_plugin.cpp msgid "Edit Items" @@ -8876,11 +8907,11 @@ msgstr "アイテムを除去:" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove Class Items" -msgstr "クラスアイテム削除" +msgstr "クラスアイテムを除去" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove Custom Items" -msgstr "" +msgstr "カスタムアイテムを除去" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove All Items" @@ -8888,7 +8919,7 @@ msgstr "すべてのアイテムを除去" #: editor/plugins/theme_editor_plugin.cpp msgid "Add Theme Item" -msgstr "テーマ アイテムを追加" +msgstr "テーマアイテムを追加" #: editor/plugins/theme_editor_plugin.cpp msgid "Old Name:" @@ -8928,13 +8959,15 @@ msgstr "アイテムを上書き" #: editor/plugins/theme_editor_plugin.cpp msgid "Unpin this StyleBox as a main style." -msgstr "" +msgstr "このStyleBoxをメインスタイルから固定解除します。" #: editor/plugins/theme_editor_plugin.cpp msgid "" "Pin this StyleBox as a main style. Editing its properties will update the " "same properties in all other StyleBoxes of this type." msgstr "" +"このStyleBoxをメインスタイルに固定します。そのプロパティを編集すると、他すべ" +"てのこのタイプのStyleBoxで同じプロパティが更新されます。" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -8958,6 +8991,7 @@ msgstr "デフォルトの表示" #: editor/plugins/theme_editor_plugin.cpp msgid "Show default type items alongside items that have been overridden." msgstr "" +"デフォルトタイプのアイテムを、オーバーライドされたアイテムと一緒に表示する。" #: editor/plugins/theme_editor_plugin.cpp msgid "Override All" @@ -8965,7 +8999,7 @@ msgstr "すべて上書き" #: editor/plugins/theme_editor_plugin.cpp msgid "Override all default type items." -msgstr "" +msgstr "すべてのデフォルトタイプのアイテムをオーバーライドする。" #: editor/plugins/theme_editor_plugin.cpp msgid "Theme:" @@ -9085,6 +9119,7 @@ msgstr "Has,Many,Options" #: editor/plugins/theme_editor_preview.cpp msgid "Invalid path, the PackedScene resource was probably moved or removed." msgstr "" +"無効なパスです。おそらくPackedSceneリソースは移動または削除されています。" #: editor/plugins/theme_editor_preview.cpp msgid "Invalid PackedScene resource, must have a Control node at its root." @@ -9096,7 +9131,7 @@ msgstr "無効なファイルです。PackedScene のリソースではありま #: editor/plugins/theme_editor_preview.cpp msgid "Reload the scene to reflect its most actual state." -msgstr "" +msgstr "最も実際の状態を反映させるためにシーンをリロードします。" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Erase Selection" @@ -9347,7 +9382,7 @@ msgstr "領域 Rect 内のポリゴンを保持します。" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Enable snap and show grid (configurable via the Inspector)." -msgstr "スナップとグリッドの表示を有効にする (インスペクタから設定可能)。" +msgstr "スナップとグリッドの表示を有効にする (インスペクターから設定可能)。" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Display Tile Names (Hold Alt Key)" @@ -9373,7 +9408,7 @@ msgstr "除去するテクスチャが選択されていません。" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Create from scene? This will overwrite all current tiles." msgstr "" -"シーンから作成しますか?これにより、現在のすべてのタイルが上書きされます。" +"シーンから作成しますか?これにより、現在のすべてのタイルが上書きされます。" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Merge from scene?" @@ -9583,19 +9618,19 @@ msgstr "変更点" #: editor/plugins/version_control_editor_plugin.cpp msgid "Modified" -msgstr "変更された箇所" +msgstr "変更済み" #: editor/plugins/version_control_editor_plugin.cpp msgid "Renamed" -msgstr "名前の変更された" +msgstr "名前変更済み" #: editor/plugins/version_control_editor_plugin.cpp msgid "Deleted" -msgstr "削除された" +msgstr "削除済み" #: editor/plugins/version_control_editor_plugin.cpp msgid "Typechange" -msgstr "タイプの変更" +msgstr "タイプ変更" #: editor/plugins/version_control_editor_plugin.cpp msgid "Stage Selected" @@ -9611,7 +9646,7 @@ msgstr "変更をコミットする" #: editor/plugins/version_control_editor_plugin.cpp msgid "View file diffs before committing them to the latest version" -msgstr "最新のバージョンにコミットする前にファイルの差分を見る" +msgstr "最新のバージョンにコミットする前にファイルの差分を表示" #: editor/plugins/version_control_editor_plugin.cpp msgid "No file diff is active" @@ -9619,7 +9654,7 @@ msgstr "有効なファイル差分はありません" #: editor/plugins/version_control_editor_plugin.cpp msgid "Detect changes in file diff" -msgstr "ファイルの差分に変更を確認" +msgstr "ファイル差分の変更を検知" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "(GLES3 only)" @@ -9687,7 +9722,7 @@ msgstr "VisualShaderノードのサイズを変更" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Set Uniform Name" -msgstr "統一名を設定" +msgstr "Uniform名を設定" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Set Input Default Port" @@ -9792,7 +9827,7 @@ msgstr "Lighten演算子。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Overlay operator." -msgstr "オーバーレイ処理。" +msgstr "オーバーレイ演算子。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Screen operator." @@ -9812,7 +9847,7 @@ msgstr "Colorのuniform。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the boolean result of the %s comparison between two parameters." -msgstr "2つのパラメータ間の %s 比較のブール結果を返します。" +msgstr "2つのパラメーター間の %s 比較のブール結果を返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Equal (==)" @@ -9838,13 +9873,13 @@ msgstr "" msgid "" "Returns the boolean result of the comparison between INF and a scalar " "parameter." -msgstr "INFとスカラパラメータの比較の結果をブール値で返します。" +msgstr "INFとスカラーパラメーターの比較の結果をブール値で返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "Returns the boolean result of the comparison between NaN and a scalar " "parameter." -msgstr "NaNとスカラパラメータの比較の結果をブール値で返します。" +msgstr "NaNとスカラーパラメーターの比較の結果をブール値で返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Less Than (<)" @@ -9872,13 +9907,13 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the boolean result of the comparison between two parameters." -msgstr "2つのパラメータ間の比較の結果をブール値で返します。" +msgstr "2つのパラメーター間の比較の結果をブール値で返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "Returns the boolean result of the comparison between INF (or NaN) and a " "scalar parameter." -msgstr "INF(またはNaN)とスカラパラメータとの比較のブール結果を返します。" +msgstr "INF(またはNaN)とスカラパラメーターとの比較のブール結果を返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Boolean constant." @@ -9894,16 +9929,15 @@ msgstr "すべてのシェーダーモードの '%s' 入力パラメーター。 #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Input parameter." -msgstr "入力パラメータ。" +msgstr "入力パラメーター。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "'%s' input parameter for vertex and fragment shader modes." -msgstr "" -"'%s' は頂点シェーダーとフラグメントシェーダーのためのパラメータを入力します。" +msgstr "頂点、フラグメントシェーダーモード(複数)の '%s' 入力パラメーター。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "'%s' input parameter for fragment and light shader modes." -msgstr "フラグメントモードとライトシェーダーモードの '%s' 入力パラメーター。" +msgstr "フラグメント、ライトシェーダーモード(複数)の '%s' 入力パラメーター。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "'%s' input parameter for fragment shader mode." @@ -9911,16 +9945,15 @@ msgstr "フラグメントシェーダーモードの '%s' 入力パラメータ #: editor/plugins/visual_shader_editor_plugin.cpp msgid "'%s' input parameter for light shader mode." -msgstr "ライトシェーダーモードの '%s' 入力パラメータ。" +msgstr "ライトシェーダーモードの '%s' 入力パラメーター。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "'%s' input parameter for vertex shader mode." -msgstr "頂点シェーダーモードの '%s' 入力パラメータ。" +msgstr "頂点シェーダーモードの '%s' 入力パラメーター。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "'%s' input parameter for vertex and fragment shader mode." -msgstr "" -"頂点シェーダーモード、フラグメントシェーダーモードの '%s' 入力パラメータ。" +msgstr "頂点、フラグメントシェーダーモードの '%s' 入力パラメーター。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Scalar function." @@ -9964,40 +9997,40 @@ msgstr "Sqrt2定数(1.414214)。2の平方根。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the absolute value of the parameter." -msgstr "パラメータの絶対値を返します。" +msgstr "パラメーターの絶対値を返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the arc-cosine of the parameter." -msgstr "パラメータの逆コサインを返します。" +msgstr "パラメーターの逆コサインを返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the inverse hyperbolic cosine of the parameter." -msgstr "パラメータの逆双曲線余弦を返します。" +msgstr "パラメーターの逆双曲線余弦を返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the arc-sine of the parameter." -msgstr "パラメータの逆サインを返します。" +msgstr "パラメーターの逆サインを返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the inverse hyperbolic sine of the parameter." -msgstr "パラメータの双曲線逆サインを返します。" +msgstr "パラメーターの双曲線逆サインを返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the arc-tangent of the parameter." -msgstr "パラメータの逆タンジェントを返します。" +msgstr "パラメーターの逆タンジェントを返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the arc-tangent of the parameters." -msgstr "複数パラメータの逆タンジェントを返します。" +msgstr "複数パラメーターの逆タンジェントを返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the inverse hyperbolic tangent of the parameter." -msgstr "パラメータの双曲線逆タンジェントを返します。" +msgstr "パラメーターの双曲線逆タンジェントを返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "Finds the nearest integer that is greater than or equal to the parameter." -msgstr "パラメータ以上の最も近い整数を検索します。" +msgstr "パラメーターと等しいかより大きい、最も近い整数を求めます。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Constrains a value to lie between two further values." @@ -10005,11 +10038,11 @@ msgstr "値をさらに2つの値の間にあるように制約します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the cosine of the parameter." -msgstr "パラメータのコサインを返します。" +msgstr "パラメーターのコサインを返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the hyperbolic cosine of the parameter." -msgstr "パラメータの双曲線コサインを返します。" +msgstr "パラメーターの双曲線コサインを返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Converts a quantity in radians to degrees." @@ -10025,7 +10058,7 @@ msgstr "2を底とする指数。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Finds the nearest integer less than or equal to the parameter." -msgstr "パラメータ以下の最も近い整数を検索します。" +msgstr "パラメーターと等しいかより小さい、最も近い整数を求めます。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Computes the fractional part of the argument." @@ -10033,7 +10066,7 @@ msgstr "引数の小数部を計算します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the inverse of the square root of the parameter." -msgstr "パラメータの平方根の逆数を返します。" +msgstr "パラメーターの平方根の逆数を返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Natural logarithm." @@ -10053,11 +10086,11 @@ msgstr "2つの値のうち小さい方を返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Linear interpolation between two scalars." -msgstr "2つのスカラ間のリニア補間。" +msgstr "2つのスカラー間のリニア補間。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the opposite value of the parameter." -msgstr "パラメータの反対の値を返します。" +msgstr "パラメーターの反対の値を返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "1.0 - scalar" @@ -10066,7 +10099,7 @@ msgstr "1.0 - スカラー" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "Returns the value of the first parameter raised to the power of the second." -msgstr "最初のパラメータの値を2のべき乗で返した値を返します。" +msgstr "最初のパラメーターの値を2のべき乗で返した値を返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Converts a quantity in degrees to radians." @@ -10078,11 +10111,11 @@ msgstr "1.0 / スカラー" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Finds the nearest integer to the parameter." -msgstr "パラメータに最も近い整数を検索します。" +msgstr "パラメーターに最も近い整数を求めます。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Finds the nearest even integer to the parameter." -msgstr "パラメータに最も近い偶数の整数を検索します。" +msgstr "パラメーターに最も近い偶数の整数を求めます。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Clamps the value between 0.0 and 1.0." @@ -10090,19 +10123,19 @@ msgstr "値を0.0から1.0の間に固定します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Extracts the sign of the parameter." -msgstr "パラメータの符号を抽出します。" +msgstr "パラメーターの符号を抽出します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the sine of the parameter." -msgstr "パラメータのサインを返します。" +msgstr "パラメーターのサインを返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the hyperbolic sine of the parameter." -msgstr "パラメータの双曲サインを返します。" +msgstr "パラメーターの双曲サインを返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the square root of the parameter." -msgstr "パラメータの平方根を返します。" +msgstr "パラメーターの平方根を返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -10130,15 +10163,15 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the tangent of the parameter." -msgstr "パラメータのタンジェントを返します。" +msgstr "パラメーターのタンジェントを返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the hyperbolic tangent of the parameter." -msgstr "パラメータの双曲タンジェントを返します。" +msgstr "パラメーターの双曲タンジェントを返します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Finds the truncated value of the parameter." -msgstr "パラメータのトランケートされた値を検索します。" +msgstr "パラメーターを切り捨てた値を求めます。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Adds scalar to scalar." @@ -10204,10 +10237,10 @@ msgid "" msgstr "" "ベクトルのペアの外積を計算します。\n" "\n" -"OuterProductは、最初のパラメータ 'c' を列ベクトル(1列の行列)として、2番目のパ" -"ラメータ 'r' を行ベクトル(1行の行列)として処理し、線形代数行列乗算 'c * r' を" -"実行して、行の数が 'c' のコンポーネントの数で、列の数が 'r' のコンポーネント" -"の数である行列を生成します。" +"OuterProductは、最初のパラメーター 'c' を列ベクトル(1列の行列)として、2番目の" +"パラメータ 'r' を行ベクトル(1行の行列)として処理し、線形代数行列乗算 'c * r' " +"を実行して、行の数が 'c' のコンポーネントの数で、列の数が 'r' のコンポーネン" +"トの数である行列を生成します。" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Composes transform from four vectors." @@ -10421,8 +10454,8 @@ msgid "" "it later in the Expressions. You can also declare varyings, uniforms and " "constants." msgstr "" -"カスタムGodotシェーダー言語の表現は、シェーディング結果の最後に位置します。" -"様々な関数をその中で定義し、表現の中で呼び出すことができます。またvarying変" +"カスタムGodotシェーダー言語の表現は、シェーディング結果の最後に位置します。さ" +"まざまな関数をその中で定義し、表現の中で呼び出すことができます。またvarying変" "数、uniform変数、定数を宣言することができます。" #: editor/plugins/visual_shader_editor_plugin.cpp @@ -10552,8 +10585,8 @@ msgid "" "If checked, the preset will be available for use in one-click deploy.\n" "Only one preset per platform may be marked as runnable." msgstr "" -"チェックを入れると、1クリック・デプロイでもこのプリセットが使われるようにな" -"ります。\n" +"チェックを入れると、ワンクリック・デプロイでもこのプリセットが使われるように" +"なります。\n" "ひとつのプラットフォームに対し、ひとつのプリセットのみが実行可能としてマーク" "できます。" @@ -10590,7 +10623,7 @@ msgid "" "Filters to export non-resource files/folders\n" "(comma-separated, e.g: *.json, *.txt, docs/*)" msgstr "" -"リソース以外のファイル/フォルダをエクスポートするためのフィルタ\n" +"リソース以外のファイル/フォルダーをエクスポートするためのフィルター\n" "(コンマ区切り、 例: *.json, *.txt, docs/*)" #: editor/project_export.cpp @@ -10598,7 +10631,7 @@ msgid "" "Filters to exclude files/folders from project\n" "(comma-separated, e.g: *.json, *.txt, docs/*)" msgstr "" -"プロジェクトからファイル/フォルダを除外するフィルタ\n" +"プロジェクトからファイル/フォルダーを除外するフィルター\n" "(コンマ区切り、 例: *.json, *.txt, docs/*)" #: editor/project_export.cpp @@ -10631,7 +10664,7 @@ msgstr "コンパイルされたバイトコード (より高速なローディ #: editor/project_export.cpp msgid "Encrypted (Provide Key Below)" -msgstr "暗号化(下にキーを入力)" +msgstr "暗号化 (下にキーを入力)" #: editor/project_export.cpp msgid "Invalid Encryption Key (must be 64 hexadecimal characters long)" @@ -10651,7 +10684,7 @@ msgstr "プロジェクトのエクスポート" #: editor/project_export.cpp msgid "Export mode?" -msgstr "エクスポート モード?" +msgstr "エクスポートのモードは?" #: editor/project_export.cpp msgid "Export All" @@ -10695,7 +10728,7 @@ msgstr "" #: editor/project_manager.cpp msgid "Please choose an empty folder." -msgstr "空のフォルダを選択してください。" +msgstr "空のフォルダーを選択してください。" #: editor/project_manager.cpp msgid "Please choose a \"project.godot\" or \".zip\" file." @@ -10719,11 +10752,11 @@ msgstr "無効なプロジェクト名です。" #: editor/project_manager.cpp msgid "Couldn't create folder." -msgstr "フォルダを作成できませんでした。" +msgstr "フォルダーを作成できませんでした。" #: editor/project_manager.cpp msgid "There is already a folder in this path with the specified name." -msgstr "このパスには、指定された名前のフォルダが既に存在します。" +msgstr "このパスには、指定された名前のフォルダーがすでに存在します。" #: editor/project_manager.cpp msgid "It would be a good idea to name your project." @@ -10811,7 +10844,7 @@ msgstr "OpenGL ES 3.0" #: editor/project_manager.cpp msgid "Not supported by your GPU drivers." -msgstr "お使いのGPUドライバではサポートされていません。" +msgstr "お使いのGPUドライバーではサポートされていません。" #: editor/project_manager.cpp msgid "" @@ -10856,7 +10889,7 @@ msgstr "プロジェクトがありません" #: editor/project_manager.cpp msgid "Error: Project is missing on the filesystem." -msgstr "エラー: プロジェクトはファイルシステムを見つけられません。" +msgstr "エラー: ファイルシステム上にプロジェクトが見つかりません。" #: editor/project_manager.cpp msgid "Can't open project at '%s'." @@ -10949,7 +10982,7 @@ msgid "" "The project folders' contents won't be modified." msgstr "" "見つからないすべてのプロジェクトを一覧から削除しますか?\n" -"プロジェクトフォルダの内容は変更されません。" +"プロジェクトフォルダーの内容は変更されません。" #: editor/project_manager.cpp msgid "" @@ -10957,15 +10990,15 @@ msgid "" "The interface will update after restarting the editor or project manager." msgstr "" "言語が変更されました。\n" -"エディタまたはプロジェクトマネージャーの再起動後にインターフェースが更新され" -"ます。" +"エディターまたはプロジェクトマネージャーの再起動後にインターフェースが更新さ" +"れます。" #: editor/project_manager.cpp msgid "" "Are you sure to scan %s folders for existing Godot projects?\n" "This could take a while." msgstr "" -"既存のGodotプロジェクトの%sフォルダをスキャンしますか?\n" +"%s個のフォルダー内に存在するGodotプロジェクトをスキャンしますか?\n" "これにはしばらく時間がかかります。" #. TRANSLATORS: This refers to the application where users manage their Godot projects. @@ -10975,7 +11008,7 @@ msgstr "プロジェクトマネージャー" #: editor/project_manager.cpp msgid "Local Projects" -msgstr "ローカル プロジェクト" +msgstr "ローカルのプロジェクト" #: editor/project_manager.cpp msgid "Loading, please wait..." @@ -11003,7 +11036,7 @@ msgstr "プロジェクトをスキャン" #: editor/project_manager.cpp msgid "Select a Folder to Scan" -msgstr "スキャンするフォルダを選択" +msgstr "スキャンするフォルダーを選択" #: editor/project_manager.cpp msgid "New Project" @@ -11039,7 +11072,7 @@ msgstr "すべて除去" #: editor/project_manager.cpp msgid "Also delete project contents (no undo!)" -msgstr "プロジェクトの内容も削除されます (もとに戻せません!)" +msgstr "プロジェクトの内容も削除する (もとに戻せません!)" #: editor/project_manager.cpp msgid "Can't run project" @@ -11055,7 +11088,7 @@ msgstr "" #: editor/project_manager.cpp msgid "Filter projects" -msgstr "プロジェクトのフィルタ" +msgstr "プロジェクトを絞り込む" #: editor/project_manager.cpp msgid "" @@ -11074,7 +11107,7 @@ msgstr "キー " #: editor/project_settings_editor.cpp msgid "Physical Key" -msgstr "" +msgstr "物理キー" #: editor/project_settings_editor.cpp msgid "Joy Button" @@ -11098,7 +11131,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "An action with the name '%s' already exists." -msgstr "'%s' という名前のアクションが既に存在します。" +msgstr "'%s' という名前のアクションがすでに存在します。" #: editor/project_settings_editor.cpp msgid "Rename Input Action Event" @@ -11122,7 +11155,7 @@ msgstr "デバイス" #: editor/project_settings_editor.cpp msgid " (Physical)" -msgstr "" +msgstr " (物理的)" #: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Press a Key..." @@ -11174,7 +11207,7 @@ msgstr "ジョイパッドの方向キー/スティックのインデックス:" #: editor/project_settings_editor.cpp msgid "Axis" -msgstr "アナログ" +msgstr "軸" #: editor/project_settings_editor.cpp msgid "Joypad Button Index:" @@ -11241,8 +11274,8 @@ msgid "" "Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'." msgstr "" -"無効なアクション名です。空もしくは'/'、':'、'='、'\\' 、'\"'を含めることはで" -"きません。" +"無効なアクション名です。空もしくは'/'、':'、'='、'\\'、'\"'を含めることはでき" +"ません。" #: editor/project_settings_editor.cpp msgid "Add Input Action" @@ -11296,11 +11329,11 @@ msgstr "リソース再マップオプションを削除" #: editor/project_settings_editor.cpp msgid "Changed Locale Filter" -msgstr "ロケールフィルタの変更" +msgstr "ロケールフィルターの変更" #: editor/project_settings_editor.cpp msgid "Changed Locale Filter Mode" -msgstr "ロケールフィルタモードの変更" +msgstr "ロケールフィルターモードの変更" #: editor/project_settings_editor.cpp msgid "Project Settings (project.godot)" @@ -11316,7 +11349,7 @@ msgstr "上書きします..." #: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "The editor must be restarted for changes to take effect." -msgstr "変更を有効にするには、エディタを再起動する必要があります。" +msgstr "変更を有効にするには、エディターを再起動する必要があります。" #: editor/project_settings_editor.cpp msgid "Input Map" @@ -11372,7 +11405,7 @@ msgstr "ロケール" #: editor/project_settings_editor.cpp msgid "Locales Filter" -msgstr "ロケールフィルタ" +msgstr "ロケールフィルター" #: editor/project_settings_editor.cpp msgid "Show All Locales" @@ -11384,7 +11417,7 @@ msgstr "選択したロケールのみ表示" #: editor/project_settings_editor.cpp msgid "Filter mode:" -msgstr "フィルタモード:" +msgstr "フィルターモード:" #: editor/project_settings_editor.cpp msgid "Locales:" @@ -11511,8 +11544,8 @@ msgid "" "Sequential integer counter.\n" "Compare counter options." msgstr "" -"シーケンシャル整数カウンタ。\n" -"カウンタオプションを比較します。" +"シーケンシャル整数カウンター。\n" +"カウンターオプションを比較します。" #: editor/rename_dialog.cpp msgid "Per-level Counter" @@ -11520,11 +11553,11 @@ msgstr "レベルごとのカウンター" #: editor/rename_dialog.cpp msgid "If set, the counter restarts for each group of child nodes." -msgstr "設定すると、子ノードのグループごとにカウンタが再起動します。" +msgstr "設定すると、子ノードのグループごとにカウンターが再起動します。" #: editor/rename_dialog.cpp msgid "Initial value for the counter" -msgstr "カウンタの初期値" +msgstr "カウンターの初期値" #: editor/rename_dialog.cpp msgid "Step" @@ -11532,7 +11565,7 @@ msgstr "ステップ" #: editor/rename_dialog.cpp msgid "Amount by which counter is incremented for each node" -msgstr "各ノードのカウンタの増分量" +msgstr "各ノードのカウンターの増分量" #: editor/rename_dialog.cpp msgid "Padding" @@ -11543,7 +11576,7 @@ msgid "" "Minimum number of digits for the counter.\n" "Missing digits are padded with leading zeros." msgstr "" -"カウンタの最小桁数。\n" +"カウンターの最小桁数。\n" "欠落した数字は、先頭にゼロが埋め込まれます。" #: editor/rename_dialog.cpp @@ -11701,11 +11734,11 @@ msgstr "ノードをルートにする" #: editor/scene_tree_dock.cpp msgid "Delete %d nodes and any children?" -msgstr "%d ノードとその子ノードすべてを削除しますか?" +msgstr "%d個のノードとその子ノードすべてを削除しますか?" #: editor/scene_tree_dock.cpp msgid "Delete %d nodes?" -msgstr "%d ノードを削除しますか?" +msgstr "%d個のノードを削除しますか?" #: editor/scene_tree_dock.cpp msgid "Delete the root node \"%s\"?" @@ -11723,8 +11756,8 @@ msgstr "\"%s\" ノードを削除しますか?" msgid "" "Saving the branch as a scene requires having a scene open in the editor." msgstr "" -"ブランチをシーンとして保存するには、エディタでシーンを開いている必要がありま" -"す。" +"ブランチをシーンとして保存するには、エディターでシーンを開いている必要があり" +"ます。" #: editor/scene_tree_dock.cpp msgid "" @@ -11741,6 +11774,11 @@ msgid "" "FileSystem dock context menu\n" "or create an inherited scene using Scene > New Inherited Scene... instead." msgstr "" +"ルートノードのブランチはインスタンス化されたシーンとして保存できません。\n" +"現在のシーンの編集可能なコピーを作成するには、FileSystemドックのコンテキスト" +"メニューを使用して複製するか、\n" +"代わりに シーン > 新しい継承シーン... を使用して継承シーンを作成してくださ" +"い。" #: editor/scene_tree_dock.cpp msgid "" @@ -11748,6 +11786,9 @@ msgid "" "To create a variation of a scene, you can make an inherited scene based on " "the instanced scene using Scene > New Inherited Scene... instead." msgstr "" +"すでにインスタンス化されているシーンのブランチは保存できません。\n" +"そのシーンのバリエーションを作成するには、代わりにインスタンス化されたシーン" +"をベースに シーン > 新しい継承シーン... から継承シーンを作成してください。" #: editor/scene_tree_dock.cpp msgid "Save New Scene As..." @@ -11864,7 +11905,7 @@ msgid "" "disabled." msgstr "" "スクリプトをアタッチできません: 言語がひとつも登録されていません。\n" -"おそらくこのエディタは、すべての言語モジュールを無効化してビルドされていま" +"おそらくこのエディターは、すべての言語モジュールを無効化してビルドされていま" "す。" #: editor/scene_tree_dock.cpp @@ -11933,6 +11974,10 @@ msgid "" "every time it updates.\n" "Switch back to the Local scene tree dock to improve performance." msgstr "" +"選択した場合、リモートのシーンツリードックが更新されるたびに、プロジェクトに" +"カクつきが発生します。\n" +"パフォーマンスを向上させるには、ローカルのシーンツリードックに切り替えてくだ" +"さい。" #: editor/scene_tree_dock.cpp msgid "Local" @@ -11996,7 +12041,7 @@ msgid "" "Click to unlock it." msgstr "" "ノードはロックされています。\n" -"クリックしてロックを外してください。" +"クリックでロックを外す。" #: editor/scene_tree_editor.cpp msgid "" @@ -12020,7 +12065,7 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "Invalid node name, the following characters are not allowed:" -msgstr "不正なノード名.以下の文字は使えません:" +msgstr "無効なノード名。以下の文字は使えません:" #: editor/scene_tree_editor.cpp msgid "Rename Node" @@ -12056,7 +12101,7 @@ msgstr "無効なベースパスです。" #: editor/script_create_dialog.cpp msgid "A directory with the same name exists." -msgstr "同名のフォルダが存在します。" +msgstr "同名のフォルダーが存在します。" #: editor/script_create_dialog.cpp msgid "File does not exist." @@ -12100,7 +12145,7 @@ msgstr "スクリプトを開く" #: editor/script_create_dialog.cpp msgid "File exists, it will be reused." -msgstr "ファイルが既に存在します。そちらを再利用します。" +msgstr "ファイルがすでに存在します。そちらを再利用します。" #: editor/script_create_dialog.cpp msgid "Invalid path." @@ -12108,7 +12153,7 @@ msgstr "パスが無効です。" #: editor/script_create_dialog.cpp msgid "Invalid class name." -msgstr "無効なクラス名。" +msgstr "無効なクラス名です。" #: editor/script_create_dialog.cpp msgid "Invalid inherited parent name or path." @@ -12120,7 +12165,7 @@ msgstr "スクリプトのパス/名前は有効です。" #: editor/script_create_dialog.cpp msgid "Allowed: a-z, A-Z, 0-9, _ and ." -msgstr "使用可能: a-z、A-Z、0-9、_ 及び ." +msgstr "使用可能: a-z、A-Z、0-9、_ および ." #: editor/script_create_dialog.cpp msgid "Built-in script (into scene file)." @@ -12132,26 +12177,27 @@ msgstr "新規スクリプトファイルを作成。" #: editor/script_create_dialog.cpp msgid "Will load an existing script file." -msgstr "既存のスクリプトファイルを読み込む。" +msgstr "既存のスクリプトファイルが読み込まれます。" #: editor/script_create_dialog.cpp msgid "Script file already exists." -msgstr "スクリプトファイルが既にあります。" +msgstr "スクリプトファイルがすでに存在します。" #: editor/script_create_dialog.cpp msgid "" "Note: Built-in scripts have some limitations and can't be edited using an " "external editor." msgstr "" -"注: 組み込みスクリプトにはいくつか制約があり、また外部のエディタでは編集でき" -"ません。" +"注: 組み込みスクリプトにはいくつか制約があり、また外部のエディターでは編集で" +"きません。" #: editor/script_create_dialog.cpp msgid "" "Warning: Having the script name be the same as a built-in type is usually " "not desired." msgstr "" -"警告: スクリプト名を組み込み型と同じにすることは、通常は望ましくありません。" +"警告: スクリプト名を組み込み型の名前と同じにすることは、通常は望ましくありま" +"せん。" #: editor/script_create_dialog.cpp msgid "Class Name:" @@ -12279,7 +12325,7 @@ msgstr "合計:" #: editor/script_editor_debugger.cpp msgid "Export list to a CSV file" -msgstr "CSVファイルにリストをエクスポート" +msgstr "リストをCSVファイルにエクスポート" #: editor/script_editor_debugger.cpp msgid "Resource Path" @@ -12335,7 +12381,7 @@ msgstr "ショートカットを変更" #: editor/settings_config_dialog.cpp msgid "Editor Settings" -msgstr "エディタ設定" +msgstr "エディター設定" #: editor/settings_config_dialog.cpp msgid "Shortcuts" @@ -12702,9 +12748,8 @@ msgid "Class name can't be a reserved keyword" msgstr "クラス名を予約キーワードにすることはできません" #: modules/mono/csharp_script.cpp -#, fuzzy msgid "Build Solution" -msgstr "選択部の塗り潰し" +msgstr "ソリューションをビルド" #: modules/mono/mono_gd/gd_mono_utils.cpp msgid "End of inner exception stack trace" @@ -12716,7 +12761,7 @@ msgstr "NavMeshを焼き込む" #: modules/recast/navigation_mesh_editor_plugin.cpp msgid "Clear the navigation mesh." -msgstr "ナビメッシュ(ナビゲーションメッシュ)の消去。" +msgstr "ナビゲーションメッシュの消去。" #: modules/recast/navigation_mesh_generator.cpp msgid "Setting up Configuration..." @@ -12760,7 +12805,7 @@ msgstr "ネイティブナビゲーションメッシュに変換しています #: modules/recast/navigation_mesh_generator.cpp msgid "Navigation Mesh Generator Setup:" -msgstr "ナビメッシュ(ナビゲーションメッシュ)生成設定:" +msgstr "ナビゲーションメッシュ生成設定:" #: modules/recast/navigation_mesh_generator.cpp msgid "Parsing Geometry..." @@ -12790,17 +12835,17 @@ msgid "" "Return value must be assigned to first element of node working memory! Fix " "your node please." msgstr "" -"戻り値はノードの作業用メモリの最初の要素に割り当てなければなりません!ノードを" -"修正してください。" +"戻り値はノードの作業用メモリの最初の要素に割り当てなければなりません!ノード" +"を修正してください。" #: modules/visual_script/visual_script.cpp msgid "Node returned an invalid sequence output: " -msgstr "ノードは無効なシークエンス出力を返しました: " +msgstr "ノードは無効なシーケンス出力を返しました: " #: modules/visual_script/visual_script.cpp msgid "Found sequence bit but not the node in the stack, report bug!" msgstr "" -"スタックにシークエンスビットを見つけましたが、ノードではありません。バグ報告" +"スタックにシーケンスビットを見つけましたが、ノードではありません。バグ報告" "を!" #: modules/visual_script/visual_script.cpp @@ -12845,7 +12890,7 @@ msgstr "ポート名を変更" #: modules/visual_script/visual_script_editor.cpp msgid "Override an existing built-in function." -msgstr "既存の組込み関数をオーバーライド。" +msgstr "既存の組み込み関数をオーバーライド。" #: modules/visual_script/visual_script_editor.cpp msgid "Create a new function." @@ -12873,7 +12918,7 @@ msgstr "この名前は無効な識別子です:" #: modules/visual_script/visual_script_editor.cpp msgid "Name already in use by another func/var/signal:" -msgstr "他の関数/変数/シグナルにより既に使われている名前:" +msgstr "他の関数/変数/シグナルによりすでに使われている名前:" #: modules/visual_script/visual_script_editor.cpp msgid "Rename Function" @@ -12885,7 +12930,7 @@ msgstr "変数名を変更" #: modules/visual_script/visual_script_editor.cpp msgid "Rename Signal" -msgstr "シグナルの名前を変える" +msgstr "シグナル名を変更" #: modules/visual_script/visual_script_editor.cpp msgid "Add Function" @@ -12926,8 +12971,8 @@ msgstr "VisualScriptノードを複製" #: modules/visual_script/visual_script_editor.cpp msgid "Hold %s to drop a Getter. Hold Shift to drop a generic signature." msgstr "" -"%sを押したままGetterを(ドラッグ&)ドロップする。Shiftを押したまま汎用署名を" -"(ドラッグ&)ドロップする。" +"%sを押したままGetterを(ドラッグ&)ドロップする。Shiftを押したまま汎用シグネ" +"チャを(ドラッグ&)ドロップする。" #: modules/visual_script/visual_script_editor.cpp msgid "Hold Ctrl to drop a Getter. Hold Shift to drop a generic signature." @@ -12971,8 +13016,8 @@ msgid "" "Can't drop properties because script '%s' is not used in this scene.\n" "Drop holding 'Shift' to just copy the signature." msgstr "" -"このシーンではスクリプト '%s'が使用されていないため、プロパティを削除できませ" -"ん。\n" +"このシーンではスクリプト '%s'が使用されていないため、プロパティをドロップでき" +"ません。\n" "「Shift」を押しながらドロップすると、署名がコピーされます。" #: modules/visual_script/visual_script_editor.cpp @@ -13013,7 +13058,7 @@ msgstr "ノードシーケンスに接続" #: modules/visual_script/visual_script_editor.cpp msgid "Script already has function '%s'" -msgstr "スクリプトに関数 '%s'が既にあります" +msgstr "スクリプトに関数 '%s'がすでに存在します" #: modules/visual_script/visual_script_editor.cpp msgid "Change Input Value" @@ -13044,6 +13089,7 @@ msgid "Select at least one node with sequence port." msgstr "シーケンス ポートを持つノードを少なくとも 1 つ選択します。" #: modules/visual_script/visual_script_editor.cpp +#, fuzzy msgid "Try to only have one sequence input in selection." msgstr "セクションでは唯一つのシーケンス入力を持つようにしてください。" @@ -13129,11 +13175,11 @@ msgstr "メンバーを編集" #: modules/visual_script/visual_script_flow_control.cpp msgid "Input type not iterable: " -msgstr "入力タイプを反復できません: " +msgstr "入力タイプは反復可能ではありません: " #: modules/visual_script/visual_script_flow_control.cpp msgid "Iterator became invalid" -msgstr "イテレータが無効になりました" +msgstr "イテレーターが無効になりました" #: modules/visual_script/visual_script_flow_control.cpp msgid "Iterator became invalid: " @@ -13180,8 +13226,8 @@ msgid "" "Invalid return value from _step(), must be integer (seq out), or string " "(error)." msgstr "" -"_step()の無効な戻り値 integer (seq out)またはstring (error)でないといけませ" -"ん。" +"_step()の戻り値が無効です。integer (seq out)またはstring (error)でなければな" +"りません。" #: modules/visual_script/visual_script_property_selector.cpp msgid "Search VisualScript" @@ -13264,16 +13310,20 @@ msgid "" "Either Debug Keystore, Debug User AND Debug Password settings must be " "configured OR none of them." msgstr "" +"Debug Keystore, Debug User, Debug Passwordは、すべて設定されているか、すべて" +"空である必要があります。" #: platform/android/export/export_plugin.cpp msgid "Debug keystore not configured in the Editor Settings nor in the preset." -msgstr "デバッグキーストアがエディタ設定にもプリセットにも設定されていません。" +msgstr "Debug Keystoreがエディター設定にもプリセットにも設定されていません。" #: platform/android/export/export_plugin.cpp msgid "" "Either Release Keystore, Release User AND Release Password settings must be " "configured OR none of them." msgstr "" +"Release Keystore, Release User, Release Passwordは、すべて設定されているか、" +"すべて空である必要があります。" #: platform/android/export/export_plugin.cpp msgid "Release keystore incorrectly configured in the export preset." @@ -13281,11 +13331,11 @@ msgstr "エクスポート設定にてリリース キーストアが誤って #: platform/android/export/export_plugin.cpp msgid "A valid Android SDK path is required in Editor Settings." -msgstr "エディタ設定でAndroid SDKパスの指定が必要です。" +msgstr "エディター設定でAndroid SDKパスの指定が必要です。" #: platform/android/export/export_plugin.cpp msgid "Invalid Android SDK path in Editor Settings." -msgstr "エディタ設定のAndroid SDKパスが無効です。" +msgstr "エディター設定のAndroid SDKパスが無効です。" #: platform/android/export/export_plugin.cpp msgid "Missing 'platform-tools' directory!" @@ -13297,7 +13347,8 @@ msgstr "Android SDK platform-toolsのadbコマンドが見つかりません。" #: platform/android/export/export_plugin.cpp msgid "Please check in the Android SDK directory specified in Editor Settings." -msgstr "エディタ設定で指定されたAndroid SDKのディレクトリを確認してください。" +msgstr "" +"エディター設定で指定されたAndroid SDKのディレクトリを確認してください。" #: platform/android/export/export_plugin.cpp msgid "Missing 'build-tools' directory!" @@ -13383,8 +13434,7 @@ msgstr "Android用にエクスポート中" #: platform/android/export/export_plugin.cpp msgid "Invalid filename! Android App Bundle requires the *.aab extension." -msgstr "" -"無効なファイル名です! Android App Bundle には拡張子 *.aab が必要です。" +msgstr "無効なファイル名です!Android App Bundle には拡張子 *.aab が必要です。" #: platform/android/export/export_plugin.cpp msgid "APK Expansion not compatible with Android App Bundle." @@ -13423,6 +13473,7 @@ msgstr "" msgid "" "Unable to overwrite res://android/build/res/*.xml files with project name" msgstr "" +"res://android/build/res/*.xml ファイルをプロジェクト名で上書きできません。" #: platform/android/export/export_plugin.cpp msgid "Could not export project files to gradle project\n" @@ -13481,6 +13532,10 @@ msgid "" "Please build a template with all required libraries, or uncheck the missing " "architectures in the export preset." msgstr "" +"選択されたアーキテクチャ: %s のエクスポートテンプレートのライブラリが不足して" +"います。\n" +"必要なライブラリをすべて含むテンプレートを作成するか、エクスポートのプリセッ" +"トで、不足しているアーキテクチャのチェックを外してください。" #: platform/android/export/export_plugin.cpp msgid "Adding files..." @@ -13496,7 +13551,7 @@ msgstr "APKを最適化..." #: platform/android/export/export_plugin.cpp msgid "Could not unzip temporary unaligned APK." -msgstr "" +msgstr "temporary unaligned APKを展開できませんでした。" #: platform/iphone/export/export.cpp platform/osx/export/export.cpp msgid "Identifier is missing." @@ -13604,35 +13659,38 @@ msgstr "無効な背景色です。" #: platform/uwp/export/export.cpp msgid "Invalid Store Logo image dimensions (should be 50x50)." -msgstr "Storeロゴの画像サイズが無効です(縦横50x50でないといけません)。" +msgstr "Storeロゴの画像サイズが無効です(縦横50x50でなければなりません)。" #: platform/uwp/export/export.cpp msgid "Invalid square 44x44 logo image dimensions (should be 44x44)." -msgstr "44X44の正方形ロゴの画像サイズが無効です(縦横44x44でないといけません)。" +msgstr "" +"44X44の正方形ロゴの画像サイズが無効です(縦横44x44でなければなりません)。" #: platform/uwp/export/export.cpp msgid "Invalid square 71x71 logo image dimensions (should be 71x71)." -msgstr "71x71の正方形ロゴの画像サイズが無効です(縦横71x71でないといけません)。" +msgstr "" +"71x71の正方形ロゴの画像サイズが無効です(縦横71x71でなければなりません)。" #: platform/uwp/export/export.cpp msgid "Invalid square 150x150 logo image dimensions (should be 150x150)." msgstr "" -"150X150の正方形ロゴの画像サイズが無効です(縦横150x150でないといけません)。" +"150X150の正方形ロゴの画像サイズが無効です(縦横150x150でなければなりません)。" #: platform/uwp/export/export.cpp msgid "Invalid square 310x310 logo image dimensions (should be 310x310)." msgstr "" -"310X310の正方形ロゴの画像サイズが無効です(縦横310x310でないといけません)。" +"310X310の正方形ロゴの画像サイズが無効です(縦横310x310でなければなりません)。" #: platform/uwp/export/export.cpp msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)." msgstr "" -"310X150のワイドロゴの画像サイズが無効です(縦横310x150でないといけません)。" +"310X150のワイドロゴの画像サイズが無効です(縦横310x150でなければなりません)。" #: platform/uwp/export/export.cpp msgid "Invalid splash screen image dimensions (should be 620x300)." msgstr "" -"スプラッシュスクリーンの画像サイズが無効です(縦横620x300でないといけません)。" +"スプラッシュスクリーンの画像サイズが無効です(縦横620x300でなければなりませ" +"ん)。" #: scene/2d/animated_sprite.cpp msgid "" @@ -13679,10 +13737,12 @@ msgstr "空の CollisionPolygon2D は、衝突判定を持ちません。" #: scene/2d/collision_polygon_2d.cpp msgid "Invalid polygon. At least 3 points are needed in 'Solids' build mode." msgstr "" +"無効なポリゴンです。'Solids' ビルドモードでは最低3つのポイントが必要です。" #: scene/2d/collision_polygon_2d.cpp msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +"無効なポリゴンです。'Segments' ビルドモードでは最低2つのポイントが必要です。" #: scene/2d/collision_shape_2d.cpp msgid "" @@ -13699,8 +13759,8 @@ msgid "" "A shape must be provided for CollisionShape2D to function. Please create a " "shape resource for it!" msgstr "" -"関数に対して CollisionShape2D の形状 (シェイプ) を指定する必要があります。そ" -"のためのシェイプリソースを作成してください!" +"CollisionShape2D が機能するにはシェイプを指定する必要があります。そのための" +"シェイプリソースを作成してください!" #: scene/2d/collision_shape_2d.cpp msgid "" @@ -13749,8 +13809,8 @@ msgstr "" msgid "" "An occluder polygon must be set (or drawn) for this occluder to take effect." msgstr "" -"この遮蔽を有効にして、オクルーダ ポリゴンを設定 (または描画) する必要がありま" -"す。" +"この遮蔽を有効にして、オクルーダーポリゴンを設定 (または描画) する必要があり" +"ます。" #: scene/2d/light_occluder_2d.cpp msgid "The occluder polygon for this occluder is empty. Please draw a polygon." @@ -13785,7 +13845,8 @@ msgid "" "Use the CPUParticles2D node instead. You can use the \"Convert to " "CPUParticles\" option for this purpose." msgstr "" -"GPUベースのパーティクルは、GLES2ビデオドライバではサポートされていません。\n" +"GPUベースのパーティクルは、GLES2ビデオドライバーではサポートされていませ" +"ん。\n" "代わりにCPUParticles2Dノードを使用してください。この目的のために \"CPUパー" "ティクルに変換\" オプションを使用できます。" @@ -13818,7 +13879,7 @@ msgid "" msgstr "" "RigidBody2D (CharacterモードまたはRigidモード) に対するサイズ変更は、実行時に" "物理エンジンによって上書きされます。\n" -"代わりに、子のコリジョン シェイプのサイズを変更してください。" +"代わりに、子のコリジョンシェイプのサイズを変更してください。" #: scene/2d/remote_transform_2d.cpp msgid "Path property must point to a valid Node2D node to work." @@ -13873,8 +13934,8 @@ msgid "" "The controller ID must not be 0 or this controller won't be bound to an " "actual controller." msgstr "" -"コントローラIDを0にすることはできません。0にすると、このコントローラは実際の" -"コントローラにバインドされません。" +"コントローラーIDを0にすることはできません。0にすると、このコントローラーは実" +"際のコントローラーにバインドされません。" #: scene/3d/arvr_nodes.cpp msgid "ARVRAnchor must have an ARVROrigin node as its parent." @@ -13957,8 +14018,8 @@ msgid "" "A shape must be provided for CollisionShape to function. Please create a " "shape resource for it." msgstr "" -"関数の CollisionShape の形状を指定する必要があります。それのためのシェイプリ" -"ソースを作成してください。" +"CollisionShape が機能するにはシェイプを指定する必要があります。そのためのシェ" +"イプリソースを作成してください。" #: scene/3d/collision_shape.cpp msgid "" @@ -14000,7 +14061,7 @@ msgid "" "GIProbes are not supported by the GLES2 video driver.\n" "Use a BakedLightmap instead." msgstr "" -"GIProbesはGLES2ビデオドライバではサポートされていません。\n" +"GIProbesはGLES2ビデオドライバーではサポートされていません。\n" "代わりにBakedLightmapを使用してください。" #: scene/3d/gi_probe.cpp @@ -14033,11 +14094,11 @@ msgstr "" #: scene/3d/occluder.cpp msgid "No shape is set." -msgstr "" +msgstr "シェイプが設定されていません。" #: scene/3d/occluder.cpp msgid "Only uniform scales are supported." -msgstr "" +msgstr "uniform スケールのみサポートされています。" #: scene/3d/particles.cpp msgid "" @@ -14045,7 +14106,8 @@ msgid "" "Use the CPUParticles node instead. You can use the \"Convert to CPUParticles" "\" option for this purpose." msgstr "" -"GPUベースのパーティクルは、GLES2ビデオドライバではサポートされていません。\n" +"GPUベースのパーティクルは、GLES2ビデオドライバーではサポートされていませ" +"ん。\n" "代わりにCPUParticlesノードを使用してください。この目的のために \"CPUパーティ" "クルに変換\" オプションを使用できます。" @@ -14187,13 +14249,15 @@ msgstr "" #: scene/3d/room_manager.cpp msgid "Portal link room not found, check output log for details." -msgstr "" +msgstr "Portal link room が見つかりません。詳細は出力ログを確認してください。" #: scene/3d/room_manager.cpp msgid "" "Portal autolink failed, check output log for details.\n" "Check the portal is facing outwards from the source room." msgstr "" +"Portalの自動リンクに失敗しました。詳細は出力ログを確認してください。\n" +"ポータルが元のRoomから外側を向いていることを確認してください。" #: scene/3d/room_manager.cpp msgid "" @@ -14209,6 +14273,9 @@ msgid "" "Error calculating room bounds.\n" "Ensure all rooms contain geometry or manual bounds." msgstr "" +"Roomの境界の計算に失敗しました。\n" +"すべてのRoomにジオメトリまたはマニュアルの境界が含まれていることを確認してく" +"ださい。" #: scene/3d/soft_body.cpp msgid "This body will be ignored until you set a mesh." @@ -14245,8 +14312,8 @@ msgid "" "WorldEnvironment requires its \"Environment\" property to contain an " "Environment to have a visible effect." msgstr "" -"Environmentが可視エフェクトを持つために、WorldEnvironmentの「Environment」プ" -"ロパティが必要です。" +"WorldEnvironmentには、視覚効果を与えるために\"Environment\"プロパティに" +"Environmentが含まれている必要があります。" #: scene/3d/world_environment.cpp msgid "" @@ -14321,7 +14388,7 @@ msgstr "" #: scene/gui/color_picker.cpp msgid "Pick a color from the editor window." -msgstr "エディタウィンドウから色を選択。" +msgstr "エディターウィンドウから色を選択。" #: scene/gui/color_picker.cpp msgid "HSV" @@ -14347,17 +14414,17 @@ msgid "" msgstr "" "コンテナ自体は、スクリプトで子の配置動作を設定しない限り、何の役割も果たしま" "せん。\n" -"スクリプトを追加しない場合は、代わりに普通の「コントロール 」ノードを使用して" -"ください。" +"スクリプトを追加しない場合は、代わりに生のコントロールノードを使用してくださ" +"い。" #: scene/gui/control.cpp msgid "" "The Hint Tooltip won't be displayed as the control's Mouse Filter is set to " "\"Ignore\". To solve this, set the Mouse Filter to \"Stop\" or \"Pass\"." msgstr "" -"コントロールのマウスフィルタが「無視」に設定されているため、ヒントツールチッ" -"プは表示されません。これを解決するには、マウスフィルタを「停止」または「パ" -"ス」に設定します。" +"コントロールのマウスフィルターが「無視」に設定されているため、ヒントツール" +"チップは表示されません。これを解決するには、マウスフィルターを「停止」または" +"「パス」に設定します。" #: scene/gui/dialogs.cpp msgid "Alert!" @@ -14419,6 +14486,14 @@ msgstr "" "プロジェクト設定で指定されている既定の環境 (Rendering -> Environment -> " "Default Environment) を読み込めませんでした。" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14432,7 +14507,10 @@ msgstr "" "当てます。" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "レンダーするにはビューポートのサイズが 0 より大きい必要があります。" #: scene/resources/occluder_shape.cpp @@ -14444,6 +14522,8 @@ msgid "" "The sampler port is connected but not used. Consider changing the source to " "'SamplerPort'." msgstr "" +"サンプラーポートは接続されていますが、使用されていません。ソースを " +"'SamplerPort'に変更すること検討してください。" #: scene/resources/visual_shader_nodes.cpp msgid "Invalid source for preview." @@ -16232,10 +16312,6 @@ msgstr "定数は変更できません。" #~ msgid "Couldn't save atlas image:" #~ msgstr "アトラスイメージを保存できませんでした:" -#, fuzzy -#~ msgid "Couldn't save converted texture:" -#~ msgstr "変換したテクスチャを保存できませんでした:" - #~ msgid "Invalid translation source!" #~ msgstr "不正な翻訳ソース!" diff --git a/editor/translations/ka.po b/editor/translations/ka.po index 5e4f5d0094..548e016719 100644 --- a/editor/translations/ka.po +++ b/editor/translations/ka.po @@ -9,6 +9,7 @@ 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: 2019-03-10 09:58+0000\n" "Last-Translator: Rati Nikolaishvili <rati.nikolaishvili@gmail.com>\n" @@ -2443,6 +2444,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2560,6 +2569,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2885,10 +2898,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4328,6 +4337,18 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "" @@ -4337,10 +4358,6 @@ msgid "Preset" msgstr "ზუმის საწყისზე დაყენება" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "" @@ -7315,12 +7332,14 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" -msgstr "" +#, fuzzy +msgid "Next Script" +msgstr "დამოკიდებულებების შემსწორებელი" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" -msgstr "" +#, fuzzy +msgid "Previous Script" +msgstr "წინამდებარე ნაბიჯზე გადასვლა" #: editor/plugins/script_editor_plugin.cpp msgid "File" @@ -7746,7 +7765,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7754,6 +7773,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -8096,6 +8119,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -14150,6 +14193,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14159,7 +14210,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/km.po b/editor/translations/km.po index a5b6139d08..860accd0c5 100644 --- a/editor/translations/km.po +++ b/editor/translations/km.po @@ -7,6 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" +"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "PO-Revision-Date: 2021-04-19 22:33+0000\n" "Last-Translator: Withuse <withuse@gmail.com>\n" "Language-Team: Khmer (Central) <https://hosted.weblate.org/projects/godot-" @@ -2320,6 +2321,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2436,6 +2445,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2755,10 +2768,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4159,15 +4168,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7051,11 +7068,11 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +msgid "Next Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +msgid "Previous Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp @@ -7465,7 +7482,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7473,6 +7490,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7810,6 +7831,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13667,6 +13708,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13676,7 +13725,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/ko.po b/editor/translations/ko.po index c288a2b7e7..b9faa4762e 100644 --- a/editor/translations/ko.po +++ b/editor/translations/ko.po @@ -24,12 +24,14 @@ # Henry LeRoux <henry.leroux@ocsbstudent.ca>, 2021. # Postive_ Cloud <postive12@gmail.com>, 2021. # dewcked <dewcked@protonmail.ch>, 2021. +# SteamB23 <steamb23@outlook.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-09-21 15:22+0000\n" -"Last-Translator: Myeongjin Lee <aranet100@gmail.com>\n" +"PO-Revision-Date: 2021-10-07 10:25+0000\n" +"Last-Translator: SteamB23 <steamb23@outlook.com>\n" "Language-Team: Korean <https://hosted.weblate.org/projects/godot-engine/" "godot/ko/>\n" "Language: ko\n" @@ -43,7 +45,7 @@ msgstr "" #: modules/visual_script/visual_script_builtin_funcs.cpp msgid "Invalid type argument to convert(), use TYPE_* constants." msgstr "" -"convert() 메서드의 인수 유형이 올바르지 않습니다. TYPE_* 상수를 사용하세요." +"convert() 메서드의 인수 타입이 올바르지 않습니다. TYPE_* 상수를 사용하세요." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp msgid "Expected a string of length 1 (a character)." @@ -69,11 +71,11 @@ msgstr "연산자 %s, %s, %s의 피연산자가 올바르지 않습니다." #: core/math/expression.cpp msgid "Invalid index of type %s for base type %s" -msgstr "자료형 %s 의 인덱스가 기본형 %s 기준으로 올바르지 않습니다" +msgstr "타입 %s의 인덱스가 기본 타입 %s에 올바르지 않습니다" #: core/math/expression.cpp msgid "Invalid named index '%s' for base type %s" -msgstr "인덱스 이름 '%s' 이 기본형 %s 기준으로 올바르지 않습니다" +msgstr "타입 '%s'의 인덱스 이름이 기본 타입 %s에 올바르지 않습니다" #: core/math/expression.cpp msgid "Invalid arguments to construct '%s'" @@ -436,7 +438,7 @@ msgid "" "-AudioStreamPlayer2D\n" "-AudioStreamPlayer3D" msgstr "" -"오디오 트랙은 다음 형식의 노드만 가리킬 수 있습니다.\n" +"오디오 트랙은 다음 타입의 노드만 가리킬 수 있습니다:\n" "-AudioStreamPlayer\n" "-AudioStreamPlayer2D\n" "-AudioStreamPlayer3D" @@ -463,7 +465,7 @@ msgstr "트랙 경로가 올바르지 않아 키를 추가할 수 없습니다." #: editor/animation_track_editor.cpp msgid "Track is not of type Spatial, can't insert key" -msgstr "트랙이 Spatial 형식이 아니어서 키를 추가할 수 없습니다" +msgstr "트랙이 Spatial 타입이 아니므로 키를 추가할 수 없습니다" #: editor/animation_track_editor.cpp msgid "Add Transform Track Key" @@ -520,17 +522,18 @@ msgid "" "Alternatively, use an import preset that imports animations to separate " "files." msgstr "" -"이 애니메이션은 가져온 씬에 속해 있습니다. 가져온 트랙의 변경 사항은 저장되" -"지 않습니다.\n" +"이 애니메이션은 불러온 씬에 속해 있습니다. 불러온 트랙의 변경사항은 저장되지 " +"않습니다.\n" "\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." @@ -712,7 +715,7 @@ msgstr "배열 크기 바꾸기" #: editor/array_property_edit.cpp msgid "Change Array Value Type" -msgstr "배열 값 유형 바꾸기" +msgstr "배열 값 타입 바꾸기" #: editor/array_property_edit.cpp msgid "Change Array Value" @@ -961,7 +964,7 @@ msgstr "메서드로 이동" #: editor/create_dialog.cpp msgid "Change %s Type" -msgstr "%s 유형 바꾸기" +msgstr "%s 타입 바꾸기" #: editor/create_dialog.cpp editor/project_settings_editor.cpp msgid "Change" @@ -1022,7 +1025,7 @@ msgid "" "Changes will only take effect when reloaded." msgstr "" "씬 '%s'이(가) 현재 편집되고 있습니다.\n" -"변경 사항은 다시 불러온 뒤에 반영됩니다." +"변경사항은 다시 불러온 뒤에 반영됩니다." #: editor/dependency_editor.cpp msgid "" @@ -1030,7 +1033,7 @@ msgid "" "Changes will only take effect when reloaded." msgstr "" "리소스 '%s'이(가) 현재 사용 중입니다.\n" -"변경 사항은 다시 불러온 뒤에 반영됩니다." +"변경사항은 다시 불러온 뒤에 반영됩니다." #: editor/dependency_editor.cpp #: modules/gdnative/gdnative_library_editor_plugin.cpp @@ -1494,7 +1497,7 @@ msgstr "엔진에 이미 있는 클래스 이름과 겹치지 않아야 합니 #: editor/editor_autoload_settings.cpp msgid "Must not collide with an existing built-in type name." -msgstr "기존 내장 자료형과 이름과 겹치지 않아야 합니다." +msgstr "기존 내장 타입과 이름과 겹치지 않아야 합니다." #: editor/editor_autoload_settings.cpp msgid "Must not collide with an existing global constant name." @@ -1579,7 +1582,7 @@ msgstr "씬 업데이트 중" #: editor/editor_data.cpp msgid "Storing local changes..." -msgstr "지역 변경 사항을 저장 중..." +msgstr "로컬 변경사항을 저장하는 중..." #: editor/editor_data.cpp msgid "Updating scene..." @@ -1633,7 +1636,7 @@ msgstr "예상 경로에서 내보내기 템플릿을 찾을 수 없습니다:" #: editor/editor_export.cpp msgid "Packing" -msgstr "묶는 중" +msgstr "패킹 중" #: editor/editor_export.cpp msgid "" @@ -1695,13 +1698,13 @@ msgstr "" #: 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 "커스텀 디버그 템플릿을 찾을 수 없습니다." #: 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 "커스텀 릴리스 템플릿을 찾을 수 없습니다." #: editor/editor_export.cpp platform/javascript/export/export.cpp msgid "Template file not found:" @@ -1737,7 +1740,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." @@ -1770,7 +1773,7 @@ msgid "" "Allows to configure import settings for individual assets. Requires the " "FileSystem dock to function." msgstr "" -"개별 애셋에 대한 가져오기 설정을 구성할 수 있게 합니다. 작동하려면 파일시스" +"개별 애셋에 대한 불러오기 설정을 구성할 수 있게 합니다. 작동하려면 파일시스" "템 독이 필요합니다." #: editor/editor_feature_profile.cpp @@ -1827,15 +1830,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'." @@ -1868,7 +1871,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" @@ -1884,7 +1887,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:" @@ -1896,7 +1899,7 @@ msgstr "Godot 기능 프로필" #: editor/editor_feature_profile.cpp msgid "Import Profile(s)" -msgstr "프로필 가져오기" +msgstr "프로필 불러오기" #: editor/editor_feature_profile.cpp msgid "Export Profile" @@ -1924,12 +1927,12 @@ msgstr "경로 복사" #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "Open in File Manager" -msgstr "파일 탐색기에서 열기" +msgstr "파일 매니저에서 열기" #: editor/editor_file_dialog.cpp editor/editor_node.cpp #: editor/filesystem_dock.cpp editor/project_manager.cpp msgid "Show in File Manager" -msgstr "파일 탐색기에서 보기" +msgstr "파일 매니저에서 보기" #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "New Folder..." @@ -2051,7 +2054,7 @@ msgstr "디렉토리 & 파일:" #: 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 "미리보기:" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "File:" @@ -2065,11 +2068,13 @@ msgstr "소스 스캔중" msgid "" "There are multiple importers for different types pointing to file %s, import " "aborted" -msgstr "파일 % 에 해당하는 가져오기 포맷이 여러 종류입니다. 가져오기 중단됨" +msgstr "" +"파일 %s을(를) 가리키고 있는 다른 타입의 여러 개의 임포터가 있으므로 가져오기" +"가 중단되었습니다" #: editor/editor_file_system.cpp msgid "(Re)Importing Assets" -msgstr "애셋 (다시) 가져오기" +msgstr "애셋 (다시) 불러오기" #: editor/editor_help.cpp msgid "Top" @@ -2102,7 +2107,7 @@ msgstr "속성" #: editor/editor_help.cpp msgid "override:" -msgstr "재정의:" +msgstr "오버라이드:" #: editor/editor_help.cpp msgid "default:" @@ -2195,7 +2200,7 @@ msgstr "테마 속성만 표시" #: editor/editor_help_search.cpp msgid "Member Type" -msgstr "멤버 유형" +msgstr "멤버 타입" #: editor/editor_help_search.cpp msgid "Class" @@ -2318,7 +2323,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 @@ -2406,6 +2411,15 @@ msgstr "" "씬을 저장할 수 없습니다. (인스턴스 또는 상속과 같은) 종속 관계를 성립할 수 없" "는 것 같습니다." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "변환된 텍스쳐를 저장할 수 없음:" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "모든 씬 저장" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "열려있는 씬은 덮어쓸 수 없습니다!" @@ -2458,8 +2472,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 @@ -2468,15 +2482,15 @@ msgid "" "Changes to it won't be kept when saving the current scene." msgstr "" "이 리소스는 인스턴스되거나 상속된 씬에 속해 있습니다.\n" -"현재 씬을 저장해도 리소스의 변경 사항이 유지되지 않을 것입니다." +"현재 씬을 저장해도 리소스의 변경사항이 유지되지 않을 것입니다." #: editor/editor_node.cpp 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 "" @@ -2485,9 +2499,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 @@ -2537,7 +2551,11 @@ msgstr "저장 & 닫기" #: editor/editor_node.cpp msgid "Save changes to '%s' before closing?" -msgstr "닫기 전에 '%s'에 변경 사항을 저장할까요?" +msgstr "닫기 전에 '%s'에 변경사항을 저장하시겠습니까?" + +#: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" #: editor/editor_node.cpp msgid "" @@ -2585,29 +2603,27 @@ msgstr "현재 씬이 저장되어 있지 않습니다. 무시하고 여시겠 #: editor/editor_node.cpp msgid "Can't undo while mouse buttons are pressed." -msgstr "" +msgstr "마우스 버튼을 누르고 있는 동안에는 실행 취소할 수 없습니다." #: editor/editor_node.cpp msgid "Nothing to undo." -msgstr "" +msgstr "실행 취소할 것이 없습니다." #: editor/editor_node.cpp -#, fuzzy msgid "Undo: %s" -msgstr "되돌리기" +msgstr "실행 취소: %s" #: editor/editor_node.cpp msgid "Can't redo while mouse buttons are pressed." -msgstr "" +msgstr "마우스 버튼을 누르고 있는 동안에는 다시 실행할 수 없습니다." #: editor/editor_node.cpp msgid "Nothing to redo." -msgstr "" +msgstr "다시 실행할 것이 없습니다." #: editor/editor_node.cpp -#, fuzzy msgid "Redo: %s" -msgstr "다시 실행" +msgstr "다시 실행: %s" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." @@ -2651,19 +2667,19 @@ msgstr "저장 & 종료" #: editor/editor_node.cpp msgid "Save changes to the following scene(s) before quitting?" -msgstr "종료하기 전에 해당 씬의 변경 사항을 저장하시겠습니까?" +msgstr "종료하기 전에 해당 씬의 변경사항을 저장하시겠습니까?" #: editor/editor_node.cpp msgid "Save changes to the following scene(s) before opening Project Manager?" -msgstr "프로젝트 매니터를 열기 전에 해당 씬의 변경 사항을 저장하시겠습니까?" +msgstr "프로젝트 매니저를 열기 전에 해당 씬의 변경사항을 저장하시겠습니까?" #: editor/editor_node.cpp msgid "" "This option is deprecated. Situations where refresh must be forced are now " "considered a bug. Please report." msgstr "" -"이 옵션은 사용되지 않습니다. 강제로 새로 고침해야 하는 상황은 이제 버그로 간" -"주됩니다. 신고해주세요." +"이 옵션은 사용되지 않습니다. 강제로 새로고침해야 하는 상황은 이제 버그로 간주" +"됩니다. 신고해주세요." #: editor/editor_node.cpp msgid "Pick a Main Scene" @@ -2706,7 +2722,7 @@ msgstr "" msgid "" "Unable to load addon script from path: '%s' Base type is not EditorPlugin." msgstr "" -"다음 경로에서 애드온 스크립트를 불러올 수 없음: '%s' 기본 유형이 EditorPlugin" +"다음 경로에서 애드온 스크립트를 불러올 수 없음: '%s' 기본 타입이 EditorPlugin" "이 아닙니다." #: editor/editor_node.cpp @@ -2720,7 +2736,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 @@ -2729,7 +2745,7 @@ msgid "" "open the scene, then save it inside the project path." msgstr "" "씬을 불러오는 중 오류가 발생했습니다. 씬은 프로젝트 경로 안에 있어야 합니다. " -"'가져오기'를 사용해서 씬을 열고, 그 씬을 프로젝트 경로 안에 저장하세요." +"'불러오기'를 사용해서 씬을 열고, 그 씬을 프로젝트 경로 안에 저장하세요." #: editor/editor_node.cpp msgid "Scene '%s' has broken dependencies:" @@ -2889,10 +2905,6 @@ msgid "Save Scene" msgstr "씬 저장" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "모든 씬 저장" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "다음으로 변환..." @@ -2907,7 +2919,7 @@ 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 "실행 취소" #: editor/editor_node.cpp editor/plugins/script_text_editor.cpp #: scene/gui/line_edit.cpp scene/gui/text_edit.cpp @@ -3180,7 +3192,7 @@ msgstr "씬 실행" #: editor/editor_node.cpp msgid "Play custom scene" -msgstr "씬을 지정해서 실행합니다" +msgstr "커스텀 씬 실행" #: editor/editor_node.cpp msgid "Play Custom Scene" @@ -3253,12 +3265,12 @@ msgid "" "the \"Use Custom Build\" option should be enabled in the Android export " "preset." msgstr "" -"\"res://android/build\"에 소스 템플릿을 설치해서, 프로젝트를 맞춤 Android 빌" -"드에 맞게 설정할 것입니다.\n" -"그런 다음 수정 사항을 적용하고 맞춤 APK를 만들어 내보낼 수 있습니다 (모듈 추" -"가, AndroidManifest.xml 바꾸기 등).\n" -"미리 빌드된 APK를 사용하는 대신 맞춤 빌드를 만들려면, Android 내보내기 프리셋" -"에서 \"맞춤 빌드 사용\" 설정을 활성화해야 합니다." +"\"res://android/build\"에 소스 템플릿을 설치해서 프로젝트를 커스텀 Android 빌" +"드에 맞게 설정합니다.\n" +"그런 다음 수정 사항을 적용하고 커스텀 APK를 빌드해서 내보낼 수 있습니다(모듈 " +"추가, AndroidManifest.xml 변경 등).\n" +"미리 빌드된 APK를 사용하는 대신 커스텀 빌드를 만들려면, Android 내보내기 프리" +"셋에서 \"커스텀 빌드 사용(Use Custom Build)\" 설정을 활성화해야 합니다." #: editor/editor_node.cpp msgid "" @@ -3273,7 +3285,7 @@ msgstr "" #: editor/editor_node.cpp msgid "Import Templates From ZIP File" -msgstr "ZIP 파일에서 템플릿 가져오기" +msgstr "ZIP 파일에서 템플릿 불러오기" #: editor/editor_node.cpp msgid "Template Package" @@ -3285,12 +3297,11 @@ msgstr "라이브러리 내보내기" #: editor/editor_node.cpp msgid "Merge With Existing" -msgstr "기존의 것과 병합" +msgstr "기존의 것과 병합하기" #: editor/editor_node.cpp -#, fuzzy msgid "Apply MeshInstance Transforms" -msgstr "애니메이션 변형 바꾸기" +msgstr "MeshInstance 변형 적용" #: editor/editor_node.cpp msgid "Open & Run a Script" @@ -3368,7 +3379,7 @@ msgstr "하위 리소스의 목록을 엽니다." #: editor/editor_plugin.cpp msgid "Creating Mesh Previews" -msgstr "메시 미리 보기 만드는 중" +msgstr "메시 미리보기 만드는 중" #: editor/editor_plugin.cpp msgid "Thumbnail..." @@ -3545,11 +3556,11 @@ msgstr "키/값 쌍 추가" msgid "" "The selected resource (%s) does not match any type expected for this " "property (%s)." -msgstr "선택한 리소스(%s)가 이 속성(%s)에 적합한 모든 유형에 맞지 않습니다." +msgstr "선택한 리소스(%s)가 이 속성(%s)에 적합한 모든 타입에 맞지 않습니다." #: editor/editor_resource_picker.cpp msgid "Quick Load" -msgstr "" +msgstr "빠른 불러오기" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "Make Unique" @@ -3625,7 +3636,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" @@ -3637,7 +3648,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." @@ -3694,7 +3705,7 @@ msgstr "요청 실패됨:" #: editor/export_template_manager.cpp msgid "Download complete; extracting templates..." -msgstr "다운로드를 완료하여 템플릿을 압축 해제 중..." +msgstr "다운로드 완료. 템플릿 압축 해제 중..." #: editor/export_template_manager.cpp msgid "Cannot remove temporary file:" @@ -3792,7 +3803,7 @@ msgstr "내보내기 템플릿 압축 푸는 중" #: editor/export_template_manager.cpp msgid "Importing:" -msgstr "가져오는 중:" +msgstr "불러오는 중:" #: editor/export_template_manager.cpp msgid "Remove templates for the version '%s'?" @@ -3910,14 +3921,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." @@ -4060,11 +4071,11 @@ msgstr "이름순 정렬 (내림차순)" #: editor/filesystem_dock.cpp msgid "Sort by Type (Ascending)" -msgstr "유형별 정렬 (오름차순)" +msgstr "타입별 정렬 (오름차순)" #: editor/filesystem_dock.cpp msgid "Sort by Type (Descending)" -msgstr "유형별 정렬 (내림차순)" +msgstr "타입별 정렬 (내림차순)" #: editor/filesystem_dock.cpp msgid "Sort by Last Modified" @@ -4112,7 +4123,7 @@ msgid "" "Please Wait..." msgstr "" "파일 스캔중.\n" -"기다려주십시오..." +"잠시만 기다려주세요..." #: editor/filesystem_dock.cpp msgid "Move" @@ -4158,8 +4169,8 @@ msgid "" "Include the files with the following extensions. Add or remove them in " "ProjectSettings." msgstr "" -"해당 확장자 이름을 갖는 파일이 포함되어 있습니다. 프로젝트 설정에 파일을 추가" -"하거나 제거하세요." +"다음 확장자의 파일을 포함하세요. 프로젝트 설정에서 파일을 추가하거나 제거하세" +"요." #: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp @@ -4253,52 +4264,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" @@ -4310,23 +4321,23 @@ msgstr "메시 용으로 생성 중: " #: editor/import/resource_importer_scene.cpp msgid "Running Custom Script..." -msgstr "맞춤 스크립트 실행 중..." +msgstr "커스텀 스크립트 실행 중..." #: editor/import/resource_importer_scene.cpp msgid "Couldn't load post-import script:" -msgstr "후 가져오기 스크립트를 불러올 수 없음:" +msgstr "post-import 스크립트를 불러올 수 없음:" #: editor/import/resource_importer_scene.cpp msgid "Invalid/broken script for post-import (check console):" -msgstr "후 가져오기 용 스크립트가 잘못됨/망가짐 (콘솔을 확인하세요):" +msgstr "post-impot용 스크립트가 잘못되거나 망가짐 (콘솔을 확인하세요):" #: editor/import/resource_importer_scene.cpp msgid "Error running post-import script:" -msgstr "후 가져오기 스크립트 실행 중 오류:" +msgstr "post-import 스크립트 실행 중 오류:" #: editor/import/resource_importer_scene.cpp msgid "Did you return a Node-derived object in the `post_import()` method?" -msgstr "`post_import()` 메소드에서 Node에서 상속받은 오브젝트를 반환했습니까?" +msgstr "`post_import()` 메서드에서 Node에서 상속받은 오브젝트를 반환했습니까?" #: editor/import/resource_importer_scene.cpp msgid "Saving..." @@ -4346,7 +4357,7 @@ msgstr "디폴트로 재설정" #: editor/import_dock.cpp msgid "Keep File (No Import)" -msgstr "파일 유지 (가져오기 없음)" +msgstr "파일 유지 (불러오기 없음)" #: editor/import_dock.cpp msgid "%d Files" @@ -4361,24 +4372,32 @@ msgid "Clear Default for '%s'" msgstr "'%s'을(를) 디폴트에서 지우기" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "다시 불러오기" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" -msgstr "다음 형식으로 가져오기:" +msgstr "다음 형식으로 불러오기:" #: editor/import_dock.cpp msgid "Preset" msgstr "프리셋" #: editor/import_dock.cpp -msgid "Reimport" -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 "" @@ -4467,7 +4486,7 @@ msgstr "오브젝트 속성을 관리합니다." #: editor/inspector_dock.cpp msgid "Changes may be lost!" -msgstr "변경 사항을 잃을 수도 있습니다!" +msgstr "변경사항을 잃을 수도 있습니다!" #: editor/multi_node_edit.cpp msgid "MultiNode Set" @@ -4588,7 +4607,7 @@ msgstr "BlendSpace1D 라벨 바꾸기" #: editor/plugins/animation_blend_space_2d_editor.cpp #: editor/plugins/animation_state_machine_editor.cpp msgid "This type of node can't be used. Only root nodes are allowed." -msgstr "이 유형의 노드를 사용할 수 없습니다. 루트 노드만 쓸 수 있습니다." +msgstr "이 타입의 노드를 사용할 수 없습니다. 루트 노드만 쓸 수 있습니다." #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp @@ -4780,8 +4799,8 @@ msgid "" "Animation player has no valid root node path, so unable to retrieve track " "names." msgstr "" -"애니메이션 플레이어가 잘못된 루트 경로를 갖고 있습니다. 그래서 트랙 이름을 검" -"색할 수 없습니다." +"애니메이션 플레이어의 루트 노드 경로가 유효하지 않으므로 트랙 이름을 검색할 " +"수 없습니다." #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Anim Clips" @@ -4984,7 +5003,7 @@ msgstr "3단계" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Differences Only" -msgstr "변경 사항만" +msgstr "차이만" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Force White Modulate" @@ -5252,7 +5271,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" @@ -5444,7 +5463,7 @@ msgstr "애셋 검색 (템플릿, 프로젝트, 및 데모 제외)" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Import..." -msgstr "가져오기..." +msgstr "불러오기..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Plugins..." @@ -5484,7 +5503,7 @@ msgstr "애셋 ZIP 파일" #: editor/plugins/audio_stream_editor_plugin.cpp msgid "Audio Preview Play/Pause" -msgstr "오디오 미리 보기 재생/일시 정지" +msgstr "오디오 미리보기 재생/일시 정지" #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "" @@ -5537,7 +5556,7 @@ msgstr "라이트맵을 구울 파일 선택:" #: editor/plugins/camera_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" -msgstr "미리 보기" +msgstr "미리보기" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Configure Snap" @@ -5641,21 +5660,19 @@ msgstr "CanvasItem \"%s\"를 (%d, %d)로 이동" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Locked" -msgstr "선택 항목 잠그기" +msgstr "잠김" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Grouped" -msgstr "그룹" +msgstr "그룹됨" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" "Children of containers have their anchors and margins values overridden by " "their parent." -msgstr "컨테이너의 자손은 부모로 인해 재정의된 앵커와 여백 값을 가집니다." +msgstr "컨테이너의 자식은 부모로 인해 오버라이드된 앵커와 여백 값을 가집니다." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Presets for the anchors and margins values of a Control node." @@ -5753,8 +5770,8 @@ msgid "" "Project Camera Override\n" "Overrides the running project's camera with the editor viewport camera." msgstr "" -"프로젝트 카메라 재정의\n" -"실행 중인 프로젝트의 카메라를 에디터 뷰포트 카메라로 재정의합니다." +"프로젝트 카메라 오버라이드\n" +"실행 중인 프로젝트의 카메라를 에디터 뷰포트 카메라로 오버라이드합니다." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5763,7 +5780,7 @@ msgid "" "No project instance running. Run the project from the editor to use this " "feature." msgstr "" -"프로젝트 카메라 재정의\n" +"프로젝트 카메라 오버라이드\n" "실행 중인 프로젝트 인스턴스가 없습니다. 이 기능을 사용하려면 에디터에서 프로" "젝트를 실행하세요." @@ -5797,7 +5814,7 @@ msgstr "가이드 지우기" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Create Custom Bone(s) from Node(s)" -msgstr "노드에서 맞춤 본 만들기" +msgstr "노드에서 커스텀 본 만들기" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Clear Bones" @@ -5947,7 +5964,7 @@ msgstr "노드 옆면에 스냅" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snap to Node Center" -msgstr "노드 중심에 스냅" +msgstr "노드 중앙에 스냅" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snap to Other Nodes" @@ -5987,11 +6004,11 @@ msgstr "본 보이기" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Make Custom Bone(s) from Node(s)" -msgstr "노드에서 맞춤 본 만들기" +msgstr "노드에서 커스텀 본 만들기" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Clear Custom Bones" -msgstr "맞춤 본 지우기" +msgstr "커스텀 본 지우기" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -6036,7 +6053,7 @@ msgstr "프레임 선택" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Preview Canvas Scale" -msgstr "캔버스 스케일 미리 보기" +msgstr "캔버스 스케일 미리보기" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Translation mask for inserting keys." @@ -6170,7 +6187,7 @@ msgstr "'%s'에서 씬 인스턴스 중 오류" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Change Default Type" -msgstr "디폴트 유형 바꾸기" +msgstr "디폴트 타입 바꾸기" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -6178,7 +6195,7 @@ msgid "" "Drag & drop + Alt : Change node type" msgstr "" "드래그 & 드롭 + Shift : 동기 노드로 추가\n" -"드래그 & 드롭 + Alt : 노드 유형 바꾸기" +"드래그 & 드롭 + Alt : 노드 타입 바꾸기" #: editor/plugins/collision_polygon_editor_plugin.cpp msgid "Create Polygon3D" @@ -6414,7 +6431,7 @@ msgstr "내비게이션 메시 만들기" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Contained Mesh is not of type ArrayMesh." -msgstr "갖고 있는 메시가 ArrayMesh 유형이 아닙니다." +msgstr "포함된 메시가 ArrayMesh 타입이 아닙니다." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "UV Unwrap failed, mesh may not be manifold?" @@ -6438,7 +6455,7 @@ msgstr "메시에 윤곽선을 만들 표면이 없습니다!" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Mesh primitive type is not PRIMITIVE_TRIANGLES!" -msgstr "메시 기본 유형이 PRIMITIVE_TRIANGLES이 아닙니다!" +msgstr "메시 기본 타입이 PRIMITIVE_TRIANGLES이 아닙니다!" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Could not create outline!" @@ -6582,14 +6599,12 @@ msgid "Remove Selected Item" msgstr "선택한 항목 제거" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Ignore Transforms)" -msgstr "씬에서 가져오기" +msgstr "씬에서 불러오기 (변형 무시)" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Apply Transforms)" -msgstr "씬에서 가져오기" +msgstr "씬에서 불러오기 (변형 적용)" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Update from Scene" @@ -6766,7 +6781,7 @@ msgstr "방출 소스: " #: editor/plugins/particles_editor_plugin.cpp msgid "A processor material of type 'ParticlesMaterial' is required." -msgstr "'ParticlesMaterial' 유형의 프로세서 머티리얼이 필요합니다." +msgstr "'ParticlesMaterial' 타입의 프로세서 머티리얼이 필요합니다." #: editor/plugins/particles_editor_plugin.cpp msgid "Generating AABB" @@ -6826,7 +6841,7 @@ msgstr "클릭: 점 추가" #: editor/plugins/path_2d_editor_plugin.cpp msgid "Left Click: Split Segment (in curve)" -msgstr "좌클릭: (곡선에서) 선분 가르기" +msgstr "좌클릭: (곡선에서) 세그먼트 가르기" #: editor/plugins/path_2d_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp @@ -6903,7 +6918,7 @@ msgstr "인-컨트롤 점 제거" #: editor/plugins/path_editor_plugin.cpp msgid "Split Segment (in curve)" -msgstr "(곡선에서) 선분 가르기" +msgstr "(곡선에서) 세그먼트 가르기" #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" @@ -6955,11 +6970,11 @@ msgstr "잘못된 폴리곤 (3개의 다른 꼭짓점이 필요합니다)" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Add Custom Polygon" -msgstr "맞춤 폴리곤 추가" +msgstr "커스텀 폴리곤 추가" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Remove Custom Polygon" -msgstr "맞춤 폴리곤 제거" +msgstr "커스텀 폴리곤 제거" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Transform UV Map" @@ -7035,15 +7050,15 @@ msgstr "폴리곤 스케일 조절" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Create a custom polygon. Enables custom polygon rendering." -msgstr "맞춤 폴리곤을 만듭니다. 맞춤 폴리곤 렌더링을 활성화합니다." +msgstr "커스텀 폴리곤을 만듭니다. 커스텀 폴리곤 렌더링을 활성화합니다." #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "" "Remove a custom polygon. If none remain, custom polygon rendering is " "disabled." msgstr "" -"맞춤 폴리곤을 제거합니다. 남아있는 맞춤 폴리곤이 없으면, 맞춤 폴리곤 렌더링" -"은 비활성화됩니다." +"커스텀 폴리곤을 제거합니다. 남아있는 커스텀 폴리곤이 없으면 커스텀 폴리곤 렌" +"더링은 비활성화됩니다." #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Paint weights with specified intensity." @@ -7148,7 +7163,7 @@ msgstr "인스턴스:" #: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Type:" -msgstr "유형:" +msgstr "타입:" #: editor/plugins/resource_preloader_editor_plugin.cpp #: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp @@ -7180,14 +7195,12 @@ msgid "Flip Portal" msgstr "포털 뒤집기" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Occluder Set Transform" -msgstr "변형 지우기" +msgstr "어클루더 세트 변형" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Center Node" -msgstr "노드 만들기" +msgstr "중앙 노드" #: editor/plugins/root_motion_editor_plugin.cpp msgid "AnimationTree has no path set to an AnimationPlayer" @@ -7227,11 +7240,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..." @@ -7266,7 +7279,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp msgid "Import Theme" -msgstr "테마 가져오기" +msgstr "테마 불러오기" #: editor/plugins/script_editor_plugin.cpp msgid "Error while saving theme" @@ -7323,11 +7336,13 @@ msgid "Move Down" msgstr "아래로 이동" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "다음 스크립트" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "이전 스크립트" #: editor/plugins/script_editor_plugin.cpp @@ -7369,7 +7384,7 @@ msgstr "테마" #: editor/plugins/script_editor_plugin.cpp msgid "Import Theme..." -msgstr "테마 가져오기..." +msgstr "테마 불러오기..." #: editor/plugins/script_editor_plugin.cpp msgid "Reload Theme" @@ -7692,14 +7707,12 @@ msgid "Skeleton2D" msgstr "스켈레톤2D" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Reset to Rest Pose" -msgstr "본을 대기 자세로 설정" +msgstr "대기 자세로 재설정" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Overwrite Rest Pose" -msgstr "덮어 쓰기" +msgstr "대기 자세 덮어 쓰기" #: editor/plugins/skeleton_editor_plugin.cpp msgid "Create physical bones" @@ -7726,69 +7739,63 @@ msgid "Perspective" msgstr "원근" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Orthogonal" -msgstr "직교" +msgstr "상단 직교" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Perspective" -msgstr "원근" +msgstr "상단 원근" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Orthogonal" -msgstr "직교" +msgstr "하단 직교" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Perspective" -msgstr "원근" +msgstr "하단 원근" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Left Orthogonal" -msgstr "직교" +msgstr "좌측 직교" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "원근" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Right Orthogonal" -msgstr "직교" +msgstr "우측 직교" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "우측 원근" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Orthogonal" -msgstr "직교" +msgstr "정면 직교" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Perspective" -msgstr "원근" +msgstr "정면 원근" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Orthogonal" -msgstr "직교" +msgstr "후면 직교" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Perspective" -msgstr "원근" +msgstr "후면 원근" #. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled. #: editor/plugins/spatial_editor_plugin.cpp msgid " [auto]" -msgstr "" +msgstr " [자동]" #. 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 " [포털 활성]" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Aborted." @@ -7983,7 +7990,7 @@ msgstr "파동 왜곡 활성화" #: editor/plugins/spatial_editor_plugin.cpp msgid "Cinematic Preview" -msgstr "시네마틱 미리 보기" +msgstr "시네마틱 미리보기" #: editor/plugins/spatial_editor_plugin.cpp msgid "Not available when using the GLES2 renderer." @@ -8023,7 +8030,7 @@ msgstr "자유 시점 느린 수정자" #: editor/plugins/spatial_editor_plugin.cpp msgid "Toggle Camera Preview" -msgstr "카메라 미리 보기 토글" +msgstr "카메라 미리보기 토글" #: editor/plugins/spatial_editor_plugin.cpp msgid "View Rotation Locked" @@ -8109,6 +8116,27 @@ msgid "Right View" msgstr "우측 뷰" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "정면 뷰" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "원근/직교 뷰 전환" @@ -8182,9 +8210,8 @@ msgid "View Portal Culling" msgstr "포털 컬링 보기" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "View Occlusion Culling" -msgstr "포털 컬링 보기" +msgstr "어클루전 컬링 보기" #: editor/plugins/spatial_editor_plugin.cpp #: modules/gridmap/grid_map_editor_plugin.cpp @@ -8241,7 +8268,7 @@ msgstr "스케일 (비율):" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Type" -msgstr "변형 유형" +msgstr "변형 타입" #: editor/plugins/spatial_editor_plugin.cpp msgid "Pre" @@ -8252,9 +8279,8 @@ msgid "Post" msgstr "후" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" -msgstr "이름 없는 프로젝트" +msgstr "이름 없는 기즈모" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create Mesh2D" @@ -8262,7 +8288,7 @@ msgstr "Mesh2D 만들기" #: editor/plugins/sprite_editor_plugin.cpp msgid "Mesh2D Preview" -msgstr "Mesh2D 미리 보기" +msgstr "Mesh2D 미리보기" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create Polygon2D" @@ -8270,7 +8296,7 @@ msgstr "Polygon2D 만들기" #: editor/plugins/sprite_editor_plugin.cpp msgid "Polygon2D Preview" -msgstr "Polygon2D 미리 보기" +msgstr "Polygon2D 미리보기" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create CollisionPolygon2D" @@ -8278,7 +8304,7 @@ msgstr "CollisionPolygon2D 만들기" #: editor/plugins/sprite_editor_plugin.cpp msgid "CollisionPolygon2D Preview" -msgstr "CollisionPolygon2D 미리 보기" +msgstr "CollisionPolygon2D 미리보기" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create LightOccluder2D" @@ -8286,7 +8312,7 @@ msgstr "LightOccluder2D 만들기" #: editor/plugins/sprite_editor_plugin.cpp msgid "LightOccluder2D Preview" -msgstr "LightOccluder2D 미리 보기" +msgstr "LightOccluder2D 미리보기" #: editor/plugins/sprite_editor_plugin.cpp msgid "Sprite is empty!" @@ -8346,7 +8372,7 @@ msgstr "성장 (픽셀): " #: editor/plugins/sprite_editor_plugin.cpp msgid "Update Preview" -msgstr "업데이트 미리 보기" +msgstr "업데이트 미리보기" #: editor/plugins/sprite_editor_plugin.cpp msgid "Settings:" @@ -8566,15 +8592,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" @@ -8594,7 +8620,7 @@ msgstr "데이터와 함께" #: editor/plugins/theme_editor_plugin.cpp msgid "Select by data type:" -msgstr "데이터 유형 별 선택:" +msgstr "데이터 타입별 선택:" #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible color items." @@ -8665,11 +8691,11 @@ msgstr "" #: editor/plugins/theme_editor_plugin.cpp msgid "Collapse types." -msgstr "유형을 접습니다." +msgstr "타입을 접습니다." #: editor/plugins/theme_editor_plugin.cpp msgid "Expand types." -msgstr "유형을 펼칩니다." +msgstr "타입을 펼칩니다." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all Theme items." @@ -8693,7 +8719,7 @@ msgstr "모든 테마 항목을 선택 해제합니다." #: editor/plugins/theme_editor_plugin.cpp msgid "Import Selected" -msgstr "선택된 항목 가져오기" +msgstr "선택된 항목 불러오기" #: editor/plugins/theme_editor_plugin.cpp msgid "" @@ -8701,7 +8727,7 @@ msgid "" "closing this window.\n" "Close anyway?" msgstr "" -"항목 가져오기 탭에 일부 항목이 선택되어 있습니다. 이 창을 닫으면 선택을 잃게 " +"항목 불러오기 탭에 일부 항목이 선택되어 있습니다. 이 창을 닫으면 선택을 잃게 " "됩니다.\n" "무시하고 닫으시겠습니까?" @@ -8710,8 +8736,8 @@ msgid "" "Select a theme type from the list to edit its items.\n" "You can add a custom type or import a type with its items from another theme." msgstr "" -"테마의 항목을 편집하려면 목록에서 테마 유형을 선택하세요.\n" -"맞춤 유형을 추가하거나 다른 테마에서 테마 항목으로 유형을 가져올 수 있습니다." +"테마의 항목을 편집하려면 목록에서 테마 타입을 선택하세요.\n" +"커스텀 타입을 추가하거나 다른 테마의 항목과 함께 타입을 불러올 수 있습니다." #: editor/plugins/theme_editor_plugin.cpp msgid "Remove All Color Items" @@ -8742,8 +8768,8 @@ msgid "" "This theme type is empty.\n" "Add more items to it manually or by importing from another theme." msgstr "" -"이 테마 유형은 비어 있습니다.\n" -"직접 또는 다른 테마에서 가져와서 테마에 더 많은 항목을 추가하세요." +"이 테마 타입은 비어 있습니다.\n" +"직접 또는 다른 테마에서 불러와서 테마에 더 많은 항목을 추가하세요." #: editor/plugins/theme_editor_plugin.cpp msgid "Add Color Item" @@ -8803,11 +8829,11 @@ msgstr "항목 편집" #: editor/plugins/theme_editor_plugin.cpp msgid "Types:" -msgstr "유형:" +msgstr "타입:" #: editor/plugins/theme_editor_plugin.cpp msgid "Add Type:" -msgstr "유형 추가:" +msgstr "타입 추가:" #: editor/plugins/theme_editor_plugin.cpp msgid "Add Item:" @@ -8827,7 +8853,7 @@ msgstr "클래스 항목 제거" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove Custom Items" -msgstr "맞춤 항목 제거" +msgstr "커스텀 항목 제거" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove All Items" @@ -8843,7 +8869,7 @@ msgstr "이전 이름:" #: editor/plugins/theme_editor_plugin.cpp msgid "Import Items" -msgstr "항목 가져오기" +msgstr "항목 불러오기" #: editor/plugins/theme_editor_plugin.cpp msgid "Default Theme" @@ -8871,7 +8897,7 @@ msgstr "항목 이름 바꾸기 취소" #: editor/plugins/theme_editor_plugin.cpp msgid "Override Item" -msgstr "항목 재정의" +msgstr "항목 오버라이드" #: editor/plugins/theme_editor_plugin.cpp msgid "Unpin this StyleBox as a main style." @@ -8882,20 +8908,20 @@ msgid "" "Pin this StyleBox as a main style. Editing its properties will update the " "same properties in all other StyleBoxes of this type." msgstr "" -"스타일박스를 주 스타일로 고정합니다. 속성을 편집하면 이 유형의 다른 모든 스타" +"스타일박스를 주 스타일로 고정합니다. 속성을 편집하면 이 타입의 다른 모든 스타" "일박스에서 같은 속성이 업데이트됩니다." #: editor/plugins/theme_editor_plugin.cpp msgid "Add Type" -msgstr "유형 추가" +msgstr "타입 추가" #: editor/plugins/theme_editor_plugin.cpp msgid "Add Item Type" -msgstr "항목 유형 추가" +msgstr "항목 타입 추가" #: editor/plugins/theme_editor_plugin.cpp msgid "Node Types:" -msgstr "노드 유형:" +msgstr "노드 타입:" #: editor/plugins/theme_editor_plugin.cpp msgid "Show Default" @@ -8903,15 +8929,15 @@ msgstr "디폴트 보이기" #: editor/plugins/theme_editor_plugin.cpp msgid "Show default type items alongside items that have been overridden." -msgstr "재정의된 항목 옆에 디폴트 유형 항목을 보여줍니다." +msgstr "오버라이드된 항목 옆에 디폴트 타입 항목을 보여줍니다." #: editor/plugins/theme_editor_plugin.cpp msgid "Override All" -msgstr "모두 재정의" +msgstr "모두 오버라이드" #: editor/plugins/theme_editor_plugin.cpp msgid "Override all default type items." -msgstr "모든 디폴트 유형 항목을 재정의합니다." +msgstr "모든 디폴트 타입 항목을 오버라이드합니다." #: editor/plugins/theme_editor_plugin.cpp msgid "Theme:" @@ -8923,15 +8949,15 @@ 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" -msgstr "미리 보기 추가" +msgstr "미리보기 추가" #: editor/plugins/theme_editor_plugin.cpp msgid "Default Preview" -msgstr "디폴트 미리 보기" +msgstr "디폴트 미리보기" #: editor/plugins/theme_editor_plugin.cpp msgid "Select UI Scene:" @@ -8942,7 +8968,7 @@ msgid "" "Toggle the control picker, allowing to visually select control types for " "edit." msgstr "" -"컨트롤 선택기를 토글하여, 편집할 컨트롤 유형을 시각적으로 선택할 수 있게 합니" +"컨트롤 선택기를 토글하여, 편집할 컨트롤 타입을 시각적으로 선택할 수 있게 합니" "다." #: editor/plugins/theme_editor_preview.cpp @@ -8994,6 +9020,7 @@ msgid "Subitem 2" msgstr "하위 항목 2" #: editor/plugins/theme_editor_preview.cpp +#, fuzzy msgid "Has" msgstr "갖춤" @@ -9026,6 +9053,7 @@ msgid "Subtree" msgstr "하위 트리" #: editor/plugins/theme_editor_preview.cpp +#, fuzzy msgid "Has,Many,Options" msgstr "많은,옵션,갖춤" @@ -9518,11 +9546,11 @@ msgstr "스테이징 영역" #: editor/plugins/version_control_editor_plugin.cpp msgid "Detect new changes" -msgstr "새 변경 사항 감지" +msgstr "새 변경사항 감지" #: editor/plugins/version_control_editor_plugin.cpp msgid "Changes" -msgstr "변경 사항" +msgstr "변경사항" #: editor/plugins/version_control_editor_plugin.cpp msgid "Modified" @@ -9550,7 +9578,7 @@ msgstr "모두 스테이지로 보내기" #: editor/plugins/version_control_editor_plugin.cpp msgid "Commit Changes" -msgstr "커밋 변경 사항" +msgstr "커밋 변경사항" #: editor/plugins/version_control_editor_plugin.cpp msgid "View file diffs before committing them to the latest version" @@ -9562,7 +9590,7 @@ msgstr "파일 diff가 켜져 있지 않습니다" #: editor/plugins/version_control_editor_plugin.cpp msgid "Detect changes in file diff" -msgstr "파일 diff에서 감지한 변경 사항" +msgstr "파일 차이에서 감지한 변경사항" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "(GLES3 only)" @@ -9598,11 +9626,11 @@ msgstr "출력 포트 추가" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Change input port type" -msgstr "입력 포트 유형 바꾸기" +msgstr "입력 포트 타입 바꾸기" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Change output port type" -msgstr "출력 포트 유형 바꾸기" +msgstr "출력 포트 타입 바꾸기" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Change input port name" @@ -9659,7 +9687,7 @@ msgstr "노드 삭제" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Visual Shader Input Type Changed" -msgstr "비주얼 셰이더 입력 유형 변경됨" +msgstr "비주얼 셰이더 입력 타입 변경됨" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "UniformRef Name Changed" @@ -9675,7 +9703,7 @@ msgstr "프래그먼트" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Light" -msgstr "조명" +msgstr "라이트" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Show resulted shader code." @@ -9731,7 +9759,7 @@ msgstr "하드 라이트 연산자." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Lighten operator." -msgstr "밝음 연산자." +msgstr "Lighten 연산자." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Overlay operator." @@ -9844,7 +9872,7 @@ msgstr "꼭짓점과 프래그먼트 셰이더 모드에 대한 '%s' 입력 매 #: editor/plugins/visual_shader_editor_plugin.cpp msgid "'%s' input parameter for fragment and light shader modes." -msgstr "프래그먼트과 조명 셰이더 모드에 대한 '%s' 입력 매개변수." +msgstr "프래그먼트와 라이트 셰이더 모드에 대한 '%s' 입력 매개변수." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "'%s' input parameter for fragment shader mode." @@ -10145,8 +10173,8 @@ msgstr "" "\n" "OuterProduct는 첫 매개변수 'c'를 열 벡터로 취급하고 (1열로 이루어진 행렬) 두 " "번째 매개변수 'r'을 행 벡터로 취급합니다 (1행으로 이루어진 행렬), 그리고 선" -"형 대수 행렬에 'c * r'을 곱해서 행렬을 산출하는데, 행 수는 'c'의 구성 요소 수" -"이고 열 수는 'r'의 구성 요소 수가 됩니다." +"형 대수 행렬에 'c * r'을 곱해서 행렬을 산출하는데, 행 수는 'c'의 컴포넌트 수" +"이고 열 수는 'r'의 컴포넌트 수가 됩니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Composes transform from four vectors." @@ -10339,9 +10367,9 @@ msgid "" "output ports. This is a direct injection of code into the vertex/fragment/" "light function, do not use it to write the function declarations inside." msgstr "" -"맞춤 입력 및 출력 포트로 이루어진, 맞춤 Godot 셰이더 언어 명령문. 꼭짓점/프래" -"그먼트/조명 함수에 직접 코드를 넣는 것이므로 코드 안에 함수 선언을 작성하는 " -"용도로 쓰지 마세요." +"커스텀 입력 및 출력 포트로 이루어진, 커스텀 Godot 셰이더 언어 표현식. 꼭짓점/" +"프래그먼트/라이트 함수에 직접 코드를 넣는 것이므로 코드 안에 함수 선언을 작성" +"하는 용도로 쓰지 마세요." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -10358,59 +10386,62 @@ msgid "" "it later in the Expressions. You can also declare varyings, uniforms and " "constants." msgstr "" -"결과 셰이더 위에 배치된, 맞춤 Godot 셰이더 언어 표현식. 다양한 함수 선언을 안" -"에 놓은 뒤 나중에 표현식에서 호출할 수 있습니다. Varying, Uniform, 상수도 선" -"언할 수 있습니다." +"결과 셰이더 위에 배치되는, 커스텀 Godot 셰이더 언어 표현식. 안에 다양한 함수 " +"선언을 작성하고 표현식에서 호출할 수 있습니다. Varying, Uniform, 상수도 선언" +"할 수 있습니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "A reference to an existing uniform." -msgstr "기존 유니폼에 대한 참조입니다." +msgstr "기존 Uniform에 대한 참조입니다." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "(Fragment/Light mode only) Scalar derivative function." -msgstr "(프래그먼트/조명 모드만 가능) 스칼라 미분 함수." +msgstr "(프래그먼트/라이트 모드만 가능) 스칼라 미분 함수." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "(Fragment/Light mode only) Vector derivative function." -msgstr "(프래그먼트/조명 모드만 가능) 벡터 미분 함수." +msgstr "(프래그먼트/라이트 모드만 가능) 벡터 미분 함수." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "(Fragment/Light mode only) (Vector) Derivative in 'x' using local " "differencing." -msgstr "(프래그먼트/조명 모드만 가능) 지역 차분을 이용한 'x'의 (벡터) 도함수." +msgstr "" +"(프래그먼트/라이트 모드만 가능) 지역 차분을 이용한 'x'의 (벡터) 도함수." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "(Fragment/Light mode only) (Scalar) Derivative in 'x' using local " "differencing." msgstr "" -"(프래그먼트/조명 모드만 가능) 지역 차분을 이용한 'x'의 (스칼라) 도함수." +"(프래그먼트/라이트 모드만 가능) 지역 차분을 이용한 'x'의 (스칼라) 도함수." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "(Fragment/Light mode only) (Vector) Derivative in 'y' using local " "differencing." -msgstr "(프래그먼트/조명 모드만 가능) 지역 차분을 이용한 'y'의 (벡터) 도함수." +msgstr "" +"(프래그먼트/라이트 모드만 가능) 지역 차분을 이용한 'y'의 (벡터) 도함수." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "(Fragment/Light mode only) (Scalar) Derivative in 'y' using local " "differencing." msgstr "" -"(프래그먼트/조명 모드만 가능) 지역 차분을 이용한 'y'의 (스칼라) 도함수." +"(프래그먼트/라이트 모드만 가능) 지역 차분을 이용한 'y'의 (스칼라) 도함수." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "(Fragment/Light mode only) (Vector) Sum of absolute derivative in 'x' and " "'y'." -msgstr "(프래그먼트/조명 모드만 가능) (벡터) 'x'와 'y'의 절대 미분 값의 합." +msgstr "(프래그먼트/라이트 모드만 가능) (벡터) 'x'와 'y'의 절대 미분 값의 합." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "(Fragment/Light mode only) (Scalar) Sum of absolute derivative in 'x' and " "'y'." -msgstr "(프래그먼트/조명 모드만 가능) (스칼라) 'x'와 'y'의 절대 미분 값의 합." +msgstr "" +"(프래그먼트/라이트 모드만 가능) (스칼라) 'x'와 'y'의 절대 미분 값의 합." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "VisualShader" @@ -10531,7 +10562,7 @@ msgstr "기능" #: editor/project_export.cpp msgid "Custom (comma-separated):" -msgstr "맞춤 (쉼표로 구분):" +msgstr "커스텀(쉼표로 구분):" #: editor/project_export.cpp msgid "Feature List:" @@ -10634,7 +10665,7 @@ msgstr "새 게임 프로젝트" #: editor/project_manager.cpp msgid "Imported Project" -msgstr "가져온 프로젝트" +msgstr "불러온 프로젝트" #: editor/project_manager.cpp msgid "Invalid project name." @@ -10690,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" @@ -10849,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?" @@ -10931,7 +10962,7 @@ msgstr "새 프로젝트" #: editor/project_manager.cpp msgid "Import Project" -msgstr "프로젝트 가져오기" +msgstr "프로젝트 불러오기" #: editor/project_manager.cpp msgid "Remove Project" @@ -11113,7 +11144,7 @@ msgstr "이벤트 추가" #: editor/project_settings_editor.cpp msgid "Button" -msgstr "버튼" +msgstr "Button" #: editor/project_settings_editor.cpp msgid "Left Button." @@ -11181,7 +11212,7 @@ msgstr "입력 액션 이벤트 이동함" #: editor/project_settings_editor.cpp msgid "Override for Feature" -msgstr "기능 재정의" +msgstr "기능 오버라이드" #: editor/project_settings_editor.cpp msgid "Add %d Translations" @@ -11229,11 +11260,11 @@ msgstr "일반" #: editor/project_settings_editor.cpp msgid "Override For..." -msgstr "재정의 대상..." +msgstr "오버라이드 대상..." #: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "The editor must be restarted for changes to take effect." -msgstr "변경 사항을 반영하려면 에디터를 다시 시작해야 합니다." +msgstr "변경사항을 반영하려면 에디터를 다시 시작해야 합니다." #: editor/project_settings_editor.cpp msgid "Input Map" @@ -11317,7 +11348,7 @@ msgstr "플러그인(Plugin)" #: editor/project_settings_editor.cpp msgid "Import Defaults" -msgstr "디폴트 가져오기" +msgstr "디폴트 불러오기" #: editor/property_editor.cpp msgid "Preset..." @@ -11413,7 +11444,7 @@ msgstr "노드의 부모 이름 (사용 가능한 경우)" #: editor/rename_dialog.cpp msgid "Node type" -msgstr "노드 유형" +msgstr "노드 타입" #: editor/rename_dialog.cpp msgid "Current scene name" @@ -11711,7 +11742,7 @@ msgstr "3D 씬" #: editor/scene_tree_dock.cpp msgid "User Interface" -msgstr "사용자 인터페이스" +msgstr "유저 인터페이스" #: editor/scene_tree_dock.cpp msgid "Other Node" @@ -11743,7 +11774,7 @@ msgstr "노드 제거" #: editor/scene_tree_dock.cpp msgid "Change type of node(s)" -msgstr "노드 유형 바꾸기" +msgstr "노드 타입 바꾸기" #: editor/scene_tree_dock.cpp msgid "" @@ -11795,7 +11826,7 @@ msgstr "모두 펼치기/접기" #: editor/scene_tree_dock.cpp msgid "Change Type" -msgstr "유형 바꾸기" +msgstr "타입 바꾸기" #: editor/scene_tree_dock.cpp msgid "Reparent to New Node" @@ -11887,16 +11918,16 @@ msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" -"노드가 %s 연결과 %s 그룹을 갖고 있습니다.\n" -"클릭하면 시그널 독을 보여줘요." +"노드에 %s 연결과 %s 그룹이 있습니다.\n" +"클릭하여 시그널 독을 봅니다." #: editor/scene_tree_editor.cpp msgid "" "Node has %s connection(s).\n" "Click to show signals dock." msgstr "" -"노드가 %s 연결을 갖고 있습니다.\n" -"클릭하면 시그널 독을 보여줘요." +"노드에 %s 연결이 있습니다.\n" +"클릭하여 시그널 독을 봅니다." #: editor/scene_tree_editor.cpp msgid "" @@ -12004,7 +12035,7 @@ msgstr "'%s' 스크립트 불러오는 중 오류" #: editor/script_create_dialog.cpp msgid "Overrides" -msgstr "재정의" +msgstr "오버라이드" #: editor/script_create_dialog.cpp msgid "N/A" @@ -12020,11 +12051,11 @@ msgstr "스크립트 열기" #: editor/script_create_dialog.cpp msgid "File exists, it will be reused." -msgstr "파일이 있습니다. 다시 사용할 것입니다." +msgstr "파일이 있습니다. 재사용될 것입니다." #: editor/script_create_dialog.cpp msgid "Invalid path." -msgstr "올바르지 않은 경로입니다." +msgstr "잘못된 경로." #: editor/script_create_dialog.cpp msgid "Invalid class name." @@ -12071,7 +12102,7 @@ msgid "" "Warning: Having the script name be the same as a built-in type is usually " "not desired." msgstr "" -"경고: 스크립트 이름을 내장 유형과 같게 정하는 적은 일반적으로 바람직하지 않습" +"경고: 스크립트 이름을 내장 타입과 같게 정하는 것은 일반적으로 바람직하지 않습" "니다." #: editor/script_create_dialog.cpp @@ -12140,7 +12171,7 @@ msgstr "자손 프로세스 연결됨." #: editor/script_editor_debugger.cpp msgid "Copy Error" -msgstr "복사 오류" +msgstr "오류 복사" #: editor/script_editor_debugger.cpp msgid "Open C++ Source on GitHub" @@ -12208,7 +12239,7 @@ msgstr "리소스 경로" #: editor/script_editor_debugger.cpp msgid "Type" -msgstr "유형" +msgstr "타입" #: editor/script_editor_debugger.cpp msgid "Format" @@ -12228,7 +12259,7 @@ msgstr "클릭된 Control:" #: editor/script_editor_debugger.cpp msgid "Clicked Control Type:" -msgstr "클릭된 Control 유형:" +msgstr "클릭된 컨트롤 타입:" #: editor/script_editor_debugger.cpp msgid "Live Edit Root:" @@ -12268,7 +12299,7 @@ msgstr "바인딩" #: editor/spatial_editor_gizmos.cpp msgid "Change Light Radius" -msgstr "조명 반경 바꾸기" +msgstr "라이트 반경 바꾸기" #: editor/spatial_editor_gizmos.cpp msgid "Change AudioStreamPlayer3D Emission Angle" @@ -12331,14 +12362,12 @@ msgid "Set Portal Point Position" msgstr "포털 점 위치 설정" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Set Occluder Sphere Radius" -msgstr "캡슐 모양 반지름 바꾸기" +msgstr "어클루더 구체 반지름 설정" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Set Occluder Sphere Position" -msgstr "곡선의 인 위치 설정" +msgstr "어클루더 구체 위치 설정" #: modules/csg/csg_gizmos.cpp msgid "Change Cylinder Radius" @@ -12602,7 +12631,7 @@ msgstr "버퍼 생성" #: modules/lightmapper_cpu/lightmapper_cpu.cpp msgid "Direct lighting" -msgstr "조명 방향" +msgstr "직접 조명" #: modules/lightmapper_cpu/lightmapper_cpu.cpp msgid "Indirect lighting" @@ -12614,16 +12643,15 @@ msgstr "후처리" #: modules/lightmapper_cpu/lightmapper_cpu.cpp msgid "Plotting lightmaps" -msgstr "구분하는 조명" +msgstr "라이트맵 그리는 중" #: modules/mono/csharp_script.cpp msgid "Class name can't be a reserved keyword" msgstr "클래스 이름은 키워드가 될 수 없습니다" #: modules/mono/csharp_script.cpp -#, fuzzy msgid "Build Solution" -msgstr "선택 항목 채우기" +msgstr "솔루션 빌드" #: modules/mono/mono_gd/gd_mono_utils.cpp msgid "End of inner exception stack trace" @@ -12731,7 +12759,7 @@ msgstr "시그널 인수 바꾸기" #: modules/visual_script/visual_script_editor.cpp msgid "Change Argument Type" -msgstr "인수 유형 바꾸기" +msgstr "인수 타입 바꾸기" #: modules/visual_script/visual_script_editor.cpp msgid "Change Argument name" @@ -12743,7 +12771,7 @@ msgstr "변수 기본값 설정" #: modules/visual_script/visual_script_editor.cpp msgid "Set Variable Type" -msgstr "변수 유형 설정" +msgstr "변수 타입 설정" #: modules/visual_script/visual_script_editor.cpp msgid "Add Input Port" @@ -12755,7 +12783,7 @@ msgstr "출력 포트 추가하기" #: modules/visual_script/visual_script_editor.cpp msgid "Change Port Type" -msgstr "포트 유형 바꾸기" +msgstr "포트 타입 바꾸기" #: modules/visual_script/visual_script_editor.cpp msgid "Change Port Name" @@ -12763,7 +12791,7 @@ msgstr "포트 이름 바꾸기" #: modules/visual_script/visual_script_editor.cpp msgid "Override an existing built-in function." -msgstr "존재하는 내장 함수를 재정의합니다." +msgstr "기존의 내장 함수를 오버라이드합니다." #: modules/visual_script/visual_script_editor.cpp msgid "Create a new function." @@ -12900,7 +12928,7 @@ msgstr "Setter 속성 추가" #: modules/visual_script/visual_script_editor.cpp msgid "Change Base Type" -msgstr "기본 유형 바꾸기" +msgstr "기본 타입 바꾸기" #: modules/visual_script/visual_script_editor.cpp msgid "Move Node(s)" @@ -12928,7 +12956,7 @@ msgstr "노드 시퀀스 연결" #: modules/visual_script/visual_script_editor.cpp msgid "Script already has function '%s'" -msgstr "스크립트가 이미 '%s' 함수를 갖고 있습니다" +msgstr "스크립트에 이미 '%s' 함수가 있습니다" #: modules/visual_script/visual_script_editor.cpp msgid "Change Input Value" @@ -12996,7 +13024,7 @@ msgstr "멤버:" #: modules/visual_script/visual_script_editor.cpp msgid "Change Base Type:" -msgstr "기본 유형 바꾸기:" +msgstr "기본 타입 바꾸기:" #: modules/visual_script/visual_script_editor.cpp msgid "Add Nodes..." @@ -13020,7 +13048,7 @@ msgstr "선택 항목 삭제" #: modules/visual_script/visual_script_editor.cpp msgid "Find Node Type" -msgstr "노드 유형 찾기" +msgstr "노드 타입 찾기" #: modules/visual_script/visual_script_editor.cpp msgid "Copy Nodes" @@ -13044,7 +13072,7 @@ msgstr "멤버 편집" #: modules/visual_script/visual_script_flow_control.cpp msgid "Input type not iterable: " -msgstr "반복할 수 없는 입력 유형: " +msgstr "반복할 수 없는 입력 타입: " #: modules/visual_script/visual_script_flow_control.cpp msgid "Iterator became invalid" @@ -13072,7 +13100,7 @@ msgstr "노드 %s 안에 인덱스 속성 이름 '%s'이(가) 잘못되었습니 #: modules/visual_script/visual_script_nodes.cpp msgid ": Invalid argument of type: " -msgstr ": 잘못된 인수 유형: " +msgstr ": 잘못된 인수 타입: " #: modules/visual_script/visual_script_nodes.cpp msgid ": Invalid arguments: " @@ -13088,7 +13116,7 @@ msgstr "VariableSet을 스크립트에서 찾을 수 없음: " #: modules/visual_script/visual_script_nodes.cpp msgid "Custom node has no _step() method, can't process graph." -msgstr "맞춤 노드에 _step() 메서드가 없습니다. 그래프를 처리할 수 없습니다." +msgstr "커스텀 노드에 _step() 메서드가 없습니다. 그래프를 처리할 수 없습니다." #: modules/visual_script/visual_script_nodes.cpp msgid "" @@ -13316,8 +13344,8 @@ msgid "" "Trying to build from a custom built template, but no version info for it " "exists. Please reinstall from the 'Project' menu." msgstr "" -"맞춤 빌드 템플릿으로 빌드하려 했으나, 버전 정보가 없습니다. '프로젝트' 메뉴에" -"서 다시 설치해주세요." +"커스텀 빌드 템플릿으로 빌드하려 했으나, 버전 정보가 없습니다. '프로젝트" +"(Project)' 메뉴에서 다시 설치해주세요." #: platform/android/export/export_plugin.cpp msgid "" @@ -13651,7 +13679,7 @@ msgstr "노드 A와 노드 B는 서로 다른 PhysicsBody2D여야 합니다" msgid "" "A texture with the shape of the light must be supplied to the \"Texture\" " "property." -msgstr "조명의 모양을 나타낼 텍스처를 \"Texture\" 속성에 지정해야 합니다." +msgstr "라이트 모양의 텍스처는 반드시 \"Texture\" 속성에 지정해야 합니다." #: scene/2d/light_occluder_2d.cpp msgid "" @@ -13764,11 +13792,11 @@ msgstr "" #: scene/3d/arvr_nodes.cpp msgid "ARVRCamera must have an ARVROrigin node as its parent." -msgstr "ARVRCamera는 반드시 ARVROrigin 노드를 부모로 갖고 있어야 합니다." +msgstr "ARVRCamera의 부모 노드는 반드시 ARVROrigin이어야 합니다." #: scene/3d/arvr_nodes.cpp msgid "ARVRController must have an ARVROrigin node as its parent." -msgstr "ARVRController는 반드시 ARVROrigin 노드를 부모로 갖고 있어야 합니다." +msgstr "ARVRController의 부모 노드는 반드시 ARVROrigin이어야 합니다." #: scene/3d/arvr_nodes.cpp msgid "" @@ -13779,7 +13807,7 @@ msgstr "" #: scene/3d/arvr_nodes.cpp msgid "ARVRAnchor must have an ARVROrigin node as its parent." -msgstr "ARVRAnchor는 반드시 ARVROrigin 노드를 부모로 갖고 있어야 합니다." +msgstr "ARVRAnchor의 부모 노드는 반드시 ARVROrigin이어야 합니다." #: scene/3d/arvr_nodes.cpp msgid "" @@ -13793,7 +13821,7 @@ msgstr "ARVROrigin은 자손으로 ARVRCamera 노드가 필요합니다." #: scene/3d/baked_lightmap.cpp msgid "Finding meshes and lights" -msgstr "메시 및 조명을 찾는 중" +msgstr "메시 및 라이트를 찾는 중" #: scene/3d/baked_lightmap.cpp msgid "Preparing geometry (%d/%d)" @@ -13809,7 +13837,7 @@ msgstr "캡처 생성 중" #: scene/3d/baked_lightmap.cpp msgid "Saving lightmaps" -msgstr "라이트맵을 저장 중" +msgstr "라이트맵 저장 중" #: scene/3d/baked_lightmap.cpp msgid "Done" @@ -13912,7 +13940,7 @@ msgstr "" #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." -msgstr "SpotLight의 각도를 90도 이상으로 잡게되면 그림자를 투영할 수 없습니다." +msgstr "SpotLight의 각도를 90도 이상으로 잡으면 그림자를 투영할 수 없습니다." #: scene/3d/navigation_mesh.cpp msgid "A NavigationMesh resource must be set or created for this node to work." @@ -13929,11 +13957,11 @@ msgstr "" #: scene/3d/occluder.cpp msgid "No shape is set." -msgstr "" +msgstr "설정할 모양이 없습니다." #: scene/3d/occluder.cpp msgid "Only uniform scales are supported." -msgstr "" +msgstr "Uniform 스케일만 지원됩니다." #: scene/3d/particles.cpp msgid "" @@ -14120,8 +14148,8 @@ msgid "" "running.\n" "Change the size in children collision shapes instead." msgstr "" -"실행 중에 SoftBody의 크기 변경은 물리 엔진에 의해 재정의됩니다.\n" -"대신 자손 콜리전 모양의 크기를 변경하세요." +"실행 중에 SoftBody의 크기 변경은 물리 엔진에 의해 오버라이드됩니다.\n" +"대신 자식 콜리전 모양의 크기를 변경하세요." #: scene/3d/sprite_3d.cpp msgid "" @@ -14191,8 +14219,7 @@ msgstr "그래프를 위한 루트 AnimationNode를 설정하지 않았습니다 #: scene/animation/animation_tree.cpp msgid "Path to an AnimationPlayer node containing animations is not set." -msgstr "" -"애니메이션을 갖고 있는 AnimationPlayer 노드의 경로를 설정하지 않았습니다." +msgstr "애니메이션을 포함한 AnimationPlayer 노드의 경로를 설정하지 않았습니다." #: scene/animation/animation_tree.cpp msgid "Path set for AnimationPlayer does not lead to an AnimationPlayer node." @@ -14279,6 +14306,10 @@ msgid "" "The GLES2 backend is currently in use, so these modes will act like Stretch " "instead." msgstr "" +"축 스트레치 속성에 대한 타일 및 타일 맞춤 옵션은 GLES3 렌더링 백엔드를 사용" +"할 때만 효과적입니다.\n" +"GLES2 백엔드가 현재 사용 중이므로, 이러한 모드는 대신 스트레치처럼 작동합니" +"다." #: scene/gui/popup.cpp msgid "" @@ -14300,8 +14331,8 @@ msgid "" "minimum size manually." msgstr "" "ScrollContainer는 단일 자손 Control을 작업하기 위한 것입니다.\n" -"(VBox, HBox 등) 컨테이너를 자손으로 사용하거나, Control을 사용하고 맞춤 최소 " -"수치를 수동으로 설정하세요." +"(VBox, HBox 등) 컨테이너를 자손으로 사용하거나, Control을 사용하고 사용자 지" +"정 최소 수치를 수동으로 설정하세요." #: scene/gui/tree.cpp msgid "(Other)" @@ -14315,6 +14346,14 @@ msgstr "" "프로젝트 설정 (Rendering -> Environment -> Default Environment)에 지정한 디폴" "트 환경을 불러올 수 없습니다." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14328,12 +14367,15 @@ msgstr "" "를 다른 노드에 지정해야 합니다." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "무엇이든 렌더링하려면 뷰포트 크기가 0보다 커야 합니다." #: scene/resources/occluder_shape.cpp msgid "OccluderShapeSphere Set Spheres" -msgstr "" +msgstr "OccluderShapeSphere를 구체로 설정" #: scene/resources/visual_shader_nodes.cpp msgid "" @@ -14345,7 +14387,7 @@ msgstr "" #: scene/resources/visual_shader_nodes.cpp msgid "Invalid source for preview." -msgstr "미리 보기에 잘못된 소스." +msgstr "미리보기에 잘못된 소스." #: scene/resources/visual_shader_nodes.cpp msgid "Invalid source for shader." @@ -14353,7 +14395,7 @@ msgstr "셰이더에 잘못된 소스." #: scene/resources/visual_shader_nodes.cpp msgid "Invalid comparison function for that type." -msgstr "해당 유형에 잘못된 비교 함수." +msgstr "해당 타입에 잘못된 비교 함수." #: servers/visual/shader_language.cpp msgid "Varying may not be assigned in the '%s' function." @@ -14377,7 +14419,7 @@ msgstr "" #: servers/visual/shader_language.cpp msgid "Fragment-stage varying could not been accessed in custom function!" -msgstr "맞춤 함수에서 Fragment-stage varying에 접근할 수 없습니다!" +msgstr "커스텀 함수에서 Fragment-stage varying에 접근할 수 없습니다!" #: servers/visual/shader_language.cpp msgid "Assignment to function." @@ -16167,9 +16209,6 @@ msgstr "상수는 수정할 수 없습니다." #~ msgid "Couldn't save atlas image:" #~ msgstr "아틀라스 이미지를 저장할 수 없음:" -#~ msgid "Couldn't save converted texture:" -#~ msgstr "변환된 텍스쳐를 저장할 수 없음:" - #~ msgid "Invalid translation source!" #~ msgstr "유효하지 않은 번역 소스!" diff --git a/editor/translations/lt.po b/editor/translations/lt.po index a853757f43..404f9f5096 100644 --- a/editor/translations/lt.po +++ b/editor/translations/lt.po @@ -6,12 +6,14 @@ # Kornelijus <kornelijus.github@gmail.com>, 2017, 2018. # Ignotas Gražys <ignotas.gr@gmail.com>, 2020. # Kornelijus Tvarijanavičius <kornelitvari@protonmail.com>, 2020, 2021. +# Lukas Hamm <ideallygrey@tuta.io>, 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-02-21 10:51+0000\n" -"Last-Translator: Kornelijus Tvarijanavičius <kornelitvari@protonmail.com>\n" +"PO-Revision-Date: 2021-10-15 04:33+0000\n" +"Last-Translator: Lukas Hamm <ideallygrey@tuta.io>\n" "Language-Team: Lithuanian <https://hosted.weblate.org/projects/godot-engine/" "godot/lt/>\n" "Language: lt\n" @@ -20,7 +22,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=n==1 ? 0 : n%10>=2 && (n%100<10 || n" "%100>=20) ? 1 : n%10==0 || (n%100>10 && n%100<20) ? 2 : 3;\n" -"X-Generator: Weblate 4.5\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 @@ -640,7 +642,7 @@ msgstr "" #: editor/animation_track_editor.cpp msgid "Optimize" -msgstr "" +msgstr "Optimizuoti" #: editor/animation_track_editor.cpp msgid "Remove invalid keys" @@ -660,7 +662,7 @@ msgstr "" #: editor/animation_track_editor.cpp msgid "Clean-Up" -msgstr "" +msgstr "Išvalyti" #: editor/animation_track_editor.cpp msgid "Scale Ratio:" @@ -711,11 +713,11 @@ msgstr "" #: editor/code_editor.cpp msgid "Go to Line" -msgstr "" +msgstr "Eik į Eilutę" #: editor/code_editor.cpp msgid "Line Number:" -msgstr "" +msgstr "Eilės Numeris:" #: editor/code_editor.cpp msgid "%d replaced." @@ -739,11 +741,11 @@ msgstr "" #: editor/code_editor.cpp msgid "Replace" -msgstr "" +msgstr "Pakeisti" #: editor/code_editor.cpp msgid "Replace All" -msgstr "" +msgstr "Pakeisti Visus" #: editor/code_editor.cpp msgid "Selection Only" @@ -892,7 +894,7 @@ msgstr "Užverti" #: editor/connections_dialog.cpp msgid "Connect" -msgstr "" +msgstr "Prijungti" #: editor/connections_dialog.cpp #, fuzzy @@ -996,7 +998,7 @@ msgstr "Naujausi:" #: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" -msgstr "" +msgstr "Ieškoti:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp #: editor/property_selector.cpp editor/quick_open.cpp @@ -1035,16 +1037,16 @@ msgstr "" #: editor/dependency_editor.cpp #: modules/gdnative/gdnative_library_editor_plugin.cpp msgid "Dependencies" -msgstr "" +msgstr "Priklausomybės" #: editor/dependency_editor.cpp editor/editor_resource_picker.cpp msgid "Resource" -msgstr "" +msgstr "Ištekliai" #: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp #: editor/project_manager.cpp editor/project_settings_editor.cpp msgid "Path" -msgstr "" +msgstr "Takas" #: editor/dependency_editor.cpp msgid "Dependencies:" @@ -1052,7 +1054,7 @@ msgstr "" #: editor/dependency_editor.cpp msgid "Fix Broken" -msgstr "" +msgstr "Pataisymas Sugedęs" #: editor/dependency_editor.cpp msgid "Dependency Editor" @@ -1138,11 +1140,11 @@ msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp #: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp msgid "Delete" -msgstr "" +msgstr "Ištrinti" #: editor/dependency_editor.cpp msgid "Owns" -msgstr "" +msgstr "Priklauso" #: editor/dependency_editor.cpp msgid "Resources Without Explicit Ownership:" @@ -1185,11 +1187,11 @@ msgstr "" #: editor/editor_about.cpp msgid "Developers" -msgstr "" +msgstr "Kūrėjai" #: editor/editor_about.cpp msgid "Authors" -msgstr "" +msgstr "Autoriai" #: editor/editor_about.cpp msgid "Platinum Sponsors" @@ -1225,11 +1227,11 @@ msgstr "" #: editor/editor_about.cpp msgid "Donors" -msgstr "" +msgstr "Donorai" #: editor/editor_about.cpp msgid "License" -msgstr "" +msgstr "Licencija" #: editor/editor_about.cpp msgid "Third-party Licenses" @@ -1253,7 +1255,7 @@ msgstr "" #: editor/editor_about.cpp msgid "Licenses" -msgstr "" +msgstr "Licencijas" #: editor/editor_asset_installer.cpp msgid "Error opening asset file for \"%s\" (not in ZIP format)." @@ -1290,11 +1292,11 @@ msgstr "" #: editor/editor_asset_installer.cpp #: editor/plugins/asset_library_editor_plugin.cpp msgid "Success!" -msgstr "" +msgstr "Sėkmė!" #: editor/editor_asset_installer.cpp editor/editor_node.cpp msgid "Install" -msgstr "" +msgstr "Diegti" #: editor/editor_asset_installer.cpp #, fuzzy @@ -1303,7 +1305,7 @@ msgstr "(Įdiegta)" #: editor/editor_audio_buses.cpp msgid "Speakers" -msgstr "" +msgstr "Garsiakalbiai" #: editor/editor_audio_buses.cpp msgid "Add Effect" @@ -1351,7 +1353,7 @@ msgstr "" #: editor/editor_audio_buses.cpp msgid "Solo" -msgstr "" +msgstr "Solo" #: editor/editor_audio_buses.cpp msgid "Mute" @@ -1359,7 +1361,7 @@ msgstr "Nutildyti" #: editor/editor_audio_buses.cpp msgid "Bypass" -msgstr "" +msgstr "Apeiti" #: editor/editor_audio_buses.cpp #, fuzzy @@ -1448,7 +1450,7 @@ msgstr "" #: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp #: editor/script_create_dialog.cpp msgid "Load" -msgstr "" +msgstr "Įkelti" #: editor/editor_audio_buses.cpp msgid "Load an existing Bus Layout." @@ -1520,7 +1522,7 @@ msgstr "" #: editor/editor_autoload_settings.cpp editor/editor_plugin_settings.cpp msgid "Enable" -msgstr "" +msgstr "Įgalinti" #: editor/editor_autoload_settings.cpp msgid "Rearrange Autoloads" @@ -1547,7 +1549,7 @@ msgstr "" #: editor/plugins/animation_tree_editor_plugin.cpp #: editor/script_create_dialog.cpp scene/gui/file_dialog.cpp msgid "Path:" -msgstr "" +msgstr "Kelias:" #: editor/editor_autoload_settings.cpp msgid "Node Name:" @@ -1557,7 +1559,7 @@ msgstr "" #: editor/editor_plugin_settings.cpp editor/editor_profiler.cpp #: editor/project_manager.cpp editor/settings_config_dialog.cpp msgid "Name" -msgstr "" +msgstr "Vardas" #: editor/editor_autoload_settings.cpp msgid "Global Variable" @@ -1606,7 +1608,7 @@ msgstr "" #: 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 "Vardas:" #: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp #: editor/filesystem_dock.cpp scene/gui/file_dialog.cpp @@ -1615,7 +1617,7 @@ msgstr "" #: editor/editor_dir_dialog.cpp msgid "Choose" -msgstr "" +msgstr "Pasirinkite" #: editor/editor_export.cpp msgid "Storing File:" @@ -2399,6 +2401,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2516,6 +2526,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2841,10 +2855,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4300,6 +4310,18 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "" @@ -4309,10 +4331,6 @@ msgid "Preset" msgstr "Atstatyti Priartinimą" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "" @@ -7297,12 +7315,14 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" -msgstr "" +#, fuzzy +msgid "Next Script" +msgstr "Atidaryti Skriptų Editorių" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" -msgstr "" +#, fuzzy +msgid "Previous Script" +msgstr "Pasirinkite Nodus, kuriuos norite importuoti" #: editor/plugins/script_editor_plugin.cpp msgid "File" @@ -7374,7 +7394,7 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp #: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" -msgstr "" +msgstr "Ieškoti" #: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp msgid "Step Into" @@ -7721,7 +7741,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7729,6 +7749,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -8070,6 +8094,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -14136,6 +14180,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14145,7 +14197,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/lv.po b/editor/translations/lv.po index 26674cb5b8..68dd8370bd 100644 --- a/editor/translations/lv.po +++ b/editor/translations/lv.po @@ -11,6 +11,7 @@ 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" @@ -2381,6 +2382,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Saglabāt Visas Ainas" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2497,6 +2506,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2817,10 +2830,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Saglabāt Visas Ainas" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4235,18 +4244,26 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" -msgstr "Sagatave" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" msgstr "" #: editor/import_dock.cpp +msgid "Preset" +msgstr "Sagatave" + +#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "" @@ -7154,12 +7171,14 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" -msgstr "" +#, fuzzy +msgid "Next Script" +msgstr "Galvenais Skripts:" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" -msgstr "" +#, fuzzy +msgid "Previous Script" +msgstr "Izvēlēties šo Mapi" #: editor/plugins/script_editor_plugin.cpp msgid "File" @@ -7578,7 +7597,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7586,6 +7605,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7928,6 +7951,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13929,6 +13972,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13938,7 +13989,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp @@ -14047,10 +14100,6 @@ msgstr "" #~ msgstr "Nederīgs fonta izmērs." #, fuzzy -#~ msgid "Previous Folder" -#~ msgstr "Izvēlēties šo Mapi" - -#, fuzzy #~ msgid "Next Folder" #~ msgstr "Izvēlēties šo Mapi" diff --git a/editor/translations/mi.po b/editor/translations/mi.po index 456d89671e..b51c143856 100644 --- a/editor/translations/mi.po +++ b/editor/translations/mi.po @@ -6,6 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" +"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "Language: mi\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8-bit\n" @@ -2312,6 +2313,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2428,6 +2437,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2747,10 +2760,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4150,15 +4159,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7039,11 +7056,11 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +msgid "Next Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +msgid "Previous Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp @@ -7453,7 +7470,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7461,6 +7478,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7798,6 +7819,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13655,6 +13696,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13664,7 +13713,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/mk.po b/editor/translations/mk.po index 26d14a75ba..d9663ce943 100644 --- a/editor/translations/mk.po +++ b/editor/translations/mk.po @@ -7,6 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" +"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "PO-Revision-Date: 2021-01-22 10:21+0000\n" "Last-Translator: Kristijan Fremen Velkovski <me@krisfremen.com>\n" "Language-Team: Macedonian <https://hosted.weblate.org/projects/godot-engine/" @@ -2320,6 +2321,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2436,6 +2445,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2755,10 +2768,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4159,15 +4168,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7054,11 +7071,11 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +msgid "Next Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +msgid "Previous Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp @@ -7468,7 +7485,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7476,6 +7493,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7813,6 +7834,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13670,6 +13711,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13679,7 +13728,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/ml.po b/editor/translations/ml.po index b9f86d4cf2..21a19ba01b 100644 --- a/editor/translations/ml.po +++ b/editor/translations/ml.po @@ -8,6 +8,7 @@ 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: 2019-11-09 22:04+0000\n" "Last-Translator: Anvar Nazar <anvarnasar@ymail.com>\n" @@ -2327,6 +2328,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2443,6 +2452,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2762,10 +2775,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4166,15 +4175,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7063,11 +7080,11 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +msgid "Next Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +msgid "Previous Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp @@ -7477,7 +7494,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7485,6 +7502,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7822,6 +7843,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13682,6 +13723,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13691,7 +13740,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/mr.po b/editor/translations/mr.po index e305a8b937..0d02f7b34a 100644 --- a/editor/translations/mr.po +++ b/editor/translations/mr.po @@ -7,6 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" +"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "PO-Revision-Date: 2020-12-23 22:57+0000\n" "Last-Translator: Prachi Joshi <josprachi@yahoo.com>\n" "Language-Team: Marathi <https://hosted.weblate.org/projects/godot-engine/" @@ -2320,6 +2321,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2436,6 +2445,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2755,10 +2768,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4159,15 +4168,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7052,11 +7069,11 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +msgid "Next Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +msgid "Previous Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp @@ -7466,7 +7483,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7474,6 +7491,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7812,6 +7833,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13674,6 +13715,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13683,7 +13732,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/ms.po b/editor/translations/ms.po index ca77c01937..cc9f6f797b 100644 --- a/editor/translations/ms.po +++ b/editor/translations/ms.po @@ -10,12 +10,14 @@ # keviinx <keviinx@yahoo.com>, 2020. # Keviindran Ramachandran <keviinx@yahoo.com>, 2020, 2021. # Jacque Fresco <aidter@use.startmail.com>, 2021. +# Lemoney <railkill@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-08-22 22:46+0000\n" -"Last-Translator: Keviindran Ramachandran <keviinx@yahoo.com>\n" +"PO-Revision-Date: 2021-10-10 10:18+0000\n" +"Last-Translator: Lemoney <railkill@gmail.com>\n" "Language-Team: Malay <https://hosted.weblate.org/projects/godot-engine/godot/" "ms/>\n" "Language: ms\n" @@ -23,7 +25,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.8.1-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 @@ -376,9 +378,8 @@ 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 "Set Peralihan ke:" +msgstr "animasi" #: editor/animation_track_editor.cpp msgid "AnimationPlayer can't animate itself, only other players." @@ -386,9 +387,8 @@ msgstr "AnimationPlayer tidak animasikan dirinya sendiri, hanya pemain lain." #. 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 "Sifat" +msgstr "sifat '%s'" #: editor/animation_track_editor.cpp msgid "Anim Create & Insert" @@ -618,9 +618,8 @@ msgid "Use Bezier Curves" msgstr "Guna Lengkung Bezier" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Create RESET Track(s)" -msgstr "Tampal Trek" +msgstr "Cipta Trek RESET" #: editor/animation_track_editor.cpp msgid "Anim. Optimizer" @@ -948,7 +947,6 @@ msgid "Edit..." msgstr "Edit..." #: editor/connections_dialog.cpp -#, fuzzy msgid "Go to Method" msgstr "Pergi ke Kaedah" @@ -1070,18 +1068,16 @@ msgid "Owners Of:" msgstr "Pemilik:" #: 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 "" -"Alih keluar fail terpilih dari projek? (Tidak boleh buat asal)\n" -"Anda boleh mencari fail yang dikeluarkan dalam tong sampah untuk " -"memulihkannya." +"Keluarkan fail terpilih dari projek? (Tidak boleh buat asal.)\n" +"Bergantung kepada konfigurasi sistem fail anda, fail yang dikeluarkan akan " +"dipindah ke tong sampah atau dipadamkan secara kekal." #: editor/dependency_editor.cpp -#, fuzzy msgid "" "The files being removed are required by other resources in order for them to " "work.\n" @@ -1091,9 +1087,9 @@ msgid "" msgstr "" "Fail yang akan dikeluarkan diperlukan oleh sumber lain agar dapat " "berfungsi.\n" -"Masih mahu keluarkan fail tersebut? (tidak boleh buat asal)\n" -"Anda boleh mencari fail yang dikeluarkan dalam tong sampah untuk " -"memulihkannya." +"Masih mahu keluarkan fail tersebut? (Tidak boleh buat asal.)\n" +"Bergantung kepada konfigurasi sistem fail anda, fail yang dikeluarkan akan " +"dipindah ke tong sampah atau dipadamkan secara kekal." #: editor/dependency_editor.cpp msgid "Cannot remove:" @@ -1263,14 +1259,12 @@ msgid "Licenses" msgstr "Lesen" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Error opening asset file for \"%s\" (not in ZIP format)." -msgstr "Ralat semasa membuka fail pakej, bukan dalam format ZIP." +msgstr "Ralat membuka fail aset untuk \"%s\" (bukan dalam format ZIP)." #: editor/editor_asset_installer.cpp -#, fuzzy msgid "%s (already exists)" -msgstr "%s (Sudah Wujud)" +msgstr "%s (sudah wujud)" #: editor/editor_asset_installer.cpp msgid "Contents of asset \"%s\" - %d file(s) conflict with your project:" @@ -1285,19 +1279,16 @@ msgid "Uncompressing Assets" msgstr "Nyahmampatkan Aset" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "The following files failed extraction from asset \"%s\":" -msgstr "Fail berikut gagal diekstrak dari pakej:" +msgstr "Fail berikut gagal diekstrak dari aset \"%s\":" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "(and %s more files)" -msgstr "Dan sebanyak %s fail." +msgstr "(dan %s fail lagi)" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Asset \"%s\" installed successfully!" -msgstr "Pakej berjaya dipasang!" +msgstr "Aset \"%s\" berjaya dipasang!" #: editor/editor_asset_installer.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -1309,9 +1300,8 @@ msgid "Install" msgstr "Pasang" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Asset Installer" -msgstr "Pemasang Pakej" +msgstr "Pemasang Aset" #: editor/editor_audio_buses.cpp msgid "Speakers" @@ -1374,9 +1364,8 @@ msgid "Bypass" msgstr "Pintas" #: editor/editor_audio_buses.cpp -#, fuzzy msgid "Bus Options" -msgstr "Pilihan bas" +msgstr "Pilihan Bas" #: editor/editor_audio_buses.cpp editor/filesystem_dock.cpp #: editor/plugins/animation_player_editor_plugin.cpp editor/scene_tree_dock.cpp @@ -1761,36 +1750,39 @@ msgstr "Memberikan akses terbina dalam kepada Perpustakaan Aset." #: editor/editor_feature_profile.cpp msgid "Allows editing the node hierarchy in the Scene dock." -msgstr "" +msgstr "Membenarkan suntingan hierarki nod di dalam dok Adegan." #: editor/editor_feature_profile.cpp msgid "" "Allows to work with signals and groups of the node selected in the Scene " "dock." msgstr "" +"Membenarkan fungsi isyarat dan kumpulan nod yang telah dipilih di dalam dok " +"Adegan." #: editor/editor_feature_profile.cpp msgid "Allows to browse the local file system via a dedicated dock." -msgstr "" +msgstr "Membenarkan semakan sistem fail lokal melalui dok yang khas." #: editor/editor_feature_profile.cpp msgid "" "Allows to configure import settings for individual assets. Requires the " "FileSystem dock to function." msgstr "" +"Membenarkan konfigurasi tetapan import untuk setiap aset. Memerlukan dok " +"FileSystem untuk berfungsi." #: editor/editor_feature_profile.cpp -#, fuzzy msgid "(current)" -msgstr "(Semasa)" +msgstr "(semasa)" #: editor/editor_feature_profile.cpp msgid "(none)" -msgstr "" +msgstr "(tiada)" #: editor/editor_feature_profile.cpp msgid "Remove currently selected profile, '%s'? Cannot be undone." -msgstr "" +msgstr "Keluarkan profil, '%s' yang sedang dipilih? Tidak boleh dibuat asal." #: editor/editor_feature_profile.cpp msgid "Profile must be a valid filename and must not contain '.'" @@ -1821,19 +1813,16 @@ msgid "Enable Contextual Editor" msgstr "Aktifkan Editor Kontekstual" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Class Properties:" -msgstr "Tutup Semua Sifat-sifat" +msgstr "Sifat-sifat Kelas:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Main Features:" -msgstr "Ciri Diaktifkan:" +msgstr "Ciri-ciri Utama:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Nodes and Classes:" -msgstr "Kelas Diaktifkan:" +msgstr "Nod-nod dan Kelas-kelas:" #: editor/editor_feature_profile.cpp msgid "File '%s' format is invalid, import aborted." @@ -1861,14 +1850,12 @@ msgid "Current Profile:" msgstr "Profil Semasa:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Create Profile" -msgstr "Padam Profil" +msgstr "Cipta Profil" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Remove Profile" -msgstr "Buang Trek Anim" +msgstr "Keluarkan Profil" #: editor/editor_feature_profile.cpp msgid "Available Profiles:" @@ -1888,18 +1875,18 @@ msgid "Export" msgstr "Eksport" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Configure Selected Profile:" -msgstr "Profil Semasa:" +msgstr "Kemas Kini Profil Terpilih:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Extra Options:" -msgstr "Pilihan Kelas:" +msgstr "Pilihan Tambahan:" #: editor/editor_feature_profile.cpp msgid "Create or import a profile to edit available classes and properties." msgstr "" +"Cipta atau import sebuah profil untuk menyunting kelas-kelas dan sifat-sifat " +"yang ada." #: editor/editor_feature_profile.cpp msgid "New profile name:" @@ -1926,9 +1913,8 @@ msgid "Select Current Folder" msgstr "Pilih Folder Semasa" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp -#, fuzzy msgid "File exists, overwrite?" -msgstr "Fail Wujud, Tulis Ganti?" +msgstr "Fail wujud, tulis ganti?" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Select This Folder" @@ -2246,7 +2232,7 @@ msgstr "Sifat:" #: editor/editor_inspector.cpp editor/scene_tree_dock.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Set %s" -msgstr "" +msgstr "Tetapkan %s" #: editor/editor_inspector.cpp msgid "Set Multiple:" @@ -2326,6 +2312,9 @@ msgid "" "Update Continuously is enabled, which can increase power usage. Click to " "disable it." msgstr "" +"Berputar apabila tingkap editor dilukis semula.\n" +"Kemas Kini Secara Berterusan adalah aktif, ia boleh meningkatkan penggunaan " +"kuasa. Klik untuk nyahaktifkannya." #: editor/editor_node.cpp msgid "Spins when the editor window redraws." @@ -2423,6 +2412,15 @@ msgstr "" "Tidak dapat menyimpan adegan. Kemungkinan kebergantungan (instance atau " "warisan) tidak dapat dipenuhi." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Tidak dapat memulakan subproses!" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Simpan Semua Adegan-adegan" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Tidak boleh tulis ganti adegan yang masih terbuka!" @@ -2559,6 +2557,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Simpan perubahan pada '%s' sebelum menutup?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2908,10 +2910,6 @@ msgid "Save Scene" msgstr "Simpan Adegan" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Simpan Semua Adegan-adegan" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Tukar Kepada..." @@ -2979,9 +2977,8 @@ msgid "Orphan Resource Explorer..." msgstr "Penjelajah Sumber Yatim..." #: editor/editor_node.cpp -#, fuzzy msgid "Reload Current Project" -msgstr "Profil Semasa:" +msgstr "Muat Semula Projek Semasa" #: editor/editor_node.cpp msgid "Quit to Project List" @@ -3422,9 +3419,8 @@ msgid "Update" msgstr "Kemas kini" #: editor/editor_plugin_settings.cpp -#, fuzzy msgid "Version" -msgstr "Versi:" +msgstr "Versi" #: editor/editor_plugin_settings.cpp #, fuzzy @@ -3711,9 +3707,8 @@ msgid "Can't resolve the requested address." msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Can't connect to the mirror." -msgstr "Tidak dapat menyambung." +msgstr "Tidak dapat menyambung ke tapak web." #: editor/export_template_manager.cpp #, fuzzy @@ -4418,6 +4413,18 @@ msgid "Clear Default for '%s'" msgstr "Kosongkan Lalai untuk '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Import semula" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Import Sebagai:" @@ -4426,10 +4433,6 @@ msgid "Preset" msgstr "Pratetap" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Import semula" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "Simpan Adegan, Import semula, dan Mula Semula" @@ -7348,12 +7351,14 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" -msgstr "" +#, fuzzy +msgid "Next Script" +msgstr "Skrip Baru" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" -msgstr "" +#, fuzzy +msgid "Previous Script" +msgstr "Tab sebelumnya" #: editor/plugins/script_editor_plugin.cpp msgid "File" @@ -7765,7 +7770,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7773,6 +7778,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -8119,6 +8128,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -14089,6 +14118,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14098,7 +14135,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/nb.po b/editor/translations/nb.po index 0b9333655f..660c01fed9 100644 --- a/editor/translations/nb.po +++ b/editor/translations/nb.po @@ -21,6 +21,7 @@ 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" @@ -2504,6 +2505,15 @@ msgstr "" "Kunne ikke lagre scene. Sannsynligvis kunne ikke avhengigheter (instanser " "eller arvinger) oppfylles." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Kunne ikke starta subprosess!" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Lagre Alle Scener" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Kan ikke overskrive en scene som fortsatt er åpen!" @@ -2640,6 +2650,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Lagre endringer til '%s' før lukking?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2993,10 +3007,6 @@ msgid "Save Scene" msgstr "Lagre Scene" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Lagre Alle Scener" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Konverter Til..." @@ -4552,6 +4562,18 @@ msgid "Clear Default for '%s'" msgstr "Fjern Standard for '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Reimporter" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Importer Som:" @@ -4561,10 +4583,6 @@ msgid "Preset" msgstr "Preset..." #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Reimporter" - -#: editor/import_dock.cpp #, fuzzy msgid "Save Scenes, Re-Import, and Restart" msgstr "Lagre scener, om-importer og start om" @@ -7694,11 +7712,13 @@ msgid "Move Down" msgstr "Flytt Ned" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Neste skript" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Forrige skript" #: editor/plugins/script_editor_plugin.cpp @@ -8134,7 +8154,7 @@ msgstr "Venstre knapp" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Perspektiv" #: editor/plugins/spatial_editor_plugin.cpp @@ -8143,6 +8163,11 @@ msgid "Right Orthogonal" msgstr "Høyre knapp" #: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Right Perspective" +msgstr "Perspektiv" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -8501,6 +8526,27 @@ msgid "Right View" msgstr "Høyrevisning" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Frontvisning" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "Bytt Perspektiv/Ortogonal Fremvisning" @@ -14779,6 +14825,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14788,7 +14842,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/nl.po b/editor/translations/nl.po index d588afb791..abbf9a02bf 100644 --- a/editor/translations/nl.po +++ b/editor/translations/nl.po @@ -49,12 +49,14 @@ # Vancha March <tjipkevdh@gmail.com>, 2021. # Hugo van de Kuilen <hugo.vandekuilen1234567890@gmail.com>, 2021. # tobeqz <vanveenjorik+tobeqz@gmail.com>, 2021. +# Edgar <Edgar@anotherfoxguy.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-08-06 19:42+0000\n" -"Last-Translator: tobeqz <vanveenjorik+tobeqz@gmail.com>\n" +"PO-Revision-Date: 2021-10-04 13:31+0000\n" +"Last-Translator: Edgar <Edgar@anotherfoxguy.com>\n" "Language-Team: Dutch <https://hosted.weblate.org/projects/godot-engine/godot/" "nl/>\n" "Language: nl\n" @@ -62,7 +64,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 @@ -412,9 +414,8 @@ msgstr "Anim Invoegen" #. 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 '%s' niet openen." +msgstr "node '%s'" #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp @@ -428,9 +429,8 @@ msgstr "Animatie-Speler kan zichzelf niet animeren, alleen andere spelers." #. 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 "Eigenschap '%s' bestaat niet." +msgstr "Eigenschap '%s'" #: editor/animation_track_editor.cpp msgid "Anim Create & Insert" @@ -1608,9 +1608,8 @@ msgid "Name" msgstr "Naam" #: editor/editor_autoload_settings.cpp -#, fuzzy msgid "Global Variable" -msgstr "Hernoem Variabele" +msgstr "Globale Variabele" #: editor/editor_data.cpp msgid "Paste Params" @@ -2458,6 +2457,15 @@ msgstr "" "Kon de scène niet opslaan. Waarschijnlijk konden afhankelijkheden " "(instanties of erfelijkheden) niet voldaan worden." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Kon het subproces niet opstarten!" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Alle scènes opslaan" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Kan geen scènes overschrijven die nog open zijn!" @@ -2595,6 +2603,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Sla wijzigen aan '%s' op voor het afsluiten?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2942,10 +2954,6 @@ msgid "Save Scene" msgstr "Scène opslaan" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Alle scènes opslaan" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Omzetten naar..." @@ -4459,6 +4467,18 @@ msgid "Clear Default for '%s'" msgstr "Wis Standaard voor '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Opnieuw importeren" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Importeer als:" @@ -4467,10 +4487,6 @@ msgid "Preset" msgstr "Voorinstellingen" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Opnieuw importeren" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "Sla scènes op, importeer opnieuw en start dan opnieuw op" @@ -7467,11 +7483,13 @@ msgid "Move Down" msgstr "Plaats Omlaag" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Volgend script" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Vorig script" #: editor/plugins/script_editor_plugin.cpp @@ -7894,7 +7912,7 @@ msgstr "Orthogonaal" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Perspectief" #: editor/plugins/spatial_editor_plugin.cpp @@ -7904,6 +7922,11 @@ msgstr "Orthogonaal" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy +msgid "Right Perspective" +msgstr "Perspectief" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Front Orthogonal" msgstr "Orthogonaal" @@ -8266,6 +8289,27 @@ msgid "Right View" msgstr "Rechter Zijaanzicht" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Vooraanzicht" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "Schakel Perspectief/Orthogonaal Zicht" @@ -14633,6 +14677,14 @@ msgstr "" "De standaard Environment zoals aangegeven in Projectinstellingen " "(Rendering→Environment→Default Environment) kon niet worden geladen." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14646,7 +14698,10 @@ msgstr "" "van en wijs zijn interne textuur toe aan een knoop om te tonen." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" "De grootte van een Viewport moet groter zijn dan 0 om iets weer te geven." diff --git a/editor/translations/or.po b/editor/translations/or.po index c1036fa702..00e5009221 100644 --- a/editor/translations/or.po +++ b/editor/translations/or.po @@ -6,6 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" +"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "PO-Revision-Date: 2019-08-11 10:23+0000\n" "Last-Translator: Pro Neon <proneon267@gmail.com>\n" "Language-Team: Odia <https://hosted.weblate.org/projects/godot-engine/godot/" @@ -2318,6 +2319,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2434,6 +2443,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2753,10 +2766,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4156,15 +4165,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7045,11 +7062,11 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +msgid "Next Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +msgid "Previous Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp @@ -7459,7 +7476,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7467,6 +7484,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7804,6 +7825,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13661,6 +13702,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13670,7 +13719,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/pl.po b/editor/translations/pl.po index 7a5a0eb037..5c55b0c86f 100644 --- a/editor/translations/pl.po +++ b/editor/translations/pl.po @@ -16,14 +16,14 @@ # Karol Walasek <coreconviction@gmail.com>, 2016. # Maksymilian Świąć <maksymilian.swiac@gmail.com>, 2017-2018. # Mietek Szcześniak <ravaging@go2.pl>, 2016. -# NeverK <neverkoxu@gmail.com>, 2018, 2019, 2020. +# NeverK <neverkoxu@gmail.com>, 2018, 2019, 2020, 2021. # Rafal Brozio <rafal.brozio@gmail.com>, 2016, 2019, 2020, 2021. # Rafał Ziemniak <synaptykq@gmail.com>, 2017. # RM <synaptykq@gmail.com>, 2018, 2020. # Sebastian Krzyszkowiak <dos@dosowisko.net>, 2017. # Sebastian Pasich <sebastian.pasich@gmail.com>, 2017, 2019, 2020. # siatek papieros <sbigneu@gmail.com>, 2016. -# Zatherz <zatherz@linux.pl>, 2017, 2020. +# Zatherz <zatherz@linux.pl>, 2017, 2020, 2021. # Tomek <kobewi4e@gmail.com>, 2018, 2019, 2020, 2021. # Wojcieh Er Zet <wojcieh.rzepecki@gmail.com>, 2018. # Dariusz Siek <dariuszynski@gmail.com>, 2018, 2019, 2020, 2021. @@ -38,7 +38,7 @@ # Myver <igormakarowicz@gmail.com>, 2019. # Maciej Chamera <chameramaciej@gmail.com>, 2019. # Cezary Stasiak <cezary.p.stasiak@gmail.com>, 2019. -# Jan Ligudziński <jan.ligudzinski@gmail.com>, 2020. +# Jan Ligudziński <jan.ligudzinski@gmail.com>, 2020, 2021. # Adam Jagoda <kontakt@lukasz.xyz>, 2020. # Filip Glura <mcmr.slendy@gmail.com>, 2020. # Roman Skiba <romanskiba0@gmail.com>, 2020. @@ -49,11 +49,13 @@ # vrid <patryksoon@live.com>, 2021. # Suchy Talerz <kacperkubis06@gmail.com>, 2021. # Bartosz Stasiak <bs97086@amu.edu.pl>, 2021. +# Marek Malaria <to.tylko.dla.kont@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-09-15 00:46+0000\n" +"PO-Revision-Date: 2021-10-06 00:12+0000\n" "Last-Translator: Tomek <kobewi4e@gmail.com>\n" "Language-Team: Polish <https://hosted.weblate.org/projects/godot-engine/" "godot/pl/>\n" @@ -2436,6 +2438,15 @@ msgstr "" "Nie udało się zapisać sceny. Najprawdopodobniej pewne zależności " "(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:" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Zapisz wszystkie sceny" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Nie można nadpisać sceny, która wciąż jest otwarta!" @@ -2573,6 +2584,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Zapisać zmiany w \"%s\" przed zamknięciem?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2618,29 +2633,27 @@ msgstr "Aktualna scena nie została zapisana. Otworzyć mimo to?" #: editor/editor_node.cpp msgid "Can't undo while mouse buttons are pressed." -msgstr "" +msgstr "Nie można cofnąć akcji kiedy przyciski myszy są wciśnięte." #: editor/editor_node.cpp msgid "Nothing to undo." -msgstr "" +msgstr "Nie ma nic do cofnięcia." #: editor/editor_node.cpp -#, fuzzy msgid "Undo: %s" -msgstr "Cofnij" +msgstr "Cofnij: %s" #: editor/editor_node.cpp msgid "Can't redo while mouse buttons are pressed." -msgstr "" +msgstr "Nie można ponowić kiedy przyciski myszy są wciśnięte." #: editor/editor_node.cpp msgid "Nothing to redo." -msgstr "" +msgstr "Nie ma nic do ponowienia." #: editor/editor_node.cpp -#, fuzzy msgid "Redo: %s" -msgstr "Ponów" +msgstr "Ponów: %s" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." @@ -2923,10 +2936,6 @@ msgid "Save Scene" msgstr "Zapisz scenę" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Zapisz wszystkie sceny" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Konwertuj na..." @@ -3324,9 +3333,8 @@ msgid "Merge With Existing" msgstr "Połącz z Istniejącym" #: editor/editor_node.cpp -#, fuzzy msgid "Apply MeshInstance Transforms" -msgstr "Zmiana transformacji" +msgstr "Zastosuj transformacje MeshInstance" #: editor/editor_node.cpp msgid "Open & Run a Script" @@ -3442,7 +3450,7 @@ msgstr "Status" #: editor/editor_profiler.cpp msgid "Measure:" -msgstr "Zmierzono:" +msgstr "Pomiar:" #: editor/editor_profiler.cpp msgid "Frame Time (ms)" @@ -3587,7 +3595,7 @@ msgstr "" #: editor/editor_resource_picker.cpp msgid "Quick Load" -msgstr "" +msgstr "Szybkie załadowanie" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "Make Unique" @@ -4407,6 +4415,18 @@ msgid "Clear Default for '%s'" msgstr "Usuń domyślne dla \"%s\"" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Importuj ponownie" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Importuj jako:" @@ -4415,10 +4435,6 @@ msgid "Preset" msgstr "Profil" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Importuj ponownie" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "Zapisz sceny, reimportuj i uruchom ponownie" @@ -5012,7 +5028,7 @@ msgstr "Poprzedni" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Future" -msgstr "Następny" +msgstr "Przyszłe" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Depth" @@ -5040,7 +5056,7 @@ msgstr "Wymuś białe cieniowanie" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Include Gizmos (3D)" -msgstr "Dołącz Gizmo (3D)" +msgstr "Dołącz uchwyty (3D)" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Pin AnimationPlayer" @@ -5063,7 +5079,7 @@ msgstr "Błąd!" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Blend Times:" -msgstr "Czasy przejścia:" +msgstr "Czasy Blendowania:" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Next (Auto Queue):" @@ -5071,7 +5087,7 @@ msgstr "Następny (automatyczna kolejka):" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Cross-Animation Blend Times" -msgstr "Czasy przejścia pomiędzy animacjami" +msgstr "Czasy Blendowania Pomiędzy Animacjami" #: editor/plugins/animation_state_machine_editor.cpp msgid "Move Node" @@ -5186,11 +5202,11 @@ msgstr "Skala:" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Fade In (s):" -msgstr "Pojawianie się (s):" +msgstr "Fade In (s):" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Fade Out (s):" -msgstr "Zanikanie (s):" +msgstr "Fade Out (s):" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Blend" @@ -5273,7 +5289,7 @@ msgstr "Jednorazowy Węzeł" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Mix Node" -msgstr "Wezeł Mieszania" +msgstr "Węzeł Mieszania" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Blend2 Node" @@ -5297,7 +5313,7 @@ msgstr "Węzeł Przewijania w Czasie" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Transition Node" -msgstr "Węzeł Przejścia" +msgstr "Węzeł Przeobrażenia" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Import Animations..." @@ -5694,15 +5710,13 @@ msgstr "Przesuń CanvasItem \"%s\" na (%d, %d)" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Locked" -msgstr "Zablokuj wybrane" +msgstr "Zablokowany" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Grouped" -msgstr "Grupa" +msgstr "Zgrupowany" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -5795,7 +5809,7 @@ msgstr "Zachowaj proporcje" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Anchors only" -msgstr "Tylko zakotwiczenia" +msgstr "Tylko zakotwiczenie" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Change Anchors and Margins" @@ -5882,7 +5896,7 @@ msgstr "" #: editor/plugins/texture_region_editor_plugin.cpp #: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp msgid "Zoom Reset" -msgstr "Zresetuj powiększenie" +msgstr "Wyzeruj zbliżenie" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -6158,11 +6172,11 @@ msgstr "Instancjonuj scenę tutaj" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Multiply grid step by 2" -msgstr "Podwój wielkość siatki" +msgstr "Zwiększ krok siatki 2 razy" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Divide grid step by 2" -msgstr "Zmniejsz wielkość siatki dwukrotnie" +msgstr "Zmniejsz krok siatki 2 razy" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Pan View" @@ -6218,7 +6232,7 @@ msgstr "Dodawanie %s..." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Cannot instantiate multiple nodes without root." -msgstr "Nie można utworzyć wielu węzłów bez węzła głównego." +msgstr "Nie można utworzyć instancji wielu węzłów bez węzła głównego." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp @@ -6336,7 +6350,7 @@ msgstr "Płaskie 0" #: editor/plugins/curve_editor_plugin.cpp msgid "Flat 1" -msgstr "Płaskie 1" +msgstr "Flat 1" #: editor/plugins/curve_editor_plugin.cpp editor/property_editor.cpp msgid "Ease In" @@ -6648,14 +6662,12 @@ msgid "Remove Selected Item" msgstr "Usuń zaznaczony element" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Ignore Transforms)" -msgstr "Import ze sceny" +msgstr "Import ze sceny (ignoruj transformacje)" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Apply Transforms)" -msgstr "Import ze sceny" +msgstr "Import ze sceny (zastosuj transformacje)" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Update from Scene" @@ -7245,14 +7257,12 @@ msgid "Flip Portal" msgstr "Odbij portal" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Occluder Set Transform" -msgstr "Wyczyść przekształcenie" +msgstr "Ustaw transformację przesłaniacza" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Center Node" -msgstr "Utwórz węzeł" +msgstr "Wycentruj węzeł" #: editor/plugins/root_motion_editor_plugin.cpp msgid "AnimationTree has no path set to an AnimationPlayer" @@ -7388,11 +7398,13 @@ msgid "Move Down" msgstr "Przesuń w dół" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Następny skrypt" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Poprzedni skrypt" #: editor/plugins/script_editor_plugin.cpp @@ -7757,14 +7769,12 @@ msgid "Skeleton2D" msgstr "Szkielet 2D" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Reset to Rest Pose" -msgstr "Ustaw kości do pozy spoczynkowej" +msgstr "Resetuj do pozy spoczynkowej" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Overwrite Rest Pose" -msgstr "Nadpisz" +msgstr "Nadpisz pozę spoczynkową" #: editor/plugins/skeleton_editor_plugin.cpp msgid "Create physical bones" @@ -7791,69 +7801,63 @@ msgid "Perspective" msgstr "Perspektywa" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Orthogonal" -msgstr "Ortogonalna" +msgstr "Góra ortogonalnie" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Perspective" -msgstr "Perspektywa" +msgstr "Góra perspektywicznie" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Orthogonal" -msgstr "Ortogonalna" +msgstr "Spód ortogonalnie" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Perspective" -msgstr "Perspektywa" +msgstr "Spód perspektywicznie" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Left Orthogonal" -msgstr "Ortogonalna" +msgstr "Lewo ortogonalnie" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Perspektywa" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Right Orthogonal" -msgstr "Ortogonalna" +msgstr "Prawo ortogonalnie" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "Prawo perspektywicznie" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Orthogonal" -msgstr "Ortogonalna" +msgstr "Przód ortogonalnie" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Perspective" -msgstr "Perspektywa" +msgstr "Przód perspektywicznie" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Orthogonal" -msgstr "Ortogonalna" +msgstr "Tył ortogonalnie" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Perspective" -msgstr "Perspektywa" +msgstr "Tył perspektywicznie" #. 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 " [portale aktywne]" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Aborted." @@ -8024,7 +8028,7 @@ msgstr "Wyświetlaj środowisko" #: editor/plugins/spatial_editor_plugin.cpp msgid "View Gizmos" -msgstr "Pokaż ikony węzłów" +msgstr "Pokaż uchwyty" #: editor/plugins/spatial_editor_plugin.cpp msgid "View Information" @@ -8177,6 +8181,27 @@ msgid "Right View" msgstr "Widok z prawej" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Widok z przodu" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "Przełącz widok perspektywiczny/ortogonalny" @@ -8235,7 +8260,7 @@ msgstr "4 widoki" #: editor/plugins/spatial_editor_plugin.cpp msgid "Gizmos" -msgstr "Ikony węzłów" +msgstr "Uchwyty" #: editor/plugins/spatial_editor_plugin.cpp msgid "View Origin" @@ -8250,9 +8275,8 @@ msgid "View Portal Culling" msgstr "Culling portali widoku" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "View Occlusion Culling" -msgstr "Culling portali widoku" +msgstr "Pokaż Occlusion Culling" #: editor/plugins/spatial_editor_plugin.cpp #: modules/gridmap/grid_map_editor_plugin.cpp @@ -8320,9 +8344,8 @@ msgid "Post" msgstr "Po" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" -msgstr "Projekt bez nazwy" +msgstr "Nienazwany uchwyt" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create Mesh2D" @@ -12446,14 +12469,12 @@ msgid "Set Portal Point Position" msgstr "Ustaw pozycję punktu portalu" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Set Occluder Sphere Radius" -msgstr "Zmień promień kształtu cylindra" +msgstr "Ustaw promień sfery przesłaniacza" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Set Occluder Sphere Position" -msgstr "Ustaw punkt kontrolny wchodzący z krzywej" +msgstr "Ustaw pozycję sfery przesłaniacza" #: modules/csg/csg_gizmos.cpp msgid "Change Cylinder Radius" @@ -12738,9 +12759,8 @@ msgid "Class name can't be a reserved keyword" msgstr "Nazwa klasy nie może być słowem zastrzeżonym" #: modules/mono/csharp_script.cpp -#, fuzzy msgid "Build Solution" -msgstr "Wypełnij zaznaczone" +msgstr "Zbuduj rozwiązanie" #: modules/mono/mono_gd/gd_mono_utils.cpp msgid "End of inner exception stack trace" @@ -14085,11 +14105,11 @@ msgstr "" #: scene/3d/occluder.cpp msgid "No shape is set." -msgstr "" +msgstr "Żaden kształt nie jest ustawiony." #: scene/3d/occluder.cpp msgid "Only uniform scales are supported." -msgstr "" +msgstr "Obsługiwane są tylko jednolite skale." #: scene/3d/particles.cpp msgid "" @@ -14440,6 +14460,10 @@ msgid "" "The GLES2 backend is currently in use, so these modes will act like Stretch " "instead." msgstr "" +"Opcje Kafelkowanie i Dopasowane kafelkowanie dla właściwości Rozciąganie Osi " +"są skuteczne tylko w przypadku korzystania z backendu renderowania GLES3.\n" +"Backend GLES2 jest obecnie używany, więc te tryby będą zamiast tego działać " +"jak Rozciągnięcie." #: scene/gui/popup.cpp msgid "" @@ -14477,6 +14501,14 @@ msgstr "" "Domyślne środowisko określone w Ustawieniach Projektu (Renderowanie -> " "Environment -> Default Environment) nie mogło zostać załadowane." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14490,12 +14522,15 @@ msgstr "" "przyporządkuj jego teksturę dla któregoś węzła." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, 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ć." #: scene/resources/occluder_shape.cpp msgid "OccluderShapeSphere Set Spheres" -msgstr "" +msgstr "OccluderShapeSphere ustaw sfery" #: scene/resources/visual_shader_nodes.cpp msgid "" @@ -16182,10 +16217,6 @@ msgstr "Stałe nie mogą być modyfikowane." #~ msgid "Couldn't save atlas image:" #~ msgstr "Nie można zapisać obrazu atlasu:" -#, fuzzy -#~ msgid "Couldn't save converted texture:" -#~ msgstr "Nie można zapisać zkonwertowanej tekstury:" - #~ msgid "Invalid translation source!" #~ msgstr "Nieprawidłowe źródło tłumaczenia!" diff --git a/editor/translations/pr.po b/editor/translations/pr.po index 8f2aa04183..9ea671ae8f 100644 --- a/editor/translations/pr.po +++ b/editor/translations/pr.po @@ -10,6 +10,7 @@ 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-06-11 14:49+0000\n" "Last-Translator: Nathan Franke <natfra@pm.me>\n" @@ -2404,6 +2405,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2520,6 +2529,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2845,10 +2858,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4306,15 +4315,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7293,12 +7310,14 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" -msgstr "" +#, fuzzy +msgid "Next Script" +msgstr "Discharge ye' Variable" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" -msgstr "" +#, fuzzy +msgid "Previous Script" +msgstr "Slit th' Node" #: editor/plugins/script_editor_plugin.cpp msgid "File" @@ -7726,7 +7745,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7734,6 +7753,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -8079,6 +8102,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -14198,6 +14241,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14207,7 +14258,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp @@ -14338,10 +14391,6 @@ msgstr "" #~ msgstr "Yer Calligraphy be wrongly sized." #, fuzzy -#~ msgid "Previous Folder" -#~ msgstr "Slit th' Node" - -#, fuzzy #~ msgid "Custom Node" #~ msgstr "Slit th' Node" diff --git a/editor/translations/pt.po b/editor/translations/pt.po index 94bcea301b..008100444d 100644 --- a/editor/translations/pt.po +++ b/editor/translations/pt.po @@ -22,8 +22,9 @@ 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" +"PO-Revision-Date: 2021-09-29 02:21+0000\n" "Last-Translator: João Lopes <linux-man@hotmail.com>\n" "Language-Team: Portuguese <https://hosted.weblate.org/projects/godot-engine/" "godot/pt/>\n" @@ -422,7 +423,7 @@ msgstr "Reorganizar Pistas" #: editor/animation_track_editor.cpp msgid "Transform tracks only apply to Spatial-based nodes." -msgstr "Pistas de Transformação só se aplicam a nós de base Espacial." +msgstr "Pistas de transformação só se aplicam a nós de base Espacial." #: editor/animation_track_editor.cpp msgid "" @@ -1079,7 +1080,7 @@ msgid "" "Depending on your filesystem configuration, the files will either be moved " "to the system trash or deleted permanently." msgstr "" -"Remover ficheiros selecionados do Projeto? (Não pode ser revertido.)\n" +"Remover ficheiros selecionados do Projeto? (Não pode ser desfeito.)\n" "Dependendo da configuração, pode encontrar os ficheiros removidos na " "Reciclagem do sistema ou apagados permanentemente." @@ -1093,7 +1094,7 @@ msgid "" msgstr "" "Os ficheiros a serem removidos são necessários para que outros recursos " "funcionem.\n" -"Remover mesmo assim? (Não pode ser revertido.)\n" +"Removê-los mesmo assim? (Não pode ser desfeito.)\n" "Dependendo da configuração, pode encontrar os ficheiros removidos na " "Reciclagem do sistema ou apagados permanentemente." @@ -1111,7 +1112,7 @@ msgstr "Falha no carregamento devido a dependências em falta:" #: editor/dependency_editor.cpp editor/editor_node.cpp msgid "Open Anyway" -msgstr "Abrir De Qualquer Maneira" +msgstr "Abrir Em Qualquer Caso" #: editor/dependency_editor.cpp msgid "Which action should be taken?" @@ -1127,7 +1128,7 @@ msgstr "Erros ao carregar!" #: editor/dependency_editor.cpp msgid "Permanently delete %d item(s)? (No undo!)" -msgstr "Apagar permanentemente %d itens? (Sem desfazer!)" +msgstr "Apagar permanentemente %d itens? (Definitivo!)" #: editor/dependency_editor.cpp msgid "Show Dependencies" @@ -1789,7 +1790,7 @@ msgstr "(nada)" #: editor/editor_feature_profile.cpp msgid "Remove currently selected profile, '%s'? Cannot be undone." -msgstr "Remover perfil selecionado, '%s'? Não pode ser revertido." +msgstr "Remover perfil selecionado, '%s'? Não pode ser desfeito." #: editor/editor_feature_profile.cpp msgid "Profile must be a valid filename and must not contain '.'" @@ -2110,7 +2111,7 @@ msgstr "Propriedades" #: editor/editor_help.cpp msgid "override:" -msgstr "Sobrepõe:" +msgstr "sobrepor:" #: editor/editor_help.cpp msgid "default:" @@ -2316,6 +2317,9 @@ msgid "" "Update Continuously is enabled, which can increase power usage. Click to " "disable it." msgstr "" +"Roda quando a janela do editor redesenha.\n" +"Atualização Contínua está ativa, o que pode aumentar o consumo de energia. " +"Clique para a desativar." #: editor/editor_node.cpp msgid "Spins when the editor window redraws." @@ -2412,6 +2416,15 @@ msgstr "" "Incapaz de guardar cena. Provavelmente, as dependências (instâncias ou " "heranças) não puderam ser satisfeitas." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Não consegui iniciar o subprocesso!" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Guardar todas as Cenas" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Não se consegue sobrescrever cena ainda aberta!" @@ -2446,7 +2459,7 @@ msgid "" "To restore the Default layout to its base settings, use the Delete Layout " "option and delete the Default layout." msgstr "" -"Layout predefinido do editor anulado.\n" +"Layout predefinido do editor sobreposto.\n" "Para restaurar o layout predefinido nas configurações base, use a opção " "Apagar Layout e remova o layout Predefinido." @@ -2549,12 +2562,16 @@ msgid "Save changes to '%s' before closing?" msgstr "Guardar alterações a '%s' antes de fechar?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." msgstr "" "A cena atual não tem nó raiz, mas %d recurso(s) externo(s) modificados foram " -"guardados." +"mesmo assim guardados." #: editor/editor_node.cpp msgid "" @@ -2594,29 +2611,27 @@ msgstr "A cena atual não foi guardada. Abrir na mesma?" #: editor/editor_node.cpp msgid "Can't undo while mouse buttons are pressed." -msgstr "" +msgstr "Incapaz de desfazer enquanto os botões do rato estão premidos." #: editor/editor_node.cpp msgid "Nothing to undo." -msgstr "" +msgstr "Nada para desfazer." #: editor/editor_node.cpp -#, fuzzy msgid "Undo: %s" -msgstr "Desfazer" +msgstr "Desfazer: %s" #: editor/editor_node.cpp msgid "Can't redo while mouse buttons are pressed." -msgstr "" +msgstr "Incapaz de refazer enquanto os botões do rato estão premidos." #: editor/editor_node.cpp msgid "Nothing to redo." -msgstr "" +msgstr "Nada para refazer." #: editor/editor_node.cpp -#, fuzzy msgid "Redo: %s" -msgstr "Refazer" +msgstr "Refazer: %s" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." @@ -2632,7 +2647,7 @@ msgid "" "Reload the saved scene anyway? This action cannot be undone." msgstr "" "A cena atual tem alterações não guardadas.\n" -"Recarregar a cena guardada? Esta ação não pode ser revertida." +"Recarregar na mesma a cena guardada? Esta ação não pode ser desfeita." #: editor/editor_node.cpp msgid "Quick Run Scene..." @@ -2900,10 +2915,6 @@ msgid "Save Scene" msgstr "Guardar Cena" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Guardar todas as Cenas" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Converter Para..." @@ -3303,9 +3314,8 @@ msgid "Merge With Existing" msgstr "Combinar com o Existente" #: editor/editor_node.cpp -#, fuzzy msgid "Apply MeshInstance Transforms" -msgstr "Anim Mudar Transformação" +msgstr "Aplicar Transformações do MeshInstance" #: editor/editor_node.cpp msgid "Open & Run a Script" @@ -3456,6 +3466,12 @@ msgid "" "functions called by that function.\n" "Use this to find individual functions to optimize." msgstr "" +"Inclusiva: Inclui tempo de outras funções chamadas por esta função.\n" +"Use-o para detetar congestionamentos.\n" +"\n" +"Próprio: Conta apenas o tempo gasto na própria função, não em outras funções " +"chamadas pela função.\n" +"Use-o para encontrar funções individuais a otimizar." #: editor/editor_profiler.cpp msgid "Frame #:" @@ -3560,7 +3576,7 @@ msgstr "" #: editor/editor_resource_picker.cpp msgid "Quick Load" -msgstr "" +msgstr "Carregamento Rápido" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "Make Unique" @@ -4203,7 +4219,7 @@ msgstr "Substituir: " #: editor/find_in_files.cpp msgid "Replace all (no undo)" -msgstr "Substituir tudo (não há desfazer)" +msgstr "Substituir tudo (definitivo)" #: editor/find_in_files.cpp msgid "Searching..." @@ -4384,6 +4400,18 @@ msgid "Clear Default for '%s'" msgstr "Limpar Predefinição para '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Reimportar" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Importar Como:" @@ -4392,10 +4420,6 @@ msgid "Preset" msgstr "Predefinições" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Reimportar" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "Guardar Cenas, Reimportar e Reiniciar" @@ -5667,22 +5691,20 @@ msgstr "Mover CanvasItem \"%s\" para (%d, %d)" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Locked" -msgstr "Bloquear Seleção" +msgstr "Bloqueado" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Grouped" -msgstr "Grupos" +msgstr "Agrupado" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" "Children of containers have their anchors and margins values overridden by " "their parent." msgstr "" -"As âncoras e margens de filhos de um contentores são sobrescritas pelo seu " +"As âncoras e margens de filhos de um contentores são sobrepostas pelo seu " "progenitor." #: editor/plugins/canvas_item_editor_plugin.cpp @@ -5793,6 +5815,9 @@ msgid "" "No project instance running. Run the project from the editor to use this " "feature." msgstr "" +"Sobreposição da Câmara do Projeto.\n" +"Nenhuma instância do projeto em execução. Execute o projeto pelo editor para " +"usar este recurso." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -6389,7 +6414,7 @@ msgstr "Editor da lista de itens" #: editor/plugins/light_occluder_2d_editor_plugin.cpp msgid "Create Occluder Polygon" -msgstr "Criar Polígono oclusor" +msgstr "Criar Polígono Oclusor" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Mesh is empty!" @@ -6532,6 +6557,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 "" +"Cria uma forma convexa de colisão simplificada.\n" +"É similar à forma de colisão única, mas pode ter uma geometria mais simples " +"em alguns casos, ao custo da precisão." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Multiple Convex Collision Siblings" @@ -6612,14 +6640,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 (Ignorar Transformações)" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Apply Transforms)" -msgstr "Importar da Cena" +msgstr "Importar da Cena (Aplicar Transformações)" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Update from Scene" @@ -7198,7 +7224,7 @@ msgstr "Inverter Portais" #: editor/plugins/room_manager_editor_plugin.cpp msgid "Room Generate Points" -msgstr "Quarto Gerar Pontos" +msgstr "Room Gerar Pontos" #: editor/plugins/room_manager_editor_plugin.cpp msgid "Generate Points" @@ -7209,14 +7235,12 @@ msgid "Flip Portal" msgstr "Inverter Portal" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Occluder Set Transform" -msgstr "Limpar Transformação" +msgstr "Oclusor Definir Transformação" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Center Node" -msgstr "Criar Nó" +msgstr "Centrar Nó" #: editor/plugins/root_motion_editor_plugin.cpp msgid "AnimationTree has no path set to an AnimationPlayer" @@ -7352,11 +7376,13 @@ msgid "Move Down" msgstr "Mover para baixo" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Próximo Script" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Script anterior" #: editor/plugins/script_editor_plugin.cpp @@ -7718,14 +7744,12 @@ msgid "Skeleton2D" msgstr "Esqueleto2D" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Reset to Rest Pose" msgstr "Pôr Ossos em Pose de Descanso" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Overwrite Rest Pose" -msgstr "Sobrescrever" +msgstr "Sobrescrever Pose de Descanso" #: editor/plugins/skeleton_editor_plugin.cpp msgid "Create physical bones" @@ -7752,73 +7776,67 @@ msgid "Perspective" msgstr "Perspetiva" #: 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 "Perspetiva" +msgstr "Perspetiva Topo" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Fundo" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Perspective" -msgstr "Perspetiva" +msgstr "Perspetiva Fundo" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Left Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Esquerda" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Perspetiva" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Right Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Direita" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "Perspetiva Direita" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Frente" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Perspective" -msgstr "Perspetiva" +msgstr "Perspetiva Frente" #: 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 "Perspetiva" +msgstr "Perspetiva 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 " [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 " [portais ativos]" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Aborted." -msgstr "Transformação abortada." +msgstr "Transformação Abortada." #: editor/plugins/spatial_editor_plugin.cpp msgid "X-Axis Transform." @@ -7921,7 +7939,7 @@ msgstr "Vista de topo." #: editor/plugins/spatial_editor_plugin.cpp msgid "Bottom View." -msgstr "Vista de fundo." +msgstr "Vista de Fundo." #: editor/plugins/spatial_editor_plugin.cpp msgid "Left View." @@ -8072,7 +8090,7 @@ msgstr "" #: editor/plugins/spatial_editor_plugin.cpp msgid "Convert Rooms" -msgstr "Converter Quartos" +msgstr "Converter Rooms" #: editor/plugins/spatial_editor_plugin.cpp msgid "XForm Dialog" @@ -8095,7 +8113,7 @@ msgstr "" #: editor/plugins/spatial_editor_plugin.cpp msgid "Snap Nodes to Floor" -msgstr "Ajustar Nós ao Fundo" +msgstr "Ajustar Nós ao Chão" #: editor/plugins/spatial_editor_plugin.cpp msgid "Couldn't find a solid floor to snap the selection to." @@ -8111,7 +8129,7 @@ msgstr "Usar Ajuste" #: editor/plugins/spatial_editor_plugin.cpp msgid "Converts rooms for portal culling." -msgstr "" +msgstr "Converte rooms para culling de portal." #: editor/plugins/spatial_editor_plugin.cpp msgid "Bottom View" @@ -8138,6 +8156,27 @@ msgid "Right View" msgstr "Vista Direita" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Vista de Frente" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "Alternar Vista Perspetiva/Ortogonal" @@ -8168,7 +8207,7 @@ msgstr "Ajustar Objetos ao Chão" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Dialog..." -msgstr "Diálogo de transformação..." +msgstr "Diálogo de Transformação..." #: editor/plugins/spatial_editor_plugin.cpp msgid "1 Viewport" @@ -8211,9 +8250,8 @@ msgid "View Portal Culling" msgstr "Ver Culling do Portal" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "View Occlusion Culling" -msgstr "Ver Culling do Portal" +msgstr "Ver Culling da Oclusão" #: editor/plugins/spatial_editor_plugin.cpp #: modules/gridmap/grid_map_editor_plugin.cpp @@ -8270,7 +8308,7 @@ msgstr "Escala (prop.):" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Type" -msgstr "Tipo de transformação" +msgstr "Tipo de Transformação" #: editor/plugins/spatial_editor_plugin.cpp msgid "Pre" @@ -8281,9 +8319,8 @@ msgid "Post" msgstr "Pós" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" -msgstr "Projeto sem nome" +msgstr "Gizmo sem nome" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create Mesh2D" @@ -8731,12 +8768,18 @@ msgid "" "closing this window.\n" "Close anyway?" msgstr "" +"O separador de Importação de Itens tem alguns itens selecionados. A seleção " +"será perdida ao fechar esta janela.\n" +"Fechar na mesma?" #: editor/plugins/theme_editor_plugin.cpp msgid "" "Select a theme type from the list to edit its items.\n" "You can add a custom type or import a type with its items from another theme." msgstr "" +"Selecione um tipo de tema da lista para editar os seus itens.\n" +"Pode adicionar um tipo personalizado ou importar um tipo com os seus itens " +"de outro tema." #: editor/plugins/theme_editor_plugin.cpp msgid "Remove All Color Items" @@ -8767,6 +8810,8 @@ msgid "" "This theme type is empty.\n" "Add more items to it manually or by importing from another theme." msgstr "" +"Este tipo de tema está vazio.\n" +"Adicione-lhe mais itens manualmente ou importando-os de outro tema." #: editor/plugins/theme_editor_plugin.cpp msgid "Add Color Item" @@ -8927,6 +8972,7 @@ msgstr "Mostrar Predefinição" #: editor/plugins/theme_editor_plugin.cpp msgid "Show default type items alongside items that have been overridden." msgstr "" +"Mostrar itens do tipo predefinido ao lado de itens que foram sobrepostos." #: editor/plugins/theme_editor_plugin.cpp msgid "Override All" @@ -8934,7 +8980,7 @@ msgstr "Sobrepor Tudo" #: editor/plugins/theme_editor_plugin.cpp msgid "Override all default type items." -msgstr "" +msgstr "Sobrepõe todos os itens de tipo predefinido." #: editor/plugins/theme_editor_plugin.cpp msgid "Theme:" @@ -8965,6 +9011,8 @@ msgid "" "Toggle the control picker, allowing to visually select control types for " "edit." msgstr "" +"Alternar o selecionador de controlo, permitindo escolher o tipo de controlo " +"para editar." #: editor/plugins/theme_editor_preview.cpp msgid "Toggle Button" @@ -9053,10 +9101,11 @@ msgstr "Tem,Muitas,Opções" #: editor/plugins/theme_editor_preview.cpp msgid "Invalid path, the PackedScene resource was probably moved or removed." msgstr "" +"Caminho inválido, o recurso PackedScene foi provavelmente movido ou removido." #: editor/plugins/theme_editor_preview.cpp msgid "Invalid PackedScene resource, must have a Control node at its root." -msgstr "" +msgstr "Recurso PackedScene inválido, tem de ter um nó Control na sua raíz." #: editor/plugins/theme_editor_preview.cpp msgid "Invalid file, not a PackedScene resource." @@ -9064,7 +9113,7 @@ msgstr "Ficheiro inválido, não é um recurso PackedScene." #: editor/plugins/theme_editor_preview.cpp msgid "Reload the scene to reflect its most actual state." -msgstr "" +msgstr "Recarregar a cena para refletir o seu estado atual." #: editor/plugins/tile_map_editor_plugin.cpp msgid "Erase Selection" @@ -10157,7 +10206,7 @@ msgstr "Consulta uniforme de textura 2D com triplanar." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Transform function." -msgstr "Função Transformação." +msgstr "Função transformação." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -10207,11 +10256,11 @@ msgstr "Multiplica vetor por transformação." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Transform constant." -msgstr "Constante Transformação." +msgstr "Constante transformação." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Transform uniform." -msgstr "Uniforme Transformação." +msgstr "Uniforme transformação." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Vector function." @@ -11009,7 +11058,7 @@ msgstr "Remover tudo" #: editor/project_manager.cpp msgid "Also delete project contents (no undo!)" -msgstr "" +msgstr "Também apaga conteúdos do projeto (definitivo!)" #: editor/project_manager.cpp msgid "Can't run project" @@ -11568,7 +11617,7 @@ msgstr "Reassociar Localização (Selecionar novo Progenitor):" #: editor/reparent_dialog.cpp msgid "Keep Global Transform" -msgstr "Manter transformação global" +msgstr "Manter Transformação Global" #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent" @@ -11691,12 +11740,15 @@ msgstr "Apagar nó \"%s\"?" msgid "" "Saving the branch as a scene requires having a scene open in the editor." msgstr "" +"Para guardar o ramo como cena é necessário ter uma cena aberta no editor." #: editor/scene_tree_dock.cpp msgid "" "Saving the branch as a scene requires selecting only one node, but you have " "selected %d nodes." msgstr "" +"Para guardar o ramo como cena é necessário selecionar apenas um nó, mas " +"estão selecionados %d nós." #: editor/scene_tree_dock.cpp msgid "" @@ -11908,7 +11960,7 @@ msgstr "Local" #: editor/scene_tree_dock.cpp msgid "Clear Inheritance? (No Undo!)" -msgstr "Limpar herança? (Sem retrocesso!)" +msgstr "Limpar herança? (Definitivo!)" #: editor/scene_tree_editor.cpp msgid "Toggle Visible" @@ -12119,6 +12171,8 @@ msgid "" "Warning: Having the script name be the same as a built-in type is usually " "not desired." msgstr "" +"Aviso: Não é habitualmente desejável que o nome do script seja o mesmo do " +"que o de um tipo incorporado." #: editor/script_create_dialog.cpp msgid "Class Name:" @@ -12370,21 +12424,19 @@ msgstr "Mudar comprimento da forma raio" #: editor/spatial_editor_gizmos.cpp msgid "Set Room Point Position" -msgstr "Definir Posição do Ponto do Quarto" +msgstr "Definir Posição do Ponto do Room" #: editor/spatial_editor_gizmos.cpp msgid "Set Portal Point Position" msgstr "Definir Posição do Ponto do Portal" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Set Occluder Sphere Radius" -msgstr "Mudar Raio da Forma Cilindro" +msgstr "Definir Raio da Esfera do Oclusor" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Set Occluder Sphere Position" -msgstr "Definir curva na posição" +msgstr "Definir Posição da Esfera do Oclusor" #: modules/csg/csg_gizmos.cpp msgid "Change Cylinder Radius" @@ -12669,9 +12721,8 @@ msgid "Class name can't be a reserved keyword" msgstr "Nome de classe não pode ser uma palavra-chave reservada" #: modules/mono/csharp_script.cpp -#, fuzzy msgid "Build Solution" -msgstr "Preencher Seleção" +msgstr "Construir Solução" #: modules/mono/mono_gd/gd_mono_utils.cpp msgid "End of inner exception stack trace" @@ -13390,6 +13441,8 @@ msgstr "" msgid "" "Unable to overwrite res://android/build/res/*.xml files with project name" msgstr "" +"Incapaz de sobrescrever ficheiros res://android/build/res/*.xml com o nome " +"do projeto" #: platform/android/export/export_plugin.cpp msgid "Could not export project files to gradle project\n" @@ -13790,7 +13843,7 @@ msgid "" "Change the size in children collision shapes instead." msgstr "" "Mudanças no tamanho do RigidBody2D (em modos carácter ou rígido) serão " -"reescritas pelo motor de física na execução.\n" +"sobrepostas pelo motor de física na execução.\n" "Mude antes o tamanho das formas de colisão filhas." #: scene/2d/remote_transform_2d.cpp @@ -13996,11 +14049,11 @@ msgstr "" #: scene/3d/occluder.cpp msgid "No shape is set." -msgstr "" +msgstr "Nenhuma forma está definida." #: scene/3d/occluder.cpp msgid "Only uniform scales are supported." -msgstr "" +msgstr "Apenas são suportadas escalas uniformes." #: scene/3d/particles.cpp msgid "" @@ -14045,7 +14098,7 @@ msgid "" "Change the size in children collision shapes instead." msgstr "" "Mudanças no tamanho do RigidBody (em modos carácter ou rígido) serão " -"reescritas pelo motor de física na execução.\n" +"sobrepostas pelo motor de física na execução.\n" "Mude antes o tamanho das formas de colisão filhas." #: scene/3d/physics_joint.cpp @@ -14070,15 +14123,15 @@ msgstr "Nó A e Nó B têm de ser PhysicsBodies diferentes" #: scene/3d/portal.cpp msgid "The RoomManager should not be a child or grandchild of a Portal." -msgstr "" +msgstr "O RoomManager não deve ser filho ou neto de um Portal." #: scene/3d/portal.cpp msgid "A Room should not be a child or grandchild of a Portal." -msgstr "" +msgstr "Um Room não deve ser filho ou neto de um Portal." #: scene/3d/portal.cpp msgid "A RoomGroup should not be a child or grandchild of a Portal." -msgstr "" +msgstr "Um RoomGroup não deve ser filho ou neto de um Portal." #: scene/3d/remote_transform.cpp msgid "" @@ -14090,15 +14143,15 @@ msgstr "" #: scene/3d/room.cpp msgid "A Room cannot have another Room as a child or grandchild." -msgstr "Um Quarto não pode ter outro Quarto como filho ou neto." +msgstr "Um Room não pode ter outro Room como filho ou neto." #: scene/3d/room.cpp msgid "The RoomManager should not be placed inside a Room." -msgstr "" +msgstr "O RoomManager não deve ser colocado dentro de um Room." #: scene/3d/room.cpp msgid "A RoomGroup should not be placed inside a Room." -msgstr "" +msgstr "Um RoomGroup não deve ser colocado dentro de um Room." #: scene/3d/room.cpp msgid "" @@ -14108,15 +14161,15 @@ msgstr "" #: scene/3d/room_group.cpp msgid "The RoomManager should not be placed inside a RoomGroup." -msgstr "" +msgstr "O RoomManager não deve ser colocado dentro de um RoomGroup." #: scene/3d/room_manager.cpp msgid "The RoomList has not been assigned." -msgstr "" +msgstr "A RoomList não foi atribuída." #: scene/3d/room_manager.cpp msgid "The RoomList node should be a Spatial (or derived from Spatial)." -msgstr "" +msgstr "O nó RoomList deve ser um Spatial (ou derivado de Spatial)." #: scene/3d/room_manager.cpp msgid "" @@ -14126,7 +14179,7 @@ msgstr "" #: scene/3d/room_manager.cpp msgid "There should only be one RoomManager in the SceneTree." -msgstr "" +msgstr "Só deve existir um RoomManager na SceneTree." #: scene/3d/room_manager.cpp msgid "" @@ -14136,33 +14189,43 @@ msgstr "" #: scene/3d/room_manager.cpp msgid "RoomList contains no Rooms, aborting." -msgstr "" +msgstr "A RoomList não contem Rooms, a abortar." #: scene/3d/room_manager.cpp msgid "Misnamed nodes detected, check output log for details. Aborting." msgstr "" +"Nomes de nós errados detetados, verifique o log de saída para detalhes. A " +"abortar." #: scene/3d/room_manager.cpp msgid "Portal link room not found, check output log for details." msgstr "" +"Room portal link não encontrado, verifique o log de saída para detalhes." #: scene/3d/room_manager.cpp msgid "" "Portal autolink failed, check output log for details.\n" "Check the portal is facing outwards from the source room." msgstr "" +"Autolink do Portal falhou, verifique o log de saída para detalhes.\n" +"Verifique se o portal está voltado para fora do room de origem." #: scene/3d/room_manager.cpp msgid "" "Room overlap detected, cameras may work incorrectly in overlapping area.\n" "Check output log for details." msgstr "" +"Sobreposição de room detetada, câmaras podem trabalhar mal na área de " +"sobreposição.\n" +"Verifique o log de saída para detalhes." #: scene/3d/room_manager.cpp msgid "" "Error calculating room bounds.\n" "Ensure all rooms contain geometry or manual bounds." msgstr "" +"Erro ao calcular limites do room.\n" +"Garanta que todos os rooms contêm geometria ou limites manuais." #: scene/3d/soft_body.cpp msgid "This body will be ignored until you set a mesh." @@ -14174,7 +14237,7 @@ msgid "" "running.\n" "Change the size in children collision shapes instead." msgstr "" -"Mudanças no tamanho do SoftBody serão reescritas pelo motor de física na " +"Mudanças no tamanho do SoftBody serão sobrepostas pelo motor de física na " "execução.\n" "Em vez disso, mude o tamanho das formas de colisão filhas." @@ -14372,6 +14435,14 @@ msgstr "" "Ambiente predefinido especificado em Configurações do Projeto (Rendering -> " "Environment -> Default Environment) não pode ser carregado." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14385,12 +14456,15 @@ msgstr "" "RenderTarget e atribua a sua textura interna a outro nó para visualizar." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "O tamanho do viewport tem de ser maior do que 0 para renderizar." #: scene/resources/occluder_shape.cpp msgid "OccluderShapeSphere Set Spheres" -msgstr "" +msgstr "OccluderShapeSphere Definir Esferas" #: scene/resources/visual_shader_nodes.cpp msgid "" diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po index 87c8792cbf..804740bf4a 100644 --- a/editor/translations/pt_BR.po +++ b/editor/translations/pt_BR.po @@ -122,12 +122,15 @@ # Alkoarism <Alkoarism@gmail.com>, 2021. # リーLee <kaualee304@gmail.com>, 2021. # William Weber Berrutti <wwberrutti@protonmail.ch>, 2021. +# Zenvasca <zenvasca@gmail.com>, 2021. +# Wladimir Roberto Barbosa <wladrbarbosa@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-09-11 20:05+0000\n" -"Last-Translator: William Weber Berrutti <wwberrutti@protonmail.ch>\n" +"PO-Revision-Date: 2021-10-09 16:52+0000\n" +"Last-Translator: Wladimir Roberto Barbosa <wladrbarbosa@gmail.com>\n" "Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/" "godot-engine/godot/pt_BR/>\n" "Language: pt_BR\n" @@ -2417,6 +2420,9 @@ msgid "" "Update Continuously is enabled, which can increase power usage. Click to " "disable it." msgstr "" +"Gira quando a janela do editor é redesenhada.\n" +"Atualização contínua está habilitada, o que pode aumentar o uso de energia. " +"Clique para desativá-lo." #: editor/editor_node.cpp msgid "Spins when the editor window redraws." @@ -2514,6 +2520,15 @@ msgstr "" "Não se pôde salvar a cena. É provável que dependências (instâncias ou " "herança) não foram satisfeitas." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Não se pôde salvar textura convertida:" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Salvar Todas as Cenas" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Não é possível sobrescrever a cena que ainda está aberta!" @@ -2649,6 +2664,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Salvar alterações em '%s' antes de fechar?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2694,11 +2713,11 @@ msgstr "Cena atual não salva. Abrir mesmo assim?" #: editor/editor_node.cpp msgid "Can't undo while mouse buttons are pressed." -msgstr "" +msgstr "Não pode desfazer enquanto os botões do mouse estiverem pressionados." #: editor/editor_node.cpp msgid "Nothing to undo." -msgstr "" +msgstr "Nada para desfazer." #: editor/editor_node.cpp #, fuzzy @@ -2707,11 +2726,11 @@ msgstr "Desfazer" #: editor/editor_node.cpp msgid "Can't redo while mouse buttons are pressed." -msgstr "" +msgstr "Não pode refazer enquanto os botões do mouse estiverem pressionados." #: editor/editor_node.cpp msgid "Nothing to redo." -msgstr "" +msgstr "Nada para refazer." #: editor/editor_node.cpp #, fuzzy @@ -3004,10 +3023,6 @@ msgid "Save Scene" msgstr "Salvar Cena" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Salvar Todas as Cenas" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Converter Para..." @@ -3563,6 +3578,12 @@ msgid "" "functions called by that function.\n" "Use this to find individual functions to optimize." msgstr "" +"Inclusivo: inclui o tempo de outras funções chamadas por esta função.\n" +"Use isso para detectar restrições.\n" +"\n" +"Próprio: conta apenas o tempo gasto na função em si, não em outras funções " +"chamadas por essa função.\n" +"Use isso para encontrar funções individuais para otimizar." #: editor/editor_profiler.cpp msgid "Frame #:" @@ -3668,7 +3689,7 @@ msgstr "" #: editor/editor_resource_picker.cpp msgid "Quick Load" -msgstr "" +msgstr "Carregamento Rápido" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "Make Unique" @@ -4199,25 +4220,24 @@ msgid "Collapse All" msgstr "Recolher Tudo" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Sort files" -msgstr "Pesquisar arquivos" +msgstr "Ordenar arquivos" #: editor/filesystem_dock.cpp msgid "Sort by Name (Ascending)" -msgstr "" +msgstr "Ordenar por Nome (Ascendente)" #: editor/filesystem_dock.cpp msgid "Sort by Name (Descending)" -msgstr "" +msgstr "Ordenar por Nome (Descendente)" #: editor/filesystem_dock.cpp msgid "Sort by Type (Ascending)" -msgstr "" +msgstr "Ordenar por Tipo (Ascendente)" #: editor/filesystem_dock.cpp msgid "Sort by Type (Descending)" -msgstr "" +msgstr "Ordenar por Tipo (Descendente)" #: editor/filesystem_dock.cpp #, fuzzy @@ -4516,6 +4536,18 @@ msgid "Clear Default for '%s'" msgstr "Limpar Padrão para '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Reimportar" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Importar como:" @@ -4524,10 +4556,6 @@ msgid "Preset" msgstr "Predefinição" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Reimportar" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "Salvar cenas, reimportar e reiniciar" @@ -5611,7 +5639,7 @@ msgstr "Pesquisar modelos, projetos e demonstrações" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Search assets (excluding templates, projects, and demos)" -msgstr "" +msgstr "Pesquisar recursos (excluindo modelos, projetos e demonstrações)" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Import..." @@ -6026,15 +6054,14 @@ msgstr "Remover nó ou trilha selecionada." #: 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 "" -"Mostrar uma lista de todos os objetos na posição clicada\n" -"(mesmo como Alt + botão direito do mouse no Modo de seleção)." +"Alt+BDM: Mostra uma lista de todos os nodes na posição clicada, incluindo " +"os bloqueados." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "RMB: Add node at position clicked." -msgstr "" +msgstr "BDM: Adiciona node à posição clicada." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -6295,15 +6322,15 @@ msgstr "Deslocar Visão" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Zoom to 3.125%" -msgstr "" +msgstr "Zoom para 3.125%" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Zoom to 6.25%" -msgstr "" +msgstr "Zoom para 6.25%" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Zoom to 12.5%" -msgstr "" +msgstr "Zoom para 12.5%" #: editor/plugins/canvas_item_editor_plugin.cpp #, fuzzy @@ -6337,7 +6364,7 @@ msgstr "Reduzir" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Zoom to 1600%" -msgstr "" +msgstr "Zoom para 1600%" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Add %s" @@ -6696,6 +6723,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 "" +"Cria uma forma de colisão convexa simplificada.\n" +"É semelhante à forma de colisão única, mas pode resultar em uma geometria " +"mais simples em alguns casos, com menos precisão." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Multiple Convex Collision Siblings" @@ -7525,11 +7555,13 @@ msgid "Move Down" msgstr "Mover para Baixo" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Próximo Script" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Script anterior" #: editor/plugins/script_editor_plugin.cpp @@ -7952,7 +7984,7 @@ msgstr "Ortogonal" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Perspectiva" #: editor/plugins/spatial_editor_plugin.cpp @@ -7962,6 +7994,11 @@ msgstr "Ortogonal" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy +msgid "Right Perspective" +msgstr "Perspectiva" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Front Orthogonal" msgstr "Ortogonal" @@ -8029,7 +8066,7 @@ msgstr "Translação:" #: editor/plugins/spatial_editor_plugin.cpp msgid "Scale" -msgstr "Scale" +msgstr "Escala" #: editor/plugins/spatial_editor_plugin.cpp msgid "Scaling: " @@ -8132,7 +8169,7 @@ msgstr "Alinhar Rotação com a Vista" #: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp msgid "No parent to instance a child at." -msgstr "Sem pai onde instanciar um filho." +msgstr "Sem pai para instanciar um filho." #: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp msgid "This operation requires a single selected node." @@ -8231,13 +8268,12 @@ msgid "Freelook Slow Modifier" msgstr "Modificador de velocidade lenta da Visão Livre" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Toggle Camera Preview" -msgstr "Alterar Tamanho da Câmera" +msgstr "Alternar pré-visualização da câmera" #: editor/plugins/spatial_editor_plugin.cpp msgid "View Rotation Locked" -msgstr "Ver Rotação Bloqueada" +msgstr "Rotação de Vista Bloqueada" #: editor/plugins/spatial_editor_plugin.cpp msgid "" @@ -8274,7 +8310,7 @@ msgstr "" "Clique para alternar entre estados de visibilidade.\n" "\n" "Olhos abertos: Gizmo está visível.\n" -"Olhos fechados: Gizmo não está visível.\n" +"Olhos fechados: Gizmo está escondido.\n" "Olhos semi-abertos: Gizmo está visível através de superficies opacas (\"raio-" "x\")." @@ -8324,6 +8360,27 @@ msgid "Right View" msgstr "Visão Direita" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Visão Frontal" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "Alternar Visão Perspectiva/Ortogonal" @@ -8884,21 +8941,23 @@ msgstr "Selecione um item de configuração primeiro!" #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible stylebox items." -msgstr "" +msgstr "Selecionar todos os itens visíveis da caixa de estilo." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible stylebox items and their data." -msgstr "" +msgstr "Selecionar todos os itens visíveis da caixa de estilo e seus dados." #: editor/plugins/theme_editor_plugin.cpp msgid "Deselect all visible stylebox items." -msgstr "" +msgstr "Deselecionar todos os itens visíveis da caixa de estilo." #: editor/plugins/theme_editor_plugin.cpp msgid "" "Caution: Adding icon data may considerably increase the size of your Theme " "resource." msgstr "" +"Atenção: Adicionar dados de ícone pode aumentar consideravelmente o tamanho " +"do recurso do Tema." #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -8922,7 +8981,7 @@ msgstr "Selecionar Pontos" #: editor/plugins/theme_editor_plugin.cpp msgid "Select all Theme items with item data." -msgstr "" +msgstr "Selecionar todos os itens do Tema com dados." #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -8931,7 +8990,7 @@ msgstr "Selecionar tudo" #: editor/plugins/theme_editor_plugin.cpp msgid "Deselect all Theme items." -msgstr "" +msgstr "Desselecionar todos os itens do Tema." #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -8944,6 +9003,9 @@ msgid "" "closing this window.\n" "Close anyway?" msgstr "" +"A guia de Importação de itens possui alguns itens selecionados. A seleção " +"será perdida ao fechar esta janela.\n" +"Fechar mesmo assim?" #: editor/plugins/theme_editor_plugin.cpp msgid "" @@ -8986,6 +9048,8 @@ msgid "" "This theme type is empty.\n" "Add more items to it manually or by importing from another theme." msgstr "" +"Este tipo de tema está vazio.\n" +"Adicione mais itens manualmente ou importe de outro tema." #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -13630,11 +13694,8 @@ msgid "Signing debug %s..." msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Signing release %s..." -msgstr "" -"Escaneando arquivos,\n" -"Por favor aguarde..." +msgstr "Assinando lançamento %s..." #: platform/android/export/export_plugin.cpp #, fuzzy @@ -13746,11 +13807,12 @@ msgid "Creating APK..." msgstr "Criando contornos..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "" "Could not find template APK to export:\n" "%s" -msgstr "Não foi possível abrir o modelo para exportar:" +msgstr "" +"Não foi possível encontrar o modelo de APK para exportar:\n" +"%s" #: platform/android/export/export_plugin.cpp msgid "" @@ -14692,6 +14754,14 @@ msgstr "" "O Ambiente Padrão especificado nas Configurações de Projeto (Rendering -> " "Environment -> Default Environment) não pôde ser carregado." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14705,7 +14775,10 @@ msgstr "" "render e atribua sua textura interna a algum nó para exibir." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" "O tamanho da Viewport deve ser maior do que 0 para renderizar qualquer coisa." @@ -16394,9 +16467,6 @@ msgstr "Constantes não podem serem modificadas." #~ msgid "Couldn't save atlas image:" #~ msgstr "Não se pôde salva imagem de atlas:" -#~ msgid "Couldn't save converted texture:" -#~ msgstr "Não se pôde salvar textura convertida:" - #~ msgid "Invalid translation source!" #~ msgstr "Origem de tradução inválida!" diff --git a/editor/translations/ro.po b/editor/translations/ro.po index ecf041058c..12102e12dc 100644 --- a/editor/translations/ro.po +++ b/editor/translations/ro.po @@ -18,6 +18,7 @@ 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-03-20 04:18+0000\n" "Last-Translator: R3ktGamerRO <bluegamermc1@gmail.com>\n" @@ -2434,6 +2435,15 @@ msgstr "" "Nu am putut salva scena. Probabil dependenţe (instanţe sau moşteniri) nu au " "putut fi satisfăcute." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Nu s-a putut porni subprocesul!" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Salvați toate scenele" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Nu pot salva peste scena care este înca deschisă!" @@ -2568,6 +2578,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Salvează schimbările la ’%s’ înainte de ieșire?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2918,10 +2932,6 @@ msgid "Save Scene" msgstr "Salvează Scena" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Salvați toate scenele" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Convertește În..." @@ -4405,6 +4415,18 @@ msgid "Clear Default for '%s'" msgstr "Curăță setarea Implicită pentru '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Reimportă" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Importă Ca:" @@ -4413,10 +4435,6 @@ msgid "Preset" msgstr "Presetare" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Reimportă" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "" @@ -7489,12 +7507,14 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" -msgstr "" +#, fuzzy +msgid "Next Script" +msgstr "Extinde Script" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" -msgstr "" +#, fuzzy +msgid "Previous Script" +msgstr "Fila anterioară" #: editor/plugins/script_editor_plugin.cpp msgid "File" @@ -7930,14 +7950,19 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" -msgstr "" +#, fuzzy +msgid "Left Perspective" +msgstr "Mod Rotație" #: editor/plugins/spatial_editor_plugin.cpp msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -8291,6 +8316,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -14452,6 +14497,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14461,7 +14514,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/ru.po b/editor/translations/ru.po index c402e80ff1..56788509e1 100644 --- a/editor/translations/ru.po +++ b/editor/translations/ru.po @@ -70,7 +70,7 @@ # Ivan Kuzmenko <kuzmenko.ivan2002@yandex.com>, 2020. # Super Pracion <superpracion2@gmail.com>, 2020. # PizzArt <7o7goo7o7@gmail.com>, 2020. -# TheGracekale <mrsmailbot.lg@gmail.com>, 2020. +# TheGracekale <mrsmailbot.lg@gmail.com>, 2020, 2021. # Климентий Титов <titoffklim@cclc.tech>, 2020. # Richard Urban <redasuio1@gmail.com>, 2020. # Nikita <Kulacnikita@ya.ru>, 2020. @@ -101,8 +101,9 @@ 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-14 19:04+0000\n" +"PO-Revision-Date: 2021-09-29 02:21+0000\n" "Last-Translator: Danil Alexeev <danil@alexeev.xyz>\n" "Language-Team: Russian <https://hosted.weblate.org/projects/godot-engine/" "godot/ru/>\n" @@ -112,7 +113,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\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 @@ -2495,6 +2496,15 @@ msgstr "" "Не возможно сохранить сцену. Вероятно, зависимости (экземпляры или " "унаследованные) не могли быть удовлетворены." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Невозможно сохранить конвертированную текстуру:" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Сохранить все сцены" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Невозможно перезаписать сцену, которая все еще открыта!" @@ -2632,6 +2642,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Сохранить изменения в «%s» перед закрытием?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2677,29 +2691,27 @@ msgstr "Текущая сцена не сохранена. Открыть в л #: editor/editor_node.cpp msgid "Can't undo while mouse buttons are pressed." -msgstr "" +msgstr "Невозможно отменить пока кнопки мыши нажаты." #: editor/editor_node.cpp msgid "Nothing to undo." -msgstr "" +msgstr "Нечего отменить." #: editor/editor_node.cpp -#, fuzzy msgid "Undo: %s" -msgstr "Отменить" +msgstr "Отменить: %s" #: editor/editor_node.cpp msgid "Can't redo while mouse buttons are pressed." -msgstr "" +msgstr "Невозможно повторить пока кнопки мыши нажаты." #: editor/editor_node.cpp msgid "Nothing to redo." -msgstr "" +msgstr "Нечего повторить." #: editor/editor_node.cpp -#, fuzzy msgid "Redo: %s" -msgstr "Повторить" +msgstr "Повторить: %s" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." @@ -2983,10 +2995,6 @@ msgid "Save Scene" msgstr "Сохранить сцену" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Сохранить все сцены" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Конвертировать в..." @@ -3387,9 +3395,8 @@ msgid "Merge With Existing" msgstr "Объединить с существующей" #: editor/editor_node.cpp -#, fuzzy msgid "Apply MeshInstance Transforms" -msgstr "Изменить положение" +msgstr "Применить преобразования MeshInstance" #: editor/editor_node.cpp msgid "Open & Run a Script" @@ -3650,7 +3657,7 @@ msgstr "" #: editor/editor_resource_picker.cpp msgid "Quick Load" -msgstr "" +msgstr "Быстро загрузить" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "Make Unique" @@ -4469,6 +4476,18 @@ msgid "Clear Default for '%s'" msgstr "Очистить по умолчанию для «%s»" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Переимпортировать" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Импортировать как:" @@ -4477,10 +4496,6 @@ msgid "Preset" msgstr "Пресет" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Переимпортировать" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "Сохранить сцены, переимпортировать и перезапустить" @@ -5754,15 +5769,13 @@ msgstr "Передвинуть CanvasItem «%s» в (%d, %d)" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Locked" -msgstr "Заблокировать выбранное" +msgstr "Заблокирован" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Grouped" -msgstr "Группа" +msgstr "Сгруппирован" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -6703,14 +6716,12 @@ msgid "Remove Selected Item" msgstr "Удалить выбранный элемент" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Ignore Transforms)" -msgstr "Импортировать из сцены" +msgstr "Импортировать из сцены (игнорируя преобразования)" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Apply Transforms)" -msgstr "Импортировать из сцены" +msgstr "Импортировать из сцены (применяя преобразования)" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Update from Scene" @@ -7301,14 +7312,12 @@ msgid "Flip Portal" msgstr "Перевернуть портал" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Occluder Set Transform" -msgstr "Очистить преобразование" +msgstr "Преобразование набора окклюдеров" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Center Node" -msgstr "Создать узел" +msgstr "Центрировать узел" #: editor/plugins/root_motion_editor_plugin.cpp msgid "AnimationTree has no path set to an AnimationPlayer" @@ -7444,11 +7453,13 @@ msgid "Move Down" msgstr "Переместить вниз" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Следующий скрипт" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Предыдущий скрипт" #: editor/plugins/script_editor_plugin.cpp @@ -7814,14 +7825,12 @@ msgid "Skeleton2D" msgstr "2D скелет" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Reset to Rest Pose" -msgstr "Установить кости в позу покоя" +msgstr "Сбросить к позе покоя" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Overwrite Rest Pose" -msgstr "Перезаписать существующую сцену" +msgstr "Перезаписать позу покоя" #: editor/plugins/skeleton_editor_plugin.cpp msgid "Create physical bones" @@ -7848,69 +7857,63 @@ msgid "Perspective" msgstr "Перспективный" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Orthogonal" -msgstr "Ортогональный" +msgstr "Верхний ортогональный" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Perspective" -msgstr "Перспективный" +msgstr "Верхний перспективный" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Orthogonal" -msgstr "Ортогональный" +msgstr "Нижний ортогональный" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Perspective" -msgstr "Перспективный" +msgstr "Нижний перспективный" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Left Orthogonal" -msgstr "Ортогональный" +msgstr "Левый ортогональный" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Перспективный" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Right Orthogonal" -msgstr "Ортогональный" +msgstr "Правый ортогональный" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "Правый перспективный" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Orthogonal" -msgstr "Ортогональный" +msgstr "Передний ортогональный" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Perspective" -msgstr "Перспективный" +msgstr "Передний перспективный" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Orthogonal" -msgstr "Ортогональный" +msgstr "Задний ортогональный" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Perspective" -msgstr "Перспективный" +msgstr "Задний перспективный" #. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled. #: editor/plugins/spatial_editor_plugin.cpp msgid " [auto]" -msgstr "" +msgstr " [авто]" #. 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 " [порталы активны]" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Aborted." @@ -8235,6 +8238,27 @@ msgid "Right View" msgstr "Вид справа" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Вид спереди" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "Переключение перспективного/ортогонального вида" @@ -8308,9 +8332,8 @@ msgid "View Portal Culling" msgstr "Отображать portal culling" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "View Occlusion Culling" -msgstr "Отображать portal culling" +msgstr "Просмотр Occlusion Culling" #: editor/plugins/spatial_editor_plugin.cpp #: modules/gridmap/grid_map_editor_plugin.cpp @@ -8378,9 +8401,8 @@ msgid "Post" msgstr "После" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" -msgstr "Безымянный проект" +msgstr "Безымянный гизмо" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create Mesh2D" @@ -11644,19 +11666,19 @@ msgstr "Оставить оригинал" #: editor/rename_dialog.cpp msgid "PascalCase to snake_case" -msgstr "ВерблюжийРегистр в змеиный_регистр" +msgstr "PascalCase в snake_case" #: editor/rename_dialog.cpp msgid "snake_case to PascalCase" -msgstr "змеиный_регистр в ВерблюжийРегистр" +msgstr "snake_case в PascalCase" #: editor/rename_dialog.cpp msgid "Case" -msgstr "Случай" +msgstr "Регистр" #: editor/rename_dialog.cpp msgid "To Lowercase" -msgstr "К нижнему регистру" +msgstr "В нижний регистр" #: editor/rename_dialog.cpp msgid "To Uppercase" @@ -12512,14 +12534,12 @@ msgid "Set Portal Point Position" msgstr "Задать положение точки портала" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Set Occluder Sphere Radius" -msgstr "Изменить радиус цилиндра" +msgstr "Задать радиус сферы окклюдера" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Set Occluder Sphere Position" -msgstr "Установить позицию входа кривой" +msgstr "Задать положение сферы окклюдера" #: modules/csg/csg_gizmos.cpp msgid "Change Cylinder Radius" @@ -12804,9 +12824,8 @@ msgid "Class name can't be a reserved keyword" msgstr "Имя класса не может быть зарезервированным ключевым словом" #: modules/mono/csharp_script.cpp -#, fuzzy msgid "Build Solution" -msgstr "Заполнить выбранное" +msgstr "Собрать решение" #: modules/mono/mono_gd/gd_mono_utils.cpp msgid "End of inner exception stack trace" @@ -14140,11 +14159,11 @@ msgstr "" #: scene/3d/occluder.cpp msgid "No shape is set." -msgstr "" +msgstr "Форма не задана." #: scene/3d/occluder.cpp msgid "Only uniform scales are supported." -msgstr "" +msgstr "Поддерживается только масштабирование uniform." #: scene/3d/particles.cpp msgid "" @@ -14497,6 +14516,10 @@ msgid "" "The GLES2 backend is currently in use, so these modes will act like Stretch " "instead." msgstr "" +"Опции Tile и Tile Fit для свойств Axis Stretch работают только при " +"использовании бэкенда рендеринга GLES3.\n" +"В настоящее время используется бэкенд GLES2, поэтому эти режимы будут " +"работать как Stretch." #: scene/gui/popup.cpp msgid "" @@ -14535,6 +14558,14 @@ msgstr "" "Окружение по умолчанию, указанное в Настройках проекта (Rendering -> " "Environment -> Default Environment) не может быть загружено." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14549,12 +14580,15 @@ msgstr "" "либо узлу для отображения." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "Размер окна просмотра должен быть больше 0 для рендеринга." #: scene/resources/occluder_shape.cpp msgid "OccluderShapeSphere Set Spheres" -msgstr "" +msgstr "OccluderShapeSphere Задать сферы" #: scene/resources/visual_shader_nodes.cpp msgid "" @@ -16244,9 +16278,6 @@ msgstr "Константы не могут быть изменены." #~ msgid "Couldn't save atlas image:" #~ msgstr "Невозможно сохранить изображение атласа:" -#~ msgid "Couldn't save converted texture:" -#~ msgstr "Невозможно сохранить конвертированную текстуру:" - #~ msgid "Invalid translation source!" #~ msgstr "Неверный источник перевода!" diff --git a/editor/translations/si.po b/editor/translations/si.po index 7ff9aee6fb..c19727905b 100644 --- a/editor/translations/si.po +++ b/editor/translations/si.po @@ -7,6 +7,7 @@ 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-02-05 09:20+0000\n" "Last-Translator: thushariii <thusharipahalage@gmail.com>\n" @@ -2349,6 +2350,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2465,6 +2474,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2785,10 +2798,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4193,15 +4202,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7112,11 +7129,11 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +msgid "Next Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +msgid "Previous Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp @@ -7527,7 +7544,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7535,6 +7552,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7872,6 +7893,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13787,6 +13828,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13796,7 +13845,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/sk.po b/editor/translations/sk.po index 2395e28105..93e2cf40ab 100644 --- a/editor/translations/sk.po +++ b/editor/translations/sk.po @@ -15,6 +15,7 @@ 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-07-07 15:34+0000\n" "Last-Translator: Eliška Fichnová <eliska@fichna.sk>\n" @@ -2413,6 +2414,15 @@ msgstr "" "Nedá sa uložiť scéna. Pravdepodobne (inštancie alebo dedičstvo) nemôžu byť " "spokojné." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Subprocess sa nedá spustiť!" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Uložiť Všetky Scény" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Scéna sa nedá predpísať keď je stále otvorená!" @@ -2549,6 +2559,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Chcete uložiť zmeny do '%s' pred zatvorením?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2894,10 +2908,6 @@ msgid "Save Scene" msgstr "Uložiť Scénu" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Uložiť Všetky Scény" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Konvertovať Do..." @@ -4398,6 +4408,18 @@ msgid "Clear Default for '%s'" msgstr "Vyčistiť Štandardné pre '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Reimportovať" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Importovať Ako:" @@ -4406,10 +4428,6 @@ msgid "Preset" msgstr "Preset" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Reimportovať" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "Uložiť Scény, Re-Importovať, a Reštartovať" @@ -7398,12 +7416,13 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp #, fuzzy -msgid "Next script" +msgid "Next Script" msgstr "Popis:" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" -msgstr "" +#, fuzzy +msgid "Previous Script" +msgstr "Minulá karta" #: editor/plugins/script_editor_plugin.cpp msgid "File" @@ -7831,14 +7850,19 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" -msgstr "" +#, fuzzy +msgid "Left Perspective" +msgstr "Vľavo Dole" #: editor/plugins/spatial_editor_plugin.cpp msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -8192,6 +8216,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -14361,6 +14405,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14370,7 +14422,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/sl.po b/editor/translations/sl.po index d505ee913c..dc381b7d0a 100644 --- a/editor/translations/sl.po +++ b/editor/translations/sl.po @@ -16,6 +16,7 @@ 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-02-01 20:54+0000\n" "Last-Translator: Jakob Tadej Vrtačnik <minecraftalka2@gmail.com>\n" @@ -2513,6 +2514,16 @@ msgstr "" "Ni mogoče shraniti scene. Najverjetneje odvisnosti (primeri ali dedovanja) " "ne morejo biti izpolnjene." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Nemorem začeti podprocesa!" + +#: editor/editor_node.cpp +#, fuzzy +msgid "Save All Scenes" +msgstr "Shrani vse Prizore" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2645,6 +2656,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Shranim spremembe v '%s' pred zapiranjem?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2999,11 +3014,6 @@ msgid "Save Scene" msgstr "Shrani Prizor" #: editor/editor_node.cpp -#, fuzzy -msgid "Save All Scenes" -msgstr "Shrani vse Prizore" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Pretvori V..." @@ -4541,6 +4551,18 @@ msgid "Clear Default for '%s'" msgstr "Počisti privzeto za '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Ponovno Uvozi" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Uvozi Kot:" @@ -4550,10 +4572,6 @@ msgid "Preset" msgstr "Prednastavitev..." #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Ponovno Uvozi" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "" @@ -7661,12 +7679,14 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" -msgstr "" +#, fuzzy +msgid "Next Script" +msgstr "Zaženi Skripto" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" -msgstr "" +#, fuzzy +msgid "Previous Script" +msgstr "Prejšnji zavihek" #: editor/plugins/script_editor_plugin.cpp msgid "File" @@ -8105,14 +8125,19 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" -msgstr "" +#, fuzzy +msgid "Left Perspective" +msgstr "Način Vrtenja" #: editor/plugins/spatial_editor_plugin.cpp msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -8464,6 +8489,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -14735,6 +14780,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14744,7 +14797,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/sq.po b/editor/translations/sq.po index 2cc63728a3..2cf0327ec4 100644 --- a/editor/translations/sq.po +++ b/editor/translations/sq.po @@ -7,6 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" +"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "PO-Revision-Date: 2019-03-24 17:38+0000\n" "Last-Translator: Enrik Qose <enrikqose@gmail.com>\n" "Language-Team: Albanian <https://hosted.weblate.org/projects/godot-engine/" @@ -2448,6 +2449,15 @@ msgstr "" "Nuk mund ta ruante skenën. Me shumë mundësi varësitë (instancat ose " "trashgimit) nuk mund të plotësohej." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Nuk mund të fillojë subprocess-in!" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Ruaj të Gjitha Skenat" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Nuk mund të mbishkruash skenën që është akoma e hapur!" @@ -2585,6 +2595,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Ruaji ndryshimet në '%s' para se ta mbyllësh?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2940,10 +2954,6 @@ msgid "Save Scene" msgstr "Ruaj Skenën" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Ruaj të Gjitha Skenat" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Konverto në..." @@ -4464,6 +4474,18 @@ msgid "Clear Default for '%s'" msgstr "Pastro të Parazgjedhurat për '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Ri-importo" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Importo Si:" @@ -4473,10 +4495,6 @@ msgid "Preset" msgstr "Ngarko Gabimet" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Ri-importo" - -#: editor/import_dock.cpp #, fuzzy msgid "Save Scenes, Re-Import, and Restart" msgstr "Ruaj skenat, ri-importo dhe rifillo" @@ -7422,12 +7440,14 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" -msgstr "" +#, fuzzy +msgid "Next Script" +msgstr "Shkrim i Ri" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" -msgstr "" +#, fuzzy +msgid "Previous Script" +msgstr "Tabi i mëparshëm" #: editor/plugins/script_editor_plugin.cpp msgid "File" @@ -7848,7 +7868,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7856,6 +7876,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -8202,6 +8226,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -14266,6 +14310,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14275,7 +14327,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/sr_Cyrl.po b/editor/translations/sr_Cyrl.po index bb56bcbe29..53a3dc6761 100644 --- a/editor/translations/sr_Cyrl.po +++ b/editor/translations/sr_Cyrl.po @@ -9,6 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" +"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "PO-Revision-Date: 2020-05-22 21:01+0000\n" "Last-Translator: Младен Габић <cupakabra@protonmail.com>\n" "Language-Team: Serbian (cyrillic) <https://hosted.weblate.org/projects/godot-" @@ -2626,6 +2627,16 @@ msgid "" "be satisfied." msgstr "Не могу сачувати сцену. Вероватно зависности нису задовољене." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Не могу покренути подпроцес!" + +#: editor/editor_node.cpp +#, fuzzy +msgid "Save All Scenes" +msgstr "Сачувај све сцене" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp #, fuzzy msgid "Can't overwrite scene that is still open!" @@ -2762,6 +2773,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Сачувај промене '%s' пре изласка?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -3117,11 +3132,6 @@ msgid "Save Scene" msgstr "Сачувај сцену" #: editor/editor_node.cpp -#, fuzzy -msgid "Save All Scenes" -msgstr "Сачувај све сцене" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Конвертуј у..." @@ -4748,6 +4758,18 @@ msgid "Clear Default for '%s'" msgstr "Обриши уобичајено за „%s“" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Поново увези" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Увези као:" @@ -4757,10 +4779,6 @@ msgid "Preset" msgstr "Поставке" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Поново увези" - -#: editor/import_dock.cpp #, fuzzy msgid "Save Scenes, Re-Import, and Restart" msgstr "Упамти Сцену, Опет Увези, и Рестартуј" @@ -8054,11 +8072,13 @@ msgid "Move Down" msgstr "Помери доле" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Следећа скриптица" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Претходна скриптица" #: editor/plugins/script_editor_plugin.cpp @@ -8525,7 +8545,7 @@ msgstr "Ортогонална пројекција" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Перспективна пројекција" #: editor/plugins/spatial_editor_plugin.cpp @@ -8535,6 +8555,11 @@ msgstr "Ортогонална пројекција" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy +msgid "Right Perspective" +msgstr "Перспективна пројекција" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Front Orthogonal" msgstr "Ортогонална пројекција" @@ -8904,6 +8929,27 @@ msgid "Right View" msgstr "Поглед с десна" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Поглед испред" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp #, fuzzy msgid "Switch Perspective/Orthogonal View" msgstr "Пребаци у перспективни/ортогонални поглед" @@ -16151,6 +16197,14 @@ msgstr "" "Уобичајено Окружење наведено у Подешавањима Пројекта (Исцртавање -> Окружење " "-> Уобичајено Окружење) није успешно учитано." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp #, fuzzy msgid "" @@ -16166,7 +16220,9 @@ msgstr "" #: scene/main/viewport.cpp #, fuzzy -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "Величина Viewport-а мора бити већа од 0 да би се нешто исцртало." #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/sr_Latn.po b/editor/translations/sr_Latn.po index eee30eb977..668ee7d7de 100644 --- a/editor/translations/sr_Latn.po +++ b/editor/translations/sr_Latn.po @@ -9,6 +9,7 @@ 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: 2019-07-29 19:21+0000\n" "Last-Translator: LT <lakizvezdas@gmail.com>\n" @@ -2361,6 +2362,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2477,6 +2486,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2798,10 +2811,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4212,15 +4221,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7157,12 +7174,13 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +msgid "Next Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" -msgstr "" +#, fuzzy +msgid "Previous Script" +msgstr "Otiđi Na Prethodni Korak" #: editor/plugins/script_editor_plugin.cpp msgid "File" @@ -7579,7 +7597,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7587,6 +7605,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7926,6 +7948,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13902,6 +13944,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13911,7 +13961,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/sv.po b/editor/translations/sv.po index 3b0b8a97dd..2ae502bdd5 100644 --- a/editor/translations/sv.po +++ b/editor/translations/sv.po @@ -26,6 +26,7 @@ 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-10 21:40+0000\n" "Last-Translator: Kristoffer Grundström <swedishsailfishosuser@tutanota.com>\n" @@ -2454,6 +2455,16 @@ msgstr "" "Kunde inte spara scenen. Förmodligen kunde inte beroenden (instanser) " "uppfyllas." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Kunde inte starta underprocess!" + +#: editor/editor_node.cpp +#, fuzzy +msgid "Save All Scenes" +msgstr "Spara alla Scener" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Kan inte skriva över en scen som fortfarande är öppen!" @@ -2595,6 +2606,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Spara ändringar i '%s' innan stängning?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2953,11 +2968,6 @@ msgid "Save Scene" msgstr "Spara Scen" #: editor/editor_node.cpp -#, fuzzy -msgid "Save All Scenes" -msgstr "Spara alla Scener" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Konvertera Till..." @@ -4453,6 +4463,18 @@ msgid "Clear Default for '%s'" msgstr "Rensa Standarden för '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Importera om" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Importera Som:" @@ -4462,10 +4484,6 @@ msgid "Preset" msgstr "Återställ Zoom" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Importera om" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "" @@ -7490,11 +7508,13 @@ msgid "Move Down" msgstr "Flytta Ner" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Nästa Skript" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Föregående Skript" #: editor/plugins/script_editor_plugin.cpp @@ -7931,7 +7951,7 @@ msgstr "" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Perspektiv" #: editor/plugins/spatial_editor_plugin.cpp @@ -7939,6 +7959,11 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Right Perspective" +msgstr "Perspektiv" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -8295,6 +8320,27 @@ msgid "Right View" msgstr "Vy från höger" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Vy framifrån" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -14486,6 +14532,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14495,7 +14549,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/ta.po b/editor/translations/ta.po index f0a34987a2..d9114adc60 100644 --- a/editor/translations/ta.po +++ b/editor/translations/ta.po @@ -9,6 +9,7 @@ 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-09-01 10:38+0000\n" "Last-Translator: Sridhar <sreeafmarketing@gmail.com>\n" @@ -2352,6 +2353,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2468,6 +2477,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2788,10 +2801,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4199,15 +4208,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7114,11 +7131,11 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +msgid "Next Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +msgid "Previous Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp @@ -7529,7 +7546,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7537,6 +7554,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7874,6 +7895,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13793,6 +13834,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13802,7 +13851,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/te.po b/editor/translations/te.po index a77af85920..39cda33625 100644 --- a/editor/translations/te.po +++ b/editor/translations/te.po @@ -6,6 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" +"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "PO-Revision-Date: 2020-09-15 07:17+0000\n" "Last-Translator: suresh p <suresh9247@gmail.com>\n" "Language-Team: Telugu <https://hosted.weblate.org/projects/godot-engine/" @@ -2321,6 +2322,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2437,6 +2446,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2756,10 +2769,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4160,15 +4169,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7049,11 +7066,11 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +msgid "Next Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +msgid "Previous Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp @@ -7463,7 +7480,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7471,6 +7488,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7808,6 +7829,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13666,6 +13707,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13675,7 +13724,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/th.po b/editor/translations/th.po index 3042188001..ef1bb3b2bb 100644 --- a/editor/translations/th.po +++ b/editor/translations/th.po @@ -14,6 +14,7 @@ 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-06-07 23:43+0000\n" "Last-Translator: Atirut Wattanamongkol <artjang301@gmail.com>\n" @@ -2405,6 +2406,15 @@ msgid "" "be satisfied." msgstr "บันทึกฉากไม่ได้ อาจจะมีการอ้างอิงไม่สมบูรณ์ (อินสแตนซ์หรือการสืบทอด)" +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "บันทึก Texture ที่แปลงแล้วไม่ได้:" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "บันทึกฉากทั้งหมด" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "ไม่สามารถเขียนทับฉากที่กำลังเปิดอยู่ได้!" @@ -2535,6 +2545,10 @@ msgid "Save changes to '%s' before closing?" msgstr "บันทึก '%s' ก่อนปิดโปรแกรมหรือไม่?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2873,10 +2887,6 @@ msgid "Save Scene" msgstr "บันทึกฉาก" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "บันทึกฉากทั้งหมด" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "แปลงเป็น..." @@ -4360,6 +4370,18 @@ msgid "Clear Default for '%s'" msgstr "ลบค่าเริ่มต้นของ '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "นำเข้าใหม่" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "นำเข้าเป็น:" @@ -4368,10 +4390,6 @@ msgid "Preset" msgstr "พรีเซ็ต (ค่าตั้งล่วงหน้า)" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "นำเข้าใหม่" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "บันทึกฉาก, นำเข้าและเริ่มต้นใหม่" @@ -7326,11 +7344,13 @@ msgid "Move Down" msgstr "เลื่อนลง" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "สคริปต์ถัดไป" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "สคริปต์ก่อนหน้า" #: editor/plugins/script_editor_plugin.cpp @@ -7752,7 +7772,7 @@ msgstr "ขนาน" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "เพอร์สเปกทีฟ" #: editor/plugins/spatial_editor_plugin.cpp @@ -7762,6 +7782,11 @@ msgstr "ขนาน" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy +msgid "Right Perspective" +msgstr "เพอร์สเปกทีฟ" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Front Orthogonal" msgstr "ขนาน" @@ -8123,6 +8148,27 @@ msgid "Right View" msgstr "มุมขวา" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "มุมหน้า" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "สลับมุมมองเพอร์สเปกทีฟ/ออโธโกนอล" @@ -14324,6 +14370,14 @@ msgstr "" "ไม่สามารถโหลด Environment ปริยายที่กำหนดในตัวเลือกโปรเจกต์ได้ (Rendering -> " "Environment -> Default Environment)" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14336,7 +14390,10 @@ msgstr "" "texture ของโหนดอื่น" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "ขนาดวิวพอร์ตจะต้องมากกว่า 0 เพื่อที่จะเรนเดอร์ได้" #: scene/resources/occluder_shape.cpp @@ -15959,9 +16016,6 @@ msgstr "ค่าคงที่ไม่สามารถแก้ไขได #~ msgid "Couldn't save atlas image:" #~ msgstr "บันทึก Atlas ไม่ได้:" -#~ msgid "Couldn't save converted texture:" -#~ msgstr "บันทึก Texture ที่แปลงแล้วไม่ได้:" - #~ msgid "Invalid translation source!" #~ msgstr "ต้นฉบับการแปลไม่ถูกต้อง!" diff --git a/editor/translations/tr.po b/editor/translations/tr.po index e5a65500d1..5f8a365768 100644 --- a/editor/translations/tr.po +++ b/editor/translations/tr.po @@ -62,12 +62,14 @@ # Cannur Daşkıran <canndask@gmail.com>, 2021. # kahveciderin <kahveciderin@gmail.com>, 2021. # Lucifer25x <umudyt2006@gmail.com>, 2021. +# Kadir Berk Yağar <ykadirberk2@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-09-15 00:46+0000\n" -"Last-Translator: Lucifer25x <umudyt2006@gmail.com>\n" +"PO-Revision-Date: 2021-10-01 03:16+0000\n" +"Last-Translator: Kadir Berk Yağar <ykadirberk2@gmail.com>\n" "Language-Team: Turkish <https://hosted.weblate.org/projects/godot-engine/" "godot/tr/>\n" "Language: tr\n" @@ -423,15 +425,13 @@ msgstr "Animasyon Ekle" #. 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 "'%s' açılamıyor." +msgstr "'%s' düğümü" #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp -#, fuzzy msgid "animation" -msgstr "Animasyon" +msgstr "animasyon" #: editor/animation_track_editor.cpp msgid "AnimationPlayer can't animate itself, only other players." @@ -440,9 +440,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 "'%s' özelliği mevcut değil." +msgstr "'%s' özelliği" #: editor/animation_track_editor.cpp msgid "Anim Create & Insert" @@ -652,7 +651,6 @@ msgid "Go to Previous Step" msgstr "Önceki Adıma Git" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Apply Reset" msgstr "Sıfırla" @@ -673,9 +671,8 @@ msgid "Use Bezier Curves" msgstr "Bezier Eğrileri Kullan" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Create RESET Track(s)" -msgstr "İzleri Yapıştır" +msgstr "RESET İz(ler)i oluşturun" #: editor/animation_track_editor.cpp msgid "Anim. Optimizer" @@ -999,7 +996,6 @@ msgid "Edit..." msgstr "Düzenle..." #: editor/connections_dialog.cpp -#, fuzzy msgid "Go to Method" msgstr "Yönteme Git" @@ -1121,18 +1117,16 @@ msgid "Owners Of:" msgstr "Şunların sahipleri:" #: 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 "" -"Seçilen dosyalar kaldırılsın mı? (geri alınamaz)\n" -"Kaldırılan dosyaları sistemin geri dönüşüm kutusunda bulabilir ve geri " -"yükleyebilirsiniz." +"Seçilen dosyalar projeden kaldırılsın mı? (Geri alınamaz.)\n" +"Sahip olduğunuz dosya sistemine bağlı olarak bu dosyalar sonsuza dek " +"silinebilir ya da geri dönüşüm kutusuna gönderilebilir." #: editor/dependency_editor.cpp -#, fuzzy msgid "" "The files being removed are required by other resources in order for them to " "work.\n" @@ -1140,10 +1134,11 @@ msgid "" "Depending on your filesystem configuration, the files will either be moved " "to the system trash or deleted permanently." msgstr "" -"Diğer kimi dosyaların çalışması için kaldırdığınız dosyalar gerekli " -"görülmekte.\n" -"Yine de kaldırılsın mı? (geri alınamaz)\n" -"Kaldırılan dosyaların sistemin geri dönüşüm kutusunda bulabilirsiniz." +"Kaldırmaya çalıştığınız dosyalar projenin bazı parçalarının çalışması için " +"gerekli görülmekte.\n" +"Yine de kaldırılsın mı? (Geri alınamaz.)\n" +"Sisteminizin dosya sistemine bağlı olarak silmeye çalıştığınız dosyalar " +"kalıcı olarak silinebilir ya da geri dönüşüm kutusuna gönderilebilir." #: editor/dependency_editor.cpp msgid "Cannot remove:" @@ -1215,7 +1210,7 @@ msgstr "Godot topluluğundan teşekkürler!" #: editor/editor_about.cpp editor/editor_node.cpp editor/project_manager.cpp msgid "Click to copy." -msgstr "Kopyalamak için tıklayın." +msgstr "Kopyalamak için tıkla." #: editor/editor_about.cpp msgid "Godot Engine contributors" @@ -1314,12 +1309,10 @@ msgid "Licenses" msgstr "Lisanslar" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Error opening asset file for \"%s\" (not in ZIP format)." -msgstr "Paket dosyası açılırken hata (ZIP formatında değil)." +msgstr "\"%s\" açılırken hata ile karşılaşıldı (dosya ZIP formatında değil)." #: editor/editor_asset_installer.cpp -#, fuzzy msgid "%s (already exists)" msgstr "%s (Zaten Var)" @@ -1337,9 +1330,8 @@ msgid "Uncompressing Assets" msgstr "Varlıklar Çıkartılıyor" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "The following files failed extraction from asset \"%s\":" -msgstr "Aşağıdaki dosyaların, çıkından ayıklanma işlemi başarısız oldu:" +msgstr "Aşağıdaki dosyaların \"%s\" kaynağından ayıklanmasında hata oluştu:" #: editor/editor_asset_installer.cpp #, fuzzy @@ -1347,9 +1339,8 @@ msgid "(and %s more files)" msgstr "Ve %s kadar dosya daha." #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Asset \"%s\" installed successfully!" -msgstr "Paket Başarı ile Kuruldu!" +msgstr "\"%s\" Başarı ile kuruldu!" #: editor/editor_asset_installer.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -1594,14 +1585,12 @@ msgid "Can't add autoload:" msgstr "Otomatik yükleme eklenemiyor:" #: editor/editor_autoload_settings.cpp -#, fuzzy msgid "%s is an invalid path. File does not exist." -msgstr "Dosya yok." +msgstr "%s geçerli bir dizin değil. Dosya yok." #: editor/editor_autoload_settings.cpp -#, fuzzy msgid "%s is an invalid path. Not in resource path (res://)." -msgstr "%s geçersiz bir yol. Kaynak yolunda değil (res://)." +msgstr "%s geçersiz bir dizin. Kaynak dizinde değil (res://)." #: editor/editor_autoload_settings.cpp msgid "Add AutoLoad" @@ -1625,9 +1614,8 @@ msgid "Name" msgstr "İsim" #: editor/editor_autoload_settings.cpp -#, fuzzy msgid "Global Variable" -msgstr "Değişken" +msgstr "Global Değişken" #: editor/editor_data.cpp msgid "Paste Params" @@ -1810,7 +1798,6 @@ msgstr "" "düzenlemeye izin verir." #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Provides built-in access to the Asset Library." msgstr "Varlık Kitaplığına yerleşik erişim sağlar." @@ -1827,33 +1814,29 @@ msgstr "" "Scene dock'ta seçilen düğümün sinyalleri ve gruplarıyla çalışmaya izin verir." #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Allows to browse the local file system via a dedicated dock." msgstr "" "Özel bir dock aracılığıyla yerel dosya sistemine göz atılmasına izin verir." #: editor/editor_feature_profile.cpp -#, fuzzy msgid "" "Allows to configure import settings for individual assets. Requires the " "FileSystem dock to function." msgstr "" -"Bireysel varlıklar için içe aktarma ayarlarını yapılandırmaya izin verir. " +"Tekil paketler için içe aktarma ayarlarını yapılandırmaya izin verir. " "Çalışması için FileSystem fonksiyonunu gerektirir." #: editor/editor_feature_profile.cpp -#, fuzzy msgid "(current)" -msgstr "(Şuanki)" +msgstr "(Şu anki)" #: editor/editor_feature_profile.cpp msgid "(none)" -msgstr "" +msgstr "(hiç)" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Remove currently selected profile, '%s'? Cannot be undone." -msgstr "Seçili olan '%s' profili kaldırılsın mı? (Geri alınamayan.)" +msgstr "Seçili olan '%s' profili kaldırılsın mı? (Geri alınamaz.)" #: editor/editor_feature_profile.cpp msgid "Profile must be a valid filename and must not contain '.'" @@ -1884,14 +1867,12 @@ msgid "Enable Contextual Editor" msgstr "İçeriksel Düzenleyiciyi Etkinleştir" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Class Properties:" -msgstr "Özellikler:" +msgstr "Sınıf Özellikleri:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Main Features:" -msgstr "Özellikler" +msgstr "Ana Özellikler:" #: editor/editor_feature_profile.cpp #, fuzzy @@ -1914,7 +1895,6 @@ msgid "Error saving profile to path: '%s'." msgstr "Profil '%s' yoluna kaydedilirken hata oluştu." #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Reset to Default" msgstr "Varsayılanlara dön" @@ -1923,14 +1903,12 @@ msgid "Current Profile:" msgstr "Şu Anki Profil:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Create Profile" -msgstr "Profili Sil" +msgstr "Profil Oluştur" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Remove Profile" -msgstr "Döşemeyi Kaldır" +msgstr "Profili Kaldır" #: editor/editor_feature_profile.cpp msgid "Available Profiles:" @@ -1950,14 +1928,12 @@ msgid "Export" msgstr "Dışa Aktar" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Configure Selected Profile:" -msgstr "Şu Anki Profil:" +msgstr "Seçilen Profili Yapılandır:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Extra Options:" -msgstr "Doku Seçenekleri" +msgstr "İlave Seçenekler:" #: editor/editor_feature_profile.cpp msgid "Create or import a profile to edit available classes and properties." @@ -1990,7 +1966,6 @@ msgid "Select Current Folder" msgstr "Geçerli Klasörü Seç" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp -#, fuzzy msgid "File exists, overwrite?" msgstr "Dosya var. Üzerine Yazılsın mı?" @@ -2385,7 +2360,6 @@ msgid "New Window" msgstr "Yeni Pencere" #: editor/editor_node.cpp -#, fuzzy msgid "" "Spins when the editor window redraws.\n" "Update Continuously is enabled, which can increase power usage. Click to " @@ -2489,6 +2463,15 @@ msgstr "" "Sahne kaydedilemedi. Anlaşılan bağımlılıklar (örnekler ve kalıtımlar) " "karşılanamadı." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Dönüştürülmüş doku kaydedilemedi:" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Tüm Sahneleri Kaydet" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Açık olan sahnenin üzerine yazılamıyor!" @@ -2625,6 +2608,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Kapatmadan önce değişklikler buraya '%s' kaydedilsin mi?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp #, fuzzy msgid "" "The current scene has no root node, but %d modified external resource(s) " @@ -2670,29 +2657,27 @@ msgstr "Var olan sahne kaydedilmedi. Yine de açılsın mı?" #: editor/editor_node.cpp msgid "Can't undo while mouse buttons are pressed." -msgstr "" +msgstr "Fare düğmelerine basıldığında geri alınamaz." #: editor/editor_node.cpp msgid "Nothing to undo." -msgstr "" +msgstr "Geri alınacak bir şey yok." #: editor/editor_node.cpp -#, fuzzy msgid "Undo: %s" -msgstr "Geri al" +msgstr "Geri al: %s" #: editor/editor_node.cpp msgid "Can't redo while mouse buttons are pressed." -msgstr "" +msgstr "Fare düğmelerine basıldığında yeniden yapılamaz." #: editor/editor_node.cpp msgid "Nothing to redo." -msgstr "" +msgstr "Yeniden yapılacak bir şey yok." #: editor/editor_node.cpp -#, fuzzy msgid "Redo: %s" -msgstr "Yeniden yap" +msgstr "İleri al: %s" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." @@ -2772,7 +2757,7 @@ msgstr "" #: editor/editor_node.cpp msgid "Unable to find script field for addon plugin at: '%s'." -msgstr "Eklenti için betik alanı şu konumda bulunamıyor: '%s'." +msgstr "Eklentideki betik alanı bulunamıyor: '%s'." #: editor/editor_node.cpp msgid "Unable to load addon script from path: '%s'." @@ -2976,10 +2961,6 @@ msgid "Save Scene" msgstr "Sahne Kaydet" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Tüm Sahneleri Kaydet" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Şuna Dönüştür..." @@ -3047,9 +3028,8 @@ msgid "Orphan Resource Explorer..." msgstr "Orphan Kaynak Göstericisi..." #: editor/editor_node.cpp -#, fuzzy msgid "Reload Current Project" -msgstr "Projeyi Yeniden Adlandır" +msgstr "Projeyi Tekrar Yükle" #: editor/editor_node.cpp msgid "Quit to Project List" @@ -3210,9 +3190,8 @@ msgid "Help" msgstr "Yardım" #: editor/editor_node.cpp -#, fuzzy msgid "Online Documentation" -msgstr "Klavuzu Aç" +msgstr "Çevrimiçi Dokümanlar" #: editor/editor_node.cpp msgid "Questions & Answers" @@ -3223,9 +3202,8 @@ msgid "Report a Bug" msgstr "Hata Bildir" #: editor/editor_node.cpp -#, fuzzy msgid "Suggest a Feature" -msgstr "Bir Değer Ata" +msgstr "Yeni bir özellik öner" #: editor/editor_node.cpp msgid "Send Docs Feedback" @@ -3236,9 +3214,8 @@ msgid "Community" msgstr "Topluluk" #: editor/editor_node.cpp -#, fuzzy msgid "About Godot" -msgstr "Hakkında" +msgstr "Godot Hakkında" #: editor/editor_node.cpp msgid "Support Godot Development" @@ -3331,14 +3308,12 @@ msgid "Manage Templates" msgstr "Şablonlarını Yönet" #: editor/editor_node.cpp -#, fuzzy msgid "Install from file" msgstr "Dosyadan Kur" #: editor/editor_node.cpp -#, fuzzy msgid "Select android sources file" -msgstr "Bir Kaynak Örüntü Seçin:" +msgstr "Bir android kaynak dosyası seçin" #: editor/editor_node.cpp msgid "" @@ -3463,9 +3438,8 @@ msgid "No sub-resources found." msgstr "Alt kaynağı bulunamadı." #: editor/editor_path.cpp -#, fuzzy msgid "Open a list of sub-resources." -msgstr "Alt kaynağı bulunamadı." +msgstr "Kaynağın alt dizinini liste halinde aç." #: editor/editor_plugin.cpp msgid "Creating Mesh Previews" @@ -3492,14 +3466,12 @@ msgid "Update" msgstr "Güncelle" #: editor/editor_plugin_settings.cpp -#, fuzzy msgid "Version" -msgstr "Sürüm:" +msgstr "Sürüm" #: editor/editor_plugin_settings.cpp -#, fuzzy msgid "Author" -msgstr "Yazarlar" +msgstr "Yaratıcı" #: editor/editor_plugin_settings.cpp #: editor/plugins/version_control_editor_plugin.cpp @@ -3512,14 +3484,12 @@ msgid "Measure:" msgstr "Ölçüm:" #: editor/editor_profiler.cpp -#, fuzzy msgid "Frame Time (ms)" -msgstr "Kare Zamanı (sn)" +msgstr "Kare Zamanı (milisaniye)" #: editor/editor_profiler.cpp -#, fuzzy msgid "Average Time (ms)" -msgstr "Ortalama Zaman (sn)" +msgstr "Ortalama Zaman (milisaniye)" #: editor/editor_profiler.cpp msgid "Frame %" @@ -3546,6 +3516,12 @@ msgid "" "functions called by that function.\n" "Use this to find individual functions to optimize." msgstr "" +"Dahili: Bu işlev tarafından çağrılan diğer işlevlerden gelen zamanı içerir.\n" +"Darboğazları tespit etmek için bunu kullanın.\n" +"\n" +"Self: Sadece fonksiyonun kendisinde geçirilen zamanı sayın, o fonksiyon " +"tarafından çağrılan diğer fonksiyonlarda değil.\n" +"Eniyileştirilecek edilecek tekil işlevleri bulmak için bunu kullanın." #: editor/editor_profiler.cpp msgid "Frame #:" @@ -3651,7 +3627,7 @@ msgstr "" #: editor/editor_resource_picker.cpp msgid "Quick Load" -msgstr "" +msgstr "Hızlı yükleme" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "Make Unique" @@ -3672,9 +3648,8 @@ msgid "Paste" msgstr "Yapıştır" #: editor/editor_resource_picker.cpp editor/property_editor.cpp -#, fuzzy msgid "Convert to %s" -msgstr "Şuna Dönüştür %s" +msgstr "%s 'e dönüştür" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "New %s" @@ -3723,11 +3698,10 @@ msgid "Did you forget the '_run' method?" msgstr "'_run()' metodunu unuttunuz mu?" #: editor/editor_spin_slider.cpp -#, fuzzy msgid "Hold %s to round to integers. Hold Shift for more precise changes." msgstr "" -"Tam sayıya yuvarlamak için Ctrl tuşuna basılı tutun. Hassas değişiklikler " -"için Shift tuşuna basılı tutun." +"Tam sayıya yuvarlamak için %s tuşuna basılı tutun. Hassas değişiklikler için " +"Shift tuşuna basılı tutun." #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" @@ -3759,9 +3733,8 @@ msgid "There are no mirrors available." msgstr "'%s' dosyası bulunamadı." #: editor/export_template_manager.cpp -#, fuzzy msgid "Retrieving the mirror list..." -msgstr "Aynalar alınıyor, lütfen bekleyin..." +msgstr "Alternatif kaynak listesi alınıyor..." #: editor/export_template_manager.cpp msgid "Starting the download..." @@ -3772,24 +3745,20 @@ msgid "Error requesting URL:" msgstr "URL isteği hatası:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Connecting to the mirror..." -msgstr "Aynaya bağlanılıyor..." +msgstr "Alternatif kaynağa bağlanılıyor..." #: editor/export_template_manager.cpp -#, fuzzy msgid "Can't resolve the requested address." -msgstr "Ana makine adı çözümlenemedi:" +msgstr "Talep edilen adres çözümlenemedi." #: editor/export_template_manager.cpp -#, fuzzy msgid "Can't connect to the mirror." -msgstr "Ana makineye bağlanılamadı:" +msgstr "Ana makineye bağlanılamadı." #: editor/export_template_manager.cpp -#, fuzzy msgid "No response from the mirror." -msgstr "Ana makineden cevap yok:" +msgstr "Ana makineden cevap yok." #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -3797,17 +3766,14 @@ msgid "Request failed." msgstr "İstek başarısız." #: editor/export_template_manager.cpp -#, fuzzy msgid "Request ended up in a redirect loop." -msgstr "İstem Başarısız, çok fazla yönlendirme" +msgstr "İstek sonsuz bir döngüye dönüştü." #: editor/export_template_manager.cpp -#, fuzzy msgid "Request failed:" -msgstr "İstek başarısız." +msgstr "Talep başarısız oldu:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Download complete; extracting templates..." msgstr "İndirme tamamlandı; şablonlar ayıklanıyor..." @@ -3828,14 +3794,14 @@ msgid "Error getting the list of mirrors." msgstr "Kaynaklar listesini alırken hata." #: editor/export_template_manager.cpp -#, fuzzy msgid "Error parsing JSON with the list of mirrors. Please report this issue!" -msgstr "JSON sunucuları listesini alırken hata. Lütfen bu hatayı bildirin!" +msgstr "" +"Sağlanan kaynak listesiyle JSON dosyasını çözümlemeye çalışırken hata ile " +"karşılaşıldı. Lütfen bu hatayı bildirin!" #: editor/export_template_manager.cpp -#, fuzzy msgid "Best available mirror" -msgstr "Mevcut en iyi ayna" +msgstr "Mevcut en iyi alternatif kaynak" #: editor/export_template_manager.cpp msgid "" @@ -3888,24 +3854,20 @@ msgid "SSL Handshake Error" msgstr "SSL El Sıkışma Hatası" #: editor/export_template_manager.cpp -#, fuzzy msgid "Can't open the export templates file." -msgstr "Dışa aktarım kalıplarının zipi açılamadı." +msgstr "Dışa aktarım kalıpları dosyası açılamadı." #: editor/export_template_manager.cpp -#, fuzzy msgid "Invalid version.txt format inside the export templates file: %s." -msgstr "Şablonların içinde geçersiz version.txt formatı: %s." +msgstr "Dışa aktarım şablonlarının içinde geçersiz version.txt formatı: %s." #: editor/export_template_manager.cpp -#, fuzzy msgid "No version.txt found inside the export templates file." -msgstr "Şablonların içinde version.txt bulunamadı." +msgstr "Dışa aktarım şablonlarının içinde version.txt bulunamadı." #: editor/export_template_manager.cpp -#, fuzzy msgid "Error creating path for extracting templates:" -msgstr "Şablonlar için yol oluşturulurken hata:" +msgstr "Ayıklama şablonları için dizin oluşturulurken hata ile karşılaşıldı:" #: editor/export_template_manager.cpp msgid "Extracting Export Templates" @@ -3916,9 +3878,8 @@ msgid "Importing:" msgstr "İçe Aktarım:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Remove templates for the version '%s'?" -msgstr "Şablon sürümünü kaldır '%s'?" +msgstr "'%s' sürümü için şablonlar kaldırılsın mı?" #: editor/export_template_manager.cpp msgid "Uncompressing Android Build Sources" @@ -3933,7 +3894,6 @@ msgid "Current Version:" msgstr "Şu Anki Sürüm:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Export templates are missing. Download them or install from a file." msgstr "" "Dışa aktarma şablonları eksik. Bunları indirin veya bir dosyadan yükleyin." @@ -3943,9 +3903,8 @@ msgid "Export templates are installed and ready to be used." msgstr "Dışa aktarma şablonları yüklenir ve kullanıma hazırdır." #: editor/export_template_manager.cpp -#, fuzzy msgid "Open Folder" -msgstr "Dosya Aç" +msgstr "Klasör Aç" #: editor/export_template_manager.cpp msgid "Open the folder containing installed templates for the current version." @@ -3956,24 +3915,20 @@ msgid "Uninstall" msgstr "Kaldır" #: editor/export_template_manager.cpp -#, fuzzy msgid "Uninstall templates for the current version." -msgstr "Sayaç için başlangıç değeri" +msgstr "Güncel sürüm için şablonları kaldır." #: editor/export_template_manager.cpp -#, fuzzy msgid "Download from:" -msgstr "İndirme Hatası" +msgstr "Şuradan indir:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Open in Web Browser" -msgstr "Tarayıcıda Çalıştır" +msgstr "İnternet Tarayıcıda Çalıştır" #: editor/export_template_manager.cpp -#, fuzzy msgid "Copy Mirror URL" -msgstr "Hatayı Kopyala" +msgstr "Alternatif kaynak URL'sini kopyala" #: editor/export_template_manager.cpp msgid "Download and Install" @@ -3993,14 +3948,12 @@ msgstr "" "değildir." #: editor/export_template_manager.cpp -#, fuzzy msgid "Install from File" msgstr "Dosyadan Kur" #: editor/export_template_manager.cpp -#, fuzzy msgid "Install templates from a local file." -msgstr "Şablonları Zip Dosyasından İçeri Aktar" +msgstr "Şablonları yerel bir dosyadan kur." #: editor/export_template_manager.cpp editor/find_in_files.cpp #: editor/progress_dialog.cpp scene/gui/dialogs.cpp @@ -4008,19 +3961,16 @@ msgid "Cancel" msgstr "Vazgeç" #: editor/export_template_manager.cpp -#, fuzzy msgid "Cancel the download of the templates." -msgstr "Dışa aktarım kalıplarının zipi açılamadı." +msgstr "Şablon indirme işlemini iptal et." #: editor/export_template_manager.cpp -#, fuzzy msgid "Other Installed Versions:" msgstr "Yüklü Sürümler:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Uninstall Template" -msgstr "Kaldır" +msgstr "Şablonu Kaldır" #: editor/export_template_manager.cpp msgid "Select Template File" @@ -4204,14 +4154,12 @@ msgid "Sort by Type (Descending)" msgstr "Türe Göre Sırala (Artan)" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Sort by Last Modified" -msgstr "Son Değişiklik" +msgstr "Son Değişiklik Tarihi'ne göre sırala" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Sort by First Modified" -msgstr "Son Değişiklik" +msgstr "İlk Değişiklik Tarihi'ne göre sırala" #: editor/filesystem_dock.cpp msgid "Duplicate..." @@ -4502,6 +4450,18 @@ msgid "Clear Default for '%s'" msgstr "'%s' İçin Varsayılanı Temizle" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Yeniden İçe Aktar" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Şu Şekilde İçe Aktar:" @@ -4510,10 +4470,6 @@ msgid "Preset" msgstr "Ön ayar" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Yeniden İçe Aktar" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "Sahneleri kaydet, tekrar içe aktar ve baştan başlat" @@ -4535,14 +4491,12 @@ msgid "Failed to load resource." msgstr "Kaynak yükleme başarısız oldu." #: editor/inspector_dock.cpp -#, fuzzy msgid "Copy Properties" -msgstr "Özellikler" +msgstr "Özellikleri Kopyala" #: editor/inspector_dock.cpp -#, fuzzy msgid "Paste Properties" -msgstr "Özellikler" +msgstr "Özellikleri Yapıştır" #: editor/inspector_dock.cpp msgid "Make Sub-Resources Unique" @@ -4567,9 +4521,8 @@ msgid "Save As..." msgstr "Farklı Kaydet..." #: editor/inspector_dock.cpp -#, fuzzy msgid "Extra resource options." -msgstr "Kaynak yolunda değil." +msgstr "İlave kaynak ayarları." #: editor/inspector_dock.cpp msgid "Edit Resource from Clipboard" @@ -4580,9 +4533,8 @@ msgid "Copy Resource" msgstr "Kaynağı Tıpkıla" #: editor/inspector_dock.cpp -#, fuzzy msgid "Make Resource Built-In" -msgstr "Gömülü Yap" +msgstr "Kaynağı gömülü hale getir" #: editor/inspector_dock.cpp msgid "Go to the previous edited object in history." @@ -5791,15 +5743,13 @@ msgstr "CanvasItem \"%s\" öğesini (%d,%d) konumuna taşı" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Locked" -msgstr "Seçimi Kilitle" +msgstr "Kilitli" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Grouped" -msgstr "Öbek" +msgstr "Gruplanmış" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -5903,7 +5853,6 @@ msgstr "Çapaları Değiştir" #: 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." @@ -5918,6 +5867,9 @@ msgid "" "No project instance running. Run the project from the editor to use this " "feature." msgstr "" +"Proje Kamera Geçersiz Kılma\n" +"Çalışan proje örneği yok. Bu özelliği kullanmak için projeyi düzenleyiciden " +"çalıştırın." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -6312,7 +6264,7 @@ msgstr "Uzaklaştır" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Zoom to 1600%" -msgstr "" +msgstr "%1600'e yakınlaştır" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Add %s" @@ -6557,9 +6509,8 @@ msgid "Couldn't create a single convex collision shape." msgstr "Tek dışbükey çarpışma şekli oluşturulamadı." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Simplified Convex Shape" -msgstr "Tekil Dışbükey Şekil Oluştur" +msgstr "Basitleştirilmiş Dışbükey Şekil Oluştur" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Single Convex Shape" @@ -6594,9 +6545,8 @@ msgid "No mesh to debug." msgstr "Hata ayıklaöma için örüntü yok." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Mesh has no UV in layer %d." -msgstr "Model bu katmanda UV'ye sahip değil" +msgstr "Model %d katmanında UV'ye sahip değil." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "MeshInstance lacks a Mesh!" @@ -6754,14 +6704,12 @@ msgid "Remove Selected Item" msgstr "Seçilen Öğeyi Kaldır" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Ignore Transforms)" -msgstr "Sahneden İçe Aktar" +msgstr "Sahneden İçe Aktar (Transformları yoksay)" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Apply Transforms)" -msgstr "Sahneden İçe Aktar" +msgstr "Sahneden İçe Aktar (Transformları uygula)" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Update from Scene" @@ -7360,9 +7308,8 @@ msgid "Occluder Set Transform" msgstr "Dönüşümü Temizle" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Center Node" -msgstr "Düğüm Oluştur" +msgstr "Node'u Ortala" #: editor/plugins/root_motion_editor_plugin.cpp msgid "AnimationTree has no path set to an AnimationPlayer" @@ -7498,11 +7445,13 @@ msgid "Move Down" msgstr "Aşağı Taşı" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Sonraki betik" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Önceki betik" #: editor/plugins/script_editor_plugin.cpp @@ -7926,7 +7875,7 @@ msgstr "Dikey" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Derinlik" #: editor/plugins/spatial_editor_plugin.cpp @@ -7936,6 +7885,11 @@ msgstr "Dikey" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy +msgid "Right Perspective" +msgstr "Derinlik" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Front Orthogonal" msgstr "Dikey" @@ -7957,12 +7911,12 @@ msgstr "Derinlik" #. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled. #: editor/plugins/spatial_editor_plugin.cpp msgid " [auto]" -msgstr "" +msgstr " [Oto]" #. 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 " [portallar aktif]" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Aborted." @@ -8032,9 +7986,8 @@ msgid "Yaw:" msgstr "Sapma:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Size:" -msgstr "Boyut: " +msgstr "Boyut:" #: editor/plugins/spatial_editor_plugin.cpp msgid "Objects Drawn:" @@ -8053,16 +8006,14 @@ msgid "Surface Changes:" msgstr "Yüzey Değişiklikleri:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Draw Calls:" -msgstr "Çizim Çağrıları" +msgstr "Çizim Çağrıları:" #: editor/plugins/spatial_editor_plugin.cpp msgid "Vertices:" msgstr "Köşenoktalar:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "FPS: %d (%s ms)" msgstr "Kare hızı: %d (%s ms)" @@ -8199,9 +8150,8 @@ msgid "Freelook Slow Modifier" msgstr "Serbest Bakış Hız Değiştirici" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Toggle Camera Preview" -msgstr "Kamera Boyutunu Değiştir" +msgstr "Kamera Görünürlüğünü Değiştir" #: editor/plugins/spatial_editor_plugin.cpp msgid "View Rotation Locked" @@ -8292,6 +8242,27 @@ msgid "Right View" msgstr "Sağdan Görünüm" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Önden Görünüm" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "Derinlikli / Sığ Görünüme Değiştir" @@ -8436,9 +8407,8 @@ msgid "Post" msgstr "Sonrası" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" -msgstr "Adsız Proje" +msgstr "Adsız Aygıt" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create Mesh2D" @@ -8698,12 +8668,10 @@ msgid "Fonts" msgstr "Yazı Tipleri" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Icons" -msgstr "Simge" +msgstr "Simgeler" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Styleboxes" msgstr "StilKutusu" @@ -8712,23 +8680,20 @@ msgid "{num} color(s)" msgstr "{num} renk(lar)" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "No colors found." -msgstr "Alt kaynağı bulunamadı." +msgstr "Renk bulunamadı." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "{num} constant(s)" -msgstr "Sabitler" +msgstr "{num} Sabitler" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "No constants found." -msgstr "Renk Sabiti." +msgstr "Sabitler bulunamadı." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} font(s)" -msgstr "" +msgstr "{num} yazı tipi(leri)" #: editor/plugins/theme_editor_plugin.cpp msgid "No fonts found." @@ -8736,16 +8701,15 @@ msgstr "Yazı tipi bulunamadı." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} icon(s)" -msgstr "" +msgstr "{num} simge(ler)" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "No icons found." -msgstr "Bulunamadı!" +msgstr "Simge bulunamadı." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} stylebox(es)" -msgstr "" +msgstr "{num} stil kutusu(lar)" #: editor/plugins/theme_editor_plugin.cpp msgid "No styleboxes found." @@ -8753,48 +8717,43 @@ msgstr "Stil kutusu bulunamadı." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} currently selected" -msgstr "" +msgstr "{num} şuan seçili" #: editor/plugins/theme_editor_plugin.cpp msgid "Nothing was selected for the import." msgstr "İçe aktarma için hiçbir şey seçilmedi." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Importing Theme Items" -msgstr "Kalıbı İçe Aktar" +msgstr "Tema Ögeleri İçe Aktarılıyor" #: editor/plugins/theme_editor_plugin.cpp msgid "Importing items {n}/{n}" -msgstr "" +msgstr "{n}/{n} öğeleri içe aktarılıyor" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Updating the editor" -msgstr "Düzenleyiciden çık?" +msgstr "Editörün güncellenmesi" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Finalizing" msgstr "Çözümleniyor" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Filter:" msgstr "Süzgeç:" #: editor/plugins/theme_editor_plugin.cpp msgid "With Data" -msgstr "" +msgstr "Veri ile" #: editor/plugins/theme_editor_plugin.cpp msgid "Select by data type:" msgstr "Veri türüne göre seçin:" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible color items." -msgstr "Önce bir ayar öğesi seçin!" +msgstr "Tüm görünür renk öğelerini seçin." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible color items and their data." @@ -8805,9 +8764,8 @@ msgid "Deselect all visible color items." msgstr "Tüm görünür renk öğelerinin seçimini kaldırın." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible constant items." -msgstr "Önce bir ayar öğesi seçin!" +msgstr "Tüm görünür sabit öğeleri seçin." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible constant items and their data." @@ -8818,9 +8776,8 @@ msgid "Deselect all visible constant items." msgstr "Tüm görünür sabit öğelerin seçimini kaldırın." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible font items." -msgstr "Önce bir ayar öğesi seçin!" +msgstr "Tüm görünür yazı tipi öğelerini seçin." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible font items and their data." @@ -8831,19 +8788,16 @@ msgid "Deselect all visible font items." msgstr "Tüm görünür yazı tipi öğelerinin seçimini kaldırın." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible icon items." -msgstr "Önce bir ayar öğesi seçin!" +msgstr "Tüm görünür simge öğelerini seçin." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible icon items and their data." -msgstr "Önce bir ayar öğesi seçin!" +msgstr "Tüm görünür simge öğelerini ve verilerini seçin." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Deselect all visible icon items." -msgstr "Önce bir ayar öğesi seçin!" +msgstr "Tüm görünür simge öğelerinin seçimini kaldırın." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible stylebox items." @@ -8878,9 +8832,8 @@ msgid "Select all Theme items." msgstr "Şablon Dosyası Seç." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select With Data" -msgstr "Noktaları Seç" +msgstr "Veri ile Seç" #: editor/plugins/theme_editor_plugin.cpp msgid "Select all Theme items with item data." @@ -8895,9 +8848,8 @@ msgid "Deselect all Theme items." msgstr "Tüm Tema öğelerinin seçimini kaldırın." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Import Selected" -msgstr "Sahneyi İçe Aktar" +msgstr "Seçileni İçe Aktar" #: editor/plugins/theme_editor_plugin.cpp msgid "" @@ -9079,7 +9031,6 @@ msgid "Override Item" msgstr "Öğeyi Geçersiz Kıl" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Unpin this StyleBox as a main style." msgstr "Bu Stil Kutusunun ana stil olarak sabitlemesini kaldırın." @@ -9184,9 +9135,8 @@ msgid "Checked Radio Item" msgstr "Seçili Radyo Ögesi" #: editor/plugins/theme_editor_preview.cpp -#, fuzzy msgid "Named Separator" -msgstr "İsimli Ayraç." +msgstr "İsimli Ayraç" #: editor/plugins/theme_editor_preview.cpp msgid "Submenu" @@ -9238,20 +9188,19 @@ msgstr "Var,Çok,Seçenekler" #: editor/plugins/theme_editor_preview.cpp msgid "Invalid path, the PackedScene resource was probably moved or removed." -msgstr "" +msgstr "Geçersiz yol, PackedScene kaynağı muhtemelen taşındı veya kaldırıldı." #: editor/plugins/theme_editor_preview.cpp msgid "Invalid PackedScene resource, must have a Control node at its root." -msgstr "" +msgstr "Geçersiz PackedScene kaynağı, kökünde bir Kontrol düğümü olmalıdır." #: editor/plugins/theme_editor_preview.cpp -#, fuzzy msgid "Invalid file, not a PackedScene resource." -msgstr "Geçersiz dosya, bu bir audio bus yerleşim düzeni değil." +msgstr "Geçersiz dosya, bu bir PackedScene kaynağı değil." #: editor/plugins/theme_editor_preview.cpp msgid "Reload the scene to reflect its most actual state." -msgstr "" +msgstr "Sahneyi en gerçek durumunu yansıtacak şekilde yeniden yükleyin." #: editor/plugins/tile_map_editor_plugin.cpp msgid "Erase Selection" @@ -10649,9 +10598,8 @@ msgid "VisualShader" msgstr "GörselShader" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Edit Visual Property:" -msgstr "Görsel Niteliği Düzenle" +msgstr "Görsel Niteliği Düzenle:" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Visual Shader Mode Changed" @@ -10777,9 +10725,8 @@ msgid "Script" msgstr "Betik" #: editor/project_export.cpp -#, fuzzy msgid "GDScript Export Mode:" -msgstr "Betik Dışa Aktarım Biçimi:" +msgstr "GDScript Dışa Aktarım Modu:" #: editor/project_export.cpp msgid "Text" @@ -10787,21 +10734,21 @@ msgstr "Yazı" #: editor/project_export.cpp msgid "Compiled Bytecode (Faster Loading)" -msgstr "" +msgstr "Derlenmiş Bayt Kodu (Daha Hızlı Yükleme)" #: editor/project_export.cpp msgid "Encrypted (Provide Key Below)" msgstr "Şifreli (Açarı Aşağıda Belirtin)" #: editor/project_export.cpp -#, fuzzy msgid "Invalid Encryption Key (must be 64 hexadecimal characters long)" -msgstr "Geçersiz Şifreleme Anahtarı (64 karakter uzunluğunda olmalı)" +msgstr "" +"Geçersiz Şifreleme Anahtarı (On altılı sayı sisteminde 64 karakter " +"uzunluğunda olmalı)" #: editor/project_export.cpp -#, fuzzy msgid "GDScript Encryption Key (256-bits as hexadecimal):" -msgstr "Betik Şifreleme Açarı (Hex olarak 256-bit):" +msgstr "GDScript Şifreleme Anahtarı (On altılı sayı sisteminde 256-bit):" #: editor/project_export.cpp msgid "Export PCK/Zip" @@ -10873,7 +10820,6 @@ msgid "Imported Project" msgstr "İçe Aktarılan Proje" #: editor/project_manager.cpp -#, fuzzy msgid "Invalid project name." msgstr "Geçersiz Proje Adı." @@ -11098,14 +11044,12 @@ msgid "Are you sure to run %d projects at once?" msgstr "Birden fazla projeyi çalıştırmak istediğinize emin misiniz?" #: editor/project_manager.cpp -#, fuzzy msgid "Remove %d projects from the list?" -msgstr "Listeden aygıt seç" +msgstr "%d proje listeden kaldırılsın mı?" #: editor/project_manager.cpp -#, fuzzy msgid "Remove this project from the list?" -msgstr "Listeden aygıt seç" +msgstr "Bu proje listeden kaldırılsın mı?" #: editor/project_manager.cpp msgid "" @@ -11139,9 +11083,8 @@ msgid "Project Manager" msgstr "Proje Yöneticisi" #: editor/project_manager.cpp -#, fuzzy msgid "Local Projects" -msgstr "Projeler" +msgstr "Yerel Projeler" #: editor/project_manager.cpp msgid "Loading, please wait..." @@ -11152,23 +11095,20 @@ msgid "Last Modified" msgstr "Son Değişiklik" #: editor/project_manager.cpp -#, fuzzy msgid "Edit Project" -msgstr "Projeyi Dışa Aktar" +msgstr "Projjeyi Düzenle" #: editor/project_manager.cpp -#, fuzzy msgid "Run Project" -msgstr "Projeyi Yeniden Adlandır" +msgstr "Projeyi Çalıştır" #: editor/project_manager.cpp msgid "Scan" msgstr "Tara" #: editor/project_manager.cpp -#, fuzzy msgid "Scan Projects" -msgstr "Projeler" +msgstr "Projeleri Tara" #: editor/project_manager.cpp msgid "Select a Folder to Scan" @@ -11179,14 +11119,12 @@ msgid "New Project" msgstr "Yeni Proje" #: editor/project_manager.cpp -#, fuzzy msgid "Import Project" -msgstr "İçe Aktarılan Proje" +msgstr "Projeyi İçe Aktar" #: editor/project_manager.cpp -#, fuzzy msgid "Remove Project" -msgstr "Projeyi Yeniden Adlandır" +msgstr "Projeyi Kaldır" #: editor/project_manager.cpp msgid "Remove Missing" @@ -11197,9 +11135,8 @@ msgid "About" msgstr "Hakkında" #: editor/project_manager.cpp -#, fuzzy msgid "Asset Library Projects" -msgstr "Varlık Kütüphanesi" +msgstr "Kaynak Kütüphanesi Projeleri" #: editor/project_manager.cpp msgid "Restart Now" @@ -11211,7 +11148,7 @@ msgstr "Tümünü Kaldır" #: editor/project_manager.cpp msgid "Also delete project contents (no undo!)" -msgstr "" +msgstr "Ayrıca proje içeriğini silin (geri alma yok!)" #: editor/project_manager.cpp msgid "Can't run project" @@ -11226,20 +11163,18 @@ msgstr "" "Varlık Kütüphanesi'ndeki resmî örnek projeleri incelemek ister misin?" #: editor/project_manager.cpp -#, fuzzy msgid "Filter projects" -msgstr "Özellikleri süz" +msgstr "Projeleri Ayıkla" #: editor/project_manager.cpp -#, fuzzy msgid "" "This field filters projects by name and last path component.\n" "To filter projects by name and full path, the query must contain at least " "one `/` character." msgstr "" -"Arama kutusu, projeleri adına ve son yol bileşenine göre filtreler.\n" -"Projeleri adına ve tam yoluna göre filtrelemek için, sorgunun en az bir `/` " -"karakteri içermesi gereklidir." +"Arama kutusu, projeleri adına ve son dizin bileşenine göre filtreler.\n" +"Projeleri adına ve tam dizinine göre filtrelemek için, sorgunun en az bir `/" +"` karakteri içermesi gereklidir." #: editor/project_settings_editor.cpp msgid "Key " @@ -11247,7 +11182,7 @@ msgstr "Anahtar " #: editor/project_settings_editor.cpp msgid "Physical Key" -msgstr "" +msgstr "Fiziksel Anahtar" #: editor/project_settings_editor.cpp msgid "Joy Button" @@ -11294,7 +11229,7 @@ msgstr "Aygıt" #: editor/project_settings_editor.cpp msgid " (Physical)" -msgstr "" +msgstr " (Fiziksel)" #: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Press a Key..." @@ -11436,9 +11371,8 @@ msgid "Override for Feature" msgstr "Özelliğin Üzerine Yaz" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Add %d Translations" -msgstr "Çeviri Ekle" +msgstr "%d Çeviri Ekle" #: editor/project_settings_editor.cpp msgid "Remove Translation" @@ -11898,12 +11832,16 @@ msgstr "\"%s\" düğümü silinsin mi?" msgid "" "Saving the branch as a scene requires having a scene open in the editor." msgstr "" +"Dalın sahne olarak kaydedilmesi, düzenleyicide bir sahnenin açık olmasını " +"gerektirir." #: editor/scene_tree_dock.cpp msgid "" "Saving the branch as a scene requires selecting only one node, but you have " "selected %d nodes." msgstr "" +"Dalın sahne olarak kaydedilmesi yalnızca bir düğümün seçilmesini gerektirir, " +"ancak %d düğüm seçtiniz." #: editor/scene_tree_dock.cpp msgid "" @@ -11912,6 +11850,11 @@ msgid "" "FileSystem dock context menu\n" "or create an inherited scene using Scene > New Inherited Scene... instead." msgstr "" +"Kök düğüm dalı, örneklenmiş bir sahne olarak kaydedilemiyor.\n" +"Geçerli sahnenin düzenlenebilir bir kopyasını oluşturmak için, onu " +"FileSystem dock bağlam menüsünü kullanarak çoğaltın\n" +"veya bunun yerine Sahne > Yeni Devralınan Sahne...'yi kullanarak devralınan " +"bir sahne oluşturun." #: editor/scene_tree_dock.cpp msgid "" @@ -11919,6 +11862,10 @@ msgid "" "To create a variation of a scene, you can make an inherited scene based on " "the instanced scene using Scene > New Inherited Scene... instead." msgstr "" +"Halihazırda örneklenmiş bir sahnenin dalı kaydedilemez.\n" +"Bir sahnenin varyasyonunu oluşturmak için, bunun yerine Sahne > Yeni " +"Devralınan Sahne... seçeneğini kullanarak örneklenen sahneye dayalı olarak " +"devralınan bir sahne oluşturabilirsiniz." #: editor/scene_tree_dock.cpp msgid "Save New Scene As..." @@ -12103,9 +12050,9 @@ msgid "" "every time it updates.\n" "Switch back to the Local scene tree dock to improve performance." msgstr "" -"Seçilirse, Uzak sahne ağacı yuvası, projenin her güncellendiğinde " -"takılmasına neden olur.\n" -"Performansı artırmak için Yerel sahne ağaç yuvasına geri dönün." +"Seçilirse, Uzak sahne ağacı dok-u projenin her güncelleme anında takılmasına " +"neden olur.\n" +"Performansı artırmak için Yerel sahne ağacı dok-una geri dönün." #: editor/scene_tree_dock.cpp msgid "Local" @@ -12324,6 +12271,7 @@ msgid "" "Warning: Having the script name be the same as a built-in type is usually " "not desired." msgstr "" +"Uyarı: Komut dosyası adının yerleşik türle aynı olması genellikle istenmez." #: editor/script_create_dialog.cpp msgid "Class Name:" @@ -12395,7 +12343,7 @@ msgstr "Hatayı Kopyala" #: editor/script_editor_debugger.cpp msgid "Open C++ Source on GitHub" -msgstr "" +msgstr "GitHub'da C++ Kaynağını Açın" #: editor/script_editor_debugger.cpp msgid "Video RAM" @@ -13395,7 +13343,7 @@ msgstr "Listeden aygıt seç" #: platform/android/export/export_plugin.cpp msgid "Running on %s" -msgstr "" +msgstr "%s üzerinde çalışıyor" #: platform/android/export/export_plugin.cpp #, fuzzy @@ -13413,9 +13361,8 @@ msgid "Installing to device, please wait..." msgstr "Yükleniyor, lütfen bekleyin..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not install to device: %s" -msgstr "Sahne Örneklenemedi!" +msgstr "Cihaza yüklenemedi: %s" #: platform/android/export/export_plugin.cpp #, fuzzy @@ -13444,7 +13391,7 @@ msgid "" "configured OR none of them." msgstr "" "Hata Ayıklama Anahtar Deposu, Hata Ayıklama Kullanıcısı VE Hata Ayıklama " -"Şifresi konfigüre edilmelidir VEYA hiçbiri konfigüre edilmemelidir." +"Şifresi konfigüre edilmeli VEYA hiçbiri konfigüre edilmemelidir." #: platform/android/export/export_plugin.cpp msgid "Debug keystore not configured in the Editor Settings nor in the preset." @@ -13536,17 +13483,18 @@ msgid "" "directory.\n" "The resulting %s is unsigned." msgstr "" +"'apksigner' bulunamadı.\n" +"Lütfen komutun Android SDK build-tools dizininde bulunup bulunmadığını " +"kontrol edin.\n" +"Elde edilen %s imzasız." #: platform/android/export/export_plugin.cpp msgid "Signing debug %s..." -msgstr "" +msgstr "%s hata ayıklaması imzalanıyor..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Signing release %s..." -msgstr "" -"Dosyalar Taranıyor,\n" -"Lütfen Bekleyiniz..." +msgstr "%s sürümü imzalanıyor..." #: platform/android/export/export_plugin.cpp #, fuzzy @@ -13555,7 +13503,7 @@ msgstr "Dışa aktarma için şablon açılamadı:" #: platform/android/export/export_plugin.cpp msgid "'apksigner' returned with error #%d" -msgstr "" +msgstr "'apksigner', #%d hatasıyla döndürüldü" #: platform/android/export/export_plugin.cpp #, fuzzy @@ -13564,7 +13512,7 @@ msgstr "Ekliyor %s..." #: platform/android/export/export_plugin.cpp msgid "'apksigner' verification of %s failed." -msgstr "" +msgstr "%s için 'apksigner' doğrulaması başarısız oldu." #: platform/android/export/export_plugin.cpp #, fuzzy @@ -13585,7 +13533,7 @@ msgstr "Geçersiz dosya adı! Android APK, * .apk uzantısını gerektirir." #: platform/android/export/export_plugin.cpp msgid "Unsupported export format!\n" -msgstr "" +msgstr "Desteklenmeyen dışa aktarma biçimi!\n" #: platform/android/export/export_plugin.cpp msgid "" @@ -13611,16 +13559,15 @@ msgstr "" msgid "" "Unable to overwrite res://android/build/res/*.xml files with project name" msgstr "" +"Proje adıyla res://android/build/res/*.xml dosyalarının üzerine yazılamıyor" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not export project files to gradle project\n" -msgstr "Proje yolunda proje.godot alınamadı." +msgstr "Proje dosyaları gradle projesine aktarılamadı\n" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not write expansion package file!" -msgstr "Dosya yazılamadı:" +msgstr "Genişletme paketi dosyası yazılamadı!" #: platform/android/export/export_plugin.cpp msgid "Building Android Project (gradle)" @@ -13659,11 +13606,12 @@ msgid "Creating APK..." msgstr "Konturlar oluşturuluyor..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "" "Could not find template APK to export:\n" "%s" -msgstr "Dışa aktarma için şablon açılamadı:" +msgstr "" +"Dışa aktarılacak şablon APK bulunamadı:\n" +"%s" #: platform/android/export/export_plugin.cpp msgid "" @@ -13672,6 +13620,9 @@ msgid "" "Please build a template with all required libraries, or uncheck the missing " "architectures in the export preset." msgstr "" +"Seçili mimariler için dışa aktarma şablonunda eksik kitaplıklar: %s.\n" +"Lütfen tüm gerekli kitaplıkları içeren bir şablon oluşturun veya dışa " +"aktarma ön ayarındaki eksik mimarilerin işaretini kaldırın." #: platform/android/export/export_plugin.cpp #, fuzzy @@ -13689,7 +13640,7 @@ msgstr "APK hizalanıyor ..." #: platform/android/export/export_plugin.cpp msgid "Could not unzip temporary unaligned APK." -msgstr "" +msgstr "Geçici olarak hizalanmamış APK'nın sıkıştırması açılamadı." #: platform/iphone/export/export.cpp platform/osx/export/export.cpp msgid "Identifier is missing." @@ -13762,19 +13713,19 @@ msgstr "Geçersiz Tanımlayıcı:" #: platform/osx/export/export.cpp msgid "Notarization: code signing required." -msgstr "" +msgstr "Noter tasdiki: kod imzalama gerekli." #: platform/osx/export/export.cpp msgid "Notarization: hardened runtime required." -msgstr "" +msgstr "Noter onayı: sertleştirilmiş çalışma zamanı gerekli." #: platform/osx/export/export.cpp msgid "Notarization: Apple ID name not specified." -msgstr "" +msgstr "Noter tasdik: Apple Kimliği adı belirtilmedi." #: platform/osx/export/export.cpp msgid "Notarization: Apple ID password not specified." -msgstr "" +msgstr "Noter tasdik: Apple Kimliği parolası belirtilmedi." #: platform/uwp/export/export.cpp msgid "Invalid package short name." @@ -14205,6 +14156,10 @@ msgid "" "longer has any effect.\n" "To remove this warning, disable the GIProbe's Compress property." msgstr "" +"GIProbe Sıkıştırma özelliği, bilinen hatalar nedeniyle kullanımdan " +"kaldırılmıştır ve artık herhangi bir etkisi yoktur.\n" +"Bu uyarıyı kaldırmak için GIProbe'un Sıkıştırma özelliğini devre dışı " +"bırakın." #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." @@ -14226,11 +14181,11 @@ msgstr "" #: scene/3d/occluder.cpp msgid "No shape is set." -msgstr "" +msgstr "Hiçbir şekil ayarlanmadı." #: scene/3d/occluder.cpp msgid "Only uniform scales are supported." -msgstr "" +msgstr "Yalnızca tek tip ölçekler desteklenir." #: scene/3d/particles.cpp msgid "" @@ -14301,15 +14256,15 @@ msgstr "Düğüm A ve Düğüm B, farklı PhysicsBody olmalıdır" #: scene/3d/portal.cpp msgid "The RoomManager should not be a child or grandchild of a Portal." -msgstr "" +msgstr "RoomManager, bir Portal'ın çocuğu veya torunu olmamalıdır." #: scene/3d/portal.cpp msgid "A Room should not be a child or grandchild of a Portal." -msgstr "" +msgstr "Bir Oda, bir Portal'ın çocuğu veya torunu olmamalıdır." #: scene/3d/portal.cpp msgid "A RoomGroup should not be a child or grandchild of a Portal." -msgstr "" +msgstr "Bir RoomGroup, bir Portal'ın çocuğu veya torunu olmamalıdır." #: scene/3d/remote_transform.cpp msgid "" @@ -14321,79 +14276,96 @@ msgstr "" #: scene/3d/room.cpp msgid "A Room cannot have another Room as a child or grandchild." -msgstr "" +msgstr "Bir Oda'nın çocuk veya torun olarak başka bir Odası olamaz." #: scene/3d/room.cpp msgid "The RoomManager should not be placed inside a Room." -msgstr "" +msgstr "RoomManager bir Odanın içine yerleştirilmemelidir." #: scene/3d/room.cpp msgid "A RoomGroup should not be placed inside a Room." -msgstr "" +msgstr "Bir Oda Grubu, bir Odanın içine yerleştirilmemelidir." #: scene/3d/room.cpp msgid "" "Room convex hull contains a large number of planes.\n" "Consider simplifying the room bound in order to increase performance." msgstr "" +"Oda dışbükey gövde, çok sayıda uçak içerir.\n" +"Performansı artırmak için oda sınırını basitleştirmeyi düşünün." #: scene/3d/room_group.cpp msgid "The RoomManager should not be placed inside a RoomGroup." -msgstr "" +msgstr "RoomManager, bir RoomGroup içine yerleştirilmemelidir." #: scene/3d/room_manager.cpp msgid "The RoomList has not been assigned." -msgstr "" +msgstr "RoomList atanmadı." #: scene/3d/room_manager.cpp msgid "The RoomList node should be a Spatial (or derived from Spatial)." -msgstr "" +msgstr "RoomList düğümü bir Uzamsal (veya Uzamsal'dan türetilmiş) olmalıdır." #: scene/3d/room_manager.cpp msgid "" "Portal Depth Limit is set to Zero.\n" "Only the Room that the Camera is in will render." msgstr "" +"Portal Derinlik Sınırı Sıfır olarak ayarlanmıştır.\n" +"Yalnızca Kameranın bulunduğu Oda görüntülenecektir." #: scene/3d/room_manager.cpp msgid "There should only be one RoomManager in the SceneTree." -msgstr "" +msgstr "SceneTree'de yalnızca bir RoomManager olmalıdır." #: scene/3d/room_manager.cpp msgid "" "RoomList path is invalid.\n" "Please check the RoomList branch has been assigned in the RoomManager." msgstr "" +"RoomList yolu geçersiz.\n" +"Lütfen RoomManager'da RoomList şubesinin atandığını kontrol edin." #: scene/3d/room_manager.cpp msgid "RoomList contains no Rooms, aborting." -msgstr "" +msgstr "RoomList hiç Oda içermiyor, iptal ediliyor." #: scene/3d/room_manager.cpp msgid "Misnamed nodes detected, check output log for details. Aborting." msgstr "" +"Yanlış adlandırılmış düğümler algılandı, ayrıntılar için çıktı günlüğünü " +"kontrol edin. İptal ediliyor." #: scene/3d/room_manager.cpp msgid "Portal link room not found, check output log for details." msgstr "" +"Portal bağlantı odası bulunamadı, ayrıntılar için çıktı günlüğünü kontrol " +"edin." #: scene/3d/room_manager.cpp msgid "" "Portal autolink failed, check output log for details.\n" "Check the portal is facing outwards from the source room." msgstr "" +"Portal otomatik bağlantısı başarısız oldu, ayrıntılar için çıktı günlüğünü " +"kontrol edin.\n" +"Portalın kaynak odadan dışa doğru baktığını kontrol edin." #: scene/3d/room_manager.cpp msgid "" "Room overlap detected, cameras may work incorrectly in overlapping area.\n" "Check output log for details." msgstr "" +"Oda çakışması algılandı, kameralar çakışan alanda hatalı çalışabilir.\n" +"Ayrıntılar için çıktı günlüğünü kontrol edin." #: scene/3d/room_manager.cpp msgid "" "Error calculating room bounds.\n" "Ensure all rooms contain geometry or manual bounds." msgstr "" +"Oda sınırları hesaplanırken hata oluştu.\n" +"Tüm odaların geometri veya manuel sınırlar içerdiğinden emin olun." #: scene/3d/soft_body.cpp msgid "This body will be ignored until you set a mesh." @@ -14457,8 +14429,9 @@ msgid "Animation not found: '%s'" msgstr "Animasyon bulunamadı: '%s'" #: scene/animation/animation_player.cpp +#, fuzzy msgid "Anim Apply Reset" -msgstr "" +msgstr "Animasyonu Sıfırla" #: scene/animation/animation_tree.cpp msgid "In node '%s', invalid animation: '%s'." @@ -14567,6 +14540,10 @@ msgid "" "The GLES2 backend is currently in use, so these modes will act like Stretch " "instead." msgstr "" +"Eksen Uzatma özellikleri için Döşeme ve Döşeme Sığdırma seçenekleri yalnızca " +"GLES3 işleme arka ucunu kullanırken etkilidir.\n" +"GLES2 arka ucu şu anda kullanımda olduğundan, bu modlar bunun yerine Stretch " +"gibi davranacaktır." #: scene/gui/popup.cpp msgid "" @@ -14604,6 +14581,14 @@ msgstr "" "Proje Ayarlarında tanımlanmış Varsayılan Ortam (İşleme -> Görüntükapısı -> " "Varsayılan Ortam) yüklenemedi." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14617,13 +14602,16 @@ msgstr "" "bir RenderTarget yap ve dahili dokusunu herhangi bir düğüme ata." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" "Herhangi bir şeyi işlemek için görüntükapısı boyutu 0'dan büyük olmalıdır." #: scene/resources/occluder_shape.cpp msgid "OccluderShapeSphere Set Spheres" -msgstr "" +msgstr "OccluderShapeSphere Küre Kümeleri" #: scene/resources/visual_shader_nodes.cpp msgid "" @@ -14655,16 +14643,19 @@ msgid "" "Varyings which assigned in 'vertex' function may not be reassigned in " "'fragment' or 'light'." msgstr "" +"'Köşe' işlevinde atanan varyasyonlar, 'parça' veya 'ışık' olarak yeniden " +"atanamaz." #: servers/visual/shader_language.cpp msgid "" "Varyings which assigned in 'fragment' function may not be reassigned in " "'vertex' or 'light'." msgstr "" +"'Parça' işlevinde atanan varyasyonlar, 'köşe' veya 'ışık'ta yeniden atanamaz." #: servers/visual/shader_language.cpp msgid "Fragment-stage varying could not been accessed in custom function!" -msgstr "" +msgstr "Özel işlevde parça aşaması değişikliğine erişilemedi!" #: servers/visual/shader_language.cpp msgid "Assignment to function." @@ -16283,9 +16274,6 @@ msgstr "Sabit değerler değiştirilemez." #~ msgid "Couldn't save atlas image:" #~ msgstr "Atlas bedizi kaydedilemedi:" -#~ msgid "Couldn't save converted texture:" -#~ msgstr "Dönüştürülmüş doku kaydedilemedi:" - #~ msgid "Invalid translation source!" #~ msgstr "Geçersiz çeviri kaynağı!" diff --git a/editor/translations/tt.po b/editor/translations/tt.po index b169cafdc7..fc5064a395 100644 --- a/editor/translations/tt.po +++ b/editor/translations/tt.po @@ -7,6 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" +"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "PO-Revision-Date: 2021-06-07 23:43+0000\n" "Last-Translator: Bualma Show <appleaidar6@gmail.com>\n" "Language-Team: Tatar <https://hosted.weblate.org/projects/godot-engine/godot/" @@ -2321,6 +2322,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2437,6 +2446,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2756,10 +2769,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4159,15 +4168,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7048,11 +7065,11 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +msgid "Next Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +msgid "Previous Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp @@ -7462,7 +7479,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7470,6 +7487,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7807,6 +7828,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13664,6 +13705,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13673,7 +13722,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/tzm.po b/editor/translations/tzm.po index b0d9d05525..1911f0fde6 100644 --- a/editor/translations/tzm.po +++ b/editor/translations/tzm.po @@ -7,6 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" +"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "PO-Revision-Date: 2020-10-18 14:21+0000\n" "Last-Translator: Hakim Oubouali <hakim.oubouali.skr@gmail.com>\n" "Language-Team: Central Atlas Tamazight <https://hosted.weblate.org/projects/" @@ -2319,6 +2320,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2435,6 +2444,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2754,10 +2767,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4157,15 +4166,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7046,11 +7063,11 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +msgid "Next Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +msgid "Previous Script" msgstr "" #: editor/plugins/script_editor_plugin.cpp @@ -7460,7 +7477,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7468,6 +7485,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -7805,6 +7826,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -13662,6 +13703,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -13671,7 +13720,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/uk.po b/editor/translations/uk.po index fd9f2a1b8a..d662cfea7b 100644 --- a/editor/translations/uk.po +++ b/editor/translations/uk.po @@ -20,8 +20,9 @@ msgid "" msgstr "" "Project-Id-Version: Ukrainian (Godot Engine)\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" +"PO-Revision-Date: 2021-09-22 20:30+0000\n" "Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n" "Language-Team: Ukrainian <https://hosted.weblate.org/projects/godot-engine/" "godot/uk/>\n" @@ -31,7 +32,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\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 @@ -2424,6 +2425,15 @@ msgstr "" "Не вдалося зберегти сцену. Вірогідно, залежності (екземпляри або " "успадковані) не задоволені." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Не вдалося запустити підпроцес!" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Зберегти всі сцени" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Неможливо перезаписати сцену, яка є ще відкритою!" @@ -2560,6 +2570,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Зберегти зміни, внесені до '%s' перед закриттям?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2605,29 +2619,27 @@ msgstr "Поточна сцена не збережена. Відкрити в #: editor/editor_node.cpp msgid "Can't undo while mouse buttons are pressed." -msgstr "" +msgstr "Скасування неможливе, доки натиснуто кнопки миші." #: editor/editor_node.cpp msgid "Nothing to undo." -msgstr "" +msgstr "Нічого скасовувати." #: editor/editor_node.cpp -#, fuzzy msgid "Undo: %s" -msgstr "Скасувати" +msgstr "Скасувати: %s" #: editor/editor_node.cpp msgid "Can't redo while mouse buttons are pressed." -msgstr "" +msgstr "Повторення дій неможливе, доки натиснуто кнопки миші." #: editor/editor_node.cpp msgid "Nothing to redo." -msgstr "" +msgstr "Нічого повторювати." #: editor/editor_node.cpp -#, fuzzy msgid "Redo: %s" -msgstr "Повернути" +msgstr "Повторити: %s" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." @@ -2914,10 +2926,6 @@ msgid "Save Scene" msgstr "Зберегти сцену" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Зберегти всі сцени" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Перетворити на..." @@ -3319,9 +3327,8 @@ msgid "Merge With Existing" msgstr "Об'єднати з існуючим" #: editor/editor_node.cpp -#, fuzzy msgid "Apply MeshInstance Transforms" -msgstr "Змінити перетворення" +msgstr "Змінити перетворення екземпляра сітки" #: editor/editor_node.cpp msgid "Open & Run a Script" @@ -3583,7 +3590,7 @@ msgstr "" #: editor/editor_resource_picker.cpp msgid "Quick Load" -msgstr "" +msgstr "Швидке завантаження" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "Make Unique" @@ -4404,6 +4411,18 @@ msgid "Clear Default for '%s'" msgstr "Очистити типове для '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Переімпортувати" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Імпортувати як:" @@ -4412,10 +4431,6 @@ msgid "Preset" msgstr "Набір" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Переімпортувати" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "Зберегти сцени, повторно імпортувати і перезапустити" @@ -5696,15 +5711,13 @@ msgstr "Пересунути CanvasItem «%s» до (%d, %d)" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Locked" -msgstr "Заблокувати позначене" +msgstr "Заблоковано" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Grouped" -msgstr "Групи" +msgstr "Згруповано" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -6647,14 +6660,12 @@ msgid "Remove Selected Item" msgstr "Вилучити вибраний елемент" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Ignore Transforms)" -msgstr "Імпортувати зі сцени" +msgstr "Імпортувати зі сцени (ігнорувати перетворення)" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Apply Transforms)" -msgstr "Імпортувати зі сцени" +msgstr "Імпортувати зі сцени (застосувати перетворення)" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Update from Scene" @@ -7246,14 +7257,12 @@ msgid "Flip Portal" msgstr "Віддзеркалити портал" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Occluder Set Transform" -msgstr "Зняти перетворення" +msgstr "Перетворення набору закупорювача" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Center Node" -msgstr "Створити вузол" +msgstr "Центрувати вузол" #: editor/plugins/root_motion_editor_plugin.cpp msgid "AnimationTree has no path set to an AnimationPlayer" @@ -7391,11 +7400,13 @@ msgid "Move Down" msgstr "Перемістити вниз" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Наступний скрипт" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Попередній скрипт" #: editor/plugins/script_editor_plugin.cpp @@ -7761,14 +7772,12 @@ msgid "Skeleton2D" msgstr "Плоский каркас" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Reset to Rest Pose" -msgstr "Встановити кістки для вільної пози" +msgstr "Відновити вільну позу" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Overwrite Rest Pose" -msgstr "Перезаписати" +msgstr "Перезаписати вільну позу" #: editor/plugins/skeleton_editor_plugin.cpp msgid "Create physical bones" @@ -7795,69 +7804,63 @@ msgid "Perspective" msgstr "Перспектива" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Orthogonal" -msgstr "Ортогонально" +msgstr "Верхній ортогональний" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Perspective" -msgstr "Перспектива" +msgstr "Верхній перспективний" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Orthogonal" -msgstr "Ортогонально" +msgstr "Нижній ортогональний" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Perspective" -msgstr "Перспектива" +msgstr "Нижній перспективний" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Left Orthogonal" -msgstr "Ортогонально" +msgstr "Лівий ортогональний" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Перспектива" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Right Orthogonal" -msgstr "Ортогонально" +msgstr "Правий ортогональний" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "Правий перспективний" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Orthogonal" -msgstr "Ортогонально" +msgstr "Передній ортогональний" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Perspective" -msgstr "Перспектива" +msgstr "Передній перспективний" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Orthogonal" -msgstr "Ортогонально" +msgstr "Задній ортогональний" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Perspective" -msgstr "Перспектива" +msgstr "Задній перспективний" #. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled. #: editor/plugins/spatial_editor_plugin.cpp msgid " [auto]" -msgstr "" +msgstr " [авто]" #. 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 " [портали активні]" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Aborted." @@ -8181,6 +8184,27 @@ msgid "Right View" msgstr "Вигляд справа" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Вигляд спереду" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "Перемкнути перегляд перспективи/ортогональний перегляд" @@ -8254,9 +8278,8 @@ msgid "View Portal Culling" msgstr "Переглянути відбраковування Portal" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "View Occlusion Culling" -msgstr "Переглянути відбраковування Portal" +msgstr "Переглянути відбраковування замикання" #: editor/plugins/spatial_editor_plugin.cpp #: modules/gridmap/grid_map_editor_plugin.cpp @@ -8324,9 +8347,8 @@ msgid "Post" msgstr "Після" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" -msgstr "Проєкт без назви" +msgstr "Гаджет без назви" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create Mesh2D" @@ -12465,14 +12487,12 @@ msgid "Set Portal Point Position" msgstr "Задати положення точки порталу" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Set Occluder Sphere Radius" -msgstr "Змінити радіус форми циліндра" +msgstr "Змінити радіус сфери закупорювання" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Set Occluder Sphere Position" -msgstr "Встановити криву в позиції" +msgstr "Встановити позицію сфери закупорювання" #: modules/csg/csg_gizmos.cpp msgid "Change Cylinder Radius" @@ -12758,9 +12778,8 @@ msgid "Class name can't be a reserved keyword" msgstr "Назвою класу не може бути зарезервоване ключове слово" #: modules/mono/csharp_script.cpp -#, fuzzy msgid "Build Solution" -msgstr "Заповнити позначене" +msgstr "Зібрати рішення" #: modules/mono/mono_gd/gd_mono_utils.cpp msgid "End of inner exception stack trace" @@ -14119,11 +14138,11 @@ msgstr "" #: scene/3d/occluder.cpp msgid "No shape is set." -msgstr "" +msgstr "Форму не встановлено." #: scene/3d/occluder.cpp msgid "Only uniform scales are supported." -msgstr "" +msgstr "Передбачено підтримку лише однорідних масштабів." #: scene/3d/particles.cpp msgid "" @@ -14486,6 +14505,10 @@ msgid "" "The GLES2 backend is currently in use, so these modes will act like Stretch " "instead." msgstr "" +"Варіанти «Плитка» і «За плиткою» для властивостей розтягування вісі працюють " +"лише при використанні модуля обробки даних GLES3.\n" +"Зараз використано модуль обробки GLES2, тому ці режими працюватимуть просто " +"як «Розтягнути»." #: scene/gui/popup.cpp msgid "" @@ -14524,6 +14547,14 @@ msgstr "" "Не вдалося завантажити типове середовище, як його визначено у параметрах " "проєкту (Обробка -> Середовище -> Типове середовище)." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14537,14 +14568,17 @@ msgstr "" "пов'язати її внутрішню текстуру з одним із вузлів для показу." #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" "Щоб програма могла хоч щось показати, розмір поля перегляду має бути більшим " "за 0." #: scene/resources/occluder_shape.cpp msgid "OccluderShapeSphere Set Spheres" -msgstr "" +msgstr "Сфери набору OccluderShapeSphere" #: scene/resources/visual_shader_nodes.cpp msgid "" diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po index 332f5bd681..b192d4b651 100644 --- a/editor/translations/ur_PK.po +++ b/editor/translations/ur_PK.po @@ -8,6 +8,7 @@ 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: 2018-12-13 14:44+0100\n" "Last-Translator: Muhammad Ali <ali@codeonion.com>\n" @@ -2372,6 +2373,14 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2488,6 +2497,10 @@ msgid "Save changes to '%s' before closing?" msgstr "" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2812,10 +2825,6 @@ msgid "Save Scene" msgstr "" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "" @@ -4250,15 +4259,23 @@ msgid "Clear Default for '%s'" msgstr "" #: editor/import_dock.cpp -msgid "Import As:" +msgid "Reimport" msgstr "" #: editor/import_dock.cpp -msgid "Preset" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." msgstr "" #: editor/import_dock.cpp -msgid "Reimport" +msgid "Import As:" +msgstr "" + +#: editor/import_dock.cpp +msgid "Preset" msgstr "" #: editor/import_dock.cpp @@ -7228,12 +7245,13 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp #, fuzzy -msgid "Next script" +msgid "Next Script" msgstr "سب سکریپشن بنائیں" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" -msgstr "" +#, fuzzy +msgid "Previous Script" +msgstr "سب سکریپشن بنائیں" #: editor/plugins/script_editor_plugin.cpp msgid "File" @@ -7652,7 +7670,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -7660,6 +7678,10 @@ msgid "Right Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -8004,6 +8026,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -14057,6 +14099,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14066,7 +14116,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/vi.po b/editor/translations/vi.po index 518c301ca6..e1aa97d317 100644 --- a/editor/translations/vi.po +++ b/editor/translations/vi.po @@ -23,6 +23,7 @@ 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: IoeCmcomc <hopdaigia2004@gmail.com>\n" @@ -2405,6 +2406,15 @@ msgstr "" "Không thể lưu cảnh. Các phần phụ thuộc (trường hợp hoặc kế thừa) không thoả " "mãn." +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "Không thể bắt đầu quá trình phụ!" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "Lưu hết các Cảnh" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "Không thể ghi đè cảnh vẫn đang mở!" @@ -2537,6 +2547,10 @@ msgid "Save changes to '%s' before closing?" msgstr "Lưu thay đổi vào '%s' trước khi đóng?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2881,10 +2895,6 @@ msgid "Save Scene" msgstr "Lưu Cảnh" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "Lưu hết các Cảnh" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "Chuyển thành..." @@ -4366,6 +4376,18 @@ msgid "Clear Default for '%s'" msgstr "Dọn Mặc định cho '%s'" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "Nhập vào lại" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "Nhập vào với:" @@ -4374,10 +4396,6 @@ msgid "Preset" msgstr "Cài sẵn" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "Nhập vào lại" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "Lưu các cảnh, nhập lại, rồi tái khởi động" @@ -7338,11 +7356,13 @@ msgid "Move Down" msgstr "Hạ nút xuống" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "Tệp lệnh tiếp theo" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "Tệp lệnh trước đó" #: editor/plugins/script_editor_plugin.cpp @@ -7768,7 +7788,7 @@ msgstr "Vuông góc" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "Phối cảnh" #: editor/plugins/spatial_editor_plugin.cpp @@ -7778,6 +7798,11 @@ msgstr "Vuông góc" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy +msgid "Right Perspective" +msgstr "Phối cảnh" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Front Orthogonal" msgstr "Vuông góc" @@ -8134,6 +8159,27 @@ msgid "Right View" msgstr "Góc nhìn phải" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "Góc nhìn trực diện" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -14387,6 +14433,14 @@ msgstr "" "Environment mặc định được chỉ định trong Cài đặt Dự án (Rendering -> " "Environment -> Default Environment) không thể nạp được." +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14396,7 +14450,9 @@ msgid "" msgstr "" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po index e8084b8856..f17a8af827 100644 --- a/editor/translations/zh_CN.po +++ b/editor/translations/zh_CN.po @@ -82,8 +82,9 @@ msgid "" msgstr "" "Project-Id-Version: Chinese (Simplified) (Godot Engine)\n" +"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: 2018-01-20 12:15+0200\n" -"PO-Revision-Date: 2021-09-06 16:32+0000\n" +"PO-Revision-Date: 2021-10-08 03:03+0000\n" "Last-Translator: Haoyu Qiu <timothyqiu32@gmail.com>\n" "Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/" "godot-engine/godot/zh_Hans/>\n" @@ -92,7 +93,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.8.1-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 @@ -2433,6 +2434,15 @@ msgid "" "be satisfied." msgstr "无法保存场景。可能是因为依赖项(实例或继承)无法满足。" +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "无法保存转换的贴图:" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "保存所有场景" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "无法覆盖仍处于打开状态的场景!" @@ -2562,6 +2572,10 @@ msgid "Save changes to '%s' before closing?" msgstr "是否在关闭前保存对 “%s” 的更改?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2603,29 +2617,27 @@ msgstr "当前场景尚未保存。是否仍要打开?" #: editor/editor_node.cpp msgid "Can't undo while mouse buttons are pressed." -msgstr "" +msgstr "鼠标按下时无法撤销。" #: editor/editor_node.cpp msgid "Nothing to undo." -msgstr "" +msgstr "无可撤销。" #: editor/editor_node.cpp -#, fuzzy msgid "Undo: %s" -msgstr "撤销" +msgstr "撤销:%s" #: editor/editor_node.cpp msgid "Can't redo while mouse buttons are pressed." -msgstr "" +msgstr "鼠标按下时无法重做。" #: editor/editor_node.cpp msgid "Nothing to redo." -msgstr "" +msgstr "无可重做。" #: editor/editor_node.cpp -#, fuzzy msgid "Redo: %s" -msgstr "重做" +msgstr "重做:%s" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." @@ -2897,10 +2909,6 @@ msgid "Save Scene" msgstr "保存场景" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "保存所有场景" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "转换为..." @@ -3285,9 +3293,8 @@ msgid "Merge With Existing" msgstr "与现有合并" #: editor/editor_node.cpp -#, fuzzy msgid "Apply MeshInstance Transforms" -msgstr "修改动画变换" +msgstr "应用 MeshInstance 变换" #: editor/editor_node.cpp msgid "Open & Run a Script" @@ -3543,7 +3550,7 @@ msgstr "所选资源(%s)与该属性(%s)所需的类型都不匹配。" #: editor/editor_resource_picker.cpp msgid "Quick Load" -msgstr "" +msgstr "快速加载" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "Make Unique" @@ -4345,6 +4352,18 @@ msgid "Clear Default for '%s'" msgstr "清除 “%s” 的默认值" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "重新导入" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "导入为:" @@ -4353,10 +4372,6 @@ msgid "Preset" msgstr "预设" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "重新导入" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "保存场景、重新导入,然后重启" @@ -4383,7 +4398,7 @@ msgstr "粘贴属性" #: editor/inspector_dock.cpp msgid "Make Sub-Resources Unique" -msgstr "转为独立子资源" +msgstr "唯一化子资源" #: editor/inspector_dock.cpp msgid "Create a new resource in memory and edit it." @@ -5612,15 +5627,13 @@ msgstr "移动 CanvasItem “%s” 至 (%d, %d)" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Locked" -msgstr "锁定所选项" +msgstr "已锁定" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Grouped" -msgstr "分组" +msgstr "已分组" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -6546,14 +6559,12 @@ msgid "Remove Selected Item" msgstr "移除选中项目" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Ignore Transforms)" -msgstr "从场景中导入" +msgstr "从场景中导入(忽略变换)" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Apply Transforms)" -msgstr "从场景中导入" +msgstr "从场景中导入(应用变换)" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Update from Scene" @@ -7139,14 +7150,12 @@ msgid "Flip Portal" msgstr "翻转入口" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Occluder Set Transform" -msgstr "清除变换" +msgstr "遮挡集变换" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Center Node" -msgstr "创建节点" +msgstr "居中节点" #: editor/plugins/root_motion_editor_plugin.cpp msgid "AnimationTree has no path set to an AnimationPlayer" @@ -7280,11 +7289,13 @@ msgid "Move Down" msgstr "向下移动" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "下一个脚本" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "上一个脚本" #: editor/plugins/script_editor_plugin.cpp @@ -7646,14 +7657,12 @@ msgid "Skeleton2D" msgstr "2D 骨骼节点" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Reset to Rest Pose" -msgstr "将骨骼重置为放松姿势" +msgstr "重置为放松姿势" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Overwrite Rest Pose" -msgstr "覆盖" +msgstr "覆盖放松姿势" #: editor/plugins/skeleton_editor_plugin.cpp msgid "Create physical bones" @@ -7680,69 +7689,63 @@ msgid "Perspective" msgstr "透视" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Orthogonal" -msgstr "正交" +msgstr "正交顶视图" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Perspective" -msgstr "透视" +msgstr "透视顶视图" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Orthogonal" -msgstr "正交" +msgstr "正交底视图" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Perspective" -msgstr "透视" +msgstr "透视底视图" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Left Orthogonal" -msgstr "正交" +msgstr "正交左视图" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "透视" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Right Orthogonal" -msgstr "正交" +msgstr "正交右视图" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "透视右视图" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Orthogonal" -msgstr "正交" +msgstr "正交前视图" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Perspective" -msgstr "透视" +msgstr "透视前视图" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Orthogonal" -msgstr "正交" +msgstr "正交后视图" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Perspective" -msgstr "透视" +msgstr "透视后视图" #. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled. #: editor/plugins/spatial_editor_plugin.cpp msgid " [auto]" -msgstr "" +msgstr " [自动]" #. 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 " [入口生效]" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Aborted." @@ -8063,6 +8066,27 @@ msgid "Right View" msgstr "右视图" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "前视图" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "切换透视图/正交视图" @@ -8136,9 +8160,8 @@ msgid "View Portal Culling" msgstr "显示入口剔除" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "View Occlusion Culling" -msgstr "显示入口剔除" +msgstr "显示遮挡剔除" #: editor/plugins/spatial_editor_plugin.cpp #: modules/gridmap/grid_map_editor_plugin.cpp @@ -8206,9 +8229,8 @@ msgid "Post" msgstr "后置" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" -msgstr "未命名项目" +msgstr "未命名控制器" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create Mesh2D" @@ -12239,14 +12261,12 @@ msgid "Set Portal Point Position" msgstr "设置入口点位置" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Set Occluder Sphere Radius" -msgstr "修改圆柱体半径" +msgstr "设置遮挡球体半径" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Set Occluder Sphere Position" -msgstr "设置曲线内控点位置" +msgstr "设置遮挡球体位置" #: modules/csg/csg_gizmos.cpp msgid "Change Cylinder Radius" @@ -12529,9 +12549,8 @@ msgid "Class name can't be a reserved keyword" msgstr "类名不能是保留关键字" #: modules/mono/csharp_script.cpp -#, fuzzy msgid "Build Solution" -msgstr "填充选中项" +msgstr "构建解决方案" #: modules/mono/mono_gd/gd_mono_utils.cpp msgid "End of inner exception stack trace" @@ -13092,11 +13111,11 @@ msgstr "用于发布的密钥存储在导出预设中未被正确设置。" #: platform/android/export/export_plugin.cpp msgid "A valid Android SDK path is required in Editor Settings." -msgstr "编辑器设置中需要有效的Android SDK路径。" +msgstr "编辑器设置中需要有效的 Android SDK 路径。" #: platform/android/export/export_plugin.cpp msgid "Invalid Android SDK path in Editor Settings." -msgstr "编辑器设置中的Android SDK路径无效。" +msgstr "编辑器设置中的 Android SDK 路径无效。" #: platform/android/export/export_plugin.cpp msgid "Missing 'platform-tools' directory!" @@ -13104,11 +13123,11 @@ msgstr "缺失“platform-tools”目录!" #: platform/android/export/export_plugin.cpp msgid "Unable to find Android SDK platform-tools' adb command." -msgstr "找不到Android SDK平台工具的adb命令。" +msgstr "找不到 Android SDK 平台工具的 adb 命令。" #: platform/android/export/export_plugin.cpp msgid "Please check in the Android SDK directory specified in Editor Settings." -msgstr "请签入编辑器设置中指定的Android SDK目录。" +msgstr "请签入编辑器设置中指定的 Android SDK 目录。" #: platform/android/export/export_plugin.cpp msgid "Missing 'build-tools' directory!" @@ -13116,7 +13135,7 @@ msgstr "缺失“build-tools”目录!" #: platform/android/export/export_plugin.cpp msgid "Unable to find Android SDK build-tools' apksigner command." -msgstr "找不到Android SDK生成工具的apksigner命令。" +msgstr "找不到 Android SDK 生成工具的 apksigner 命令。" #: platform/android/export/export_plugin.cpp msgid "Invalid public key for APK expansion." @@ -13320,7 +13339,7 @@ msgstr "预设中未指定必需的图标。" #: platform/javascript/export/export.cpp msgid "Stop HTTP Server" -msgstr "停止 HTTP 服务" +msgstr "停止 HTTP 服务器" #: platform/javascript/export/export.cpp msgid "Run in Browser" @@ -13790,11 +13809,11 @@ msgstr "" #: scene/3d/occluder.cpp msgid "No shape is set." -msgstr "" +msgstr "未设置形状。" #: scene/3d/occluder.cpp msgid "Only uniform scales are supported." -msgstr "" +msgstr "仅支持统一的缩放。" #: scene/3d/particles.cpp msgid "" @@ -14131,6 +14150,8 @@ msgid "" "The GLES2 backend is currently in use, so these modes will act like Stretch " "instead." msgstr "" +"Axis Stretch 属性的 Tile 和 Tile Fit 选项仅在使用 GLES3 渲染后端时有效。\n" +"当前使用的是 GLES2 后端,将使用 Stretch 的行为代替这些模式。" #: scene/gui/popup.cpp msgid "" @@ -14167,6 +14188,14 @@ msgstr "" "无法加载项目设置中的默认环境 (Rendering -> Environment -> Default " "Environment)。" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14179,12 +14208,15 @@ msgstr "" "RenderTarget 并分配其内部纹理来显示。" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "Viewport 大小大于 0 时才能进行渲染。" #: scene/resources/occluder_shape.cpp msgid "OccluderShapeSphere Set Spheres" -msgstr "" +msgstr "OccluderShapeSphere 设置 Spheres" #: scene/resources/visual_shader_nodes.cpp msgid "" @@ -15857,9 +15889,6 @@ msgstr "不允许修改常量。" #~ msgid "Couldn't save atlas image:" #~ msgstr "无法保存精灵集图片:" -#~ msgid "Couldn't save converted texture:" -#~ msgstr "无法保存转换的贴图:" - #~ msgid "Invalid translation source!" #~ msgstr "源语言文件非法!" diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po index b9461bffd0..b3ac6dcf79 100644 --- a/editor/translations/zh_HK.po +++ b/editor/translations/zh_HK.po @@ -7,6 +7,7 @@ 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-05-01 11:43+0000\n" "Last-Translator: zx-wt <ZX_WT@ymail.com>\n" @@ -2485,6 +2486,15 @@ msgid "" "be satisfied." msgstr "" +#: editor/editor_node.cpp +msgid "Could not save one or more scenes!" +msgstr "" + +#: editor/editor_node.cpp +#, fuzzy +msgid "Save All Scenes" +msgstr "儲存所有場景" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "" @@ -2606,6 +2616,10 @@ msgid "Save changes to '%s' before closing?" msgstr "關閉前要先儲存對 '%s' 任何更改嗎?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2958,11 +2972,6 @@ msgid "Save Scene" msgstr "儲存場景" #: editor/editor_node.cpp -#, fuzzy -msgid "Save All Scenes" -msgstr "儲存所有場景" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "轉為..." @@ -4489,20 +4498,28 @@ msgstr "" #: editor/import_dock.cpp #, fuzzy -msgid "Import As:" +msgid "Reimport" msgstr "導入" #: editor/import_dock.cpp -#, fuzzy -msgid "Preset" -msgstr "重設縮放比例" +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" #: editor/import_dock.cpp #, fuzzy -msgid "Reimport" +msgid "Import As:" msgstr "導入" #: editor/import_dock.cpp +#, fuzzy +msgid "Preset" +msgstr "重設縮放比例" + +#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "" @@ -7573,12 +7590,14 @@ msgid "Move Down" msgstr "下移" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "下一個腳本" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" -msgstr "" +#, fuzzy +msgid "Previous Script" +msgstr "上一個tab" #: editor/plugins/script_editor_plugin.cpp msgid "File" @@ -8026,7 +8045,7 @@ msgid "Left Orthogonal" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Right Perspective" +msgid "Left Perspective" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp @@ -8035,6 +8054,10 @@ msgid "Right Orthogonal" msgstr "右𨫡" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Right Perspective" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Front Orthogonal" msgstr "" @@ -8389,6 +8412,26 @@ msgid "Right View" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Up" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "" @@ -14654,6 +14697,14 @@ msgid "" "Environment -> Default Environment) could not be loaded." msgstr "" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14664,7 +14715,9 @@ msgstr "" #: scene/main/viewport.cpp #, fuzzy -msgid "Viewport size must be greater than 0 to render anything." +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "viewport大小必須大於0以渲染任何東西。" #: scene/resources/occluder_shape.cpp diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po index db1603cc9b..6ec9a2671a 100644 --- a/editor/translations/zh_TW.po +++ b/editor/translations/zh_TW.po @@ -29,6 +29,7 @@ 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-07-13 06:13+0000\n" "Last-Translator: meowmeowmeowcat <meowmeowcat1211@gmail.com>\n" @@ -2407,6 +2408,15 @@ msgid "" "be satisfied." msgstr "無法保存場景。可能是由於相依性(實體或繼承)無法滿足。" +#: editor/editor_node.cpp +#, fuzzy +msgid "Could not save one or more scenes!" +msgstr "無法啟動子處理程序!" + +#: editor/editor_node.cpp +msgid "Save All Scenes" +msgstr "保存所有場景" + #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" msgstr "無法複寫未關閉的場景!" @@ -2536,6 +2546,10 @@ msgid "Save changes to '%s' before closing?" msgstr "關閉前是否保存對「%s」的更改?" #: editor/editor_node.cpp +msgid "%s no longer exists! Please specify a new save location." +msgstr "" + +#: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." @@ -2871,10 +2885,6 @@ msgid "Save Scene" msgstr "保存場景" #: editor/editor_node.cpp -msgid "Save All Scenes" -msgstr "保存所有場景" - -#: editor/editor_node.cpp msgid "Convert To..." msgstr "轉換成…" @@ -4352,6 +4362,18 @@ msgid "Clear Default for '%s'" msgstr "清除「%s」的預設" #: editor/import_dock.cpp +msgid "Reimport" +msgstr "重新匯入" + +#: editor/import_dock.cpp +msgid "" +"You have pending changes that haven't been applied yet. Click Reimport to " +"apply changes made to the import options.\n" +"Selecting another resource in the FileSystem dock without clicking Reimport " +"first will discard changes made in the Import dock." +msgstr "" + +#: editor/import_dock.cpp msgid "Import As:" msgstr "匯入為:" @@ -4360,10 +4382,6 @@ msgid "Preset" msgstr "預設設定" #: editor/import_dock.cpp -msgid "Reimport" -msgstr "重新匯入" - -#: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" msgstr "保存場景、重新匯入、並重新啟動" @@ -7315,11 +7333,13 @@ msgid "Move Down" msgstr "下移" #: editor/plugins/script_editor_plugin.cpp -msgid "Next script" +#, fuzzy +msgid "Next Script" msgstr "下一個腳本" #: editor/plugins/script_editor_plugin.cpp -msgid "Previous script" +#, fuzzy +msgid "Previous Script" msgstr "上一個腳本" #: editor/plugins/script_editor_plugin.cpp @@ -7741,7 +7761,7 @@ msgstr "正交" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Right Perspective" +msgid "Left Perspective" msgstr "透視" #: editor/plugins/spatial_editor_plugin.cpp @@ -7751,6 +7771,11 @@ msgstr "正交" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy +msgid "Right Perspective" +msgstr "透視" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Front Orthogonal" msgstr "正交" @@ -8112,6 +8137,27 @@ msgid "Right View" msgstr "右視圖" #: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Down" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Left" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View Right" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy +msgid "Orbit View Up" +msgstr "前視圖" + +#: editor/plugins/spatial_editor_plugin.cpp +msgid "Orbit View 180" +msgstr "" + +#: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" msgstr "切換投影或正交視圖" @@ -14306,6 +14352,14 @@ msgstr "" "無法載入專案設定中指定的預設環境 (Rendering -> Environment -> Default " "Environment)。" +#: scene/main/timer.cpp +msgid "" +"Very low timer wait times (< 0.05 seconds) may behave in significantly " +"different ways depending on the rendered or physics frame rate.\n" +"Consider using a script's process loop instead of relying on a Timer for " +"very low wait times." +msgstr "" + #: scene/main/viewport.cpp msgid "" "This viewport is not set as render target. If you intend for it to display " @@ -14318,7 +14372,10 @@ msgstr "" "為其他節點以顯示。" #: scene/main/viewport.cpp -msgid "Viewport size must be greater than 0 to render anything." +#, fuzzy +msgid "" +"The Viewport size must be greater than or equal to 2 pixels on both " +"dimensions to render anything." msgstr "Viewport 大小必須大於 0 才可進行算繪。" #: scene/resources/occluder_shape.cpp |