diff options
Diffstat (limited to 'editor')
230 files changed, 4224 insertions, 3425 deletions
diff --git a/editor/SCsub b/editor/SCsub index 6b18eeae93..87153f3b2b 100644 --- a/editor/SCsub +++ b/editor/SCsub @@ -76,7 +76,7 @@ if env["tools"]: # Editor translations to_include = ( - "ar,bg,bn,ca,cs,de,el,eo,es_AR,es,fi,fr,gl,he,hu,id,it,ja,ko,ms,nb,nl,pl,pt_BR,pt,ro,ru,sk,sv,th,tr,uk,vi,zh_CN,zh_TW" + "ar,bg,bn,ca,cs,de,el,eo,es_AR,es,fi,fr,gl,he,hu,id,it,ja,ko,lv,ms,nb,nl,pl,pt_BR,pt,ro,ru,sk,sv,th,tr,uk,vi,zh_CN,zh_TW" ).split(",") tlist = [env.Dir("#editor/translations").abspath + "/" + f + ".po" for f in to_include] env.Depends("#editor/editor_translations.gen.h", tlist) @@ -87,7 +87,7 @@ if env["tools"]: ) # Documentation translations - to_include = "es,fr,ja,zh_CN".split(",") + to_include = "de,es,fr,ja,zh_CN".split(",") tlist = [env.Dir("#doc/translations").abspath + "/" + f + ".po" for f in to_include] env.Depends("#editor/doc_translations.gen.h", tlist) env.CommandNoCache( diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp index 519dd654ef..3ca3576de6 100644 --- a/editor/action_map_editor.cpp +++ b/editor/action_map_editor.cpp @@ -36,8 +36,8 @@ ///////////////////////////////////////// -// Maps to 2*axis if value is neg, or + 1 if value is pos. -static const char *_joy_axis_descriptions[JOY_AXIS_MAX * 2] = { +// Maps to 2*axis if value is neg, or 2*axis+1 if value is pos. +static const char *_joy_axis_descriptions[(size_t)JoyAxis::MAX * 2] = { TTRC("Left Stick Left, Joystick 0 Left"), TTRC("Left Stick Right, Joystick 0 Right"), TTRC("Left Stick Up, Joystick 0 Up"), @@ -67,11 +67,11 @@ String InputEventConfigurationDialog::get_event_text(const Ref<InputEvent> &p_ev Ref<InputEventJoypadMotion> jpmotion = p_event; if (jpmotion.is_valid()) { String desc = TTR("Unknown Joypad Axis"); - if (jpmotion->get_axis() < JOY_AXIS_MAX) { - desc = RTR(_joy_axis_descriptions[2 * jpmotion->get_axis() + (jpmotion->get_axis_value() < 0 ? 0 : 1)]); + if (jpmotion->get_axis() < JoyAxis::MAX) { + desc = RTR(_joy_axis_descriptions[2 * (size_t)jpmotion->get_axis() + (jpmotion->get_axis_value() < 0 ? 0 : 1)]); } - return vformat("Joypad Axis %s %s (%s)", itos(jpmotion->get_axis()), jpmotion->get_axis_value() < 0 ? "-" : "+", desc); + return vformat("Joypad Axis %s %s (%s)", itos((int64_t)jpmotion->get_axis()), jpmotion->get_axis_value() < 0 ? "-" : "+", desc); } else { return p_event->as_text(); } @@ -108,7 +108,7 @@ void InputEventConfigurationDialog::_set_event(const Ref<InputEvent> &p_event) { if (k.is_valid()) { show_phys_key = true; - physical_key_checkbox->set_pressed(k->get_physical_keycode() != 0 && k->get_keycode() == 0); + physical_key_checkbox->set_pressed(k->get_physical_keycode() != Key::NONE && k->get_keycode() == Key::NONE); } else if (joyb.is_valid() || joym.is_valid() || mb.is_valid()) { show_device = true; @@ -260,7 +260,7 @@ void InputEventConfigurationDialog::_listen_window_input(const Ref<InputEvent> & return; } else { // Always make the value 1 or -1 for display consistency - joym->set_axis_value(SGN(axis_value)); + joym->set_axis_value(SIGN(axis_value)); } } @@ -268,9 +268,9 @@ void InputEventConfigurationDialog::_listen_window_input(const Ref<InputEvent> & k->set_pressed(false); // to avoid serialisation of 'pressed' property - doesn't matter for actions anyway. // Maintain physical keycode option state if (physical_key_checkbox->is_pressed()) { - k->set_keycode(KEY_NONE); + k->set_keycode(Key::NONE); } else { - k->set_physical_keycode(KEY_NONE); + k->set_physical_keycode(Key::NONE); } } @@ -325,7 +325,7 @@ void InputEventConfigurationDialog::_update_input_list() { mouse_root->set_collapsed(collapse); mouse_root->set_meta("__type", INPUT_MOUSE_BUTTON); - MouseButton mouse_buttons[9] = { MOUSE_BUTTON_LEFT, MOUSE_BUTTON_RIGHT, MOUSE_BUTTON_MIDDLE, MOUSE_BUTTON_WHEEL_UP, MOUSE_BUTTON_WHEEL_DOWN, MOUSE_BUTTON_WHEEL_LEFT, MOUSE_BUTTON_WHEEL_RIGHT, MOUSE_BUTTON_XBUTTON1, MOUSE_BUTTON_XBUTTON2 }; + MouseButton mouse_buttons[9] = { MouseButton::LEFT, MouseButton::RIGHT, MouseButton::MIDDLE, MouseButton::WHEEL_UP, MouseButton::WHEEL_DOWN, MouseButton::WHEEL_LEFT, MouseButton::WHEEL_RIGHT, MouseButton::MB_XBUTTON1, MouseButton::MB_XBUTTON2 }; for (int i = 0; i < 9; i++) { Ref<InputEventMouseButton> mb; mb.instantiate(); @@ -349,7 +349,7 @@ void InputEventConfigurationDialog::_update_input_list() { joyb_root->set_collapsed(collapse); joyb_root->set_meta("__type", INPUT_JOY_BUTTON); - for (int i = 0; i < JOY_BUTTON_MAX; i++) { + for (int i = 0; i < (int)JoyButton::MAX; i++) { Ref<InputEventJoypadButton> joyb; joyb.instantiate(); joyb->set_button_index((JoyButton)i); @@ -372,7 +372,7 @@ void InputEventConfigurationDialog::_update_input_list() { joya_root->set_collapsed(collapse); joya_root->set_meta("__type", INPUT_JOY_MOTION); - for (int i = 0; i < JOY_AXIS_MAX * 2; i++) { + for (int i = 0; i < (int)JoyAxis::MAX * 2; i++) { int axis = i / 2; int direction = (i & 1) ? 1 : -1; Ref<InputEventJoypadMotion> joym; @@ -453,10 +453,10 @@ void InputEventConfigurationDialog::_physical_keycode_toggled(bool p_checked) { if (p_checked) { k->set_physical_keycode(k->get_keycode()); - k->set_keycode(KEY_NONE); + k->set_keycode(Key::NONE); } else { k->set_keycode((Key)k->get_physical_keycode()); - k->set_physical_keycode(KEY_NONE); + k->set_physical_keycode(Key::NONE); } _set_event(k); @@ -480,9 +480,9 @@ void InputEventConfigurationDialog::_input_list_item_selected() { if (physical_key_checkbox->is_pressed()) { k->set_physical_keycode(keycode); - k->set_keycode(KEY_NONE); + k->set_keycode(Key::NONE); } else { - k->set_physical_keycode(KEY_NONE); + k->set_physical_keycode(Key::NONE); k->set_keycode(keycode); } diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp index 02b4a12b92..f7f88ad0d5 100644 --- a/editor/animation_bezier_editor.cpp +++ b/editor/animation_bezier_editor.cpp @@ -187,7 +187,7 @@ void AnimationBezierTrackEdit::_draw_line_clipped(const Vector2 &p_from, const V Vector2 from = p_from; Vector2 to = p_to; - if (from.x == to.x) { + if (from.x == to.x && from.y == to.y) { return; } if (to.x < from.x) { @@ -222,11 +222,6 @@ void AnimationBezierTrackEdit::_notification(int p_what) { bezier_icon = get_theme_icon(SNAME("KeyBezierPoint"), SNAME("EditorIcons")); bezier_handle_icon = get_theme_icon(SNAME("KeyBezierHandle"), SNAME("EditorIcons")); selected_icon = get_theme_icon(SNAME("KeyBezierSelected"), SNAME("EditorIcons")); - if (handle_mode_option->get_item_count() == 0) { - handle_mode_option->add_icon_item(get_theme_icon(SNAME("BezierHandlesFree"), SNAME("EditorIcons")), TTR("Free"), HANDLE_MODE_FREE); - handle_mode_option->add_icon_item(get_theme_icon(SNAME("BezierHandlesBalanced"), SNAME("EditorIcons")), TTR("Balanced"), HANDLE_MODE_BALANCED); - handle_mode_option->add_icon_item(get_theme_icon(SNAME("BezierHandlesMirror"), SNAME("EditorIcons")), TTR("Mirror"), HANDLE_MODE_MIRROR); - } } if (p_what == NOTIFICATION_RESIZED) { int right_limit = get_size().width - timeline->get_buttons_width(); @@ -420,9 +415,9 @@ void AnimationBezierTrackEdit::_notification(int p_what) { //draw editor handles { - float scale = timeline->get_zoom_scale(); edit_points.clear(); + float scale = timeline->get_zoom_scale(); for (int i = 0; i < animation->track_get_key_count(track); i++) { float offset = animation->track_get_key_time(track, i); float value = animation->bezier_track_get_key_value(track, i); @@ -438,7 +433,7 @@ void AnimationBezierTrackEdit::_notification(int p_what) { if (moving_handle != 0 && moving_handle_key == i) { in_vec = moving_handle_left; } - Vector2 pos_in = Vector2(((offset + in_vec.x) - timeline->get_value()) * scale + limit, _bezier_h_to_pixel(value + in_vec.y)); + Vector2 pos_in(((offset + in_vec.x) - timeline->get_value()) * scale + limit, _bezier_h_to_pixel(value + in_vec.y)); Vector2 out_vec = animation->bezier_track_get_key_out_handle(track, i); @@ -446,7 +441,7 @@ void AnimationBezierTrackEdit::_notification(int p_what) { out_vec = moving_handle_right; } - Vector2 pos_out = Vector2(((offset + out_vec.x) - timeline->get_value()) * scale + limit, _bezier_h_to_pixel(value + out_vec.y)); + Vector2 pos_out(((offset + out_vec.x) - timeline->get_value()) * scale + limit, _bezier_h_to_pixel(value + out_vec.y)); _draw_line_clipped(pos, pos_in, accent, limit, right_limit); _draw_line_clipped(pos, pos_out, accent, limit, right_limit); @@ -581,11 +576,21 @@ void AnimationBezierTrackEdit::_clear_selection() { update(); } +void AnimationBezierTrackEdit::_change_selected_keys_handle_mode(Animation::HandleMode p_mode) { + undo_redo->create_action(TTR("Update Selected Key Handles")); + double ratio = timeline->get_zoom_scale() * v_zoom; + for (Set<int>::Element *E = selection.back(); E; E = E->prev()) { + const int key_index = E->get(); + undo_redo->add_undo_method(animation.ptr(), "bezier_track_set_key_handle_mode", track, key_index, animation->bezier_track_get_key_handle_mode(track, key_index), ratio); + undo_redo->add_do_method(animation.ptr(), "bezier_track_set_key_handle_mode", track, key_index, p_mode, ratio); + } + undo_redo->commit_action(); +} + void AnimationBezierTrackEdit::_clear_selection_for_anim(const Ref<Animation> &p_anim) { if (!(animation == p_anim)) { return; } - //selection.clear(); _clear_selection(); } @@ -618,7 +623,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) { } Ref<InputEventMouseButton> mb = p_event; - if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN) { + if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::WHEEL_DOWN) { const float v_zoom_orig = v_zoom; if (mb->is_command_pressed()) { timeline->get_zoom()->set_value(timeline->get_zoom()->get_value() / 1.05); @@ -631,7 +636,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) { update(); } - if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP) { + if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::WHEEL_UP) { const float v_zoom_orig = v_zoom; if (mb->is_command_pressed()) { timeline->get_zoom()->set_value(timeline->get_zoom()->get_value() * 1.05); @@ -644,7 +649,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) { update(); } - if (mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_MIDDLE) { + if (mb.is_valid() && mb->get_button_index() == MouseButton::MIDDLE) { if (mb->is_pressed()) { int x = mb->get_position().x - timeline->get_name_limit(); panning_timeline_from = x / timeline->get_zoom_scale(); @@ -655,7 +660,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) { } } - if (mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_RIGHT && mb->is_pressed()) { + if (mb.is_valid() && mb->get_button_index() == MouseButton::RIGHT && mb->is_pressed()) { menu_insert_key = mb->get_position(); if (menu_insert_key.x >= timeline->get_name_limit() && menu_insert_key.x <= get_size().width - timeline->get_buttons_width()) { Vector2 popup_pos = get_global_transform().xform(mb->get_position()); @@ -667,6 +672,9 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) { menu->add_icon_item(get_theme_icon(SNAME("Duplicate"), SNAME("EditorIcons")), TTR("Duplicate Selected Key(s)"), MENU_KEY_DUPLICATE); menu->add_separator(); menu->add_icon_item(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), TTR("Delete Selected Key(s)"), MENU_KEY_DELETE); + menu->add_separator(); + menu->add_icon_item(get_theme_icon(SNAME("BezierHandlesFree"), SNAME("EditorIcons")), TTR("Make Handles Free"), MENU_KEY_SET_HANDLE_FREE); + menu->add_icon_item(get_theme_icon(SNAME("BezierHandlesBalanced"), SNAME("EditorIcons")), TTR("Make Handles Balanced"), MENU_KEY_SET_HANDLE_BALANCED); } menu->set_as_minsize(); @@ -675,11 +683,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) { } } - if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { - if (close_icon_rect.has_point(mb->get_position())) { - emit_signal(SNAME("close_request")); - return; - } + if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { for (const KeyValue<int, Rect2> &E : subtracks) { if (E.value.has_point(mb->get_position())) { set_animation_and_track(animation, E.key); @@ -746,7 +750,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) { //insert new point if (mb->is_command_pressed() && mb->get_position().x >= timeline->get_name_limit() && mb->get_position().x < get_size().width - timeline->get_buttons_width()) { Array new_point; - new_point.resize(5); + new_point.resize(6); float h = (get_size().height / 2 - mb->get_position().y) * v_zoom + v_scroll; @@ -755,6 +759,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) { new_point[2] = 0; new_point[3] = 0.25; new_point[4] = 0; + new_point[5] = 0; float time = ((mb->get_position().x - timeline->get_name_limit()) / timeline->get_zoom_scale()) + timeline->get_value(); while (animation->track_find_key(track, time, true) != -1) { @@ -792,7 +797,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) { } } - if (box_selecting_attempt && mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (box_selecting_attempt && mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { if (box_selecting) { //do actual select if (!box_selecting_add) { @@ -822,7 +827,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) { update(); } - if (moving_handle != 0 && mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (moving_handle != 0 && mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { undo_redo->create_action(TTR("Move Bezier Points")); undo_redo->add_do_method(animation.ptr(), "bezier_track_set_key_in_handle", track, moving_handle_key, moving_handle_left); undo_redo->add_do_method(animation.ptr(), "bezier_track_set_key_out_handle", track, moving_handle_key, moving_handle_right); @@ -834,7 +839,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) { update(); } - if (moving_selection_attempt && mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (moving_selection_attempt && mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { if (moving_selection) { //combit it @@ -929,7 +934,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) { } Ref<InputEventMouseMotion> mm = p_event; - if (mm.is_valid() && mm->get_button_mask() & MOUSE_BUTTON_MASK_MIDDLE) { + if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_MIDDLE) != MouseButton::NONE) { v_scroll += mm->get_relative().y * v_zoom; if (v_scroll > 100000) { v_scroll = 100000; @@ -986,33 +991,49 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) { if (moving_handle == -1) { moving_handle_left = moving_handle_value; - if (moving_handle_left.x > 0) { - moving_handle_left.x = 0; - } - if (handle_mode_option->get_selected() == HANDLE_MODE_BALANCED) { - Vector2 scale = Vector2(timeline->get_zoom_scale(), v_zoom); - moving_handle_right = (-(moving_handle_left * scale).normalized() * (moving_handle_right * scale).length()) / scale; + if (animation->bezier_track_get_key_handle_mode(track, moving_handle_key) == Animation::HANDLE_MODE_BALANCED) { + double ratio = timeline->get_zoom_scale() * v_zoom; + Transform2D xform; + xform.set_scale(Vector2(1.0, 1.0 / ratio)); - } else if (handle_mode_option->get_selected() == HANDLE_MODE_MIRROR) { - moving_handle_right = -moving_handle_left; - } - } + Vector2 vec_out = xform.xform(moving_handle_right); + Vector2 vec_in = xform.xform(moving_handle_left); - if (moving_handle == 1) { - moving_handle_right = moving_handle_value; - if (moving_handle_right.x < 0) { - moving_handle_right.x = 0; + moving_handle_right = xform.affine_inverse().xform(-vec_in.normalized() * vec_out.length()); } + } else if (moving_handle == 1) { + moving_handle_right = moving_handle_value; + + if (animation->bezier_track_get_key_handle_mode(track, moving_handle_key) == Animation::HANDLE_MODE_BALANCED) { + double ratio = timeline->get_zoom_scale() * v_zoom; + Transform2D xform; + xform.set_scale(Vector2(1.0, 1.0 / ratio)); - if (handle_mode_option->get_selected() == HANDLE_MODE_BALANCED) { - Vector2 scale = Vector2(timeline->get_zoom_scale(), v_zoom); - moving_handle_left = (-(moving_handle_right * scale).normalized() * (moving_handle_left * scale).length()) / scale; - } else if (handle_mode_option->get_selected() == HANDLE_MODE_MIRROR) { - moving_handle_left = -moving_handle_right; + Vector2 vec_in = xform.xform(moving_handle_left); + Vector2 vec_out = xform.xform(moving_handle_right); + + moving_handle_left = xform.affine_inverse().xform(-vec_out.normalized() * vec_in.length()); } } + update(); + } + + bool is_finishing_key_handle_drag = moving_handle != 0 && mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT; + if (is_finishing_key_handle_drag) { + undo_redo->create_action(TTR("Move Bezier Points")); + if (moving_handle == -1) { + double ratio = timeline->get_zoom_scale() * v_zoom; + undo_redo->add_do_method(animation.ptr(), "bezier_track_set_key_in_handle", track, moving_handle_key, moving_handle_left, ratio); + undo_redo->add_undo_method(animation.ptr(), "bezier_track_set_key_in_handle", track, moving_handle_key, animation->bezier_track_get_key_in_handle(track, moving_handle_key), ratio); + } else if (moving_handle == 1) { + double ratio = timeline->get_zoom_scale() * v_zoom; + undo_redo->add_do_method(animation.ptr(), "bezier_track_set_key_out_handle", track, moving_handle_key, moving_handle_right, ratio); + undo_redo->add_undo_method(animation.ptr(), "bezier_track_set_key_out_handle", track, moving_handle_key, animation->bezier_track_get_key_out_handle(track, moving_handle_key), ratio); + } + undo_redo->commit_action(); + moving_handle = 0; update(); } } @@ -1021,7 +1042,7 @@ void AnimationBezierTrackEdit::_menu_selected(int p_index) { switch (p_index) { case MENU_KEY_INSERT: { Array new_point; - new_point.resize(5); + new_point.resize(6); float h = (get_size().height / 2 - menu_insert_key.y) * v_zoom + v_scroll; @@ -1030,6 +1051,7 @@ void AnimationBezierTrackEdit::_menu_selected(int p_index) { new_point[2] = 0; new_point[3] = 0.25; new_point[4] = 0; + new_point[5] = Animation::HANDLE_MODE_BALANCED; float time = ((menu_insert_key.x - timeline->get_name_limit()) / timeline->get_zoom_scale()) + timeline->get_value(); while (animation->track_find_key(track, time, true) != -1) { @@ -1048,6 +1070,12 @@ void AnimationBezierTrackEdit::_menu_selected(int p_index) { case MENU_KEY_DELETE: { delete_selection(); } break; + case MENU_KEY_SET_HANDLE_FREE: { + _change_selected_keys_handle_mode(Animation::HANDLE_MODE_FREE); + } break; + case MENU_KEY_SET_HANDLE_BALANCED: { + _change_selected_keys_handle_mode(Animation::HANDLE_MODE_BALANCED); + } break; } } @@ -1118,6 +1146,7 @@ void AnimationBezierTrackEdit::delete_selection() { undo_redo->add_do_method(this, "_clear_selection_for_anim", animation); undo_redo->add_undo_method(this, "_clear_selection_for_anim", animation); undo_redo->commit_action(); + //selection.clear(); } } @@ -1150,8 +1179,6 @@ AnimationBezierTrackEdit::AnimationBezierTrackEdit() { set_focus_mode(FOCUS_CLICK); set_clip_contents(true); - handle_mode = HANDLE_MODE_FREE; - handle_mode_option = memnew(OptionButton); close_button = memnew(Button); close_button->connect("pressed", Callable(this, SNAME("emit_signal")), varray(SNAME("close_request"))); @@ -1160,7 +1187,6 @@ AnimationBezierTrackEdit::AnimationBezierTrackEdit() { right_column = memnew(VBoxContainer); right_column->add_child(close_button); right_column->add_spacer(); - right_column->add_child(handle_mode_option); add_child(right_column); menu = memnew(PopupMenu); diff --git a/editor/animation_bezier_editor.h b/editor/animation_bezier_editor.h index 578c6f9337..4b46777cfe 100644 --- a/editor/animation_bezier_editor.h +++ b/editor/animation_bezier_editor.h @@ -36,21 +36,14 @@ class AnimationBezierTrackEdit : public Control { GDCLASS(AnimationBezierTrackEdit, Control); - enum HandleMode { - HANDLE_MODE_FREE, - HANDLE_MODE_BALANCED, - HANDLE_MODE_MIRROR - }; - enum { MENU_KEY_INSERT, MENU_KEY_DUPLICATE, - MENU_KEY_DELETE + MENU_KEY_DELETE, + MENU_KEY_SET_HANDLE_FREE, + MENU_KEY_SET_HANDLE_BALANCED, }; - HandleMode handle_mode; - OptionButton *handle_mode_option; - VBoxContainer *right_column; Button *close_button; @@ -69,8 +62,6 @@ class AnimationBezierTrackEdit : public Control { Ref<Texture2D> bezier_handle_icon; Ref<Texture2D> selected_icon; - Rect2 close_icon_rect; - Map<int, Rect2> subtracks; float v_scroll = 0; @@ -104,10 +95,12 @@ class AnimationBezierTrackEdit : public Control { int moving_handle_key = 0; Vector2 moving_handle_left; Vector2 moving_handle_right; + int moving_handle_mode; // value from Animation::HandleMode void _clear_selection(); void _clear_selection_for_anim(const Ref<Animation> &p_anim); void _select_at_anim(const Ref<Animation> &p_anim, int p_track, float p_pos); + void _change_selected_keys_handle_mode(Animation::HandleMode p_mode); Vector2 menu_insert_key; diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index a85a4450a6..6fce55f8e3 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -334,6 +334,22 @@ public: setting = false; return true; } + + if (name == "handle_mode") { + const Variant &value = p_value; + + setting = true; + undo_redo->create_action(TTR("Anim Change Keyframe Value"), UndoRedo::MERGE_ENDS); + int prev = animation->bezier_track_get_key_handle_mode(track, key); + undo_redo->add_do_method(animation.ptr(), "bezier_track_set_key_handle_mode", track, key, value); + undo_redo->add_undo_method(animation.ptr(), "bezier_track_set_key_handle_mode", track, key, prev); + 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; + } } break; case Animation::TYPE_AUDIO: { if (name == "stream") { @@ -498,6 +514,11 @@ public: return true; } + if (name == "handle_mode") { + r_ret = animation->bezier_track_get_key_handle_mode(track, key); + return true; + } + } break; case Animation::TYPE_AUDIO: { if (name == "stream") { @@ -610,6 +631,7 @@ public: p_list->push_back(PropertyInfo(Variant::FLOAT, "value")); p_list->push_back(PropertyInfo(Variant::VECTOR2, "in_handle")); p_list->push_back(PropertyInfo(Variant::VECTOR2, "out_handle")); + p_list->push_back(PropertyInfo(Variant::INT, "handle_mode", PROPERTY_HINT_ENUM, "Free,Balanced")); } break; case Animation::TYPE_AUDIO: { @@ -949,6 +971,17 @@ public: undo_redo->add_do_method(animation.ptr(), "bezier_track_set_key_out_handle", track, key, value); undo_redo->add_undo_method(animation.ptr(), "bezier_track_set_key_out_handle", track, key, prev); update_obj = true; + } else if (name == "handle_mode") { + const Variant &value = p_value; + + if (!setting) { + setting = true; + undo_redo->create_action(TTR("Anim Multi Change Keyframe Value"), UndoRedo::MERGE_ENDS); + } + int prev = animation->bezier_track_get_key_handle_mode(track, key); + undo_redo->add_do_method(animation.ptr(), "bezier_track_set_key_handle_mode", track, key, value); + undo_redo->add_undo_method(animation.ptr(), "bezier_track_set_key_handle_mode", track, key, prev); + update_obj = true; } } break; case Animation::TYPE_AUDIO: { @@ -1120,6 +1153,11 @@ public: return true; } + if (name == "handle_mode") { + r_ret = animation->bezier_track_get_key_handle_mode(track, key); + return true; + } + } break; case Animation::TYPE_AUDIO: { if (name == "stream") { @@ -1273,6 +1311,7 @@ public: p_list->push_back(PropertyInfo(Variant::FLOAT, "value")); p_list->push_back(PropertyInfo(Variant::VECTOR2, "in_handle")); p_list->push_back(PropertyInfo(Variant::VECTOR2, "out_handle")); + p_list->push_back(PropertyInfo(Variant::INT, "handle_mode", PROPERTY_HINT_ENUM, "Free,Balanced")); } break; case Animation::TYPE_AUDIO: { p_list->push_back(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream")); @@ -1377,8 +1416,20 @@ void AnimationTimelineEdit::_anim_length_changed(double p_new_len) { void AnimationTimelineEdit::_anim_loop_pressed() { undo_redo->create_action(TTR("Change Animation Loop")); - undo_redo->add_do_method(animation.ptr(), "set_loop", loop->is_pressed()); - undo_redo->add_undo_method(animation.ptr(), "set_loop", animation->has_loop()); + switch (animation->get_loop_mode()) { + case Animation::LoopMode::LOOP_NONE: { + undo_redo->add_do_method(animation.ptr(), "set_loop_mode", Animation::LoopMode::LOOP_LINEAR); + } break; + case Animation::LoopMode::LOOP_LINEAR: { + undo_redo->add_do_method(animation.ptr(), "set_loop_mode", Animation::LoopMode::LOOP_PINGPONG); + } break; + case Animation::LoopMode::LOOP_PINGPONG: { + undo_redo->add_do_method(animation.ptr(), "set_loop_mode", Animation::LoopMode::LOOP_NONE); + } break; + default: + break; + } + undo_redo->add_undo_method(animation.ptr(), "set_loop_mode", animation->get_loop_mode()); undo_redo->commit_action(); } @@ -1664,7 +1715,24 @@ void AnimationTimelineEdit::update_values() { length->set_tooltip(TTR("Animation length (seconds)")); time_icon->set_tooltip(TTR("Animation length (seconds)")); } - loop->set_pressed(animation->has_loop()); + + switch (animation->get_loop_mode()) { + case Animation::LoopMode::LOOP_NONE: { + loop->set_icon(get_theme_icon("Loop", "EditorIcons")); + loop->set_pressed(false); + } break; + case Animation::LoopMode::LOOP_LINEAR: { + loop->set_icon(get_theme_icon("Loop", "EditorIcons")); + loop->set_pressed(true); + } break; + case Animation::LoopMode::LOOP_PINGPONG: { + loop->set_icon(get_theme_icon("PingPongLoop", "EditorIcons")); + loop->set_pressed(true); + } break; + default: + break; + } + editing = false; } @@ -1693,48 +1761,48 @@ void AnimationTimelineEdit::gui_input(const Ref<InputEvent> &p_event) { const Ref<InputEventMouseButton> mb = p_event; - if (mb.is_valid() && mb->is_pressed() && mb->is_command_pressed() && mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP) { + if (mb.is_valid() && mb->is_pressed() && mb->is_command_pressed() && mb->get_button_index() == MouseButton::WHEEL_UP) { get_zoom()->set_value(get_zoom()->get_value() * 1.05); accept_event(); } - if (mb.is_valid() && mb->is_pressed() && mb->is_command_pressed() && mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN) { + if (mb.is_valid() && mb->is_pressed() && mb->is_command_pressed() && mb->get_button_index() == MouseButton::WHEEL_DOWN) { get_zoom()->set_value(get_zoom()->get_value() / 1.05); accept_event(); } - if (mb.is_valid() && mb->is_pressed() && mb->is_alt_pressed() && mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP) { + if (mb.is_valid() && mb->is_pressed() && mb->is_alt_pressed() && mb->get_button_index() == MouseButton::WHEEL_UP) { if (track_edit) { track_edit->get_editor()->goto_prev_step(true); } accept_event(); } - if (mb.is_valid() && mb->is_pressed() && mb->is_alt_pressed() && mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN) { + if (mb.is_valid() && mb->is_pressed() && mb->is_alt_pressed() && mb->get_button_index() == MouseButton::WHEEL_DOWN) { if (track_edit) { track_edit->get_editor()->goto_next_step(true); } accept_event(); } - if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT && hsize_rect.has_point(mb->get_position())) { + if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT && hsize_rect.has_point(mb->get_position())) { dragging_hsize = true; dragging_hsize_from = mb->get_position().x; dragging_hsize_at = name_limit; } - if (mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT && dragging_hsize) { + if (mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT && dragging_hsize) { dragging_hsize = false; } if (mb.is_valid() && mb->get_position().x > get_name_limit() && mb->get_position().x < (get_size().width - get_buttons_width())) { - if (!panning_timeline && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (!panning_timeline && mb->get_button_index() == MouseButton::LEFT) { int x = mb->get_position().x - get_name_limit(); float ofs = x / get_zoom_scale() + get_value(); - emit_signal(SNAME("timeline_changed"), ofs, false, Input::get_singleton()->is_key_pressed(KEY_ALT)); + emit_signal(SNAME("timeline_changed"), ofs, false, Input::get_singleton()->is_key_pressed(Key::ALT)); dragging_timeline = true; } - if (!dragging_timeline && mb->get_button_index() == MOUSE_BUTTON_MIDDLE) { + if (!dragging_timeline && mb->get_button_index() == MouseButton::MIDDLE) { int x = mb->get_position().x - get_name_limit(); panning_timeline_from = x / get_zoom_scale(); panning_timeline = true; @@ -1742,11 +1810,11 @@ void AnimationTimelineEdit::gui_input(const Ref<InputEvent> &p_event) { } } - if (dragging_timeline && mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_LEFT && !mb->is_pressed()) { + if (dragging_timeline && mb.is_valid() && mb->get_button_index() == MouseButton::LEFT && !mb->is_pressed()) { dragging_timeline = false; } - if (panning_timeline && mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_MIDDLE && !mb->is_pressed()) { + if (panning_timeline && mb.is_valid() && mb->get_button_index() == MouseButton::MIDDLE && !mb->is_pressed()) { panning_timeline = false; } @@ -1770,7 +1838,7 @@ void AnimationTimelineEdit::gui_input(const Ref<InputEvent> &p_event) { if (dragging_timeline) { int x = mm->get_position().x - get_name_limit(); float ofs = x / get_zoom_scale() + get_value(); - emit_signal(SNAME("timeline_changed"), ofs, false, Input::get_singleton()->is_key_pressed(KEY_ALT)); + emit_signal(SNAME("timeline_changed"), ofs, false, Input::get_singleton()->is_key_pressed(Key::ALT)); } if (panning_timeline) { int x = mm->get_position().x - get_name_limit(); @@ -2110,25 +2178,25 @@ void AnimationTrackEdit::_notification(int p_what) { Ref<Texture2D> icon = wrap_icon[loop_wrap ? 1 : 0]; - loop_mode_rect.position.x = ofs; - loop_mode_rect.position.y = int(get_size().height - icon->get_height()) / 2; - loop_mode_rect.size = icon->get_size(); + loop_wrap_rect.position.x = ofs; + loop_wrap_rect.position.y = int(get_size().height - icon->get_height()) / 2; + loop_wrap_rect.size = icon->get_size(); if (!animation->track_is_compressed(track) && (animation->track_get_type(track) == Animation::TYPE_VALUE || animation->track_get_type(track) == Animation::TYPE_BLEND_SHAPE || animation->track_get_type(track) == Animation::TYPE_POSITION_3D || animation->track_get_type(track) == Animation::TYPE_SCALE_3D || animation->track_get_type(track) == Animation::TYPE_ROTATION_3D)) { - draw_texture(icon, loop_mode_rect.position); + draw_texture(icon, loop_wrap_rect.position); } - loop_mode_rect.position.y = 0; - loop_mode_rect.size.y = get_size().height; + loop_wrap_rect.position.y = 0; + loop_wrap_rect.size.y = get_size().height; ofs += icon->get_width() + hsep; - loop_mode_rect.size.x += hsep; + loop_wrap_rect.size.x += hsep; if (!animation->track_is_compressed(track) && (animation->track_get_type(track) == Animation::TYPE_VALUE || animation->track_get_type(track) == Animation::TYPE_BLEND_SHAPE || animation->track_get_type(track) == Animation::TYPE_POSITION_3D || animation->track_get_type(track) == Animation::TYPE_SCALE_3D || animation->track_get_type(track) == Animation::TYPE_ROTATION_3D)) { draw_texture(down_icon, Vector2(ofs, int(get_size().height - down_icon->get_height()) / 2)); - loop_mode_rect.size.x += down_icon->get_width(); + loop_wrap_rect.size.x += down_icon->get_width(); } else { - loop_mode_rect = Rect2(); + loop_wrap_rect = Rect2(); } ofs += down_icon->get_width(); @@ -2228,6 +2296,11 @@ void AnimationTrackEdit::draw_key(int p_index, float p_pixels_sec, int p_x, bool Ref<Texture2D> icon_to_draw = p_selected ? selected_icon : type_icon; + if (animation->track_get_type(track) == Animation::TYPE_VALUE && !Math::is_equal_approx(animation->track_get_key_transition(track, p_index), real_t(1.0))) { + // Use a different icon for keys with non-linear easing. + icon_to_draw = get_theme_icon(p_selected ? SNAME("KeyEasedSelected") : SNAME("KeyValueEased"), SNAME("EditorIcons")); + } + // Override type icon for invalid value keys, unless selected. if (!p_selected && animation->track_get_type(track) == Animation::TYPE_VALUE) { const Variant &v = animation->track_get_key_value(track, p_index); @@ -2478,7 +2551,7 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const { return TTR("Interpolation Mode"); } - if (loop_mode_rect.has_point(p_pos)) { + if (loop_wrap_rect.has_point(p_pos)) { return TTR("Loop Wrap Mode (Interpolate end with beginning on loop)"); } @@ -2573,6 +2646,17 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const { text += "In-Handle: " + ih + "\n"; Vector2 oh = animation->bezier_track_get_key_out_handle(track, key_idx); text += "Out-Handle: " + oh + "\n"; + int hm = animation->bezier_track_get_key_handle_mode(track, key_idx); + text += "Handle mode: "; + switch (hm) { + case Animation::HANDLE_MODE_FREE: { + text += "Free"; + } break; + case Animation::HANDLE_MODE_BALANCED: { + text += "Balanced"; + } break; + } + text += "\n"; } break; case Animation::TYPE_AUDIO: { String stream_name = "null"; @@ -2626,7 +2710,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) { } Ref<InputEventMouseButton> mb = p_event; - if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { Point2 pos = mb->get_position(); if (check_rect.has_point(pos)) { @@ -2681,7 +2765,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) { accept_event(); } - if (loop_mode_rect.has_point(pos)) { + if (loop_wrap_rect.has_point(pos)) { if (!menu) { menu = memnew(PopupMenu); add_child(menu); @@ -2692,7 +2776,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) { menu->add_icon_item(get_theme_icon(SNAME("InterpWrapLoop"), SNAME("EditorIcons")), TTR("Wrap Loop Interp"), MENU_LOOP_WRAP); menu->set_as_minsize(); - Vector2 popup_pos = get_screen_position() + loop_mode_rect.position + Vector2(0, loop_mode_rect.size.height); + Vector2 popup_pos = get_screen_position() + loop_wrap_rect.position + Vector2(0, loop_wrap_rect.size.height); menu->set_position(popup_pos); menu->popup(); accept_event(); @@ -2772,7 +2856,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) { } } - if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_RIGHT) { + if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) { Point2 pos = mb->get_position(); if (pos.x >= timeline->get_name_limit() && pos.x <= get_size().width - timeline->get_buttons_width()) { // Can do something with menu too! show insert key. @@ -2802,7 +2886,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) { } } - if (mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT && clicking_on_name) { + if (mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT && clicking_on_name) { if (!path) { path_popup = memnew(Popup); path_popup->set_wrap_controls(true); @@ -2824,7 +2908,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) { } if (mb.is_valid() && moving_selection_attempt) { - if (!mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (!mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { moving_selection_attempt = false; if (moving_selection) { emit_signal(SNAME("move_selection_commit")); @@ -2835,7 +2919,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) { select_single_attempt = -1; } - if (moving_selection && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_RIGHT) { + if (moving_selection && mb->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) { moving_selection_attempt = false; moving_selection = false; emit_signal(SNAME("move_selection_cancel")); @@ -2843,7 +2927,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) { } Ref<InputEventMouseMotion> mm = p_event; - if (mm.is_valid() && mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT && moving_selection_attempt) { + if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE && moving_selection_attempt) { if (!moving_selection) { moving_selection = true; emit_signal(SNAME("move_selection_begin")); @@ -4137,7 +4221,7 @@ bool AnimationTrackEditor::is_selection_active() const { } bool AnimationTrackEditor::is_snap_enabled() const { - return snap->is_pressed() ^ Input::get_singleton()->is_key_pressed(KEY_CTRL); + return snap->is_pressed() ^ Input::get_singleton()->is_key_pressed(Key::CTRL); } void AnimationTrackEditor::_update_tracks() { @@ -4762,12 +4846,13 @@ void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) { Variant value; _find_hint_for_track(p_track, bp, &value); Array arr; - arr.resize(5); + arr.resize(6); arr[0] = value; arr[1] = -0.25; arr[2] = 0; arr[3] = 0.25; arr[4] = 0; + arr[5] = 0; undo_redo->create_action(TTR("Add Track Key")); undo_redo->add_do_method(animation.ptr(), "track_insert_key", p_track, p_ofs, arr); @@ -5118,27 +5203,27 @@ void AnimationTrackEditor::_box_selection_draw() { void AnimationTrackEditor::_scroll_input(const Ref<InputEvent> &p_event) { Ref<InputEventMouseButton> mb = p_event; - if (mb.is_valid() && mb->is_pressed() && mb->is_command_pressed() && mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP) { + if (mb.is_valid() && mb->is_pressed() && mb->is_command_pressed() && mb->get_button_index() == MouseButton::WHEEL_UP) { timeline->get_zoom()->set_value(timeline->get_zoom()->get_value() * 1.05); scroll->accept_event(); } - if (mb.is_valid() && mb->is_pressed() && mb->is_command_pressed() && mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN) { + if (mb.is_valid() && mb->is_pressed() && mb->is_command_pressed() && mb->get_button_index() == MouseButton::WHEEL_DOWN) { timeline->get_zoom()->set_value(timeline->get_zoom()->get_value() / 1.05); scroll->accept_event(); } - if (mb.is_valid() && mb->is_pressed() && mb->is_alt_pressed() && mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP) { + if (mb.is_valid() && mb->is_pressed() && mb->is_alt_pressed() && mb->get_button_index() == MouseButton::WHEEL_UP) { goto_prev_step(true); scroll->accept_event(); } - if (mb.is_valid() && mb->is_pressed() && mb->is_alt_pressed() && mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN) { + if (mb.is_valid() && mb->is_pressed() && mb->is_alt_pressed() && mb->get_button_index() == MouseButton::WHEEL_DOWN) { goto_next_step(true); scroll->accept_event(); } - if (mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT) { if (mb->is_pressed()) { box_selecting = true; box_selecting_from = scroll->get_global_transform().xform(mb->get_position()); @@ -5166,12 +5251,12 @@ void AnimationTrackEditor::_scroll_input(const Ref<InputEvent> &p_event) { Ref<InputEventMouseMotion> mm = p_event; - if (mm.is_valid() && mm->get_button_mask() & MOUSE_BUTTON_MASK_MIDDLE) { + if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_MIDDLE) != MouseButton::NONE) { timeline->set_value(timeline->get_value() - mm->get_relative().x / timeline->get_zoom_scale()); } if (mm.is_valid() && box_selecting) { - if (!(mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT)) { + if ((mm->get_button_mask() & MouseButton::MASK_LEFT) == MouseButton::NONE) { // No longer. box_selection->hide(); box_selecting = false; @@ -5320,7 +5405,7 @@ void AnimationTrackEditor::goto_prev_step(bool p_from_mouse_event) { if (step == 0) { step = 1; } - if (p_from_mouse_event && Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + if (p_from_mouse_event && Input::get_singleton()->is_key_pressed(Key::SHIFT)) { // Use more precise snapping when holding Shift. // This is used when scrobbling the timeline using Alt + Mouse wheel. step *= 0.25; @@ -5343,7 +5428,7 @@ void AnimationTrackEditor::goto_next_step(bool p_from_mouse_event) { if (step == 0) { step = 1; } - if (p_from_mouse_event && Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + if (p_from_mouse_event && Input::get_singleton()->is_key_pressed(Key::SHIFT)) { // Use more precise snapping when holding Shift. // This is used when scrobbling the timeline using Alt + Mouse wheel. // Do not use precise snapping when using the menu action or keyboard shortcut, @@ -5779,7 +5864,7 @@ float AnimationTrackEditor::snap_time(float p_value, bool p_relative) { snap_increment = step->get_value(); } - if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + if (Input::get_singleton()->is_key_pressed(Key::SHIFT)) { // Use more precise snapping when holding Shift. snap_increment *= 0.25; } @@ -5893,10 +5978,10 @@ void AnimationTrackEditor::_pick_track_filter_input(const Ref<InputEvent> &p_ie) if (k.is_valid()) { switch (k->get_keycode()) { - case KEY_UP: - case KEY_DOWN: - case KEY_PAGEUP: - case KEY_PAGEDOWN: { + case Key::UP: + case Key::DOWN: + case Key::PAGEUP: + case Key::PAGEDOWN: { pick_track->get_scene_tree()->get_scene_tree()->gui_input(k); pick_track->get_filter_line_edit()->accept_event(); } break; @@ -6057,14 +6142,14 @@ AnimationTrackEditor::AnimationTrackEditor() { edit->get_popup()->add_item(TTR("Scale Selection"), EDIT_SCALE_SELECTION); edit->get_popup()->add_item(TTR("Scale From Cursor"), EDIT_SCALE_FROM_CURSOR); edit->get_popup()->add_separator(); - edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/duplicate_selection", TTR("Duplicate Selection"), KEY_MASK_CMD | KEY_D), EDIT_DUPLICATE_SELECTION); - edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/duplicate_selection_transposed", TTR("Duplicate Transposed"), KEY_MASK_SHIFT | KEY_MASK_CMD | KEY_D), EDIT_DUPLICATE_TRANSPOSED); + edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/duplicate_selection", TTR("Duplicate Selection"), KeyModifierMask::CMD | Key::D), EDIT_DUPLICATE_SELECTION); + edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/duplicate_selection_transposed", TTR("Duplicate Transposed"), KeyModifierMask::SHIFT | KeyModifierMask::CMD | Key::D), EDIT_DUPLICATE_TRANSPOSED); edit->get_popup()->add_separator(); - edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/delete_selection", TTR("Delete Selection"), KEY_DELETE), EDIT_DELETE_SELECTION); + edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/delete_selection", TTR("Delete Selection"), Key::KEY_DELETE), EDIT_DELETE_SELECTION); edit->get_popup()->add_separator(); - edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/goto_next_step", TTR("Go to Next Step"), KEY_MASK_CMD | KEY_RIGHT), EDIT_GOTO_NEXT_STEP); - edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/goto_prev_step", TTR("Go to Previous Step"), KEY_MASK_CMD | KEY_LEFT), EDIT_GOTO_PREV_STEP); + edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/goto_next_step", TTR("Go to Next Step"), KeyModifierMask::CMD | Key::RIGHT), EDIT_GOTO_NEXT_STEP); + edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/goto_prev_step", TTR("Go to Previous Step"), KeyModifierMask::CMD | Key::LEFT), EDIT_GOTO_PREV_STEP); edit->get_popup()->add_separator(); edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/apply_reset", TTR("Apply Reset")), EDIT_APPLY_RESET); edit->get_popup()->add_separator(); diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h index 05cf91de1d..2bdc1d4107 100644 --- a/editor/animation_track_editor.h +++ b/editor/animation_track_editor.h @@ -159,7 +159,7 @@ class AnimationTrackEdit : public Control { Rect2 update_mode_rect; Rect2 interp_mode_rect; - Rect2 loop_mode_rect; + Rect2 loop_wrap_rect; Rect2 remove_rect; Rect2 bezier_edit_rect; @@ -466,6 +466,7 @@ class AnimationTrackEditor : public VBoxContainer { Animation::TrackType track_type = Animation::TrackType::TYPE_ANIMATION; Animation::InterpolationType interp_type = Animation::InterpolationType::INTERPOLATION_CUBIC; Animation::UpdateMode update_mode = Animation::UpdateMode::UPDATE_CAPTURE; + Animation::LoopMode loop_mode = Animation::LoopMode::LOOP_LINEAR; bool loop_wrap = false; bool enabled = false; diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp index 70ba806c37..dd3e08b299 100644 --- a/editor/animation_track_editor_plugins.cpp +++ b/editor/animation_track_editor_plugins.cpp @@ -1098,7 +1098,7 @@ void AnimationTrackEditTypeAudio::gui_input(const Ref<InputEvent> &p_event) { } Ref<InputEventMouseButton> mb = p_event; - if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT && get_default_cursor_shape() == CURSOR_HSIZE) { + if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT && get_default_cursor_shape() == CURSOR_HSIZE) { len_resizing = true; len_resizing_start = mb->is_shift_pressed(); len_resizing_from_px = mb->get_position().x; @@ -1108,7 +1108,7 @@ void AnimationTrackEditTypeAudio::gui_input(const Ref<InputEvent> &p_event) { return; } - if (len_resizing && mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (len_resizing && mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { float ofs_local = -len_resizing_rel / get_timeline()->get_zoom_scale(); if (len_resizing_start) { float prev_ofs = get_animation()->audio_track_get_key_start_offset(get_track(), len_resizing_index); diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 1902ae66fb..bfcd2dd4ca 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -127,7 +127,7 @@ void FindReplaceBar::unhandled_input(const Ref<InputEvent> &p_event) { bool accepted = true; switch (k->get_keycode()) { - case KEY_ESCAPE: { + case Key::ESCAPE: { _hide_bar(); } break; default: { @@ -542,7 +542,7 @@ void FindReplaceBar::_search_text_changed(const String &p_text) { } void FindReplaceBar::_search_text_submitted(const String &p_text) { - if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + if (Input::get_singleton()->is_key_pressed(Key::SHIFT)) { search_prev(); } else { search_next(); @@ -553,7 +553,7 @@ void FindReplaceBar::_replace_text_submitted(const String &p_text) { if (selection_only->is_pressed() && text_editor->has_selection()) { _replace_all(); _hide_bar(); - } else if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + } else if (Input::get_singleton()->is_key_pressed(Key::SHIFT)) { _replace(); search_prev(); } else { @@ -766,9 +766,9 @@ void CodeTextEditor::_text_editor_gui_input(const Ref<InputEvent> &p_event) { if (mb.is_valid()) { if (mb->is_pressed() && mb->is_command_pressed()) { - if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP) { + if (mb->get_button_index() == MouseButton::WHEEL_UP) { _zoom_in(); - } else if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN) { + } else if (mb->get_button_index() == MouseButton::WHEEL_DOWN) { _zoom_out(); } } @@ -1654,7 +1654,7 @@ void CodeTextEditor::_toggle_scripts_pressed() { void CodeTextEditor::_error_pressed(const Ref<InputEvent> &p_event) { Ref<InputEventMouseButton> mb = p_event; - if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { goto_error(); } } @@ -1788,9 +1788,9 @@ void CodeTextEditor::update_toggle_scripts_button() { CodeTextEditor::CodeTextEditor() { code_complete_func = nullptr; - ED_SHORTCUT("script_editor/zoom_in", TTR("Zoom In"), KEY_MASK_CMD | KEY_EQUAL); - ED_SHORTCUT("script_editor/zoom_out", TTR("Zoom Out"), KEY_MASK_CMD | KEY_MINUS); - ED_SHORTCUT("script_editor/reset_zoom", TTR("Reset Zoom"), KEY_MASK_CMD | KEY_0); + ED_SHORTCUT("script_editor/zoom_in", TTR("Zoom In"), KeyModifierMask::CMD | Key::EQUAL); + ED_SHORTCUT("script_editor/zoom_out", TTR("Zoom Out"), KeyModifierMask::CMD | Key::MINUS); + ED_SHORTCUT("script_editor/reset_zoom", TTR("Reset Zoom"), KeyModifierMask::CMD | Key::KEY_0); text_editor = memnew(CodeEdit); add_child(text_editor); diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index f0b27702e7..72aea9b630 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -352,10 +352,10 @@ void CreateDialog::_sbox_input(const Ref<InputEvent> &p_ie) { Ref<InputEventKey> k = p_ie; if (k.is_valid()) { switch (k->get_keycode()) { - case KEY_UP: - case KEY_DOWN: - case KEY_PAGEUP: - case KEY_PAGEDOWN: { + case Key::UP: + case Key::DOWN: + case Key::PAGEUP: + case Key::PAGEDOWN: { search_options->gui_input(k); search_box->accept_event(); } break; diff --git a/editor/debugger/editor_performance_profiler.cpp b/editor/debugger/editor_performance_profiler.cpp index 08ed675d16..952f46e9a5 100644 --- a/editor/debugger/editor_performance_profiler.cpp +++ b/editor/debugger/editor_performance_profiler.cpp @@ -249,7 +249,7 @@ TreeItem *EditorPerformanceProfiler::_create_monitor_item(const StringName &p_mo void EditorPerformanceProfiler::_marker_input(const Ref<InputEvent> &p_event) { Ref<InputEventMouseButton> mb = p_event; - if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { Vector<StringName> active; for (OrderedHashMap<StringName, Monitor>::Element i = monitors.front(); i; i = i.next()) { if (i.value().item->is_checked(0)) { diff --git a/editor/debugger/editor_profiler.cpp b/editor/debugger/editor_profiler.cpp index 2fe7cd7886..d08ae1de8a 100644 --- a/editor/debugger/editor_profiler.cpp +++ b/editor/debugger/editor_profiler.cpp @@ -438,7 +438,7 @@ void EditorProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) { Ref<InputEventMouseMotion> mm = p_ev; if ( - (mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_LEFT && mb->is_pressed()) || + (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT && mb->is_pressed()) || (mm.is_valid())) { int x = me->get_position().x - 1; x = x * frame_metrics.size() / graph->get_size().width; @@ -453,7 +453,7 @@ void EditorProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) { x = frame_metrics.size() - 1; } - if (mb.is_valid() || mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT) { + if (mb.is_valid() || (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) { updating_frame = true; if (x < total_metrics) diff --git a/editor/debugger/editor_visual_profiler.cpp b/editor/debugger/editor_visual_profiler.cpp index f25f18b7e4..4739458f8e 100644 --- a/editor/debugger/editor_visual_profiler.cpp +++ b/editor/debugger/editor_visual_profiler.cpp @@ -517,7 +517,7 @@ void EditorVisualProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) { Ref<InputEventMouseMotion> mm = p_ev; if ( - (mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_LEFT && mb->is_pressed()) || + (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT && mb->is_pressed()) || (mm.is_valid())) { int half_w = graph->get_size().width / 2; int x = me->get_position().x; @@ -549,7 +549,7 @@ void EditorVisualProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) { hover_metric = -1; } - if (mb.is_valid() || mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT) { + if (mb.is_valid() || (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) { //cursor_metric=x; updating_frame = true; diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp index a312c161a8..e0d32756ca 100644 --- a/editor/debugger/script_editor_debugger.cpp +++ b/editor/debugger/script_editor_debugger.cpp @@ -578,6 +578,12 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da error->set_tooltip(0, tooltip); error->set_tooltip(1, tooltip); + if (warning_count == 0 && error_count == 0) { + expand_all_button->set_disabled(false); + collapse_all_button->set_disabled(false); + clear_button->set_disabled(false); + } + if (oe.warning) { warning_count++; } else { @@ -1404,6 +1410,11 @@ void ScriptEditorDebugger::_clear_errors_list() { error_tree->clear(); error_count = 0; warning_count = 0; + update_tabs(); + + expand_all_button->set_disabled(true); + collapse_all_button->set_disabled(true); + clear_button->set_disabled(true); } // Right click on specific file(s) or folder(s). @@ -1662,28 +1673,31 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { errors_tab = memnew(VBoxContainer); errors_tab->set_name(TTR("Errors")); - HBoxContainer *errhb = memnew(HBoxContainer); - errors_tab->add_child(errhb); + HBoxContainer *error_hbox = memnew(HBoxContainer); + errors_tab->add_child(error_hbox); - Button *expand_all = memnew(Button); - expand_all->set_text(TTR("Expand All")); - expand_all->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_expand_errors_list)); - errhb->add_child(expand_all); + expand_all_button = memnew(Button); + expand_all_button->set_text(TTR("Expand All")); + expand_all_button->set_disabled(true); + expand_all_button->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_expand_errors_list)); + error_hbox->add_child(expand_all_button); - Button *collapse_all = memnew(Button); - collapse_all->set_text(TTR("Collapse All")); - collapse_all->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_collapse_errors_list)); - errhb->add_child(collapse_all); + collapse_all_button = memnew(Button); + collapse_all_button->set_text(TTR("Collapse All")); + collapse_all_button->set_disabled(true); + collapse_all_button->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_collapse_errors_list)); + error_hbox->add_child(collapse_all_button); Control *space = memnew(Control); space->set_h_size_flags(SIZE_EXPAND_FILL); - errhb->add_child(space); - - clearbutton = memnew(Button); - clearbutton->set_text(TTR("Clear")); - clearbutton->set_h_size_flags(0); - clearbutton->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_clear_errors_list)); - errhb->add_child(clearbutton); + error_hbox->add_child(space); + + clear_button = memnew(Button); + clear_button->set_text(TTR("Clear")); + clear_button->set_h_size_flags(0); + clear_button->set_disabled(true); + clear_button->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_clear_errors_list)); + error_hbox->add_child(clear_button); error_tree = memnew(Tree); error_tree->set_columns(2); diff --git a/editor/debugger/script_editor_debugger.h b/editor/debugger/script_editor_debugger.h index 1c1c0fd3e5..76209aef46 100644 --- a/editor/debugger/script_editor_debugger.h +++ b/editor/debugger/script_editor_debugger.h @@ -94,7 +94,9 @@ private: VBoxContainer *errors_tab; Tree *error_tree; - Button *clearbutton; + Button *expand_all_button; + Button *collapse_all_button; + Button *clear_button; PopupMenu *item_menu; EditorFileDialog *file_dialog; diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp index 61cc6dbd4a..5ce57e936a 100644 --- a/editor/doc_tools.cpp +++ b/editor/doc_tools.cpp @@ -41,7 +41,7 @@ #include "scene/resources/theme.h" // Used for a hack preserving Mono properties on non-Mono builds. -#include "modules/modules_enabled.gen.h" +#include "modules/modules_enabled.gen.h" // For mono. void DocTools::merge_from(const DocTools &p_data) { for (KeyValue<String, DocData::ClassDoc> &E : class_list) { diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index b9f1c1af54..dd9f10a23b 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -303,7 +303,7 @@ void EditorAudioBus::_volume_changed(float p_normalized) { const float p_db = this->_normalized_volume_to_scaled_db(p_normalized); - if (Input::get_singleton()->is_key_pressed(KEY_CTRL)) { + if (Input::get_singleton()->is_key_pressed(Key::CTRL)) { // Snap the value when holding Ctrl for easier editing. // To do so, it needs to be converted back to normalized volume (as the slider uses that unit). slider->set_value(_scaled_db_to_normalized_volume(Math::round(p_db))); @@ -363,7 +363,7 @@ float EditorAudioBus::_scaled_db_to_normalized_volume(float db) { void EditorAudioBus::_show_value(float slider_value) { float db; - if (Input::get_singleton()->is_key_pressed(KEY_CTRL)) { + if (Input::get_singleton()->is_key_pressed(Key::CTRL)) { // Display the correct (snapped) value when holding Ctrl db = Math::round(_normalized_volume_to_scaled_db(slider_value)); } else { @@ -534,7 +534,7 @@ void EditorAudioBus::gui_input(const Ref<InputEvent> &p_event) { ERR_FAIL_COND(p_event.is_null()); Ref<InputEventMouseButton> mb = p_event; - if (mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_RIGHT && mb->is_pressed()) { + if (mb.is_valid() && mb->get_button_index() == MouseButton::RIGHT && mb->is_pressed()) { Vector2 pos = mb->get_position(); bus_popup->set_position(get_global_position() + pos); bus_popup->popup(); @@ -543,7 +543,7 @@ void EditorAudioBus::gui_input(const Ref<InputEvent> &p_event) { void EditorAudioBus::_effects_gui_input(Ref<InputEvent> p_event) { Ref<InputEventKey> k = p_event; - if (k.is_valid() && k->is_pressed() && !k->is_echo() && k->get_keycode() == KEY_DELETE) { + if (k.is_valid() && k->is_pressed() && !k->is_echo() && k->get_keycode() == Key::KEY_DELETE) { TreeItem *current_effect = effects->get_selected(); if (current_effect && current_effect->get_metadata(0).get_type() == Variant::INT) { _delete_effect_pressed(0); @@ -925,8 +925,8 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) { hbc->add_child(bus_options); bus_popup = bus_options->get_popup(); - bus_popup->add_shortcut(ED_SHORTCUT("audio_bus_editor/duplicate_selected_bus", TTR("Duplicate Bus"), KEY_MASK_CMD | KEY_D)); - bus_popup->add_shortcut(ED_SHORTCUT("audio_bus_editor/delete_selected_bus", TTR("Delete Bus"), KEY_DELETE)); + bus_popup->add_shortcut(ED_SHORTCUT("audio_bus_editor/duplicate_selected_bus", TTR("Duplicate Bus"), KeyModifierMask::CMD | Key::D)); + bus_popup->add_shortcut(ED_SHORTCUT("audio_bus_editor/delete_selected_bus", TTR("Delete Bus"), Key::KEY_DELETE)); bus_popup->set_item_disabled(1, is_master); bus_popup->add_item(TTR("Reset Volume")); bus_popup->connect("index_pressed", callable_mp(this, &EditorAudioBus::_bus_popup_pressed)); diff --git a/editor/editor_command_palette.cpp b/editor/editor_command_palette.cpp index 71e9fac219..52e55de84c 100644 --- a/editor/editor_command_palette.cpp +++ b/editor/editor_command_palette.cpp @@ -149,10 +149,10 @@ void EditorCommandPalette::_sbox_input(const Ref<InputEvent> &p_ie) { Ref<InputEventKey> k = p_ie; if (k.is_valid()) { switch (k->get_keycode()) { - case KEY_UP: - case KEY_DOWN: - case KEY_PAGEUP: - case KEY_PAGEDOWN: { + case Key::UP: + case Key::DOWN: + case Key::PAGEUP: + case Key::PAGEDOWN: { search_options->gui_input(k); } break; default: diff --git a/editor/editor_command_palette.h b/editor/editor_command_palette.h index 39821a1169..8836c7b0fb 100644 --- a/editor/editor_command_palette.h +++ b/editor/editor_command_palette.h @@ -99,6 +99,6 @@ public: static EditorCommandPalette *get_singleton(); }; -Ref<Shortcut> ED_SHORTCUT_AND_COMMAND(const String &p_path, const String &p_name, Key p_keycode = KEY_NONE, String p_command = ""); +Ref<Shortcut> ED_SHORTCUT_AND_COMMAND(const String &p_path, const String &p_name, Key p_keycode = Key::NONE, String p_command = ""); #endif //EDITOR_COMMAND_PALETTE_H diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index d1dfc61c19..e78ca7cd64 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -82,7 +82,7 @@ bool EditorExportPreset::_get(const StringName &p_name, Variant &r_ret) const { void EditorExportPreset::_get_property_list(List<PropertyInfo> *p_list) const { for (const PropertyInfo &E : properties) { - if (platform->get_option_visibility(E.name, values)) { + if (platform->get_export_option_visibility(E.name, values)) { p_list->push_back(E); } } diff --git a/editor/editor_export.h b/editor/editor_export.h index b681f52330..1a5b8e6026 100644 --- a/editor/editor_export.h +++ b/editor/editor_export.h @@ -240,7 +240,7 @@ public: virtual void get_export_options(List<ExportOption> *r_options) = 0; virtual bool should_update_export_options() { return false; } - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { return true; } + virtual bool get_export_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { return true; } virtual String get_os_name() const = 0; virtual String get_name() const = 0; diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index 675234959a..021ab8b93b 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -598,7 +598,7 @@ void EditorFileDialog::_item_list_item_rmb_selected(int p_item, const Vector2 &p item_menu->add_icon_item(item_list->get_theme_icon(SNAME("ActionCopy"), SNAME("EditorIcons")), TTR("Copy Path"), ITEM_MENU_COPY_PATH); } if (allow_delete) { - item_menu->add_icon_item(item_list->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), TTR("Delete"), ITEM_MENU_DELETE, KEY_DELETE); + item_menu->add_icon_item(item_list->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), TTR("Delete"), ITEM_MENU_DELETE, Key::KEY_DELETE); } if (single_item_selected) { item_menu->add_separator(); @@ -623,9 +623,9 @@ void EditorFileDialog::_item_list_rmb_clicked(const Vector2 &p_pos) { item_menu->set_size(Size2(1, 1)); if (can_create_dir) { - item_menu->add_icon_item(item_list->get_theme_icon(SNAME("folder"), SNAME("FileDialog")), TTR("New Folder..."), ITEM_MENU_NEW_FOLDER, KEY_MASK_CMD | KEY_N); + item_menu->add_icon_item(item_list->get_theme_icon(SNAME("folder"), SNAME("FileDialog")), TTR("New Folder..."), ITEM_MENU_NEW_FOLDER, KeyModifierMask::CMD | Key::N); } - item_menu->add_icon_item(item_list->get_theme_icon(SNAME("Reload"), SNAME("EditorIcons")), TTR("Refresh"), ITEM_MENU_REFRESH, KEY_F5); + item_menu->add_icon_item(item_list->get_theme_icon(SNAME("Reload"), SNAME("EditorIcons")), TTR("Refresh"), ITEM_MENU_REFRESH, Key::F5); item_menu->add_separator(); item_menu->add_icon_item(item_list->get_theme_icon(SNAME("Filesystem"), SNAME("EditorIcons")), TTR("Open in File Manager"), ITEM_MENU_SHOW_IN_EXPLORER); @@ -1476,18 +1476,18 @@ EditorFileDialog::EditorFileDialog() { mode = FILE_MODE_SAVE_FILE; set_title(TTR("Save a File")); - ED_SHORTCUT("file_dialog/go_back", TTR("Go Back"), KEY_MASK_ALT | KEY_LEFT); - ED_SHORTCUT("file_dialog/go_forward", TTR("Go Forward"), KEY_MASK_ALT | KEY_RIGHT); - ED_SHORTCUT("file_dialog/go_up", TTR("Go Up"), KEY_MASK_ALT | KEY_UP); - ED_SHORTCUT("file_dialog/refresh", TTR("Refresh"), KEY_F5); - ED_SHORTCUT("file_dialog/toggle_hidden_files", TTR("Toggle Hidden Files"), KEY_MASK_CMD | KEY_H); - ED_SHORTCUT("file_dialog/toggle_favorite", TTR("Toggle Favorite"), KEY_MASK_ALT | KEY_F); - ED_SHORTCUT("file_dialog/toggle_mode", TTR("Toggle Mode"), KEY_MASK_ALT | KEY_V); - ED_SHORTCUT("file_dialog/create_folder", TTR("Create Folder"), KEY_MASK_CMD | KEY_N); - ED_SHORTCUT("file_dialog/delete", TTR("Delete"), KEY_DELETE); - ED_SHORTCUT("file_dialog/focus_path", TTR("Focus Path"), KEY_MASK_CMD | KEY_D); - ED_SHORTCUT("file_dialog/move_favorite_up", TTR("Move Favorite Up"), KEY_MASK_CMD | KEY_UP); - ED_SHORTCUT("file_dialog/move_favorite_down", TTR("Move Favorite Down"), KEY_MASK_CMD | KEY_DOWN); + ED_SHORTCUT("file_dialog/go_back", TTR("Go Back"), KeyModifierMask::ALT | Key::LEFT); + ED_SHORTCUT("file_dialog/go_forward", TTR("Go Forward"), KeyModifierMask::ALT | Key::RIGHT); + ED_SHORTCUT("file_dialog/go_up", TTR("Go Up"), KeyModifierMask::ALT | Key::UP); + ED_SHORTCUT("file_dialog/refresh", TTR("Refresh"), Key::F5); + ED_SHORTCUT("file_dialog/toggle_hidden_files", TTR("Toggle Hidden Files"), KeyModifierMask::CMD | Key::H); + ED_SHORTCUT("file_dialog/toggle_favorite", TTR("Toggle Favorite"), KeyModifierMask::ALT | Key::F); + ED_SHORTCUT("file_dialog/toggle_mode", TTR("Toggle Mode"), KeyModifierMask::ALT | Key::V); + ED_SHORTCUT("file_dialog/create_folder", TTR("Create Folder"), KeyModifierMask::CMD | Key::N); + ED_SHORTCUT("file_dialog/delete", TTR("Delete"), Key::KEY_DELETE); + ED_SHORTCUT("file_dialog/focus_path", TTR("Focus Path"), KeyModifierMask::CMD | Key::D); + ED_SHORTCUT("file_dialog/move_favorite_up", TTR("Move Favorite Up"), KeyModifierMask::CMD | Key::UP); + ED_SHORTCUT("file_dialog/move_favorite_down", TTR("Move Favorite Down"), KeyModifierMask::CMD | Key::DOWN); HBoxContainer *pathhb = memnew(HBoxContainer); diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 3d6b523733..d141447044 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -1633,7 +1633,7 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector Ref<ResourceImporter> importer = ResourceFormatImporter::get_singleton()->get_importer_by_name(importer_name); ERR_FAIL_COND_V(!importer.is_valid(), ERR_FILE_CORRUPT); List<ResourceImporter::ImportOption> options; - importer->get_import_options(&options); + importer->get_import_options(p_files[i], &options); //set default values for (const ResourceImporter::ImportOption &E : options) { source_file_options[p_files[i]][E.option.name] = E.default_value; @@ -1714,7 +1714,7 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector //store options in provided order, to avoid file changing. Order is also important because first match is accepted first. List<ResourceImporter::ImportOption> options; - importer->get_import_options(&options); + importer->get_import_options(file, &options); //set default values for (const ResourceImporter::ImportOption &F : options) { String base = F.option.name; @@ -1851,7 +1851,7 @@ void EditorFileSystem::_reimport_file(const String &p_file, const Map<StringName //mix with default params, in case a parameter is missing List<ResourceImporter::ImportOption> opts; - importer->get_import_options(&opts); + importer->get_import_options(p_file, &opts); for (const ResourceImporter::ImportOption &E : opts) { if (!params.has(E.option.name)) { //this one is not present params[E.option.name] = E.default_value; diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 8c3569df07..f520877256 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -33,13 +33,14 @@ #include "core/core_constants.h" #include "core/input/input.h" #include "core/os/keyboard.h" +#include "core/version_generated.gen.h" #include "doc_data_compressed.gen.h" #include "editor/plugins/script_editor_plugin.h" #include "editor_node.h" #include "editor_scale.h" #include "editor_settings.h" -#define CONTRIBUTE_URL "https://docs.godotengine.org/en/latest/community/contributing/updating_the_class_reference.html" +#define CONTRIBUTE_URL vformat("%s/community/contributing/updating_the_class_reference.html", VERSION_DOCS_URL) DocTools *EditorHelp::doc = nullptr; @@ -108,6 +109,9 @@ void EditorHelp::_class_desc_select(const String &p_select) { } else if (tag == "constant") { topic = "class_constant"; table = &this->constant_line; + } else if (tag == "theme_item") { + topic = "theme_item"; + table = &this->theme_property_line; } else { return; } @@ -1429,14 +1433,15 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) { bbcode = bbcode.replace("[/gdscript]", "[/codeblock]"); for (int pos = bbcode.find("[csharp]"); pos != -1; pos = bbcode.find("[csharp]")) { - if (bbcode.find("[/csharp]") == -1) { + int end_pos = bbcode.find("[/csharp]"); + if (end_pos == -1) { WARN_PRINT("Unclosed [csharp] block or parse fail in code (search for tag errors)"); break; } - bbcode.erase(pos, bbcode.find("[/csharp]") + 9 - pos); + bbcode = bbcode.left(pos) + bbcode.substr(end_pos + 9); // 9 is length of "[/csharp]". while (bbcode[pos] == '\n') { - bbcode.erase(pos, 1); + bbcode = bbcode.left(pos) + bbcode.substr(pos + 1); } } break; @@ -1445,14 +1450,15 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) { bbcode = bbcode.replace("[/csharp]", "[/codeblock]"); for (int pos = bbcode.find("[gdscript]"); pos != -1; pos = bbcode.find("[gdscript]")) { - if (bbcode.find("[/gdscript]") == -1) { + int end_pos = bbcode.find("[/gdscript]"); + if (end_pos == -1) { WARN_PRINT("Unclosed [gdscript] block or parse fail in code (search for tag errors)"); break; } - bbcode.erase(pos, bbcode.find("[/gdscript]") + 11 - pos); + bbcode = bbcode.left(pos) + bbcode.substr(end_pos + 11); // 11 is length of "[/gdscript]". while (bbcode[pos] == '\n') { - bbcode.erase(pos, 1); + bbcode = bbcode.left(pos) + bbcode.substr(pos + 1); } } break; @@ -1535,7 +1541,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) { p_rt->add_text("["); pos = brk_pos + 1; - } else if (tag.begins_with("method ") || tag.begins_with("member ") || tag.begins_with("signal ") || tag.begins_with("enum ") || tag.begins_with("constant ")) { + } else if (tag.begins_with("method ") || tag.begins_with("member ") || tag.begins_with("signal ") || tag.begins_with("enum ") || tag.begins_with("constant ") || tag.begins_with("theme_item ")) { int tag_end = tag.find(" "); String link_tag = tag.substr(0, tag_end); @@ -2021,7 +2027,7 @@ void FindBar::unhandled_input(const Ref<InputEvent> &p_event) { bool accepted = true; switch (k->get_keycode()) { - case KEY_ESCAPE: { + case Key::ESCAPE: { _hide_bar(); } break; default: { @@ -2041,7 +2047,7 @@ void FindBar::_search_text_changed(const String &p_text) { } void FindBar::_search_text_submitted(const String &p_text) { - if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + if (Input::get_singleton()->is_key_pressed(Key::SHIFT)) { search_prev(); } else { search_next(); diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp index 8504745b03..578e21861e 100644 --- a/editor/editor_help_search.cpp +++ b/editor/editor_help_search.cpp @@ -67,10 +67,10 @@ void EditorHelpSearch::_search_box_gui_input(const Ref<InputEvent> &p_event) { Ref<InputEventKey> key = p_event; if (key.is_valid()) { switch (key->get_keycode()) { - case KEY_UP: - case KEY_DOWN: - case KEY_PAGEUP: - case KEY_PAGEDOWN: { + case Key::UP: + case Key::DOWN: + case Key::PAGEUP: + case Key::PAGEDOWN: { results_tree->gui_input(key); search_box->accept_event(); } break; diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 9f049a0e58..07e505adb4 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -39,6 +39,7 @@ #include "editor_scale.h" #include "editor_settings.h" #include "multi_node_edit.h" +#include "scene/property_utils.h" #include "scene/resources/packed_scene.h" Size2 EditorProperty::get_minimum_size() const { @@ -305,6 +306,20 @@ void EditorProperty::_notification(int p_what) { revert_rect = Rect2(); } + if (!pin_hidden && pinned) { + Ref<Texture2D> pinned_icon = get_theme_icon(SNAME("Pin"), SNAME("EditorIcons")); + int margin_w = get_theme_constant(SNAME("hseparator"), SNAME("Tree")) * 2; + int total_icon_w = margin_w + pinned_icon->get_width(); + int text_w = font->get_string_size(label, font_size, rtl ? HALIGN_RIGHT : HALIGN_LEFT, text_limit - total_icon_w).x; + int y = (size.height - pinned_icon->get_height()) / 2; + if (rtl) { + draw_texture(pinned_icon, Vector2(size.width - ofs - text_w - total_icon_w, y), color); + } else { + draw_texture(pinned_icon, Vector2(ofs + text_w + margin_w, y), color); + } + text_limit -= total_icon_w; + } + int v_ofs = (size.height - font->get_height(font_size)) / 2; if (rtl) { draw_string(font, Point2(size.width - ofs - text_limit, v_ofs + font->get_ascent(font_size)), label, HALIGN_RIGHT, text_limit, font_size, color); @@ -398,177 +413,12 @@ bool EditorProperty::is_read_only() const { return read_only; } -bool EditorPropertyRevert::may_node_be_in_instance(Node *p_node) { - Node *edited_scene = EditorNode::get_singleton()->get_edited_scene(); - - bool might_be = false; - Node *node = p_node; - - while (node) { - if (node == edited_scene) { - if (node->get_scene_inherited_state().is_valid()) { - might_be = true; - break; - } - might_be = false; - break; - } - if (node->get_scene_instance_state().is_valid()) { - might_be = true; - break; - } - node = node->get_owner(); - } - - return might_be; // or might not be -} - -bool EditorPropertyRevert::get_instantiated_node_original_property(Node *p_node, const StringName &p_prop, Variant &value, bool p_check_class_default) { - Node *node = p_node; - Node *orig = node; - - Node *edited_scene = EditorNode::get_singleton()->get_edited_scene(); - - bool found = false; - - while (node) { - Ref<SceneState> ss; - - if (node == edited_scene) { - ss = node->get_scene_inherited_state(); - - } else { - ss = node->get_scene_instance_state(); - } - - if (ss.is_valid()) { - NodePath np = node->get_path_to(orig); - int node_idx = ss->find_node_by_path(np); - if (node_idx >= 0) { - bool lfound = false; - Variant lvar; - lvar = ss->get_property_value(node_idx, p_prop, lfound); - if (lfound) { - found = true; - value = lvar; - } - } - } - if (node == edited_scene) { - //just in case - break; - } - node = node->get_owner(); - } - - if (p_check_class_default && !found && p_node) { - //if not found, try default class value - Variant attempt = ClassDB::class_get_default_property_value(p_node->get_class_name(), p_prop); - if (attempt.get_type() != Variant::NIL) { - found = true; - value = attempt; - } - } - - return found; -} - -bool EditorPropertyRevert::is_node_property_different(Node *p_node, const Variant &p_current, const Variant &p_orig) { - // this is a pretty difficult function, because a property may not be saved but may have - // the flag to not save if one or if zero - - //make sure there is an actual state - { - Node *node = p_node; - if (!node) { - return false; - } - - Node *edited_scene = EditorNode::get_singleton()->get_edited_scene(); - bool found_state = false; - - while (node) { - Ref<SceneState> ss; - - if (node == edited_scene) { - ss = node->get_scene_inherited_state(); - - } else { - ss = node->get_scene_instance_state(); - } - - if (ss.is_valid()) { - found_state = true; - break; - } - if (node == edited_scene) { - //just in case - break; - } - node = node->get_owner(); - } - - if (!found_state) { - return false; //pointless to check if we are not comparing against anything. - } - } - - return is_property_value_different(p_current, p_orig); -} - -bool EditorPropertyRevert::is_property_value_different(const Variant &p_a, const Variant &p_b) { - if (p_a.get_type() == Variant::FLOAT && p_b.get_type() == Variant::FLOAT) { - //this must be done because, as some scenes save as text, there might be a tiny difference in floats due to numerical error - return !Math::is_equal_approx((float)p_a, (float)p_b); - } else { - return p_a != p_b; - } -} - Variant EditorPropertyRevert::get_property_revert_value(Object *p_object, const StringName &p_property) { - // If the object implements property_can_revert, rely on that completely - // (i.e. don't then try to revert to default value - the property_get_revert implementation - // can do that if so desired) if (p_object->has_method("property_can_revert") && p_object->call("property_can_revert", p_property)) { return p_object->call("property_get_revert", p_property); } - Ref<Script> scr = p_object->get_script(); - Node *node = Object::cast_to<Node>(p_object); - if (node && EditorPropertyRevert::may_node_be_in_instance(node)) { - //if this node is an instance or inherits, but it has a script attached which is unrelated - //to the one set for the parent and also has a default value for the property, consider that - //has precedence over the value from the parent, because that is an explicit source of defaults - //closer in the tree to the current node - bool ignore_parent = false; - if (scr.is_valid()) { - Variant sorig; - if (EditorPropertyRevert::get_instantiated_node_original_property(node, "script", sorig) && !scr->inherits_script(sorig)) { - Variant dummy; - if (scr->get_property_default_value(p_property, dummy)) { - ignore_parent = true; - } - } - } - - if (!ignore_parent) { - //check for difference including instantiation - Variant vorig; - if (EditorPropertyRevert::get_instantiated_node_original_property(node, p_property, vorig, false)) { - return vorig; - } - } - } - - if (scr.is_valid()) { - Variant orig_value; - if (scr->get_property_default_value(p_property, orig_value)) { - return orig_value; - } - } - - //report default class value instead - return ClassDB::class_get_default_property_value(p_object->get_class_name(), p_property); + return PropertyUtils::get_property_default_value(p_object, p_property); } bool EditorPropertyRevert::can_property_revert(Object *p_object, const StringName &p_property) { @@ -577,18 +427,25 @@ bool EditorPropertyRevert::can_property_revert(Object *p_object, const StringNam return false; } Variant current_value = p_object->get(p_property); - return EditorPropertyRevert::is_property_value_different(current_value, revert_value); + return PropertyUtils::is_property_value_different(current_value, revert_value); } -void EditorProperty::update_reload_status() { +void EditorProperty::update_revert_and_pin_status() { if (property == StringName()) { return; //no property, so nothing to do } - bool has_reload = EditorPropertyRevert::can_property_revert(object, property); + bool new_pinned = false; + if (can_pin) { + Node *node = Object::cast_to<Node>(object); + CRASH_COND(!node); + new_pinned = node->is_property_pinned(property); + } + bool new_can_revert = EditorPropertyRevert::can_property_revert(object, property) && !is_read_only(); - if (has_reload != can_revert) { - can_revert = has_reload; + if (new_can_revert != can_revert || new_pinned != pinned) { + can_revert = new_can_revert; + pinned = new_pinned; update(); } } @@ -714,7 +571,7 @@ void EditorProperty::gui_input(const Ref<InputEvent> &p_event) { if (is_layout_rtl()) { mpos.x = get_size().x - mpos.x; } - bool button_left = me->get_button_mask() & MOUSE_BUTTON_MASK_LEFT; + bool button_left = (me->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE; bool new_keying_hover = keying_rect.has_point(mpos) && !button_left; if (new_keying_hover != keying_hover) { @@ -743,7 +600,7 @@ void EditorProperty::gui_input(const Ref<InputEvent> &p_event) { Ref<InputEventMouseButton> mb = p_event; - if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { Vector2 mpos = mb->get_position(); if (is_layout_rtl()) { mpos.x = get_size().x - mpos.x; @@ -790,8 +647,8 @@ void EditorProperty::gui_input(const Ref<InputEvent> &p_event) { update(); emit_signal(SNAME("property_checked"), property, checked); } - } else if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_RIGHT) { - _ensure_popup(); + } else if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) { + _update_popup(); menu->set_position(get_screen_position() + get_local_mouse_position()); menu->set_size(Vector2(1, 1)); menu->popup(); @@ -914,6 +771,56 @@ float EditorProperty::get_name_split_ratio() const { void EditorProperty::set_object_and_property(Object *p_object, const StringName &p_property) { object = p_object; property = p_property; + _update_pin_flags(); +} + +static bool _is_value_potential_override(Node *p_node, const String &p_property) { + // Consider a value is potentially overriding another if either of the following is true: + // a) The node is foreign (inheriting or an instance), so the original value may come from another scene. + // b) The node belongs to the scene, but the original value comes from somewhere but the builtin class (i.e., a script). + Node *edited_scene = EditorNode::get_singleton()->get_edited_scene(); + Vector<SceneState::PackState> states_stack = PropertyUtils::get_node_states_stack(p_node, edited_scene); + if (states_stack.size()) { + return true; + } else { + bool is_class_default = false; + PropertyUtils::get_property_default_value(p_node, p_property, &states_stack, false, nullptr, &is_class_default); + return !is_class_default; + } +} + +void EditorProperty::_update_pin_flags() { + can_pin = false; + pin_hidden = true; + if (read_only) { + return; + } + if (Node *node = Object::cast_to<Node>(object)) { + // Avoid errors down the road by ignoring nodes which are not part of a scene + if (!node->get_owner()) { + bool is_scene_root = false; + for (int i = 0; i < EditorNode::get_singleton()->get_editor_data().get_edited_scene_count(); ++i) { + if (EditorNode::get_singleton()->get_editor_data().get_edited_scene_root(i) == node) { + is_scene_root = true; + break; + } + } + if (!is_scene_root) { + return; + } + } + if (!_is_value_potential_override(node, property)) { + return; + } + pin_hidden = false; + { + Set<StringName> storable_properties; + node->get_storable_properties(storable_properties); + if (storable_properties.has(node->get_property_store_alias(property))) { + can_pin = true; + } + } + } } Control *EditorProperty::make_custom_tooltip(const String &p_text) const { @@ -955,6 +862,10 @@ void EditorProperty::menu_option(int p_option) { case MENU_COPY_PROPERTY_PATH: { DisplayServer::get_singleton()->clipboard_set(property); } break; + case MENU_PIN_VALUE: { + emit_signal(SNAME("property_pinned"), property, !pinned); + update(); + } break; } } @@ -1003,12 +914,14 @@ void EditorProperty::_bind_methods() { ADD_SIGNAL(MethodInfo("property_keyed", PropertyInfo(Variant::STRING_NAME, "property"))); ADD_SIGNAL(MethodInfo("property_deleted", PropertyInfo(Variant::STRING_NAME, "property"))); ADD_SIGNAL(MethodInfo("property_keyed_with_value", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT))); - ADD_SIGNAL(MethodInfo("property_checked", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::STRING, "bool"))); + ADD_SIGNAL(MethodInfo("property_checked", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::BOOL, "checked"))); + ADD_SIGNAL(MethodInfo("property_pinned", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::BOOL, "pinned"))); ADD_SIGNAL(MethodInfo("resource_selected", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource"))); ADD_SIGNAL(MethodInfo("object_id_selected", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::INT, "id"))); ADD_SIGNAL(MethodInfo("selected", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::INT, "focusable_idx"))); GDVIRTUAL_BIND(_update_property) + ClassDB::bind_method(D_METHOD("_update_revert_and_pin_status"), &EditorProperty::update_revert_and_pin_status); } EditorProperty::EditorProperty() { @@ -1027,6 +940,9 @@ EditorProperty::EditorProperty() { revert_hover = false; check_hover = false; can_revert = false; + can_pin = false; + pin_hidden = false; + pinned = false; use_folding = false; property_usage = 0; selected = false; @@ -1038,17 +954,29 @@ EditorProperty::EditorProperty() { set_process_unhandled_key_input(true); } -void EditorProperty::_ensure_popup() { +void EditorProperty::_update_popup() { if (menu) { - return; + menu->clear(); + } else { + menu = memnew(PopupMenu); + add_child(menu); + menu->connect("id_pressed", callable_mp(this, &EditorProperty::menu_option)); } - menu = memnew(PopupMenu); menu->add_shortcut(ED_GET_SHORTCUT("property_editor/copy_property"), MENU_COPY_PROPERTY); menu->add_shortcut(ED_GET_SHORTCUT("property_editor/paste_property"), MENU_PASTE_PROPERTY); menu->add_shortcut(ED_GET_SHORTCUT("property_editor/copy_property_path"), MENU_COPY_PROPERTY_PATH); - menu->connect("id_pressed", callable_mp(this, &EditorProperty::menu_option)); menu->set_item_disabled(MENU_PASTE_PROPERTY, is_read_only()); - add_child(menu); + if (!pin_hidden) { + menu->add_separator(); + if (can_pin) { + menu->add_check_item(TTR("Pin value"), MENU_PIN_VALUE); + menu->set_item_checked(menu->get_item_index(MENU_PIN_VALUE), pinned); + menu->set_item_tooltip(menu->get_item_index(MENU_PIN_VALUE), TTR("Pinning a value forces it to be saved even if it's equal to the default.")); + } else { + menu->add_check_item(vformat(TTR("Pin value [Disabled because '%s' is editor-only]"), property), MENU_PIN_VALUE); + menu->set_item_disabled(menu->get_item_index(MENU_PIN_VALUE), true); + } + } } //////////////////////////////////////////////// @@ -1086,11 +1014,15 @@ bool EditorInspectorPlugin::can_handle(Object *p_object) { } void EditorInspectorPlugin::parse_begin(Object *p_object) { - GDVIRTUAL_CALL(_parse_begin); + GDVIRTUAL_CALL(_parse_begin, p_object); } -void EditorInspectorPlugin::parse_category(Object *p_object, const String &p_parse_category) { - GDVIRTUAL_CALL(_parse_category, p_object, p_parse_category); +void EditorInspectorPlugin::parse_category(Object *p_object, const String &p_category) { + GDVIRTUAL_CALL(_parse_category, p_object, p_category); +} + +void EditorInspectorPlugin::parse_group(Object *p_object, const String &p_group) { + GDVIRTUAL_CALL(_parse_group, p_object, p_group); } bool EditorInspectorPlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) { @@ -1101,8 +1033,8 @@ bool EditorInspectorPlugin::parse_property(Object *p_object, const Variant::Type return false; } -void EditorInspectorPlugin::parse_end() { - GDVIRTUAL_CALL(_parse_end); +void EditorInspectorPlugin::parse_end(Object *p_object) { + GDVIRTUAL_CALL(_parse_end, p_object); } void EditorInspectorPlugin::_bind_methods() { @@ -1111,10 +1043,11 @@ void EditorInspectorPlugin::_bind_methods() { ClassDB::bind_method(D_METHOD("add_property_editor_for_multiple_properties", "label", "properties", "editor"), &EditorInspectorPlugin::add_property_editor_for_multiple_properties); GDVIRTUAL_BIND(_can_handle, "object") - GDVIRTUAL_BIND(_parse_begin) + GDVIRTUAL_BIND(_parse_begin, "object") GDVIRTUAL_BIND(_parse_category, "object", "category") + GDVIRTUAL_BIND(_parse_group, "object", "group") GDVIRTUAL_BIND(_parse_property, "object", "type", "name", "hint_type", "hint_string", "usage_flags", "wide"); - GDVIRTUAL_BIND(_parse_end) + GDVIRTUAL_BIND(_parse_end, "object") } //////////////////////////////////////////////// @@ -1289,7 +1222,7 @@ void EditorInspectorSection::_notification(int p_what) { Color c = bg_color; c.a *= 0.4; if (foldable && header_rect.has_point(get_local_mouse_position())) { - c = c.lightened(Input::get_singleton()->is_mouse_button_pressed(MOUSE_BUTTON_LEFT) ? -0.05 : 0.2); + c = c.lightened(Input::get_singleton()->is_mouse_button_pressed(MouseButton::LEFT) ? -0.05 : 0.2); } draw_rect(header_rect, c); @@ -1407,7 +1340,7 @@ void EditorInspectorSection::gui_input(const Ref<InputEvent> &p_event) { } Ref<InputEventMouseButton> mb = p_event; - if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { Ref<Font> font = get_theme_font(SNAME("font"), SNAME("Tree")); int font_size = get_theme_font_size(SNAME("font_size"), SNAME("Tree")); if (mb->get_position().y > font->get_height(font_size)) { //clicked outside @@ -1610,7 +1543,7 @@ void EditorInspectorArray::_panel_gui_input(Ref<InputEvent> p_event, int p_index if (key_ref.is_valid()) { const InputEventKey &key = **key_ref; - if (array_elements[p_index].panel->has_focus() && key.is_pressed() && key.get_keycode() == KEY_DELETE) { + if (array_elements[p_index].panel->has_focus() && key.is_pressed() && key.get_keycode() == Key::KEY_DELETE) { _move_element(begin_array_index + p_index, -1); array_elements[p_index].panel->accept_event(); } @@ -1618,7 +1551,7 @@ void EditorInspectorArray::_panel_gui_input(Ref<InputEvent> p_event, int p_index Ref<InputEventMouseButton> mb = p_event; if (mb.is_valid()) { - if (mb->get_button_index() == MOUSE_BUTTON_RIGHT) { + if (mb->get_button_index() == MouseButton::RIGHT) { popup_array_index_pressed = begin_array_index + p_index; rmb_popup->set_item_disabled(OPTION_MOVE_UP, popup_array_index_pressed == 0); rmb_popup->set_item_disabled(OPTION_MOVE_DOWN, popup_array_index_pressed == count - 1); @@ -2296,6 +2229,7 @@ void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, Ref<Edit ep->connect("property_deleted", callable_mp(this, &EditorInspector::_property_deleted), varray(), CONNECT_DEFERRED); ep->connect("property_keyed_with_value", callable_mp(this, &EditorInspector::_property_keyed_with_value)); ep->connect("property_checked", callable_mp(this, &EditorInspector::_property_checked)); + ep->connect("property_pinned", callable_mp(this, &EditorInspector::_property_pinned)); ep->connect("selected", callable_mp(this, &EditorInspector::_property_selected)); ep->connect("multiple_properties_changed", callable_mp(this, &EditorInspector::_multiple_properties_changed)); ep->connect("resource_selected", callable_mp(this, &EditorInspector::_resource_selected), varray(), CONNECT_DEFERRED); @@ -2324,7 +2258,8 @@ void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, Ref<Edit ep->set_read_only(read_only); ep->update_property(); - ep->update_reload_status(); + ep->_update_pin_flags(); + ep->update_revert_and_pin_status(); ep->set_deletable(deletable_properties); ep->update_cache(); } @@ -2698,6 +2633,12 @@ void EditorInspector::update_tree() { c.a /= level; section->setup(acc_path, component, object, c, use_folding); + // Add editors at the start of a group. + for (Ref<EditorInspectorPlugin> &ped : valid_plugins) { + ped->parse_group(object, path); + _parse_added_editors(section->get_vbox(), ped); + } + vbox_per_path[root_vbox][acc_path] = section->get_vbox(); } @@ -2877,6 +2818,7 @@ void EditorInspector::update_tree() { ep->connect("property_deleted", callable_mp(this, &EditorInspector::_property_deleted), varray(), CONNECT_DEFERRED); ep->connect("property_keyed_with_value", callable_mp(this, &EditorInspector::_property_keyed_with_value)); ep->connect("property_checked", callable_mp(this, &EditorInspector::_property_checked)); + ep->connect("property_pinned", callable_mp(this, &EditorInspector::_property_pinned)); ep->connect("selected", callable_mp(this, &EditorInspector::_property_selected)); ep->connect("multiple_properties_changed", callable_mp(this, &EditorInspector::_multiple_properties_changed)); ep->connect("resource_selected", callable_mp(this, &EditorInspector::_resource_selected), varray(), CONNECT_DEFERRED); @@ -2887,7 +2829,8 @@ void EditorInspector::update_tree() { ep->set_tooltip(property_prefix + p.name); } ep->update_property(); - ep->update_reload_status(); + ep->_update_pin_flags(); + ep->update_revert_and_pin_status(); ep->update_cache(); if (current_selected && ep->property == current_selected) { @@ -2905,7 +2848,7 @@ void EditorInspector::update_tree() { // Get the lists of to add at the end. for (Ref<EditorInspectorPlugin> &ped : valid_plugins) { - ped->parse_end(); + ped->parse_end(object); _parse_added_editors(main_vbox, ped); } } @@ -2917,7 +2860,7 @@ void EditorInspector::update_property(const String &p_prop) { for (EditorProperty *E : editor_property_map[p_prop]) { E->update_property(); - E->update_reload_status(); + E->update_revert_and_pin_status(); E->update_cache(); } } @@ -3143,12 +3086,20 @@ void EditorInspector::_edit_set(const String &p_name, const Variant &p_value, bo } else { undo_redo->create_action(vformat(TTR("Set %s"), p_name), UndoRedo::MERGE_ENDS); undo_redo->add_do_property(object, p_name, p_value); - undo_redo->add_undo_property(object, p_name, object->get(p_name)); + bool valid = false; + Variant value = object->get(p_name, &valid); + if (valid) { + undo_redo->add_undo_property(object, p_name, value); + } PropertyInfo prop_info; if (ClassDB::get_property_info(object->get_class_name(), p_name, &prop_info)) { for (const String &linked_prop : prop_info.linked_properties) { - undo_redo->add_undo_property(object, linked_prop, object->get(linked_prop)); + valid = false; + value = object->get(linked_prop, &valid); + if (valid) { + undo_redo->add_undo_property(object, linked_prop, value); + } } } @@ -3196,7 +3147,7 @@ void EditorInspector::_edit_set(const String &p_name, const Variant &p_value, bo if (editor_property_map.has(p_name)) { for (EditorProperty *E : editor_property_map[p_name]) { - E->update_reload_status(); + E->update_revert_and_pin_status(); } } } @@ -3295,7 +3246,7 @@ void EditorInspector::_property_checked(const String &p_path, bool p_checked) { if (editor_property_map.has(p_path)) { for (EditorProperty *E : editor_property_map[p_path]) { E->update_property(); - E->update_reload_status(); + E->update_revert_and_pin_status(); E->update_cache(); } } @@ -3305,6 +3256,35 @@ void EditorInspector::_property_checked(const String &p_path, bool p_checked) { } } +void EditorInspector::_property_pinned(const String &p_path, bool p_pinned) { + if (!object) { + return; + } + + Node *node = Object::cast_to<Node>(object); + ERR_FAIL_COND(!node); + + if (undo_redo) { + undo_redo->create_action(vformat(p_pinned ? TTR("Pinned %s") : TTR("Unpinned %s"), p_path)); + undo_redo->add_do_method(node, "_set_property_pinned", p_path, p_pinned); + undo_redo->add_undo_method(node, "_set_property_pinned", p_path, !p_pinned); + if (editor_property_map.has(p_path)) { + for (List<EditorProperty *>::Element *E = editor_property_map[p_path].front(); E; E = E->next()) { + undo_redo->add_do_method(E->get(), "_update_revert_and_pin_status"); + undo_redo->add_undo_method(E->get(), "_update_revert_and_pin_status"); + } + } + undo_redo->commit_action(); + } else { + node->set_property_pinned(p_path, p_pinned); + if (editor_property_map.has(p_path)) { + for (List<EditorProperty *>::Element *E = editor_property_map[p_path].front(); E; E = E->next()) { + E->get()->update_revert_and_pin_status(); + } + } + } +} + void EditorInspector::_property_selected(const String &p_path, int p_focusable) { property_selected = p_path; property_focusable = p_focusable; @@ -3375,7 +3355,7 @@ void EditorInspector::_notification(int p_what) { for (EditorProperty *E : F.value) { if (!E->is_cache_valid()) { E->update_property(); - E->update_reload_status(); + E->update_revert_and_pin_status(); E->update_cache(); } } @@ -3397,7 +3377,7 @@ void EditorInspector::_notification(int p_what) { if (editor_property_map.has(prop)) { for (EditorProperty *E : editor_property_map[prop]) { E->update_property(); - E->update_reload_status(); + E->update_revert_and_pin_status(); E->update_cache(); } } @@ -3490,7 +3470,7 @@ void EditorInspector::_update_script_class_properties(const Object &p_object, Li String path = s->get_path(); String name = EditorNode::get_editor_data().script_class_get_name(path); if (name.is_empty()) { - if (!path.is_empty() && path.find("::") == -1) { + if (!s->is_built_in()) { name = path.get_file(); } else { name = TTR("Built-in script"); @@ -3596,7 +3576,7 @@ EditorInspector::EditorInspector() { refresh_countdown = 0.33; } - ED_SHORTCUT("property_editor/copy_property", TTR("Copy Property"), KEY_MASK_CMD | KEY_C); - ED_SHORTCUT("property_editor/paste_property", TTR("Paste Property"), KEY_MASK_CMD | KEY_V); - ED_SHORTCUT("property_editor/copy_property_path", TTR("Copy Property Path"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_C); + ED_SHORTCUT("property_editor/copy_property", TTR("Copy Property"), KeyModifierMask::CMD | Key::C); + ED_SHORTCUT("property_editor/paste_property", TTR("Paste Property"), KeyModifierMask::CMD | Key::V); + ED_SHORTCUT("property_editor/copy_property_path", TTR("Copy Property Path"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::C); } diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h index 124ea31302..f2dfe32f82 100644 --- a/editor/editor_inspector.h +++ b/editor/editor_inspector.h @@ -43,7 +43,6 @@ class UndoRedo; class EditorPropertyRevert { public: - static bool may_node_be_in_instance(Node *p_node); static bool get_instantiated_node_original_property(Node *p_node, const StringName &p_prop, Variant &value, bool p_check_class_default = true); static bool is_node_property_different(Node *p_node, const Variant &p_current, const Variant &p_orig); static bool is_property_value_different(const Variant &p_a, const Variant &p_b); @@ -60,6 +59,7 @@ public: MENU_COPY_PROPERTY, MENU_PASTE_PROPERTY, MENU_COPY_PROPERTY_PATH, + MENU_PIN_VALUE, }; private: @@ -91,11 +91,14 @@ private: bool delete_hover = false; bool can_revert; + bool can_pin; + bool pin_hidden; + bool pinned; bool use_folding; bool draw_top_bg; - void _ensure_popup(); + void _update_popup(); void _focusable_focused(int p_index); bool selectable; @@ -114,6 +117,8 @@ private: Map<StringName, Variant> cache; GDVIRTUAL0(_update_property) + void _update_pin_flags(); + protected: void _notification(int p_what); static void _bind_methods(); @@ -138,7 +143,7 @@ public: StringName get_edited_property(); virtual void update_property(); - void update_reload_status(); + void update_revert_and_pin_status(); virtual bool use_keying_next() const; @@ -210,10 +215,11 @@ protected: static void _bind_methods(); GDVIRTUAL1RC(bool, _can_handle, Variant) - GDVIRTUAL0(_parse_begin) + GDVIRTUAL1(_parse_begin, Object *) GDVIRTUAL2(_parse_category, Object *, String) + GDVIRTUAL2(_parse_group, Object *, String) GDVIRTUAL7R(bool, _parse_property, Object *, int, String, int, String, int, bool) - GDVIRTUAL0(_parse_end) + GDVIRTUAL1(_parse_end, Object *) public: void add_custom_control(Control *control); @@ -222,9 +228,10 @@ public: virtual bool can_handle(Object *p_object); virtual void parse_begin(Object *p_object); - virtual void parse_category(Object *p_object, const String &p_parse_category); + virtual void parse_category(Object *p_object, const String &p_category); + virtual void parse_group(Object *p_object, const String &p_group); virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false); - virtual void parse_end(); + virtual void parse_end(Object *p_object); }; class EditorInspectorCategory : public Control { @@ -459,8 +466,8 @@ class EditorInspector : public ScrollContainer { void _property_keyed(const String &p_path, bool p_advance); void _property_keyed_with_value(const String &p_path, const Variant &p_value, bool p_advance); void _property_deleted(const String &p_path); - void _property_checked(const String &p_path, bool p_checked); + void _property_pinned(const String &p_path, bool p_pinned); void _resource_selected(const String &p_path, RES p_resource); void _property_selected(const String &p_path, int p_focusable); diff --git a/editor/editor_layouts_dialog.cpp b/editor/editor_layouts_dialog.cpp index b1f8ba5d20..4cdeeb2396 100644 --- a/editor/editor_layouts_dialog.cpp +++ b/editor/editor_layouts_dialog.cpp @@ -46,15 +46,15 @@ void EditorLayoutsDialog::_line_gui_input(const Ref<InputEvent> &p_event) { } switch (k->get_keycode()) { - case KEY_KP_ENTER: - case KEY_ENTER: { + case Key::KP_ENTER: + case Key::ENTER: { if (get_hide_on_ok()) { hide(); } ok_pressed(); set_input_as_handled(); } break; - case KEY_ESCAPE: { + case Key::ESCAPE: { hide(); set_input_as_handled(); } break; diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp index 251e1c2385..5ace9ae03e 100644 --- a/editor/editor_log.cpp +++ b/editor/editor_log.cpp @@ -45,9 +45,9 @@ void EditorLog::_error_handler(void *p_self, const char *p_func, const char *p_f String err_str; if (p_errorexp && p_errorexp[0]) { - err_str = p_errorexp; + err_str = String::utf8(p_errorexp); } else { - err_str = String(p_file) + ":" + itos(p_line) + " - " + String(p_error); + err_str = String::utf8(p_file) + ":" + itos(p_line) + " - " + String::utf8(p_error); } if (p_editor_notify) { @@ -366,7 +366,7 @@ EditorLog::EditorLog() { clear_button = memnew(Button); clear_button->set_flat(true); clear_button->set_focus_mode(FOCUS_NONE); - clear_button->set_shortcut(ED_SHORTCUT("editor/clear_output", TTR("Clear Output"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_K)); + clear_button->set_shortcut(ED_SHORTCUT("editor/clear_output", TTR("Clear Output"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::K)); clear_button->set_shortcut_context(this); clear_button->connect("pressed", callable_mp(this, &EditorLog::_clear_request)); hb_tools->add_child(clear_button); @@ -375,7 +375,7 @@ EditorLog::EditorLog() { copy_button = memnew(Button); copy_button->set_flat(true); copy_button->set_focus_mode(FOCUS_NONE); - copy_button->set_shortcut(ED_SHORTCUT("editor/copy_output", TTR("Copy Selection"), KEY_MASK_CMD | KEY_C)); + copy_button->set_shortcut(ED_SHORTCUT("editor/copy_output", TTR("Copy Selection"), KeyModifierMask::CMD | Key::C)); copy_button->set_shortcut_context(this); copy_button->connect("pressed", callable_mp(this, &EditorLog::_copy_request)); hb_tools->add_child(copy_button); @@ -401,7 +401,7 @@ EditorLog::EditorLog() { show_search_button->set_focus_mode(FOCUS_NONE); show_search_button->set_toggle_mode(true); show_search_button->set_pressed(true); - show_search_button->set_shortcut(ED_SHORTCUT("editor/open_search", TTR("Focus Search/Filter Bar"), KEY_MASK_CMD | KEY_F)); + show_search_button->set_shortcut(ED_SHORTCUT("editor/open_search", TTR("Focus Search/Filter Bar"), KeyModifierMask::CMD | Key::F)); show_search_button->set_shortcut_context(this); show_search_button->connect("toggled", callable_mp(this, &EditorLog::_set_search_visible)); hb_tools2->add_child(show_search_button); diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index bb4a05efba..368b7e6ab3 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -174,6 +174,7 @@ #include "editor/plugins/sprite_frames_editor_plugin.h" #include "editor/plugins/style_box_editor_plugin.h" #include "editor/plugins/sub_viewport_preview_editor_plugin.h" +#include "editor/plugins/text_control_editor_plugin.h" #include "editor/plugins/text_editor.h" #include "editor/plugins/texture_3d_editor_plugin.h" #include "editor/plugins/texture_editor_plugin.h" @@ -620,6 +621,19 @@ void EditorNode::_notification(int p_what) { } break; case NOTIFICATION_READY: { + { + _initializing_addons = true; + Vector<String> addons; + if (ProjectSettings::get_singleton()->has_setting("editor_plugins/enabled")) { + addons = ProjectSettings::get_singleton()->get("editor_plugins/enabled"); + } + + for (int i = 0; i < addons.size(); i++) { + set_addon_plugin_enabled(addons[i], true); + } + _initializing_addons = false; + } + RenderingServer::get_singleton()->viewport_set_disable_2d(get_scene_root()->get_viewport_rid(), true); RenderingServer::get_singleton()->viewport_set_disable_environment(get_viewport()->get_viewport_rid(), true); @@ -993,18 +1007,6 @@ void EditorNode::_sources_changed(bool p_exist) { load_scene(defer_load_scene); defer_load_scene = ""; } - - // Only enable addons once resources have been imported - _initializing_addons = true; - Vector<String> addons; - if (ProjectSettings::get_singleton()->has_setting("editor_plugins/enabled")) { - addons = ProjectSettings::get_singleton()->get("editor_plugins/enabled"); - } - - for (int i = 0; i < addons.size(); i++) { - set_addon_plugin_enabled(addons[i], true); - } - _initializing_addons = false; } } @@ -1716,8 +1718,10 @@ void EditorNode::_save_scene(String p_file, int idx) { err = ResourceSaver::save(p_file, sdata, flg); - _save_external_resources(); + // This needs to be emitted before saving external resources. + emit_signal(SNAME("scene_saved"), p_file); + _save_external_resources(); editor_data.save_editor_external_data(); for (Ref<AnimatedValuesBackup> &E : anim_backups) { @@ -1791,7 +1795,7 @@ void EditorNode::_save_all_scenes() { } else { _save_scene_with_preview(scene->get_scene_file_path()); } - } else { + } else if (scene->get_scene_file_path() != "") { all_saved = false; } } @@ -2256,7 +2260,8 @@ void EditorNode::_edit_current() { if (main_plugin) { // special case if use of external editor is true - if (main_plugin->get_name() == "Script" && current_obj->get_class_name() != StringName("VisualScript") && (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor")) || overrides_external_editor(current_obj))) { + Resource *res = Object::cast_to<Resource>(current_obj); + if (main_plugin->get_name() == "Script" && current_obj->get_class_name() != StringName("VisualScript") && res && !res->is_built_in() && (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor")) || overrides_external_editor(current_obj))) { if (!changing_scene) { main_plugin->edit(current_obj); } @@ -2642,7 +2647,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { } break; case EDIT_UNDO: { - if (Input::get_singleton()->get_mouse_button_mask() & 0x7) { + if ((int)Input::get_singleton()->get_mouse_button_mask() & 0x7) { log->add_message(TTR("Can't undo while mouse buttons are pressed."), EditorLog::MSG_TYPE_EDITOR); } else { String action = editor_data.get_undo_redo().get_current_action_name(); @@ -2655,7 +2660,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { } } break; case EDIT_REDO: { - if (Input::get_singleton()->get_mouse_button_mask() & 0x7) { + if ((int)Input::get_singleton()->get_mouse_button_mask() & 0x7) { log->add_message(TTR("Can't redo while mouse buttons are pressed."), EditorLog::MSG_TYPE_EDITOR); } else { if (!editor_data.get_undo_redo().redo()) { @@ -3356,7 +3361,7 @@ void EditorNode::set_edited_scene(Node *p_scene) { if (p_scene) { if (p_scene->get_parent() != scene_root) { - scene_root->add_child(p_scene); + scene_root->add_child(p_scene, true); } } } @@ -3488,7 +3493,7 @@ void EditorNode::set_current_scene(int p_idx) { if (new_scene) { if (new_scene->get_parent() != scene_root) { - scene_root->add_child(new_scene); + scene_root->add_child(new_scene, true); } } @@ -3622,7 +3627,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b sdata->set_path(lpath, true); // take over path } - Node *new_scene = sdata->instantiate(PackedScene::GEN_EDIT_STATE_MAIN); + Node *new_scene = sdata->instantiate(p_set_inherited ? PackedScene::GEN_EDIT_STATE_MAIN_INHERITED : PackedScene::GEN_EDIT_STATE_MAIN); if (!new_scene) { sdata.unref(); @@ -4321,7 +4326,7 @@ void EditorNode::_dock_select_input(const Ref<InputEvent> &p_input) { Ref<InputEventMouseButton> mb = me; - if (mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed() && dock_popup_selected != nrect) { + if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT && mb->is_pressed() && dock_popup_selected != nrect) { Control *dock = dock_slot[dock_popup_selected]->get_current_tab_control(); if (dock) { dock_slot[dock_popup_selected]->remove_child(dock); @@ -5014,15 +5019,15 @@ void EditorNode::_scene_tab_input(const Ref<InputEvent> &p_input) { if (mb.is_valid()) { if (scene_tabs->get_hovered_tab() >= 0) { - if (mb->get_button_index() == MOUSE_BUTTON_MIDDLE && mb->is_pressed()) { + if (mb->get_button_index() == MouseButton::MIDDLE && mb->is_pressed()) { _scene_tab_closed(scene_tabs->get_hovered_tab()); } } else { - if ((mb->get_button_index() == MOUSE_BUTTON_LEFT && mb->is_double_click()) || (mb->get_button_index() == MOUSE_BUTTON_MIDDLE && mb->is_pressed())) { + if ((mb->get_button_index() == MouseButton::LEFT && mb->is_double_click()) || (mb->get_button_index() == MouseButton::MIDDLE && mb->is_pressed())) { _menu_option_confirm(FILE_NEW_SCENE, true); } } - if (mb->get_button_index() == MOUSE_BUTTON_RIGHT && mb->is_pressed()) { + if (mb->get_button_index() == MouseButton::RIGHT && mb->is_pressed()) { // context menu scene_tabs_context_menu->clear(); scene_tabs_context_menu->set_size(Size2(1, 1)); @@ -5055,12 +5060,12 @@ void EditorNode::_scene_tab_input(const Ref<InputEvent> &p_input) { scene_tabs_context_menu->set_position(mb->get_global_position()); scene_tabs_context_menu->popup(); } - if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP && mb->is_pressed()) { + if (mb->get_button_index() == MouseButton::WHEEL_UP && mb->is_pressed()) { int previous_tab = editor_data.get_edited_scene() - 1; previous_tab = previous_tab >= 0 ? previous_tab : editor_data.get_edited_scene_count() - 1; _scene_tab_changed(previous_tab); } - if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN && mb->is_pressed()) { + if (mb->get_button_index() == MouseButton::WHEEL_DOWN && mb->is_pressed()) { int next_tab = editor_data.get_edited_scene() + 1; next_tab %= editor_data.get_edited_scene_count(); _scene_tab_changed(next_tab); @@ -5710,6 +5715,7 @@ void EditorNode::_bind_methods() { ADD_SIGNAL(MethodInfo("request_help_search")); ADD_SIGNAL(MethodInfo("script_add_function_request", PropertyInfo(Variant::OBJECT, "obj"), PropertyInfo(Variant::STRING, "function"), PropertyInfo(Variant::PACKED_STRING_ARRAY, "args"))); ADD_SIGNAL(MethodInfo("resource_saved", PropertyInfo(Variant::OBJECT, "obj"))); + ADD_SIGNAL(MethodInfo("scene_saved", PropertyInfo(Variant::STRING, "path"))); ADD_SIGNAL(MethodInfo("project_settings_changed")); } @@ -6253,8 +6259,8 @@ EditorNode::EditorNode() { tabbar_container->add_child(scene_tabs); distraction_free = memnew(Button); distraction_free->set_flat(true); - ED_SHORTCUT_AND_COMMAND("editor/distraction_free_mode", TTR("Distraction Free Mode"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F11); - ED_SHORTCUT_OVERRIDE("editor/distraction_free_mode", "macos", KEY_MASK_CMD | KEY_MASK_CTRL | KEY_D); + ED_SHORTCUT_AND_COMMAND("editor/distraction_free_mode", TTR("Distraction Free Mode"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::F11); + ED_SHORTCUT_OVERRIDE("editor/distraction_free_mode", "macos", KeyModifierMask::CMD | KeyModifierMask::CTRL | Key::D); distraction_free->set_shortcut(ED_GET_SHORTCUT("editor/distraction_free_mode")); distraction_free->set_tooltip(TTR("Toggle distraction-free mode.")); distraction_free->connect("pressed", callable_mp(this, &EditorNode::_toggle_distraction_free_mode)); @@ -6352,9 +6358,9 @@ EditorNode::EditorNode() { gui_base->add_child(warning); warning->connect("custom_action", callable_mp(this, &EditorNode::_copy_warning)); - ED_SHORTCUT("editor/next_tab", TTR("Next Scene Tab"), KEY_MASK_CMD + KEY_TAB); - ED_SHORTCUT("editor/prev_tab", TTR("Previous Scene Tab"), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_TAB); - ED_SHORTCUT("editor/filter_files", TTR("Focus FileSystem Filter"), KEY_MASK_CMD + KEY_MASK_ALT + KEY_P); + ED_SHORTCUT("editor/next_tab", TTR("Next Scene Tab"), KeyModifierMask::CMD + Key::TAB); + ED_SHORTCUT("editor/prev_tab", TTR("Previous Scene Tab"), KeyModifierMask::CMD + KeyModifierMask::SHIFT + Key::TAB); + ED_SHORTCUT("editor/filter_files", TTR("Focus FileSystem Filter"), KeyModifierMask::CMD + KeyModifierMask::ALT + Key::P); command_palette = EditorCommandPalette::get_singleton(); command_palette->set_title(TTR("Command Palette")); @@ -6366,22 +6372,22 @@ EditorNode::EditorNode() { p = file_menu->get_popup(); - p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/new_scene", TTR("New Scene"), KEY_MASK_CMD + KEY_N), FILE_NEW_SCENE); - p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/new_inherited_scene", TTR("New Inherited Scene..."), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_N), FILE_NEW_INHERITED_SCENE); - p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/open_scene", TTR("Open Scene..."), KEY_MASK_CMD + KEY_O), FILE_OPEN_SCENE); - p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/reopen_closed_scene", TTR("Reopen Closed Scene"), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_T), FILE_OPEN_PREV); + p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/new_scene", TTR("New Scene"), KeyModifierMask::CMD + Key::N), FILE_NEW_SCENE); + p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/new_inherited_scene", TTR("New Inherited Scene..."), KeyModifierMask::CMD + KeyModifierMask::SHIFT + Key::N), FILE_NEW_INHERITED_SCENE); + p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/open_scene", TTR("Open Scene..."), KeyModifierMask::CMD + Key::O), FILE_OPEN_SCENE); + p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/reopen_closed_scene", TTR("Reopen Closed Scene"), KeyModifierMask::CMD + KeyModifierMask::SHIFT + Key::T), FILE_OPEN_PREV); p->add_submenu_item(TTR("Open Recent"), "RecentScenes", FILE_OPEN_RECENT); p->add_separator(); - p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/save_scene", TTR("Save Scene"), KEY_MASK_CMD + KEY_S), FILE_SAVE_SCENE); - p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/save_scene_as", TTR("Save Scene As..."), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_S), FILE_SAVE_AS_SCENE); - p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/save_all_scenes", TTR("Save All Scenes"), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_MASK_ALT + KEY_S), FILE_SAVE_ALL_SCENES); + p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/save_scene", TTR("Save Scene"), KeyModifierMask::CMD + Key::S), FILE_SAVE_SCENE); + p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/save_scene_as", TTR("Save Scene As..."), KeyModifierMask::CMD + KeyModifierMask::SHIFT + Key::S), FILE_SAVE_AS_SCENE); + p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/save_all_scenes", TTR("Save All Scenes"), KeyModifierMask::CMD + KeyModifierMask::SHIFT + KeyModifierMask::ALT + Key::S), FILE_SAVE_ALL_SCENES); p->add_separator(); - p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/quick_open", TTR("Quick Open..."), KEY_MASK_SHIFT + KEY_MASK_ALT + KEY_O), FILE_QUICK_OPEN); - p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/quick_open_scene", TTR("Quick Open Scene..."), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_O), FILE_QUICK_OPEN_SCENE); - p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/quick_open_script", TTR("Quick Open Script..."), KEY_MASK_CMD + KEY_MASK_ALT + KEY_O), FILE_QUICK_OPEN_SCRIPT); + p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/quick_open", TTR("Quick Open..."), KeyModifierMask::SHIFT + KeyModifierMask::ALT + Key::O), FILE_QUICK_OPEN); + p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/quick_open_scene", TTR("Quick Open Scene..."), KeyModifierMask::CMD + KeyModifierMask::SHIFT + Key::O), FILE_QUICK_OPEN_SCENE); + p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/quick_open_script", TTR("Quick Open Script..."), KeyModifierMask::CMD + KeyModifierMask::ALT + Key::O), FILE_QUICK_OPEN_SCRIPT); p->add_separator(); PopupMenu *pm_export = memnew(PopupMenu); @@ -6397,7 +6403,7 @@ EditorNode::EditorNode() { p->add_separator(); p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/reload_saved_scene", TTR("Reload Saved Scene")), EDIT_RELOAD_SAVED_SCENE); - p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/close_scene", TTR("Close Scene"), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_W), FILE_CLOSE); + p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/close_scene", TTR("Close Scene"), KeyModifierMask::CMD + KeyModifierMask::SHIFT + Key::W), FILE_CLOSE); recent_scenes = memnew(PopupMenu); recent_scenes->set_name("RecentScenes"); @@ -6405,7 +6411,7 @@ EditorNode::EditorNode() { recent_scenes->connect("id_pressed", callable_mp(this, &EditorNode::_open_recent_scene)); p->add_separator(); - p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/file_quit", TTR("Quit"), KEY_MASK_CMD + KEY_Q), FILE_QUIT, true); + p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/file_quit", TTR("Quit"), KeyModifierMask::CMD + Key::Q), FILE_QUIT, true); project_menu = memnew(MenuButton); project_menu->set_flat(false); @@ -6417,7 +6423,7 @@ EditorNode::EditorNode() { p = project_menu->get_popup(); - p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/project_settings", TTR("Project Settings..."), KEY_NONE, TTR("Project Settings")), RUN_SETTINGS); + p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/project_settings", TTR("Project Settings..."), Key::NONE, TTR("Project Settings")), RUN_SETTINGS); p->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option)); vcs_actions_menu = VersionControlEditorPlugin::get_singleton()->get_version_control_actions_panel(); @@ -6430,7 +6436,7 @@ EditorNode::EditorNode() { vcs_actions_menu->add_item(TTR("Shut Down Version Control"), RUN_VCS_SHUT_DOWN); p->add_separator(); - p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/export", TTR("Export..."), KEY_NONE, TTR("Export")), FILE_EXPORT_PROJECT); + p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/export", TTR("Export..."), Key::NONE, TTR("Export")), FILE_EXPORT_PROJECT); p->add_item(TTR("Install Android Build Template..."), FILE_INSTALL_ANDROID_SOURCE); p->add_item(TTR("Open Project Data Folder"), RUN_PROJECT_DATA_FOLDER); @@ -6447,8 +6453,8 @@ EditorNode::EditorNode() { p->add_separator(); p->add_shortcut(ED_SHORTCUT("editor/reload_current_project", TTR("Reload Current Project")), RUN_RELOAD_CURRENT_PROJECT); - ED_SHORTCUT_AND_COMMAND("editor/quit_to_project_list", TTR("Quit to Project List"), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_Q); - ED_SHORTCUT_OVERRIDE("editor/quit_to_project_list", "macos", KEY_MASK_SHIFT + KEY_MASK_ALT + KEY_Q); + ED_SHORTCUT_AND_COMMAND("editor/quit_to_project_list", TTR("Quit to Project List"), KeyModifierMask::CMD + KeyModifierMask::SHIFT + Key::Q); + ED_SHORTCUT_OVERRIDE("editor/quit_to_project_list", "macos", KeyModifierMask::SHIFT + KeyModifierMask::ALT + Key::Q); p->add_shortcut(ED_GET_SHORTCUT("editor/quit_to_project_list"), RUN_PROJECT_MANAGER, true); menu_hb->add_spacer(); @@ -6476,9 +6482,9 @@ EditorNode::EditorNode() { p = settings_menu->get_popup(); ED_SHORTCUT_AND_COMMAND("editor/editor_settings", TTR("Editor Settings...")); - ED_SHORTCUT_OVERRIDE("editor/editor_settings", "macos", KEY_MASK_CMD + KEY_COMMA); + ED_SHORTCUT_OVERRIDE("editor/editor_settings", "macos", KeyModifierMask::CMD + Key::COMMA); p->add_shortcut(ED_GET_SHORTCUT("editor/editor_settings"), SETTINGS_PREFERENCES); - p->add_shortcut(ED_SHORTCUT("editor/command_palette", TTR("Command Palette..."), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_P), HELP_COMMAND_PALETTE); + p->add_shortcut(ED_SHORTCUT("editor/command_palette", TTR("Command Palette..."), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::P), HELP_COMMAND_PALETTE); p->add_separator(); editor_layouts = memnew(PopupMenu); @@ -6488,14 +6494,14 @@ EditorNode::EditorNode() { p->add_submenu_item(TTR("Editor Layout"), "Layouts"); p->add_separator(); - ED_SHORTCUT_AND_COMMAND("editor/take_screenshot", TTR("Take Screenshot"), KEY_MASK_CTRL | KEY_F12); - ED_SHORTCUT_OVERRIDE("editor/take_screenshot", "macos", KEY_MASK_CMD | KEY_F12); + ED_SHORTCUT_AND_COMMAND("editor/take_screenshot", TTR("Take Screenshot"), KeyModifierMask::CTRL | Key::F12); + ED_SHORTCUT_OVERRIDE("editor/take_screenshot", "macos", KeyModifierMask::CMD | Key::F12); p->add_shortcut(ED_GET_SHORTCUT("editor/take_screenshot"), EDITOR_SCREENSHOT); p->set_item_tooltip(p->get_item_count() - 1, TTR("Screenshots are stored in the Editor Data/Settings Folder.")); - ED_SHORTCUT_AND_COMMAND("editor/fullscreen_mode", TTR("Toggle Fullscreen"), KEY_MASK_SHIFT | KEY_F11); - ED_SHORTCUT_OVERRIDE("editor/fullscreen_mode", "macos", KEY_MASK_CMD | KEY_MASK_CTRL | KEY_F); + ED_SHORTCUT_AND_COMMAND("editor/fullscreen_mode", TTR("Toggle Fullscreen"), KeyModifierMask::SHIFT | Key::F11); + ED_SHORTCUT_OVERRIDE("editor/fullscreen_mode", "macos", KeyModifierMask::CMD | KeyModifierMask::CTRL | Key::F); p->add_shortcut(ED_GET_SHORTCUT("editor/fullscreen_mode"), SETTINGS_TOGGLE_FULLSCREEN); #if defined(WINDOWS_ENABLED) && defined(WINDOWS_SUBSYSTEM_CONSOLE) @@ -6529,8 +6535,8 @@ EditorNode::EditorNode() { p = help_menu->get_popup(); p->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option)); - ED_SHORTCUT_AND_COMMAND("editor/editor_help", TTR("Search Help"), KEY_F1); - ED_SHORTCUT_OVERRIDE("editor/editor_help", "macos", KEY_MASK_ALT | KEY_SPACE); + ED_SHORTCUT_AND_COMMAND("editor/editor_help", TTR("Search Help"), Key::F1); + ED_SHORTCUT_OVERRIDE("editor/editor_help", "macos", KeyModifierMask::ALT | Key::SPACE); p->add_icon_shortcut(gui_base->get_theme_icon(SNAME("HelpSearch"), SNAME("EditorIcons")), ED_GET_SHORTCUT("editor/editor_help"), HELP_SEARCH); p->add_separator(); p->add_icon_shortcut(gui_base->get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")), ED_SHORTCUT_AND_COMMAND("editor/online_docs", TTR("Online Documentation")), HELP_DOCS); @@ -6555,8 +6561,8 @@ EditorNode::EditorNode() { play_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option), make_binds(RUN_PLAY)); play_button->set_tooltip(TTR("Play the project.")); - ED_SHORTCUT_AND_COMMAND("editor/play", TTR("Play"), KEY_F5); - ED_SHORTCUT_OVERRIDE("editor/play", "macos", KEY_MASK_CMD | KEY_B); + ED_SHORTCUT_AND_COMMAND("editor/play", TTR("Play"), Key::F5); + ED_SHORTCUT_OVERRIDE("editor/play", "macos", KeyModifierMask::CMD | Key::B); play_button->set_shortcut(ED_GET_SHORTCUT("editor/play")); pause_button = memnew(Button); @@ -6568,8 +6574,8 @@ EditorNode::EditorNode() { pause_button->set_disabled(true); play_hb->add_child(pause_button); - ED_SHORTCUT("editor/pause_scene", TTR("Pause Scene"), KEY_F7); - ED_SHORTCUT_OVERRIDE("editor/pause_scene", "macos", KEY_MASK_CMD | KEY_MASK_CTRL | KEY_Y); + ED_SHORTCUT("editor/pause_scene", TTR("Pause Scene"), Key::F7); + ED_SHORTCUT_OVERRIDE("editor/pause_scene", "macos", KeyModifierMask::CMD | KeyModifierMask::CTRL | Key::Y); pause_button->set_shortcut(ED_GET_SHORTCUT("editor/pause_scene")); stop_button = memnew(Button); @@ -6581,8 +6587,8 @@ EditorNode::EditorNode() { stop_button->set_tooltip(TTR("Stop the scene.")); stop_button->set_disabled(true); - ED_SHORTCUT("editor/stop", TTR("Stop"), KEY_F8); - ED_SHORTCUT_OVERRIDE("editor/stop", "macos", KEY_MASK_CMD | KEY_PERIOD); + ED_SHORTCUT("editor/stop", TTR("Stop"), Key::F8); + ED_SHORTCUT_OVERRIDE("editor/stop", "macos", KeyModifierMask::CMD | Key::PERIOD); stop_button->set_shortcut(ED_GET_SHORTCUT("editor/stop")); run_native = memnew(EditorRunNative); @@ -6598,8 +6604,8 @@ EditorNode::EditorNode() { play_scene_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option), make_binds(RUN_PLAY_SCENE)); play_scene_button->set_tooltip(TTR("Play the edited scene.")); - ED_SHORTCUT_AND_COMMAND("editor/play_scene", TTR("Play Scene"), KEY_F6); - ED_SHORTCUT_OVERRIDE("editor/play_scene", "macos", KEY_MASK_CMD | KEY_R); + ED_SHORTCUT_AND_COMMAND("editor/play_scene", TTR("Play Scene"), Key::F6); + ED_SHORTCUT_OVERRIDE("editor/play_scene", "macos", KeyModifierMask::CMD | Key::R); play_scene_button->set_shortcut(ED_GET_SHORTCUT("editor/play_scene")); play_custom_scene_button = memnew(Button); @@ -6611,8 +6617,8 @@ EditorNode::EditorNode() { play_custom_scene_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option), make_binds(RUN_PLAY_CUSTOM_SCENE)); play_custom_scene_button->set_tooltip(TTR("Play custom scene")); - ED_SHORTCUT_AND_COMMAND("editor/play_custom_scene", TTR("Play Custom Scene"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F5); - ED_SHORTCUT_OVERRIDE("editor/play_custom_scene", "macos", KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_R); + ED_SHORTCUT_AND_COMMAND("editor/play_custom_scene", TTR("Play Custom Scene"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::F5); + ED_SHORTCUT_OVERRIDE("editor/play_custom_scene", "macos", KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::R); play_custom_scene_button->set_shortcut(ED_GET_SHORTCUT("editor/play_custom_scene")); HBoxContainer *right_menu_hb = memnew(HBoxContainer); @@ -6799,7 +6805,7 @@ EditorNode::EditorNode() { bottom_panel_raise->set_flat(true); bottom_panel_raise->set_icon(gui_base->get_theme_icon(SNAME("ExpandBottomDock"), SNAME("EditorIcons"))); - bottom_panel_raise->set_shortcut(ED_SHORTCUT_AND_COMMAND("editor/bottom_panel_expand", TTR("Expand Bottom Panel"), KEY_MASK_SHIFT | KEY_F12)); + bottom_panel_raise->set_shortcut(ED_SHORTCUT_AND_COMMAND("editor/bottom_panel_expand", TTR("Expand Bottom Panel"), KeyModifierMask::SHIFT | Key::F12)); bottom_panel_hb->add_child(bottom_panel_raise); bottom_panel_raise->hide(); @@ -7009,6 +7015,7 @@ EditorNode::EditorNode() { add_editor_plugin(memnew(GPUParticlesCollisionSDFEditorPlugin(this))); add_editor_plugin(memnew(InputEventEditorPlugin(this))); add_editor_plugin(memnew(SubViewportPreviewEditorPlugin(this))); + add_editor_plugin(memnew(TextControlEditorPlugin(this))); for (int i = 0; i < EditorPlugins::get_plugin_count(); i++) { add_editor_plugin(EditorPlugins::create(i, this)); @@ -7139,8 +7146,6 @@ EditorNode::EditorNode() { _build_icon_type_cache(); - Node::set_human_readable_collision_renaming(true); - pick_main_scene = memnew(ConfirmationDialog); gui_base->add_child(pick_main_scene); pick_main_scene->get_ok_button()->set_text(TTR("Select")); @@ -7170,15 +7175,15 @@ EditorNode::EditorNode() { ResourceLoader::set_load_callback(_resource_loaded); // Use the Ctrl modifier so F2 can be used to rename nodes in the scene tree dock. - ED_SHORTCUT_AND_COMMAND("editor/editor_2d", TTR("Open 2D Editor"), KEY_MASK_CTRL | KEY_F1); - ED_SHORTCUT_AND_COMMAND("editor/editor_3d", TTR("Open 3D Editor"), KEY_MASK_CTRL | KEY_F2); - ED_SHORTCUT_AND_COMMAND("editor/editor_script", TTR("Open Script Editor"), KEY_MASK_CTRL | KEY_F3); - ED_SHORTCUT_AND_COMMAND("editor/editor_assetlib", TTR("Open Asset Library"), KEY_MASK_CTRL | KEY_F4); - - ED_SHORTCUT_OVERRIDE("editor/editor_2d", "macos", KEY_MASK_ALT | KEY_1); - ED_SHORTCUT_OVERRIDE("editor/editor_3d", "macos", KEY_MASK_ALT | KEY_2); - ED_SHORTCUT_OVERRIDE("editor/editor_script", "macos", KEY_MASK_ALT | KEY_3); - ED_SHORTCUT_OVERRIDE("editor/editor_assetlib", "macos", KEY_MASK_ALT | KEY_4); + ED_SHORTCUT_AND_COMMAND("editor/editor_2d", TTR("Open 2D Editor"), KeyModifierMask::CTRL | Key::F1); + ED_SHORTCUT_AND_COMMAND("editor/editor_3d", TTR("Open 3D Editor"), KeyModifierMask::CTRL | Key::F2); + ED_SHORTCUT_AND_COMMAND("editor/editor_script", TTR("Open Script Editor"), KeyModifierMask::CTRL | Key::F3); + ED_SHORTCUT_AND_COMMAND("editor/editor_assetlib", TTR("Open Asset Library"), KeyModifierMask::CTRL | Key::F4); + + ED_SHORTCUT_OVERRIDE("editor/editor_2d", "macos", KeyModifierMask::ALT | Key::KEY_1); + ED_SHORTCUT_OVERRIDE("editor/editor_3d", "macos", KeyModifierMask::ALT | Key::KEY_2); + ED_SHORTCUT_OVERRIDE("editor/editor_script", "macos", KeyModifierMask::ALT | Key::KEY_3); + ED_SHORTCUT_OVERRIDE("editor/editor_assetlib", "macos", KeyModifierMask::ALT | Key::KEY_4); ED_SHORTCUT_AND_COMMAND("editor/editor_next", TTR("Open the next Editor")); ED_SHORTCUT_AND_COMMAND("editor/editor_prev", TTR("Open the previous Editor")); diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index e679222567..e48679cad7 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -35,6 +35,9 @@ #include "editor_node.h" #include "editor_properties_array_dict.h" #include "editor_scale.h" +#include "scene/2d/gpu_particles_2d.h" +#include "scene/3d/fog_volume.h" +#include "scene/3d/gpu_particles_3d.h" #include "scene/main/window.h" #include "scene/resources/font.h" @@ -815,7 +818,7 @@ public: } const Ref<InputEventMouseButton> mb = p_ev; - if (mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_LEFT && mb->is_pressed()) { + if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT && mb->is_pressed()) { if (hovered_index >= 0) { // Toggle the flag. // We base our choice on the hovered flag, so that it always matches the hovered flag. @@ -1275,11 +1278,11 @@ void EditorPropertyEasing::_drag_easing(const Ref<InputEvent> &p_ev) { } const Ref<InputEventMouseButton> mb = p_ev; if (mb.is_valid()) { - if (mb->is_double_click() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb->is_double_click() && mb->get_button_index() == MouseButton::LEFT) { _setup_spin(); } - if (mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_RIGHT) { + if (mb->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) { preset->set_position(easing_draw->get_screen_transform().xform(mb->get_position())); preset->popup(); @@ -1288,7 +1291,7 @@ void EditorPropertyEasing::_drag_easing(const Ref<InputEvent> &p_ev) { easing_draw->update(); } - if (mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb->get_button_index() == MouseButton::LEFT) { dragging = mb->is_pressed(); // Update to display the correct dragging color easing_draw->update(); @@ -1297,7 +1300,7 @@ void EditorPropertyEasing::_drag_easing(const Ref<InputEvent> &p_ev) { const Ref<InputEventMouseMotion> mm = p_ev; - if (dragging && mm.is_valid() && mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT) { + if (dragging && mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) { float rel = mm->get_relative().x; if (rel == 0) { return; @@ -2821,8 +2824,8 @@ void EditorPropertyResource::_set_read_only(bool p_read_only) { resource_picker->set_editable(!p_read_only); }; -void EditorPropertyResource::_resource_selected(const RES &p_resource) { - if (use_sub_inspector) { +void EditorPropertyResource::_resource_selected(const RES &p_resource, bool p_edit) { + if (!p_edit && use_sub_inspector) { bool unfold = !get_edited_object()->editor_is_section_unfolded(get_edited_property()); get_edited_object()->editor_set_section_unfold(get_edited_property(), unfold); update_property(); @@ -2969,6 +2972,35 @@ void EditorPropertyResource::_update_property_bg() { update(); } +void EditorPropertyResource::_update_preferred_shader() { + Node *parent = get_parent(); + EditorProperty *parent_property = nullptr; + + while (parent && !parent_property) { + parent_property = Object::cast_to<EditorProperty>(parent); + parent = parent->get_parent(); + } + + if (parent_property) { + EditorShaderPicker *shader_picker = Object::cast_to<EditorShaderPicker>(resource_picker); + Object *object = parent_property->get_edited_object(); + const StringName &property = parent_property->get_edited_property(); + + // Set preferred shader based on edited parent type. + if ((Object::cast_to<GPUParticles2D>(object) || Object::cast_to<GPUParticles3D>(object)) && property == SNAME("process_material")) { + shader_picker->set_preferred_mode(Shader::MODE_PARTICLES); + } else if (Object::cast_to<FogVolume>(object)) { + shader_picker->set_preferred_mode(Shader::MODE_FOG); + } else if (Object::cast_to<CanvasItem>(object)) { + shader_picker->set_preferred_mode(Shader::MODE_CANVAS_ITEM); + } else if (Object::cast_to<Node3D>(object)) { + shader_picker->set_preferred_mode(Shader::MODE_SPATIAL); + } else if (Object::cast_to<Sky>(object)) { + shader_picker->set_preferred_mode(Shader::MODE_SKY); + } + } +} + void EditorPropertyResource::_viewport_selected(const NodePath &p_path) { Node *to_node = get_node(p_path); if (!Object::cast_to<Viewport>(to_node)) { @@ -3000,6 +3032,7 @@ void EditorPropertyResource::setup(Object *p_object, const String &p_path, const EditorShaderPicker *shader_picker = memnew(EditorShaderPicker); shader_picker->set_edited_material(Object::cast_to<ShaderMaterial>(p_object)); resource_picker = shader_picker; + connect(SNAME("ready"), callable_mp(this, &EditorPropertyResource::_update_preferred_shader)); } else { resource_picker = memnew(EditorResourcePicker); } @@ -3137,11 +3170,7 @@ EditorPropertyResource::EditorPropertyResource() { ////////////// DEFAULT PLUGIN ////////////////////// bool EditorInspectorDefaultPlugin::can_handle(Object *p_object) { - return true; //can handle everything -} - -void EditorInspectorDefaultPlugin::parse_begin(Object *p_object) { - //do none + return true; // Can handle everything. } bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) { @@ -3152,10 +3181,6 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, const Varian return false; } -void EditorInspectorDefaultPlugin::parse_end() { - //do none -} - struct EditorPropertyRangeHint { bool angle_in_degrees = false; bool greater = true; diff --git a/editor/editor_properties.h b/editor/editor_properties.h index 9a687f1a72..42ef650adc 100644 --- a/editor/editor_properties.h +++ b/editor/editor_properties.h @@ -657,7 +657,7 @@ class EditorPropertyResource : public EditorProperty { bool updating_theme = false; bool opened_editor = false; - void _resource_selected(const RES &p_resource); + void _resource_selected(const RES &p_resource, bool p_edit); void _resource_changed(const RES &p_resource); void _viewport_selected(const NodePath &p_path); @@ -669,6 +669,7 @@ class EditorPropertyResource : public EditorProperty { void _open_editor_pressed(); void _fold_other_editors(Object *p_self); void _update_property_bg(); + void _update_preferred_shader(); protected: virtual void _set_read_only(bool p_read_only) override; @@ -695,9 +696,7 @@ class EditorInspectorDefaultPlugin : public EditorInspectorPlugin { public: virtual bool can_handle(Object *p_object) override; - virtual void parse_begin(Object *p_object) override; virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override; - virtual void parse_end() override; static EditorProperty *get_editor_for_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false); }; diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp index 9dbf69a779..0703677dc8 100644 --- a/editor/editor_resource_picker.cpp +++ b/editor/editor_resource_picker.cpp @@ -84,7 +84,7 @@ void EditorResourcePicker::_update_resource_preview(const String &p_path, const if (p_preview.is_valid()) { preview_rect->set_offset(SIDE_LEFT, assign_button->get_icon()->get_width() + assign_button->get_theme_stylebox(SNAME("normal"))->get_default_margin(SIDE_LEFT) + get_theme_constant(SNAME("hseparation"), SNAME("Button"))); - if (type == "GradientTexture") { + if (type == "GradientTexture1D") { preview_rect->set_stretch_mode(TextureRect::STRETCH_SCALE); assign_button->set_custom_minimum_size(Size2(1, 1)); } else { @@ -106,7 +106,7 @@ void EditorResourcePicker::_resource_selected() { return; } - emit_signal(SNAME("resource_selected"), edited_resource); + emit_signal(SNAME("resource_selected"), edited_resource, false); } void EditorResourcePicker::_file_selected(const String &p_path) { @@ -266,7 +266,7 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) { case OBJ_MENU_EDIT: { if (edited_resource.is_valid()) { - emit_signal(SNAME("resource_selected"), edited_resource); + emit_signal(SNAME("resource_selected"), edited_resource, true); } } break; @@ -464,7 +464,7 @@ void EditorResourcePicker::_button_input(const Ref<InputEvent> &p_event) { Ref<InputEventMouseButton> mb = p_event; if (mb.is_valid()) { - if (mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_RIGHT) { + if (mb->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) { _update_menu_items(); Vector2 pos = get_screen_position() + mb->get_position(); @@ -690,7 +690,7 @@ void EditorResourcePicker::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editable"), "set_editable", "is_editable"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "toggle_mode"), "set_toggle_mode", "is_toggle_mode"); - ADD_SIGNAL(MethodInfo("resource_selected", PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource"))); + ADD_SIGNAL(MethodInfo("resource_selected", PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource"), PropertyInfo(Variant::BOOL, "edit"))); ADD_SIGNAL(MethodInfo("resource_changed", PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource"))); } @@ -934,7 +934,7 @@ bool EditorShaderPicker::handle_menu_selected(int p_which) { switch (p_which) { case OBJ_MENU_NEW_SHADER: { if (material.is_valid()) { - EditorNode::get_singleton()->get_scene_tree_dock()->open_shader_dialog(material); + EditorNode::get_singleton()->get_scene_tree_dock()->open_shader_dialog(material, preferred_mode); return true; } } break; @@ -952,5 +952,9 @@ ShaderMaterial *EditorShaderPicker::get_edited_material() const { return edited_material; } +void EditorShaderPicker::set_preferred_mode(int p_mode) { + preferred_mode = p_mode; +} + EditorShaderPicker::EditorShaderPicker() { } diff --git a/editor/editor_resource_picker.h b/editor/editor_resource_picker.h index d0dad0287b..f55c6f47f3 100644 --- a/editor/editor_resource_picker.h +++ b/editor/editor_resource_picker.h @@ -156,6 +156,7 @@ class EditorShaderPicker : public EditorResourcePicker { }; ShaderMaterial *edited_material = nullptr; + int preferred_mode = -1; public: virtual void set_create_options(Object *p_menu_node) override; @@ -163,6 +164,7 @@ public: void set_edited_material(ShaderMaterial *p_material); ShaderMaterial *get_edited_material() const; + void set_preferred_mode(int p_preferred_mode); EditorShaderPicker(); }; diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 1da9213b89..613e0ba7a0 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -293,8 +293,8 @@ void EditorSettings::_get_property_list(List<PropertyInfo> *p_list) const { p_list->push_back(pi); } - p_list->push_back(PropertyInfo(Variant::ARRAY, "shortcuts", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); //do not edit - p_list->push_back(PropertyInfo(Variant::ARRAY, "builtin_action_overrides", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); + p_list->push_back(PropertyInfo(Variant::ARRAY, "shortcuts", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL)); //do not edit + p_list->push_back(PropertyInfo(Variant::ARRAY, "builtin_action_overrides", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL)); } void EditorSettings::_add_property_info_bind(const Dictionary &p_info) { @@ -1482,7 +1482,7 @@ void ED_SHORTCUT_OVERRIDE(const String &p_path, const String &p_feature, Key p_k ERR_FAIL_COND_MSG(!sc.is_valid(), "Used ED_SHORTCUT_OVERRIDE with invalid shortcut: " + p_path + "."); PackedInt32Array arr; - arr.push_back(p_keycode); + arr.push_back((int32_t)p_keycode); ED_SHORTCUT_OVERRIDE_ARRAY(p_path, p_feature, arr); } @@ -1503,13 +1503,12 @@ void ED_SHORTCUT_OVERRIDE_ARRAY(const String &p_path, const String &p_feature, c #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; + if (keycode == Key::KEY_DELETE) { + keycode = KeyModifierMask::CMD | Key::BACKSPACE; } #endif - Ref<InputEventKey> ie; - if (keycode) { + if (keycode != Key::NONE) { ie = InputEventKey::create_reference(keycode); events.push_back(ie); } @@ -1522,7 +1521,7 @@ void ED_SHORTCUT_OVERRIDE_ARRAY(const String &p_path, const String &p_feature, c Ref<Shortcut> ED_SHORTCUT(const String &p_path, const String &p_name, Key p_keycode) { PackedInt32Array arr; - arr.push_back(p_keycode); + arr.push_back((int32_t)p_keycode); return ED_SHORTCUT_ARRAY(p_path, p_name, arr); } @@ -1534,13 +1533,13 @@ Ref<Shortcut> ED_SHORTCUT_ARRAY(const String &p_path, const String &p_name, cons #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; + if (keycode == Key::KEY_DELETE) { + keycode = KeyModifierMask::CMD | Key::BACKSPACE; } #endif Ref<InputEventKey> ie; - if (keycode) { + if (keycode != Key::NONE) { ie = InputEventKey::create_reference(keycode); events.push_back(ie); } diff --git a/editor/editor_settings.h b/editor/editor_settings.h index 04e227bc5c..cb23ed3d19 100644 --- a/editor/editor_settings.h +++ b/editor/editor_settings.h @@ -200,9 +200,9 @@ Variant _EDITOR_DEF(const String &p_setting, const Variant &p_default, bool p_re 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(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(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); diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp index 82b5ec5ca1..2942ece409 100644 --- a/editor/editor_spin_slider.cpp +++ b/editor/editor_spin_slider.cpp @@ -39,9 +39,9 @@ String EditorSpinSlider::get_tooltip(const Point2 &p_pos) const { if (grabber->is_visible()) { #ifdef OSX_ENABLED - const int key = KEY_META; + Key key = Key::META; #else - const int key = KEY_CTRL; + Key key = Key::CTRL; #endif return TS->format_number(rtos(get_value())) + "\n\n" + vformat(TTR("Hold %s to round to integers. Hold Shift for more precise changes."), find_keycode_name(key)); } @@ -61,7 +61,7 @@ void EditorSpinSlider::gui_input(const Ref<InputEvent> &p_event) { Ref<InputEventMouseButton> mb = p_event; if (mb.is_valid()) { - if (mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb->get_button_index() == MouseButton::LEFT) { if (mb->is_pressed()) { if (updown_offset != -1 && mb->get_position().x > updown_offset) { //there is an updown, so use it. @@ -92,7 +92,7 @@ void EditorSpinSlider::gui_input(const Ref<InputEvent> &p_event) { grabbing_spinner_attempt = false; } } - } else if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP || mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN) { + } else if (mb->get_button_index() == MouseButton::WHEEL_UP || mb->get_button_index() == MouseButton::WHEEL_DOWN) { if (grabber->is_visible()) { call_deferred(SNAME("update")); } @@ -154,17 +154,17 @@ void EditorSpinSlider::_grabber_gui_input(const Ref<InputEvent> &p_event) { if (grabbing_grabber) { if (mb.is_valid()) { - if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP) { + if (mb->get_button_index() == MouseButton::WHEEL_UP) { set_value(get_value() + get_step()); mousewheel_over_grabber = true; - } else if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN) { + } else if (mb->get_button_index() == MouseButton::WHEEL_DOWN) { set_value(get_value() - get_step()); mousewheel_over_grabber = true; } } } - if (mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT) { if (mb->is_pressed()) { grabbing_grabber = true; if (!mousewheel_over_grabber) { @@ -212,9 +212,9 @@ void EditorSpinSlider::_value_input_gui_input(const Ref<InputEvent> &p_event) { step *= 0.1; } - uint32_t code = k->get_keycode(); + Key code = k->get_keycode(); switch (code) { - case KEY_UP: { + case Key::UP: { _evaluate_input_text(); double last_value = get_value(); @@ -228,7 +228,7 @@ void EditorSpinSlider::_value_input_gui_input(const Ref<InputEvent> &p_event) { value_input_dirty = true; set_process_internal(true); } break; - case KEY_DOWN: { + case Key::DOWN: { _evaluate_input_text(); double last_value = get_value(); @@ -242,6 +242,8 @@ void EditorSpinSlider::_value_input_gui_input(const Ref<InputEvent> &p_event) { value_input_dirty = true; set_process_internal(true); } break; + default: + break; } } } diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 06c39a957c..637394d136 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -36,7 +36,7 @@ #include "editor_scale.h" #include "editor_settings.h" -#include "modules/modules_enabled.gen.h" +#include "modules/modules_enabled.gen.h" // For svg. #ifdef MODULE_SVG_ENABLED #include "modules/svg/image_loader_svg.h" #endif @@ -1207,7 +1207,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("font_shadow_color", "RichTextLabel", Color(0, 0, 0, 0)); theme->set_constant("shadow_offset_x", "RichTextLabel", 1 * EDSCALE); theme->set_constant("shadow_offset_y", "RichTextLabel", 1 * EDSCALE); - theme->set_constant("shadow_as_outline", "RichTextLabel", 0 * EDSCALE); + theme->set_constant("shadow_outline_size", "RichTextLabel", 1 * EDSCALE); theme->set_stylebox("focus", "RichTextLabel", make_empty_stylebox()); theme->set_stylebox("normal", "RichTextLabel", style_tree_bg); @@ -1223,7 +1223,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("font_shadow_color", "Label", Color(0, 0, 0, 0)); theme->set_constant("shadow_offset_x", "Label", 1 * EDSCALE); theme->set_constant("shadow_offset_y", "Label", 1 * EDSCALE); - theme->set_constant("shadow_as_outline", "Label", 0 * EDSCALE); + theme->set_constant("shadow_outline_size", "Label", 1 * EDSCALE); theme->set_constant("line_spacing", "Label", 3 * EDSCALE); // LinkButton diff --git a/editor/editor_toaster.cpp b/editor/editor_toaster.cpp index 22da12b59b..0d9a546b8e 100644 --- a/editor/editor_toaster.cpp +++ b/editor/editor_toaster.cpp @@ -158,11 +158,11 @@ void EditorToaster::_error_handler(void *p_self, const char *p_func, const char if (p_editor_notify || (show_all_setting == 0 && in_dev) || show_all_setting == 1) { String err_str; if (p_errorexp && p_errorexp[0]) { - err_str = p_errorexp; + err_str = String::utf8(p_errorexp); } else { - err_str = String(p_error); + err_str = String::utf8(p_error); } - String tooltip_str = String(p_file) + ":" + itos(p_line); + String tooltip_str = String::utf8(p_file) + ":" + itos(p_line); if (!p_editor_notify) { if (p_type == ERR_HANDLER_WARNING) { diff --git a/editor/editor_zoom_widget.cpp b/editor/editor_zoom_widget.cpp index 420aeb03fe..a998ec7e5b 100644 --- a/editor/editor_zoom_widget.cpp +++ b/editor/editor_zoom_widget.cpp @@ -51,7 +51,7 @@ void EditorZoomWidget::_update_zoom_label() { } void EditorZoomWidget::_button_zoom_minus() { - set_zoom_by_increments(-6, Input::get_singleton()->is_key_pressed(KEY_ALT)); + set_zoom_by_increments(-6, Input::get_singleton()->is_key_pressed(Key::ALT)); emit_signal(SNAME("zoom_changed"), zoom); } @@ -61,7 +61,7 @@ void EditorZoomWidget::_button_zoom_reset() { } void EditorZoomWidget::_button_zoom_plus() { - set_zoom_by_increments(6, Input::get_singleton()->is_key_pressed(KEY_ALT)); + set_zoom_by_increments(6, Input::get_singleton()->is_key_pressed(Key::ALT)); emit_signal(SNAME("zoom_changed"), zoom); } @@ -169,7 +169,7 @@ EditorZoomWidget::EditorZoomWidget() { zoom_minus->set_flat(true); add_child(zoom_minus); zoom_minus->connect("pressed", callable_mp(this, &EditorZoomWidget::_button_zoom_minus)); - zoom_minus->set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_minus", TTR("Zoom Out"), KEY_MASK_CMD | KEY_MINUS)); + zoom_minus->set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_minus", TTR("Zoom Out"), KeyModifierMask::CMD | Key::MINUS)); zoom_minus->set_shortcut_context(this); zoom_minus->set_focus_mode(FOCUS_NONE); @@ -180,7 +180,7 @@ EditorZoomWidget::EditorZoomWidget() { zoom_reset->add_theme_color_override("font_outline_color", Color(0, 0, 0)); zoom_reset->add_theme_color_override("font_color", Color(1, 1, 1)); zoom_reset->connect("pressed", callable_mp(this, &EditorZoomWidget::_button_zoom_reset)); - zoom_reset->set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_reset", TTR("Zoom Reset"), KEY_MASK_CMD | KEY_0)); + zoom_reset->set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_reset", TTR("Zoom Reset"), KeyModifierMask::CMD | Key::KEY_0)); zoom_reset->set_shortcut_context(this); zoom_reset->set_focus_mode(FOCUS_NONE); zoom_reset->set_text_align(Button::TextAlign::ALIGN_CENTER); @@ -191,7 +191,7 @@ EditorZoomWidget::EditorZoomWidget() { zoom_plus->set_flat(true); add_child(zoom_plus); zoom_plus->connect("pressed", callable_mp(this, &EditorZoomWidget::_button_zoom_plus)); - zoom_plus->set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_plus", TTR("Zoom In"), KEY_MASK_CMD | KEY_EQUAL)); // Usually direct access key for PLUS + zoom_plus->set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_plus", TTR("Zoom In"), KeyModifierMask::CMD | Key::EQUAL)); // Usually direct access key for PLUS zoom_plus->set_shortcut_context(this); zoom_plus->set_focus_mode(FOCUS_NONE); diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index f2a3aa3b44..1dde157527 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -2273,7 +2273,7 @@ void FileSystemDock::drop_data_fw(const Point2 &p_point, const Variant &p_data, } } if (!to_move.is_empty()) { - if (Input::get_singleton()->is_key_pressed(KEY_CTRL)) { + if (Input::get_singleton()->is_key_pressed(Key::CTRL)) { for (int i = 0; i < to_move.size(); i++) { String new_path; String new_path_base; @@ -2794,11 +2794,12 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { editor = p_editor; path = "res://"; - // `KEY_MASK_CMD | KEY_C` conflicts with other editor shortcuts. - ED_SHORTCUT("filesystem_dock/copy_path", TTR("Copy Path"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_C); - ED_SHORTCUT("filesystem_dock/duplicate", TTR("Duplicate..."), KEY_MASK_CMD | KEY_D); - ED_SHORTCUT("filesystem_dock/delete", TTR("Delete"), KEY_DELETE); - ED_SHORTCUT("filesystem_dock/rename", TTR("Rename..."), KEY_F2); + // `KeyModifierMask::CMD | Key::C` conflicts with other editor shortcuts. + ED_SHORTCUT("filesystem_dock/copy_path", TTR("Copy Path"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::C); + ED_SHORTCUT("filesystem_dock/duplicate", TTR("Duplicate..."), KeyModifierMask::CMD | Key::D); + ED_SHORTCUT("filesystem_dock/delete", TTR("Delete"), Key::KEY_DELETE); + ED_SHORTCUT("filesystem_dock/rename", TTR("Rename..."), Key::F2); + ED_SHORTCUT_OVERRIDE("filesystem_dock/rename", "macos", Key::ENTER); VBoxContainer *top_vbc = memnew(VBoxContainer); add_child(top_vbc); diff --git a/editor/icons/GradientTexture.svg b/editor/icons/GradientTexture1D.svg index fa03e69805..fa03e69805 100644 --- a/editor/icons/GradientTexture.svg +++ b/editor/icons/GradientTexture1D.svg diff --git a/editor/icons/InterpCubic.svg b/editor/icons/InterpCubic.svg index ad2ed51ee1..b542986ea6 100644 --- a/editor/icons/InterpCubic.svg +++ b/editor/icons/InterpCubic.svg @@ -1 +1 @@ -<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1050.4c3 0 3-4 6-4s3 4 6 4" fill="none" stroke="#e0e0e0" stroke-linecap="round" stroke-width="2" transform="translate(0 -1044.4)"/></svg> +<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1050.4c5 0 3-4 6-4s1 4 6 4" fill="none" stroke="#5fb2ff" stroke-linecap="round" stroke-width="2" transform="translate(0 -1044.4)"/></svg> diff --git a/editor/icons/InterpLinear.svg b/editor/icons/InterpLinear.svg index 241a82fc8f..966ddfdc31 100644 --- a/editor/icons/InterpLinear.svg +++ b/editor/icons/InterpLinear.svg @@ -1 +1 @@ -<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1050.4 6-4 6 4" fill="none" stroke="#e0e0e0" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" transform="translate(0 -1044.4)"/></svg> +<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1050.4 6-4 6 4" fill="none" stroke="#ffca5f" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" transform="translate(0 -1044.4)"/></svg> diff --git a/editor/icons/InterpWrapClamp.svg b/editor/icons/InterpWrapClamp.svg index 6ba8e78500..b589542019 100644 --- a/editor/icons/InterpWrapClamp.svg +++ b/editor/icons/InterpWrapClamp.svg @@ -1 +1 @@ -<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v6h2v-2.9863-3.0137zm2 3.0137a1.0001 1.0001 0 0 0 .29297.69336l2 2a1 1 0 0 0 1.4141 0 1 1 0 0 0 0-1.4141l-.29297-.29297h3.1719l-.29297.29297a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l2-2a1.0001 1.0001 0 0 0 .29297-.72266 1.0001 1.0001 0 0 0 -.29297-.69141l-2-2a1 1 0 0 0 -.7207-.29102 1 1 0 0 0 -.69336.29102 1 1 0 0 0 0 1.4141l.29297.29297h-3.1719l.29297-.29297a1 1 0 0 0 0-1.4141 1 1 0 0 0 -.7207-.29102 1 1 0 0 0 -.69336.29102l-2 2a1.0001 1.0001 0 0 0 -.29297.7207zm10-.029297v3.0156h2v-6h-2z" fill="#e0e0e0"/></svg> +<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v6h2v-2.9863-3.0137zm2 3.0137a1.0001 1.0001 0 0 0 .29297.69336l2 2a1 1 0 0 0 1.4141 0 1 1 0 0 0 0-1.4141l-.29297-.29297h3.1719l-.29297.29297a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l2-2a1.0001 1.0001 0 0 0 .29297-.72266 1.0001 1.0001 0 0 0 -.29297-.69141l-2-2a1 1 0 0 0 -.7207-.29102 1 1 0 0 0 -.69336.29102 1 1 0 0 0 0 1.4141l.29297.29297h-3.1719l.29297-.29297a1 1 0 0 0 0-1.4141 1 1 0 0 0 -.7207-.29102 1 1 0 0 0 -.69336.29102l-2 2a1.0001 1.0001 0 0 0 -.29297.7207zm10-.029297v3.0156h2v-6h-2z" fill="#fc7f7f"/></svg> diff --git a/editor/icons/InterpWrapLoop.svg b/editor/icons/InterpWrapLoop.svg index 57670f97ce..4faf7805f8 100644 --- a/editor/icons/InterpWrapLoop.svg +++ b/editor/icons/InterpWrapLoop.svg @@ -1 +1 @@ -<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m9 0-3 2 3 2v-1h3a1 1 0 0 1 1 1 1 1 0 0 1 -1 1v2a3 3 0 0 0 3-3 3 3 0 0 0 -3-3h-3zm-5 1a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h3v1l3-2-3-2v1h-3a1 1 0 0 1 -1-1 1 1 0 0 1 1-1z" fill="#e0e0e0"/></svg> +<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m9 0-3 2 3 2v-1h3a1 1 0 0 1 1 1 1 1 0 0 1 -1 1v2a3 3 0 0 0 3-3 3 3 0 0 0 -3-3h-3zm-5 1a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h3v1l3-2-3-2v1h-3a1 1 0 0 1 -1-1 1 1 0 0 1 1-1z" fill="#c38ef1"/></svg> diff --git a/editor/icons/KeyEasedSelected.svg b/editor/icons/KeyEasedSelected.svg new file mode 100644 index 0000000000..c06d94c553 --- /dev/null +++ b/editor/icons/KeyEasedSelected.svg @@ -0,0 +1 @@ +<svg height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg"><rect fill="#5fb2ff" height="9.999999" rx=".948002" stroke-width="1.2427" width="9.999999" x=".000001" y=".000035"/><rect fill="#003e7a" height="5.628136" rx=".533549" stroke-width=".699406" transform="matrix(.99989481 .01450427 .01450427 .99989481 0 0)" width="5.628136" x="2.115027" y="2.114924"/></svg> diff --git a/editor/icons/KeyValueEased.svg b/editor/icons/KeyValueEased.svg new file mode 100644 index 0000000000..4e4a33c006 --- /dev/null +++ b/editor/icons/KeyValueEased.svg @@ -0,0 +1 @@ +<svg height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg"><rect fill="#e0e0e0" height="8.000001" rx="1.000032" ry="1.00003" stroke-width="1.3109" transform="rotate(-90)" width="8.000016" x="-9.000016" y=".999999"/></svg> diff --git a/editor/icons/MirrorX.svg b/editor/icons/MirrorX.svg new file mode 100644 index 0000000000..fa668986ac --- /dev/null +++ b/editor/icons/MirrorX.svg @@ -0,0 +1 @@ +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="#e0e0e0" stroke-opacity=".99608" stroke-width="2" transform="translate(0 -1036.4)"><path d="m4 1042.4-2 2 2 2" stroke-linecap="round" stroke-linejoin="round"/><path d="m2 1044.4h11"/><path d="m12 1042.4 2 2-2 2" stroke-linecap="round" stroke-linejoin="round"/></g></svg> diff --git a/editor/icons/MirrorY.svg b/editor/icons/MirrorY.svg new file mode 100644 index 0000000000..bb4e4d3543 --- /dev/null +++ b/editor/icons/MirrorY.svg @@ -0,0 +1 @@ +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m11.012 1048.4a1.0001 1.0001 0 0 0 -1.7168-.6973l-.29297.293v-7.1719l.29297.293a1.0001 1.0001 0 0 0 1.7148-.7266 1.0001 1.0001 0 0 0 -.30078-.6875l-2-2a1.0001 1.0001 0 0 0 -1.4141 0l-2 2a1.0001 1.0001 0 1 0 1.4141 1.4141l.29297-.293v7.1719l-.29297-.293a1.0001 1.0001 0 1 0 -1.4141 1.4141l2 2a1.0001 1.0001 0 0 0 1.4141 0l2-2a1.0001 1.0001 0 0 0 .30273-.7168z" fill="#e0e0e0" fill-opacity=".99608" transform="translate(0 -1036.4)"/></svg> diff --git a/editor/icons/PingPongLoop.svg b/editor/icons/PingPongLoop.svg new file mode 100644 index 0000000000..c44f889b49 --- /dev/null +++ b/editor/icons/PingPongLoop.svg @@ -0,0 +1 @@ +<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".9961"><path d="m10 7h-4v-2l-4 3 4 3v-2h4v2l4-3-4-3z"/><path d="m0 1v14h2v-7-7z"/><path d="m14 1v7 7h2v-14z"/></g></svg> diff --git a/editor/icons/ReverseGradient.svg b/editor/icons/ReverseGradient.svg new file mode 100644 index 0000000000..12f80d12dd --- /dev/null +++ b/editor/icons/ReverseGradient.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8"?><svg version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><linearGradient id="b" x1=".26458" x2="3.9688" y1=".79375" y2=".79375" gradientTransform="scale(3.7795)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"/><stop stop-color="#ccc" stop-opacity="0" offset="1"/></linearGradient><linearGradient id="a" x1=".26458" x2="3.9688" y1="3.4396" y2="3.4396" gradientTransform="matrix(3.7795 0 0 3.7795 -16 -1.1865e-7)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"/><stop stop-color="#ccc" stop-opacity="0" offset="1"/></linearGradient></defs><g><rect x="1" y="1" width="14" height="4" ry="1" fill="url(#b)"/><rect transform="scale(-1,1)" x="-15" y="11" width="14" height="4" ry="1" fill="url(#a)" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.7795"/><path d="m6 6 2 4 2-4z" fill="#ccc"/></g></svg> diff --git a/editor/icons/RotateLeft.svg b/editor/icons/RotateLeft.svg new file mode 100644 index 0000000000..1200df1dde --- /dev/null +++ b/editor/icons/RotateLeft.svg @@ -0,0 +1 @@ +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".99608" transform="translate(0 -1036.4)"><path d="m9 2a6 6 0 0 0 -6 6h2a4 4 0 0 1 4-4 4 4 0 0 1 4 4 4 4 0 0 1 -4 4v2a6 6 0 0 0 6-6 6 6 0 0 0 -6-6z" transform="translate(0 1036.4)"/><path d="m4.118 1048.3-1.6771-.9683-1.6771-.9682 1.6771-.9683 1.6771-.9682-.0000001 1.9365z" transform="matrix(0 -1.1926 1.5492 0 -1617 1049.3)"/></g></svg> diff --git a/editor/icons/RotateRight.svg b/editor/icons/RotateRight.svg new file mode 100644 index 0000000000..d69e6a7705 --- /dev/null +++ b/editor/icons/RotateRight.svg @@ -0,0 +1 @@ +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".99608" transform="matrix(-1 0 0 1 16.026308 -1036.4)"><path d="m9 2a6 6 0 0 0 -6 6h2a4 4 0 0 1 4-4 4 4 0 0 1 4 4 4 4 0 0 1 -4 4v2a6 6 0 0 0 6-6 6 6 0 0 0 -6-6z" transform="translate(0 1036.4)"/><path d="m4.118 1048.3-1.6771-.9683-1.6771-.9682 1.6771-.9683 1.6771-.9682-.0000001 1.9365z" transform="matrix(0 -1.1926 1.5492 0 -1617 1049.3)"/></g></svg> diff --git a/editor/icons/ShapeCast2D.svg b/editor/icons/ShapeCast2D.svg new file mode 100644 index 0000000000..dcdba92f45 --- /dev/null +++ b/editor/icons/ShapeCast2D.svg @@ -0,0 +1 @@ +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#a5b7f3"><path d="m7 1v9h-3l4 5 4-5h-3v-9z"/><circle cx="7.990566" cy="4.8202" r="4.009434"/></g></svg> diff --git a/editor/icons/TrackCapture.svg b/editor/icons/TrackCapture.svg index aaa4a20e4a..b3d5f09eff 100644 --- a/editor/icons/TrackCapture.svg +++ b/editor/icons/TrackCapture.svg @@ -1 +1 @@ -<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0"><path d="m2.1665128.99764963c-.422625 0-.763672.34104737-.763672.76367187v4.5742187c0 .4226242.341047.7617192.763672.7617192h4.472656c.422625 0 .763672-.339095.763672-.7617192v-.9882812h-3.300781c-.1662 0-.298828-.3390943-.298828-.7617188v-1.2246094c0-.4226244.132628-.7636718.298828-.7636718h3.300781v-.8359375c0-.4226245-.341047-.76367187-.763672-.76367187z"/><path d="m9.1827441 4.7953408c.5166221-1.0415625 1.0955249-2.2117429 1.2864509-2.600401l.347137-.7066511.679654.00665.679654.00665.956945 2.3125c.526319 1.271875 1.007254 2.4334375 1.068744 2.5812497l.1118.26875h-.597215-.597214l-.332849-.6437497-.332849-.64375h-1.133826-1.133825l-.3786749.6561133-.3786747.6561134-.5922856.000137-.592285.000136zm3.1779349-.369483c.0042-.00346-.233487-.4884588-.528245-1.0777779l-.535922-1.0714891-.03691.0875c-.0203.048125-.183516.425-.362699.8375-.179182.4125-.355738.85125-.392346.975-.03661.12375-.07127.2390723-.07703.2562715-.0083.024853.188215.027989.957503.015278.532385-.0088.971429-.018823.975651-.022283z" stroke="#e0e0e0" stroke-width=".803"/></g></svg> +<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e1da5b"><path d="m2.1665128.99764963c-.422625 0-.763672.34104737-.763672.76367187v4.5742187c0 .4226242.341047.7617192.763672.7617192h4.472656c.422625 0 .763672-.339095.763672-.7617192v-.9882812h-3.300781c-.1662 0-.298828-.3390943-.298828-.7617188v-1.2246094c0-.4226244.132628-.7636718.298828-.7636718h3.300781v-.8359375c0-.4226245-.341047-.76367187-.763672-.76367187z"/><path d="m9.1827441 4.7953408c.5166221-1.0415625 1.0955249-2.2117429 1.2864509-2.600401l.347137-.7066511.679654.00665.679654.00665.956945 2.3125c.526319 1.271875 1.007254 2.4334375 1.068744 2.5812497l.1118.26875h-.597215-.597214l-.332849-.6437497-.332849-.64375h-1.133826-1.133825l-.3786749.6561133-.3786747.6561134-.5922856.000137-.592285.000136zm3.1779349-.369483c.0042-.00346-.233487-.4884588-.528245-1.0777779l-.535922-1.0714891-.03691.0875c-.0203.048125-.183516.425-.362699.8375-.179182.4125-.355738.85125-.392346.975-.03661.12375-.07127.2390723-.07703.2562715-.0083.024853.188215.027989.957503.015278.532385-.0088.971429-.018823.975651-.022283z" stroke="#e1da5b" stroke-width=".803"/></g></svg> diff --git a/editor/icons/TrackDiscrete.svg b/editor/icons/TrackDiscrete.svg index d1df4b1667..6498742233 100644 --- a/editor/icons/TrackDiscrete.svg +++ b/editor/icons/TrackDiscrete.svg @@ -1 +1 @@ -<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m14 1a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-6 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-6 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1z" fill="#e0e0e0"/></svg> +<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m14 1a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-6 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-6 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1z" fill="#b9ec41"/></svg> diff --git a/editor/icons/TrackTrigger.svg b/editor/icons/TrackTrigger.svg index 6e46a74121..c403fba59a 100644 --- a/editor/icons/TrackTrigger.svg +++ b/editor/icons/TrackTrigger.svg @@ -1 +1 @@ -<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v2h2v4h2v-4h2v-2zm13 0a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-3 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-3 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1z" fill="#e0e0e0"/></svg> +<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v2h2v4h2v-4h2v-2zm13 0a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-3 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-3 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1z" fill="#f68f45"/></svg> diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index f9aa550e7d..076c0cc62b 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -314,7 +314,7 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Node3D *p_parent) { xf = collada.fix_transform(xf) * p_node->post_transform; node->set_transform(xf); - p_parent->add_child(node); + p_parent->add_child(node, true); node->set_owner(scene); if (p_node->empty_draw_type != "") { @@ -1804,7 +1804,7 @@ Node *EditorSceneFormatImporterCollada::import_scene(const String &p_path, uint3 ap->add_animation(name, state.animations[i]); } - state.scene->add_child(ap); + state.scene->add_child(ap, true); ap->set_owner(state.scene); } diff --git a/editor/import/editor_import_plugin.cpp b/editor/import/editor_import_plugin.cpp index d219f6e325..1a002569c5 100644 --- a/editor/import/editor_import_plugin.cpp +++ b/editor/import/editor_import_plugin.cpp @@ -57,6 +57,7 @@ void EditorImportPlugin::get_recognized_extensions(List<String> *p_extensions) c for (int i = 0; i < extensions.size(); i++) { p_extensions->push_back(extensions[i]); } + return; } ERR_FAIL_MSG("Unimplemented _get_recognized_extensions in add-on."); } @@ -109,12 +110,12 @@ int EditorImportPlugin::get_import_order() const { ERR_FAIL_V_MSG(-1, "Unimplemented _get_import_order in add-on."); } -void EditorImportPlugin::get_import_options(List<ResourceImporter::ImportOption> *r_options, int p_preset) const { +void EditorImportPlugin::get_import_options(const String &p_path, List<ResourceImporter::ImportOption> *r_options, int p_preset) const { Array needed; needed.push_back("name"); needed.push_back("default_value"); Array options; - if (GDVIRTUAL_CALL(_get_import_options, p_preset, options)) { + if (GDVIRTUAL_CALL(_get_import_options, p_path, p_preset, options)) { for (int i = 0; i < options.size(); i++) { Dictionary d = options[i]; ERR_FAIL_COND(!d.has_all(needed)); @@ -139,12 +140,13 @@ void EditorImportPlugin::get_import_options(List<ResourceImporter::ImportOption> ImportOption option(PropertyInfo(default_value.get_type(), name, hint, hint_string, usage), default_value); r_options->push_back(option); } + return; } ERR_FAIL_MSG("Unimplemented _get_import_options in add-on."); } -bool EditorImportPlugin::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { +bool EditorImportPlugin::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { Dictionary d; Map<StringName, Variant>::Element *E = p_options.front(); while (E) { @@ -152,7 +154,7 @@ bool EditorImportPlugin::get_option_visibility(const String &p_option, const Map E = E->next(); } bool visible; - if (GDVIRTUAL_CALL(_get_option_visibility, p_option, d, visible)) { + if (GDVIRTUAL_CALL(_get_option_visibility, p_path, p_option, d, visible)) { return visible; } @@ -190,11 +192,11 @@ void EditorImportPlugin::_bind_methods() { GDVIRTUAL_BIND(_get_preset_count) GDVIRTUAL_BIND(_get_preset_name, "preset_index") GDVIRTUAL_BIND(_get_recognized_extensions) - GDVIRTUAL_BIND(_get_import_options, "preset_index") + GDVIRTUAL_BIND(_get_import_options, "path", "preset_index") GDVIRTUAL_BIND(_get_save_extension) GDVIRTUAL_BIND(_get_resource_type) GDVIRTUAL_BIND(_get_priority) GDVIRTUAL_BIND(_get_import_order) - GDVIRTUAL_BIND(_get_option_visibility, "option_name", "options") + GDVIRTUAL_BIND(_get_option_visibility, "path", "option_name", "options") GDVIRTUAL_BIND(_import, "source_file", "save_path", "options", "platform_variants", "gen_files"); } diff --git a/editor/import/editor_import_plugin.h b/editor/import/editor_import_plugin.h index 49c959ab44..6c5f4f6005 100644 --- a/editor/import/editor_import_plugin.h +++ b/editor/import/editor_import_plugin.h @@ -44,12 +44,12 @@ protected: GDVIRTUAL0RC(int, _get_preset_count) GDVIRTUAL1RC(String, _get_preset_name, int) GDVIRTUAL0RC(Vector<String>, _get_recognized_extensions) - GDVIRTUAL1RC(Array, _get_import_options, int) + GDVIRTUAL2RC(Array, _get_import_options, String, int) GDVIRTUAL0RC(String, _get_save_extension) GDVIRTUAL0RC(String, _get_resource_type) GDVIRTUAL0RC(float, _get_priority) GDVIRTUAL0RC(int, _get_import_order) - GDVIRTUAL2RC(bool, _get_option_visibility, StringName, Dictionary) + GDVIRTUAL3RC(bool, _get_option_visibility, String, StringName, Dictionary) GDVIRTUAL5RC(int, _import, String, String, Dictionary, Array, Array) public: @@ -63,8 +63,8 @@ public: virtual String get_resource_type() const override; virtual float get_priority() const override; virtual int get_import_order() const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset) const override; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; 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, Variant *r_metadata = nullptr) override; }; diff --git a/editor/import/resource_importer_bitmask.cpp b/editor/import/resource_importer_bitmask.cpp index 7fd9230284..c43052593d 100644 --- a/editor/import/resource_importer_bitmask.cpp +++ b/editor/import/resource_importer_bitmask.cpp @@ -57,7 +57,7 @@ String ResourceImporterBitMap::get_resource_type() const { return "BitMap"; } -bool ResourceImporterBitMap::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterBitMap::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { return true; } @@ -69,7 +69,7 @@ String ResourceImporterBitMap::get_preset_name(int p_idx) const { return String(); } -void ResourceImporterBitMap::get_import_options(List<ImportOption> *r_options, int p_preset) const { +void ResourceImporterBitMap::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const { r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "create_from", PROPERTY_HINT_ENUM, "Black & White,Alpha"), 0)); r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "threshold", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.5)); } diff --git a/editor/import/resource_importer_bitmask.h b/editor/import/resource_importer_bitmask.h index d68693c54a..f3da5f9a31 100644 --- a/editor/import/resource_importer_bitmask.h +++ b/editor/import/resource_importer_bitmask.h @@ -49,8 +49,8 @@ public: virtual int get_preset_count() const override; virtual String get_preset_name(int p_idx) const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; 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; ResourceImporterBitMap(); diff --git a/editor/import/resource_importer_bmfont.cpp b/editor/import/resource_importer_bmfont.cpp index 2e7ef1402b..f54065416e 100644 --- a/editor/import/resource_importer_bmfont.cpp +++ b/editor/import/resource_importer_bmfont.cpp @@ -56,11 +56,11 @@ String ResourceImporterBMFont::get_resource_type() const { return "FontData"; } -bool ResourceImporterBMFont::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterBMFont::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { return true; } -void ResourceImporterBMFont::get_import_options(List<ImportOption> *r_options, int p_preset) const { +void ResourceImporterBMFont::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const { r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "compress"), true)); } @@ -359,6 +359,8 @@ Error ResourceImporterBMFont::import(const String &p_source_file, const String & int height = 0; int ascent = 0; int outline = 0; + uint32_t st_flags = 0; + String font_name; bool packed = false; uint8_t ch[4] = { 0, 0, 0, 0 }; // RGBA @@ -382,13 +384,23 @@ Error ResourceImporterBMFont::import(const String &p_source_file, const String & base_size = f->get_16(); uint8_t flags = f->get_8(); ERR_FAIL_COND_V_MSG(flags & 0x02, ERR_CANT_CREATE, TTR("Non-unicode version of BMFont is not supported.")); + if (flags & (1 << 3)) { + st_flags |= TextServer::FONT_BOLD; + } + if (flags & (1 << 2)) { + st_flags |= TextServer::FONT_ITALIC; + } f->get_8(); // non-unicode charset, skip f->get_16(); // stretch_h, skip f->get_8(); // aa, skip f->get_32(); // padding, skip f->get_16(); // spacing, skip outline = f->get_8(); - // font name, skip + // font name + PackedByteArray name_data; + name_data.resize(block_size - 14); + f->get_buffer(name_data.ptrw(), block_size - 14); + font_name = String::utf8((const char *)name_data.ptr(), block_size - 14); font->set_fixed_size(base_size); } break; case 2: /* common */ { @@ -601,6 +613,19 @@ Error ResourceImporterBMFont::import(const String &p_source_file, const String & if (keys.has("outline")) { outline = keys["outline"].to_int(); } + if (keys.has("bold")) { + if (keys["bold"].to_int()) { + st_flags |= TextServer::FONT_BOLD; + } + } + if (keys.has("italic")) { + if (keys["italic"].to_int()) { + st_flags |= TextServer::FONT_ITALIC; + } + } + if (keys.has("face")) { + font_name = keys["face"]; + } ERR_FAIL_COND_V_MSG((!keys.has("unicode") || keys["unicode"].to_int() != 1), ERR_CANT_CREATE, TTR("Non-unicode version of BMFont is not supported.")); } else if (type == "common") { if (keys.has("lineHeight")) { @@ -778,6 +803,8 @@ Error ResourceImporterBMFont::import(const String &p_source_file, const String & } } + font->set_font_name(font_name); + font->set_font_style(st_flags); font->set_ascent(0, base_size, ascent); font->set_descent(0, base_size, height - ascent); diff --git a/editor/import/resource_importer_bmfont.h b/editor/import/resource_importer_bmfont.h index 065703132a..64d536535c 100644 --- a/editor/import/resource_importer_bmfont.h +++ b/editor/import/resource_importer_bmfont.h @@ -45,8 +45,8 @@ public: virtual String get_save_extension() const override; virtual String get_resource_type() const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; 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; diff --git a/editor/import/resource_importer_csv_translation.cpp b/editor/import/resource_importer_csv_translation.cpp index 07647d8b6a..7948d9e577 100644 --- a/editor/import/resource_importer_csv_translation.cpp +++ b/editor/import/resource_importer_csv_translation.cpp @@ -55,7 +55,7 @@ String ResourceImporterCSVTranslation::get_resource_type() const { return "Translation"; } -bool ResourceImporterCSVTranslation::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterCSVTranslation::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { return true; } @@ -67,7 +67,7 @@ String ResourceImporterCSVTranslation::get_preset_name(int p_idx) const { return ""; } -void ResourceImporterCSVTranslation::get_import_options(List<ImportOption> *r_options, int p_preset) const { +void ResourceImporterCSVTranslation::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const { r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "compress"), true)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "delimiter", PROPERTY_HINT_ENUM, "Comma,Semicolon,Tab"), 0)); } diff --git a/editor/import/resource_importer_csv_translation.h b/editor/import/resource_importer_csv_translation.h index d53e91e38b..de7ba3e3a0 100644 --- a/editor/import/resource_importer_csv_translation.h +++ b/editor/import/resource_importer_csv_translation.h @@ -46,8 +46,8 @@ public: virtual int get_preset_count() const override; virtual String get_preset_name(int p_idx) const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; 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; diff --git a/editor/import/resource_importer_dynamicfont.cpp b/editor/import/resource_importer_dynamicfont.cpp index 8e01adbd56..f7363a565d 100644 --- a/editor/import/resource_importer_dynamicfont.cpp +++ b/editor/import/resource_importer_dynamicfont.cpp @@ -30,12 +30,12 @@ #include "resource_importer_dynamicfont.h" -#include "dynamicfont_import_settings.h" - #include "core/io/file_access.h" #include "core/io/resource_saver.h" +#include "dynamicfont_import_settings.h" #include "editor/editor_node.h" -#include "modules/modules_enabled.gen.h" + +#include "modules/modules_enabled.gen.h" // For freetype. String ResourceImporterDynamicFont::get_importer_name() const { return "font_data_dynamic"; @@ -66,7 +66,7 @@ String ResourceImporterDynamicFont::get_resource_type() const { return "FontData"; } -bool ResourceImporterDynamicFont::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterDynamicFont::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { if (p_option == "msdf_pixel_range" && !bool(p_options["multichannel_signed_distance_field"])) { return false; } @@ -94,7 +94,7 @@ String ResourceImporterDynamicFont::get_preset_name(int p_idx) const { } } -void ResourceImporterDynamicFont::get_import_options(List<ImportOption> *r_options, int p_preset) const { +void ResourceImporterDynamicFont::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const { bool msdf = p_preset == PRESET_MSDF; r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "antialiased"), true)); diff --git a/editor/import/resource_importer_dynamicfont.h b/editor/import/resource_importer_dynamicfont.h index 52f256ab96..cb5294b9dd 100644 --- a/editor/import/resource_importer_dynamicfont.h +++ b/editor/import/resource_importer_dynamicfont.h @@ -57,8 +57,8 @@ public: virtual int get_preset_count() const override; virtual String get_preset_name(int p_idx) const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; bool has_advanced_options() const override; void show_advanced_options(const String &p_path) override; diff --git a/editor/import/resource_importer_image.cpp b/editor/import/resource_importer_image.cpp index 2dea359188..45cb5e2f9d 100644 --- a/editor/import/resource_importer_image.cpp +++ b/editor/import/resource_importer_image.cpp @@ -55,7 +55,7 @@ String ResourceImporterImage::get_resource_type() const { return "Image"; } -bool ResourceImporterImage::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterImage::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { return true; } @@ -67,7 +67,7 @@ String ResourceImporterImage::get_preset_name(int p_idx) const { return String(); } -void ResourceImporterImage::get_import_options(List<ImportOption> *r_options, int p_preset) const { +void ResourceImporterImage::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const { } Error ResourceImporterImage::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) { diff --git a/editor/import/resource_importer_image.h b/editor/import/resource_importer_image.h index 7c8d5e228e..b7131ec850 100644 --- a/editor/import/resource_importer_image.h +++ b/editor/import/resource_importer_image.h @@ -47,8 +47,8 @@ public: virtual int get_preset_count() const override; virtual String get_preset_name(int p_idx) const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; 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; diff --git a/editor/import/resource_importer_imagefont.cpp b/editor/import/resource_importer_imagefont.cpp index 997280d1dd..04a68e4a53 100644 --- a/editor/import/resource_importer_imagefont.cpp +++ b/editor/import/resource_importer_imagefont.cpp @@ -55,11 +55,11 @@ String ResourceImporterImageFont::get_resource_type() const { return "FontData"; } -bool ResourceImporterImageFont::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterImageFont::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { return true; } -void ResourceImporterImageFont::get_import_options(List<ImportOption> *r_options, int p_preset) const { +void ResourceImporterImageFont::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const { r_options->push_back(ImportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "character_ranges"), Vector<String>())); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "columns"), 1)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "rows"), 1)); diff --git a/editor/import/resource_importer_imagefont.h b/editor/import/resource_importer_imagefont.h index 9b2b38596f..d600c35e1c 100644 --- a/editor/import/resource_importer_imagefont.h +++ b/editor/import/resource_importer_imagefont.h @@ -47,8 +47,8 @@ public: virtual String get_save_extension() const override; virtual String get_resource_type() const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; 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; diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cpp index d5bb21443c..89c62ab5cb 100644 --- a/editor/import/resource_importer_layered_texture.cpp +++ b/editor/import/resource_importer_layered_texture.cpp @@ -118,7 +118,7 @@ String ResourceImporterLayeredTexture::get_resource_type() const { ERR_FAIL_V(String()); } -bool ResourceImporterLayeredTexture::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterLayeredTexture::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { if (p_option == "compress/lossy_quality" && p_options.has("compress/mode")) { return int(p_options["compress/mode"]) == COMPRESS_LOSSY; } @@ -133,7 +133,7 @@ String ResourceImporterLayeredTexture::get_preset_name(int p_idx) const { return ""; } -void ResourceImporterLayeredTexture::get_import_options(List<ImportOption> *r_options, int p_preset) const { +void ResourceImporterLayeredTexture::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const { r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/mode", PROPERTY_HINT_ENUM, "Lossless (PNG),Lossy (WebP),Video RAM (S3TC/ETC/BPTC),Uncompressed,Basis Universal", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 1)); r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "compress/lossy_quality", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.7)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/hdr_compression", PROPERTY_HINT_ENUM, "Disabled,Opaque Only,Always"), 1)); diff --git a/editor/import/resource_importer_layered_texture.h b/editor/import/resource_importer_layered_texture.h index 7d8fb3cac5..29dfe7263a 100644 --- a/editor/import/resource_importer_layered_texture.h +++ b/editor/import/resource_importer_layered_texture.h @@ -84,8 +84,8 @@ public: virtual int get_preset_count() const override; virtual String get_preset_name(int p_idx) const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; void _save_tex(Vector<Ref<Image>> p_images, const String &p_to_path, int p_compress_mode, float p_lossy, Image::CompressMode p_vram_compression, Image::CompressSource p_csource, Image::UsedChannels used_channels, bool p_mipmaps, bool p_force_po2); diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp index 4f75faedcb..bb68de99b1 100644 --- a/editor/import/resource_importer_obj.cpp +++ b/editor/import/resource_importer_obj.cpp @@ -405,11 +405,11 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_ current_material_library = l.replace("mtllib", "").strip_edges(); if (!material_map.has(current_material_library)) { Map<String, Ref<StandardMaterial3D>> lib; - Error err = _parse_material_library(current_material_library, lib, r_missing_deps); - if (err == ERR_CANT_OPEN) { - String dir = p_path.get_base_dir(); - err = _parse_material_library(dir.plus_file(current_material_library), lib, r_missing_deps); + String lib_path = current_material_library; + if (lib_path.is_relative_path()) { + lib_path = p_path.get_base_dir().plus_file(current_material_library); } + Error err = _parse_material_library(lib_path, lib, r_missing_deps); if (err == OK) { material_map[current_material_library] = lib; } @@ -448,7 +448,7 @@ Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, in ImporterMeshInstance3D *mi = memnew(ImporterMeshInstance3D); mi->set_mesh(mesh); mi->set_name(m->get_name()); - scene->add_child(mi); + scene->add_child(mi, true); mi->set_owner(scene); } @@ -504,14 +504,14 @@ String ResourceImporterOBJ::get_preset_name(int p_idx) const { return ""; } -void ResourceImporterOBJ::get_import_options(List<ImportOption> *r_options, int p_preset) const { +void ResourceImporterOBJ::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const { r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "generate_tangents"), true)); r_options->push_back(ImportOption(PropertyInfo(Variant::VECTOR3, "scale_mesh"), Vector3(1, 1, 1))); r_options->push_back(ImportOption(PropertyInfo(Variant::VECTOR3, "offset_mesh"), Vector3(0, 0, 0))); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "optimize_mesh"), true)); } -bool ResourceImporterOBJ::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterOBJ::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { return true; } diff --git a/editor/import/resource_importer_obj.h b/editor/import/resource_importer_obj.h index d9f2f79903..c3e46b6eb5 100644 --- a/editor/import/resource_importer_obj.h +++ b/editor/import/resource_importer_obj.h @@ -59,8 +59,8 @@ public: virtual int get_preset_count() const override; virtual String get_preset_name(int p_idx) const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; 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; diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index 7d3b945b04..ab3479b7ce 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -91,6 +91,16 @@ Ref<Animation> EditorSceneFormatImporter::import_animation(const String &p_path, ERR_FAIL_V(nullptr); } +void EditorSceneFormatImporter::get_import_options(const String &p_path, List<ResourceImporter::ImportOption> *r_options) { + GDVIRTUAL_CALL(_get_import_options, p_path); +} + +Variant EditorSceneFormatImporter::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) { + Variant ret; + GDVIRTUAL_CALL(_get_option_visibility, p_path, p_option, ret); + return ret; +} + //for documenters, these functions are useful when an importer calls an external conversion helper (like, fbx2gltf), //and you want to load the resulting file @@ -110,6 +120,8 @@ void EditorSceneFormatImporter::_bind_methods() { GDVIRTUAL_BIND(_get_extensions); GDVIRTUAL_BIND(_import_scene, "path", "flags", "bake_fps"); GDVIRTUAL_BIND(_import_animation, "path", "flags", "bake_fps"); + GDVIRTUAL_BIND(_get_import_options, "path"); + GDVIRTUAL_BIND(_get_option_visibility, "path", "option"); BIND_CONSTANT(IMPORT_SCENE); BIND_CONSTANT(IMPORT_ANIMATION); @@ -193,15 +205,15 @@ void EditorScenePostImportPlugin::internal_process(InternalImportCategory p_cate current_options_dict = nullptr; } -void EditorScenePostImportPlugin::get_import_options(List<ResourceImporter::ImportOption> *r_options) { +void EditorScenePostImportPlugin::get_import_options(const String &p_path, List<ResourceImporter::ImportOption> *r_options) { current_option_list = r_options; - GDVIRTUAL_CALL(_get_import_options); + GDVIRTUAL_CALL(_get_import_options, p_path); current_option_list = nullptr; } -Variant EditorScenePostImportPlugin::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { +Variant EditorScenePostImportPlugin::get_option_visibility(const String &p_path, 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); + GDVIRTUAL_CALL(_get_option_visibility, p_path, p_option, ret); current_options = nullptr; return ret; } @@ -227,8 +239,8 @@ void EditorScenePostImportPlugin::_bind_methods() { 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(_get_import_options, "path"); + GDVIRTUAL_BIND(_get_option_visibility, "path", "option"); GDVIRTUAL_BIND(_pre_process, "scene"); GDVIRTUAL_BIND(_post_process, "scene"); @@ -269,7 +281,7 @@ int ResourceImporterScene::get_format_version() const { return 1; } -bool ResourceImporterScene::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterScene::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { if (p_option.begins_with("animation/")) { if (p_option != "animation/import" && !bool(p_options["animation/import"])) { return false; @@ -281,7 +293,14 @@ bool ResourceImporterScene::get_option_visibility(const String &p_option, const } for (int i = 0; i < post_importer_plugins.size(); i++) { - Variant ret = post_importer_plugins.write[i]->get_option_visibility(p_option, p_options); + Variant ret = post_importer_plugins.write[i]->get_option_visibility(p_path, p_option, p_options); + if (ret.get_type() == Variant::BOOL) { + return ret; + } + } + + for (Ref<EditorSceneFormatImporter> importer : importers) { + Variant ret = importer->get_option_visibility(p_path, p_option, p_options); if (ret.get_type() == Variant::BOOL) { return ret; } @@ -424,10 +443,10 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I String animname = E; const int loop_string_count = 3; - static const char *loop_strings[loop_string_count] = { "loops", "loop", "cycle" }; + static const char *loop_strings[loop_string_count] = { "loop_mode", "loop", "cycle" }; for (int i = 0; i < loop_string_count; i++) { if (_teststr(animname, loop_strings[i])) { - anim->set_loop(true); + anim->set_loop_mode(Animation::LoopMode::LOOP_LINEAR); animname = _fixstr(animname, loop_strings[i]); ap->rename_animation(E, animname); } @@ -502,7 +521,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I sphereShape->set_radius(1); colshape->set_shape(sphereShape); } - sb->add_child(colshape); + sb->add_child(colshape, true); colshape->set_owner(sb->get_owner()); } @@ -528,7 +547,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I rigid_body->set_transform(mi->get_transform()); p_node = rigid_body; mi->set_transform(Transform3D()); - rigid_body->add_child(mi); + rigid_body->add_child(mi, true); mi->set_owner(rigid_body->get_owner()); _add_shapes(rigid_body, shapes); @@ -566,7 +585,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I if (shapes.size()) { StaticBody3D *col = memnew(StaticBody3D); - mi->add_child(col); + mi->add_child(col, true); col->set_owner(mi->get_owner()); _add_shapes(col, shapes); @@ -614,7 +633,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I if (shapes.size()) { StaticBody3D *col = memnew(StaticBody3D); - p_node->add_child(col); + p_node->add_child(col, true); col->set_owner(p_node->get_owner()); _add_shapes(col, shapes); @@ -749,7 +768,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< switch (mesh_physics_mode) { case MESH_PHYSICS_MESH_AND_STATIC_COLLIDER: { StaticBody3D *col = memnew(StaticBody3D); - p_node->add_child(col); + p_node->add_child(col, true); col->set_owner(p_node->get_owner()); col->set_transform(get_collision_shapes_transform(node_settings)); base = col; @@ -761,7 +780,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< rigid_body->set_transform(mi->get_transform() * get_collision_shapes_transform(node_settings)); p_node = rigid_body; mi->set_transform(Transform3D()); - rigid_body->add_child(mi); + rigid_body->add_child(mi, true); mi->set_owner(rigid_body->get_owner()); base = rigid_body; } break; @@ -790,7 +809,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< for (const Ref<Shape3D> &E : shapes) { CollisionShape3D *cshape = memnew(CollisionShape3D); cshape->set_shape(E); - base->add_child(cshape); + base->add_child(cshape, true); cshape->set_owner(base->get_owner()); idx++; @@ -823,7 +842,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< memdelete(p_node); p_node = nmi; } else { - mi->add_child(nmi); + mi->add_child(nmi, true); nmi->set_owner(mi->get_owner()); } } @@ -868,7 +887,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< String name = node_settings["clip_" + itos(i + 1) + "/name"]; int from_frame = node_settings["clip_" + itos(i + 1) + "/start_frame"]; int end_frame = node_settings["clip_" + itos(i + 1) + "/end_frame"]; - bool loop = node_settings["clip_" + itos(i + 1) + "/loops"]; + Animation::LoopMode loop_mode = static_cast<Animation::LoopMode>((int)node_settings["clip_" + itos(i + 1) + "/loop_mode"]); bool save_to_file = node_settings["clip_" + itos(i + 1) + "/save_to_file/enabled"]; bool save_to_path = node_settings["clip_" + itos(i + 1) + "/save_to_file/path"]; bool save_to_file_keep_custom = node_settings["clip_" + itos(i + 1) + "/save_to_file/keep_custom_tracks"]; @@ -876,7 +895,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< animation_clips.push_back(name); animation_clips.push_back(from_frame / p_animation_fps); animation_clips.push_back(end_frame / p_animation_fps); - animation_clips.push_back(loop); + animation_clips.push_back(loop_mode); animation_clips.push_back(save_to_file); animation_clips.push_back(save_to_path); animation_clips.push_back(save_to_file_keep_custom); @@ -903,7 +922,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< } } - anim->set_loop(anim_settings["settings/loops"]); + anim->set_loop_mode(static_cast<Animation::LoopMode>((int)anim_settings["settings/loop_mode"])); bool save = anim_settings["save_to_file/enabled"]; String path = anim_settings["save_to_file/path"]; bool keep_custom = anim_settings["save_to_file/keep_custom_tracks"]; @@ -977,7 +996,7 @@ Ref<Animation> ResourceImporterScene::_save_animation_to_file(Ref<Animation> ani old_anim->copy_track(i, anim); } } - anim->set_loop(old_anim->has_loop()); + anim->set_loop_mode(old_anim->get_loop_mode()); } } @@ -1005,7 +1024,7 @@ void ResourceImporterScene::_create_clips(AnimationPlayer *anim, const Array &p_ String name = p_clips[i]; float from = p_clips[i + 1]; float to = p_clips[i + 2]; - bool loop = p_clips[i + 3]; + Animation::LoopMode loop_mode = static_cast<Animation::LoopMode>((int)p_clips[i + 3]); bool save_to_file = p_clips[i + 4]; String save_to_path = p_clips[i + 5]; bool keep_current = p_clips[i + 6]; @@ -1135,7 +1154,7 @@ void ResourceImporterScene::_create_clips(AnimationPlayer *anim, const Array &p_ } } - new_anim->set_loop(loop); + new_anim->set_loop_mode(loop_mode); new_anim->set_length(to - from); anim->add_animation(name, new_anim); @@ -1218,7 +1237,7 @@ void ResourceImporterScene::get_internal_import_options(InternalImportCategory p r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "use_external/path", PROPERTY_HINT_FILE, "*.material,*.res,*.tres"), "")); } break; case INTERNAL_IMPORT_CATEGORY_ANIMATION: { - r_options->push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::BOOL, "settings/loops"), false)); + r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "settings/loop_mode"), 0)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "save_to_file/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false)); r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "save_to_file/path", PROPERTY_HINT_SAVE_FILE, "*.res,*.tres"), "")); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "save_to_file/keep_custom_tracks"), "")); @@ -1240,7 +1259,7 @@ void ResourceImporterScene::get_internal_import_options(InternalImportCategory p r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "slice_" + itos(i + 1) + "/name"), "")); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slice_" + itos(i + 1) + "/start_frame"), 0)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slice_" + itos(i + 1) + "/end_frame"), 0)); - r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "slice_" + itos(i + 1) + "/loops"), false)); + r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slice_" + itos(i + 1) + "/loop_mode"), 0)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "slice_" + itos(i + 1) + "/save_to_file/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false)); r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "slice_" + itos(i + 1) + "/save_to_file/path", PROPERTY_HINT_SAVE_FILE, ".res,*.tres"), "")); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "slice_" + itos(i + 1) + "/save_to_file/keep_custom_tracks"), false)); @@ -1404,7 +1423,7 @@ bool ResourceImporterScene::get_internal_option_update_view_required(InternalImp return false; } -void ResourceImporterScene::get_import_options(List<ImportOption> *r_options, int p_preset) const { +void ResourceImporterScene::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const { r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "nodes/root_type", PROPERTY_HINT_TYPE_STRING, "Node"), "Node3D")); r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "nodes/root_name"), "Scene Root")); @@ -1428,13 +1447,17 @@ void ResourceImporterScene::get_import_options(List<ImportOption> *r_options, in r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "meshes/lightmap_texel_size", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 0.1)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "skins/use_named_skins"), true)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/import"), true)); - r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "animation/fps", PROPERTY_HINT_RANGE, "1,120,1"), 15)); + r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "animation/fps", PROPERTY_HINT_RANGE, "1,120,1"), 30)); r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "import_script/path", PROPERTY_HINT_FILE, script_ext_hint), "")); - r_options->push_back(ImportOption(PropertyInfo(Variant::DICTIONARY, "_subresources", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), Dictionary())); + r_options->push_back(ImportOption(PropertyInfo(Variant::DICTIONARY, "_subresources", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), Dictionary())); for (int i = 0; i < post_importer_plugins.size(); i++) { - post_importer_plugins.write[i]->get_import_options(r_options); + post_importer_plugins.write[i]->get_import_options(p_path, r_options); + } + + for (Ref<EditorSceneFormatImporter> importer : importers) { + importer->get_import_options(p_path, r_options); } } @@ -1462,7 +1485,7 @@ Node *ResourceImporterScene::import_scene_from_other_importer(EditorSceneFormatI for (const String &F : extensions) { if (F.to_lower() == ext) { - importer = E; + importer = E->get(); break; } } @@ -1492,7 +1515,7 @@ Ref<Animation> ResourceImporterScene::import_animation_from_other_importer(Edito for (const String &F : extensions) { if (F.to_lower() == ext) { - importer = E; + importer = E->get(); break; } } @@ -1680,7 +1703,7 @@ void ResourceImporterScene::_add_shapes(Node *p_node, const Vector<Ref<Shape3D>> for (const Ref<Shape3D> &E : p_shapes) { CollisionShape3D *cshape = memnew(CollisionShape3D); cshape->set_shape(E); - p_node->add_child(cshape); + p_node->add_child(cshape, true); cshape->set_owner(p_node->get_owner()); } diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h index a192921966..5437ecd159 100644 --- a/editor/import/resource_importer_scene.h +++ b/editor/import/resource_importer_scene.h @@ -55,6 +55,8 @@ protected: GDVIRTUAL0RC(Vector<String>, _get_extensions) GDVIRTUAL3R(Object *, _import_scene, String, uint32_t, uint32_t) GDVIRTUAL3R(Ref<Animation>, _import_animation, String, uint32_t, uint32_t) + GDVIRTUAL1(_get_import_options, String) + GDVIRTUAL2RC(Variant, _get_option_visibility, String, String) public: enum ImportFlags { @@ -69,6 +71,8 @@ public: virtual void get_extensions(List<String> *r_extensions) const; 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); + virtual void get_import_options(const String &p_path, List<ResourceImporter::ImportOption> *r_options); + virtual Variant get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options); EditorSceneFormatImporter() {} }; @@ -115,8 +119,8 @@ protected: 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(_get_import_options, String) + GDVIRTUAL2RC(Variant, _get_option_visibility, String, String) GDVIRTUAL1(_pre_process, Node *) GDVIRTUAL1(_post_process, Node *) @@ -133,8 +137,8 @@ public: 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 get_import_options(const String &p_path, List<ResourceImporter::ImportOption> *r_options); + virtual Variant get_option_visibility(const String &p_path, 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); @@ -250,8 +254,8 @@ public: bool get_internal_option_visibility(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const; bool get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; // Import scenes *after* everything else (such as textures). virtual int get_import_order() const override { return ResourceImporter::IMPORT_ORDER_SCENE; } diff --git a/editor/import/resource_importer_shader_file.cpp b/editor/import/resource_importer_shader_file.cpp index c01d8068da..797e11f5ea 100644 --- a/editor/import/resource_importer_shader_file.cpp +++ b/editor/import/resource_importer_shader_file.cpp @@ -65,10 +65,10 @@ String ResourceImporterShaderFile::get_preset_name(int p_idx) const { return String(); } -void ResourceImporterShaderFile::get_import_options(List<ImportOption> *r_options, int p_preset) const { +void ResourceImporterShaderFile::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const { } -bool ResourceImporterShaderFile::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterShaderFile::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { return true; } diff --git a/editor/import/resource_importer_shader_file.h b/editor/import/resource_importer_shader_file.h index c421132ec2..3ed489e9fb 100644 --- a/editor/import/resource_importer_shader_file.h +++ b/editor/import/resource_importer_shader_file.h @@ -46,8 +46,8 @@ public: virtual int get_preset_count() const override; virtual String get_preset_name(int p_idx) const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; 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; diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp index 96a53b3257..b1fa2eda28 100644 --- a/editor/import/resource_importer_texture.cpp +++ b/editor/import/resource_importer_texture.cpp @@ -153,7 +153,7 @@ String ResourceImporterTexture::get_resource_type() const { return "StreamTexture2D"; } -bool ResourceImporterTexture::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterTexture::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { if (p_option == "compress/lossy_quality") { int compress_mode = int(p_options["compress/mode"]); if (compress_mode != COMPRESS_LOSSY && compress_mode != COMPRESS_VRAM_COMPRESSED) { @@ -194,7 +194,7 @@ String ResourceImporterTexture::get_preset_name(int p_idx) const { return preset_names[p_idx]; } -void ResourceImporterTexture::get_import_options(List<ImportOption> *r_options, int p_preset) const { +void ResourceImporterTexture::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const { r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/mode", PROPERTY_HINT_ENUM, "Lossless,Lossy,VRAM Compressed,VRAM Uncompressed,Basis Universal", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), p_preset == PRESET_3D ? 2 : 0)); r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "compress/lossy_quality", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.7)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/hdr_compression", PROPERTY_HINT_ENUM, "Disabled,Opaque Only,Always"), 1)); @@ -218,7 +218,8 @@ void ResourceImporterTexture::get_import_options(List<ImportOption> *r_options, void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image> &p_image, CompressMode p_compress_mode, Image::UsedChannels p_channels, Image::CompressMode p_compress_format, float p_lossy_quality) { switch (p_compress_mode) { case COMPRESS_LOSSLESS: { - bool lossless_force_png = ProjectSettings::get_singleton()->get("rendering/textures/lossless_compression/force_png"); + bool lossless_force_png = ProjectSettings::get_singleton()->get("rendering/textures/lossless_compression/force_png") || + !Image::_webp_mem_loader_func; // WebP module disabled. bool use_webp = !lossless_force_png && p_image->get_width() <= 16383 && p_image->get_height() <= 16383; // WebP has a size limit f->store_32(use_webp ? StreamTexture2D::DATA_FORMAT_WEBP : StreamTexture2D::DATA_FORMAT_PNG); f->store_16(p_image->get_width()); diff --git a/editor/import/resource_importer_texture.h b/editor/import/resource_importer_texture.h index 41220009cd..cb9d1b08cd 100644 --- a/editor/import/resource_importer_texture.h +++ b/editor/import/resource_importer_texture.h @@ -95,8 +95,8 @@ public: virtual int get_preset_count() const override; virtual String get_preset_name(int p_idx) const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; 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; diff --git a/editor/import/resource_importer_texture_atlas.cpp b/editor/import/resource_importer_texture_atlas.cpp index cf699599ae..3fdf5dd9db 100644 --- a/editor/import/resource_importer_texture_atlas.cpp +++ b/editor/import/resource_importer_texture_atlas.cpp @@ -59,7 +59,7 @@ String ResourceImporterTextureAtlas::get_resource_type() const { return "Texture2D"; } -bool ResourceImporterTextureAtlas::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterTextureAtlas::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { return true; } @@ -71,7 +71,7 @@ String ResourceImporterTextureAtlas::get_preset_name(int p_idx) const { return String(); } -void ResourceImporterTextureAtlas::get_import_options(List<ImportOption> *r_options, int p_preset) const { +void ResourceImporterTextureAtlas::get_import_options(const String &p_path, 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)); @@ -134,7 +134,7 @@ static void _plot_triangle(Vector2i *vertices, const Vector2i &p_offset, bool p_ int max_y = MIN(y[2], height - p_offset.y - 1); for (int yi = y[0]; yi < max_y; yi++) { if (yi >= 0) { - for (int xi = (xf > 0 ? int(xf) : 0); xi < (xt < width ? xt : width - 1); xi++) { + for (int xi = (xf > 0 ? int(xf) : 0); xi < (xt < src_width ? xt : src_width - 1); xi++) { int px = xi, py = yi; int sx = px, sy = py; sx = CLAMP(sx, 0, src_width - 1); @@ -156,7 +156,7 @@ static void _plot_triangle(Vector2i *vertices, const Vector2i &p_offset, bool p_ p_image->set_pixel(px, py, color); } - for (int xi = (xf < width ? int(xf) : width - 1); xi >= (xt > 0 ? xt : 0); xi--) { + for (int xi = (xf < src_width ? int(xf) : src_width - 1); xi >= (xt > 0 ? xt : 0); xi--) { int px = xi, py = yi; int sx = px, sy = py; sx = CLAMP(sx, 0, src_width - 1); diff --git a/editor/import/resource_importer_texture_atlas.h b/editor/import/resource_importer_texture_atlas.h index d518a120bf..177ef949ac 100644 --- a/editor/import/resource_importer_texture_atlas.h +++ b/editor/import/resource_importer_texture_atlas.h @@ -60,8 +60,8 @@ public: virtual int get_preset_count() const override; virtual String get_preset_name(int p_idx) const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; virtual String get_option_group_file() const override; 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; diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp index 89383d3dde..820eba951f 100644 --- a/editor/import/resource_importer_wav.cpp +++ b/editor/import/resource_importer_wav.cpp @@ -58,7 +58,7 @@ String ResourceImporterWAV::get_resource_type() const { return "AudioStreamSample"; } -bool ResourceImporterWAV::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterWAV::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { if (p_option == "force/max_rate_hz" && !bool(p_options["force/max_rate"])) { return false; } @@ -74,7 +74,7 @@ String ResourceImporterWAV::get_preset_name(int p_idx) const { return String(); } -void ResourceImporterWAV::get_import_options(List<ImportOption> *r_options, int p_preset) const { +void ResourceImporterWAV::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const { r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "force/8_bit"), false)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "force/mono"), false)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "force/max_rate", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false)); @@ -272,7 +272,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s if (loop_type == 0x00) { loop = AudioStreamSample::LOOP_FORWARD; } else if (loop_type == 0x01) { - loop = AudioStreamSample::LOOP_PING_PONG; + loop = AudioStreamSample::LOOP_PINGPONG; } else if (loop_type == 0x02) { loop = AudioStreamSample::LOOP_BACKWARD; } diff --git a/editor/import/resource_importer_wav.h b/editor/import/resource_importer_wav.h index 7413dbd11c..e3e605aeb2 100644 --- a/editor/import/resource_importer_wav.h +++ b/editor/import/resource_importer_wav.h @@ -46,8 +46,8 @@ public: virtual int get_preset_count() const override; virtual String get_preset_name(int p_idx) const override; - virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; static void _compress_ima_adpcm(const Vector<float> &p_data, Vector<uint8_t> &dst_data) { /*p_sample_data->data = (void*)malloc(len); diff --git a/editor/import/scene_import_settings.cpp b/editor/import/scene_import_settings.cpp index 95a96f9e26..5690d49a55 100644 --- a/editor/import/scene_import_settings.cpp +++ b/editor/import/scene_import_settings.cpp @@ -327,7 +327,7 @@ void SceneImportSettings::_fill_scene(Node *p_node, TreeItem *p_parent_item) { MeshInstance3D *collider_view = memnew(MeshInstance3D); collider_view->set_name("collider_view"); collider_view->set_visible(false); - mesh_node->add_child(collider_view); + mesh_node->add_child(collider_view, true); collider_view->set_owner(mesh_node); Transform3D accum_xform; @@ -664,7 +664,7 @@ void SceneImportSettings::_select(Tree *p_from, String p_type, String p_id) { List<ResourceImporter::ImportOption> options; if (scene_import_settings_data->category == ResourceImporterScene::INTERNAL_IMPORT_CATEGORY_MAX) { - ResourceImporterScene::get_singleton()->get_import_options(&options); + ResourceImporterScene::get_singleton()->get_import_options(base_path, &options); } else { ResourceImporterScene::get_singleton()->get_internal_import_options(scene_import_settings_data->category, &options); } @@ -737,21 +737,21 @@ void SceneImportSettings::_viewport_input(const Ref<InputEvent> &p_input) { zoom = &md.cam_zoom; } Ref<InputEventMouseMotion> mm = p_input; - if (mm.is_valid() && mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT) { + if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) { (*rot_x) -= mm->get_relative().y * 0.01 * EDSCALE; (*rot_y) -= mm->get_relative().x * 0.01 * EDSCALE; (*rot_x) = CLAMP((*rot_x), -Math_PI / 2, Math_PI / 2); _update_camera(); } Ref<InputEventMouseButton> mb = p_input; - if (mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN) { + if (mb.is_valid() && mb->get_button_index() == MouseButton::WHEEL_DOWN) { (*zoom) *= 1.1; if ((*zoom) > 10.0) { (*zoom) = 10.0; } _update_camera(); } - if (mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP) { + if (mb.is_valid() && mb->get_button_index() == MouseButton::WHEEL_UP) { (*zoom) /= 1.1; if ((*zoom) < 0.1) { (*zoom) = 0.1; diff --git a/editor/import_defaults_editor.cpp b/editor/import_defaults_editor.cpp index 8300dcf555..4b69810861 100644 --- a/editor/import_defaults_editor.cpp +++ b/editor/import_defaults_editor.cpp @@ -62,7 +62,7 @@ protected: return; } for (const PropertyInfo &E : properties) { - if (importer->get_option_visibility(E.name, values)) { + if (importer->get_option_visibility("", E.name, values)) { p_list->push_back(E); } } @@ -119,7 +119,7 @@ void ImportDefaultsEditor::_update_importer() { if (importer.is_valid()) { List<ResourceImporter::ImportOption> options; - importer->get_import_options(&options); + importer->get_import_options("", &options); Dictionary d; if (ProjectSettings::get_singleton()->has_setting("importer_defaults/" + importer->get_importer_name())) { d = ProjectSettings::get_singleton()->get("importer_defaults/" + importer->get_importer_name()); diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp index a6e1e1d094..cc6b4e66e4 100644 --- a/editor/import_dock.cpp +++ b/editor/import_dock.cpp @@ -42,6 +42,7 @@ public: Vector<String> paths; Set<StringName> checked; bool checking; + String base_options_path; bool _set(const StringName &p_name, const Variant &p_value) { if (values.has(p_name)) { @@ -66,7 +67,7 @@ public: } void _get_property_list(List<PropertyInfo> *p_list) const { for (const PropertyInfo &E : properties) { - if (!importer->get_option_visibility(E.name, values)) { + if (!importer->get_option_visibility(base_options_path, E.name, values)) { continue; } PropertyInfo pi = E; @@ -104,8 +105,9 @@ void ImportDock::set_edit_path(const String &p_path) { params->paths.clear(); params->paths.push_back(p_path); + params->base_options_path = p_path; - _update_options(config); + _update_options(p_path, config); List<Ref<ResourceImporter>> importers; ResourceFormatImporter::get_singleton()->get_importers_for_extension(p_path.get_extension(), &importers); @@ -146,17 +148,18 @@ void ImportDock::_add_keep_import_option(const String &p_importer_name) { } } -void ImportDock::_update_options(const Ref<ConfigFile> &p_config) { +void ImportDock::_update_options(const String &p_path, const Ref<ConfigFile> &p_config) { List<ResourceImporter::ImportOption> options; if (params->importer.is_valid()) { - params->importer->get_import_options(&options); + params->importer->get_import_options(p_path, &options); } params->properties.clear(); params->values.clear(); params->checking = params->paths.size() > 1; params->checked.clear(); + params->base_options_path = p_path; for (const ResourceImporter::ImportOption &E : options) { params->properties.push_back(E.option); @@ -184,10 +187,12 @@ void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) { // Use the value that is repeated the most. Map<String, Dictionary> value_frequency; + Set<String> extensions; for (int i = 0; i < p_paths.size(); i++) { Ref<ConfigFile> config; config.instantiate(); + extensions.insert(p_paths[i].get_extension()); Error err = config->load(p_paths[i] + ".import"); ERR_CONTINUE(err != OK); @@ -223,13 +228,18 @@ void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) { ERR_FAIL_COND(params->importer.is_null()); + String base_path; + if (extensions.size() == 1 && p_paths.size() > 0) { + base_path = p_paths[0]; + } List<ResourceImporter::ImportOption> options; - params->importer->get_import_options(&options); + params->importer->get_import_options(base_path, &options); params->properties.clear(); params->values.clear(); params->checking = true; params->checked.clear(); + params->base_options_path = base_path; for (const ResourceImporter::ImportOption &E : options) { params->properties.push_back(E.option); @@ -327,22 +337,22 @@ void ImportDock::_importer_selected(int i_idx) { String name = import_as->get_selected_metadata(); if (name == "keep") { params->importer.unref(); - _update_options(Ref<ConfigFile>()); + _update_options(params->base_options_path, Ref<ConfigFile>()); } else { Ref<ResourceImporter> importer = ResourceFormatImporter::get_singleton()->get_importer_by_name(name); ERR_FAIL_COND(importer.is_null()); params->importer = importer; - Ref<ConfigFile> config; if (params->paths.size()) { + String path = params->paths[0]; config.instantiate(); - Error err = config->load(params->paths[0] + ".import"); + Error err = config->load(path + ".import"); if (err != OK) { config.unref(); } } - _update_options(config); + _update_options(params->base_options_path, config); } } @@ -387,7 +397,7 @@ void ImportDock::_preset_selected(int p_idx) { default: { List<ResourceImporter::ImportOption> options; - params->importer->get_import_options(&options, p_idx); + params->importer->get_import_options(params->base_options_path, &options, p_idx); if (params->checking) { params->checked.clear(); diff --git a/editor/import_dock.h b/editor/import_dock.h index 150c44576d..ac73f3e3c0 100644 --- a/editor/import_dock.h +++ b/editor/import_dock.h @@ -64,7 +64,7 @@ class ImportDock : public VBoxContainer { void _preset_selected(int p_idx); void _importer_selected(int i_idx); - void _update_options(const Ref<ConfigFile> &p_config = Ref<ConfigFile>()); + void _update_options(const String &p_path, const Ref<ConfigFile> &p_config = Ref<ConfigFile>()); void _update_preset_menu(); void _add_keep_import_option(const String &p_importer_name); diff --git a/editor/plugin_config_dialog.cpp b/editor/plugin_config_dialog.cpp index 91ca1465df..c99b34e0c2 100644 --- a/editor/plugin_config_dialog.cpp +++ b/editor/plugin_config_dialog.cpp @@ -38,7 +38,7 @@ #include "editor/project_settings_editor.h" #include "scene/gui/grid_container.h" -#include "modules/modules_enabled.gen.h" +#include "modules/modules_enabled.gen.h" // For gdscript. #ifdef MODULE_GDSCRIPT_ENABLED #include "modules/gdscript/gdscript.h" #endif diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp index 36a814c30a..7cafbbc1c4 100644 --- a/editor/plugins/abstract_polygon_2d_editor.cpp +++ b/editor/plugins/abstract_polygon_2d_editor.cpp @@ -245,11 +245,11 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) Ref<InputEventMouseButton> mb = p_event; if (!_has_resource()) { - if (mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed()) { + if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT && mb->is_pressed()) { create_resource->set_text(String("No polygon resource on this node.\nCreate and assign one?")); create_resource->popup_centered(); } - return (mb.is_valid() && mb->get_button_index() == 1); + return (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT); } CanvasItemEditor::Tool tool = CanvasItemEditor::get_singleton()->get_current_tool(); @@ -264,7 +264,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) Vector2 cpoint = _get_node()->to_local(canvas_item_editor->snap_point(canvas_item_editor->get_canvas_transform().affine_inverse().xform(mb->get_position()))); if (mode == MODE_EDIT || (_is_line() && mode == MODE_CREATE)) { - if (mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb->get_button_index() == MouseButton::LEFT) { if (mb->is_pressed()) { if (mb->is_ctrl_pressed() || mb->is_shift_pressed() || mb->is_alt_pressed()) { return false; @@ -326,7 +326,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) return true; } } - } else if (mb->get_button_index() == MOUSE_BUTTON_RIGHT && mb->is_pressed() && !edited_point.valid()) { + } else if (mb->get_button_index() == MouseButton::RIGHT && mb->is_pressed() && !edited_point.valid()) { const PosVertex closest = closest_point(gpoint); if (closest.valid()) { @@ -335,7 +335,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) } } } else if (mode == MODE_DELETE) { - if (mb->get_button_index() == MOUSE_BUTTON_LEFT && mb->is_pressed()) { + if (mb->get_button_index() == MouseButton::LEFT && mb->is_pressed()) { const PosVertex closest = closest_point(gpoint); if (closest.valid()) { @@ -346,7 +346,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) } if (mode == MODE_CREATE) { - if (mb->get_button_index() == MOUSE_BUTTON_LEFT && mb->is_pressed()) { + if (mb->get_button_index() == MouseButton::LEFT && mb->is_pressed()) { if (_is_line()) { // for lines, we don't have a wip mode, and we can undo each single add point. Vector<Vector2> vertices = _get_polygon(0); @@ -384,7 +384,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) return true; } } - } else if (mb->get_button_index() == MOUSE_BUTTON_RIGHT && mb->is_pressed() && wip_active) { + } else if (mb->get_button_index() == MouseButton::RIGHT && mb->is_pressed() && wip_active) { _wip_cancel(); } } @@ -395,7 +395,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) if (mm.is_valid()) { Vector2 gpoint = mm->get_position(); - if (edited_point.valid() && (wip_active || (mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT))) { + if (edited_point.valid() && (wip_active || (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE)) { Vector2 cpoint = _get_node()->to_local(canvas_item_editor->snap_point(canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint))); //Move the point in a single axis. Should only work when editing a polygon and while holding shift. @@ -443,7 +443,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) Ref<InputEventKey> k = p_event; if (k.is_valid() && k->is_pressed()) { - if (k->get_keycode() == KEY_DELETE || k->get_keycode() == KEY_BACKSPACE) { + if (k->get_keycode() == Key::KEY_DELETE || k->get_keycode() == Key::BACKSPACE) { if (wip_active && selected_point.polygon == -1) { if (wip.size() > selected_point.vertex) { wip.remove(selected_point.vertex); @@ -460,9 +460,9 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) return true; } } - } else if (wip_active && k->get_keycode() == KEY_ENTER) { + } else if (wip_active && k->get_keycode() == Key::ENTER) { _wip_close(); - } else if (wip_active && k->get_keycode() == KEY_ESCAPE) { + } else if (wip_active && k->get_keycode() == Key::ESCAPE) { _wip_cancel(); } } diff --git a/editor/plugins/animation_blend_space_1d_editor.cpp b/editor/plugins/animation_blend_space_1d_editor.cpp index ad2d9866fa..cfb7217baa 100644 --- a/editor/plugins/animation_blend_space_1d_editor.cpp +++ b/editor/plugins/animation_blend_space_1d_editor.cpp @@ -42,7 +42,7 @@ StringName AnimationNodeBlendSpace1DEditor::get_blend_position_path() const { void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEvent> &p_event) { Ref<InputEventKey> k = p_event; - if (tool_select->is_pressed() && k.is_valid() && k->is_pressed() && k->get_keycode() == KEY_DELETE && !k->is_echo()) { + if (tool_select->is_pressed() && k.is_valid() && k->is_pressed() && k->get_keycode() == Key::KEY_DELETE && !k->is_echo()) { if (selected_point != -1) { _erase_selected(); accept_event(); @@ -51,7 +51,7 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven Ref<InputEventMouseButton> mb = p_event; - if (mb.is_valid() && mb->is_pressed() && ((tool_select->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_RIGHT) || (mb->get_button_index() == MOUSE_BUTTON_LEFT && tool_create->is_pressed()))) { + if (mb.is_valid() && mb->is_pressed() && ((tool_select->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) || (mb->get_button_index() == MouseButton::LEFT && tool_create->is_pressed()))) { menu->clear(); animations_menu->clear(); animations_to_add.clear(); @@ -110,7 +110,7 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven } } - if (mb.is_valid() && mb->is_pressed() && tool_select->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && mb->is_pressed() && tool_select->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { blend_space_draw->update(); // why not // try to see if a point can be selected @@ -132,7 +132,7 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven } } - if (mb.is_valid() && !mb->is_pressed() && dragging_selected_attempt && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && !mb->is_pressed() && dragging_selected_attempt && mb->get_button_index() == MouseButton::LEFT) { if (dragging_selected) { // move float point = blend_space->get_blend_point_position(selected_point); @@ -161,7 +161,7 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven } // *set* the blend - if (mb.is_valid() && !mb->is_pressed() && tool_blend->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && !mb->is_pressed() && tool_blend->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { float blend_pos = mb->get_position().x / blend_space_draw->get_size().x; blend_pos *= blend_space->get_max_space() - blend_space->get_min_space(); blend_pos += blend_space->get_min_space(); @@ -184,7 +184,7 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven _update_edited_point_pos(); } - if (mm.is_valid() && tool_blend->is_pressed() && mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT) { + if (mm.is_valid() && tool_blend->is_pressed() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) { float blend_pos = mm->get_position().x / blend_space_draw->get_size().x; blend_pos *= blend_space->get_max_space() - blend_space->get_min_space(); blend_pos += blend_space->get_min_space(); diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp index 686a35e442..9af060ed84 100644 --- a/editor/plugins/animation_blend_space_2d_editor.cpp +++ b/editor/plugins/animation_blend_space_2d_editor.cpp @@ -70,7 +70,7 @@ StringName AnimationNodeBlendSpace2DEditor::get_blend_position_path() const { void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEvent> &p_event) { Ref<InputEventKey> k = p_event; - if (tool_select->is_pressed() && k.is_valid() && k->is_pressed() && k->get_keycode() == KEY_DELETE && !k->is_echo()) { + if (tool_select->is_pressed() && k.is_valid() && k->is_pressed() && k->get_keycode() == Key::KEY_DELETE && !k->is_echo()) { if (selected_point != -1 || selected_triangle != -1) { _erase_selected(); accept_event(); @@ -79,7 +79,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven Ref<InputEventMouseButton> mb = p_event; - if (mb.is_valid() && mb->is_pressed() && ((tool_select->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_RIGHT) || (mb->get_button_index() == MOUSE_BUTTON_LEFT && tool_create->is_pressed()))) { + if (mb.is_valid() && mb->is_pressed() && ((tool_select->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) || (mb->get_button_index() == MouseButton::LEFT && tool_create->is_pressed()))) { menu->clear(); animations_menu->clear(); animations_to_add.clear(); @@ -133,7 +133,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven } } - if (mb.is_valid() && mb->is_pressed() && tool_select->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && mb->is_pressed() && tool_select->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { blend_space_draw->update(); //update anyway //try to see if a point can be selected selected_point = -1; @@ -173,7 +173,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven } } - if (mb.is_valid() && mb->is_pressed() && tool_triangle->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && mb->is_pressed() && tool_triangle->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { blend_space_draw->update(); //update anyway //try to see if a point can be selected selected_point = -1; @@ -208,7 +208,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven } } - if (mb.is_valid() && !mb->is_pressed() && dragging_selected_attempt && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && !mb->is_pressed() && dragging_selected_attempt && mb->get_button_index() == MouseButton::LEFT) { if (dragging_selected) { //move Vector2 point = blend_space->get_blend_point_position(selected_point); @@ -234,7 +234,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven blend_space_draw->update(); } - if (mb.is_valid() && mb->is_pressed() && tool_blend->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && mb->is_pressed() && tool_blend->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { Vector2 blend_pos = (mb->get_position() / blend_space_draw->get_size()); blend_pos.y = 1.0 - blend_pos.y; blend_pos *= (blend_space->get_max_space() - blend_space->get_min_space()); @@ -268,7 +268,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven blend_space_draw->update(); } - if (mm.is_valid() && tool_blend->is_pressed() && mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT) { + if (mm.is_valid() && tool_blend->is_pressed() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) { Vector2 blend_pos = (mm->get_position() / blend_space_draw->get_size()); blend_pos.y = 1.0 - blend_pos.y; blend_pos *= (blend_space->get_max_space() - blend_space->get_min_space()); diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index ea025dad3e..226046f250 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -41,6 +41,7 @@ #include "editor/plugins/canvas_item_editor_plugin.h" // For onion skinning. #include "editor/plugins/node_3d_editor_plugin.h" // For onion skinning. #include "scene/main/window.h" +#include "scene/resources/animation.h" #include "servers/rendering_server.h" void AnimationPlayerEditor::_node_removed(Node *p_node) { @@ -72,7 +73,7 @@ void AnimationPlayerEditor::_notification(int p_what) { if (player->has_animation(animname)) { Ref<Animation> anim = player->get_animation(animname); if (!anim.is_null()) { - frame->set_max(anim->get_length()); + frame->set_max((double)anim->get_length()); } } } @@ -289,7 +290,7 @@ void AnimationPlayerEditor::_animation_selected(int p_which) { track_editor->set_root(root); } } - frame->set_max(anim->get_length()); + frame->set_max((double)anim->get_length()); } else { track_editor->set_animation(Ref<Animation>()); @@ -474,7 +475,7 @@ double AnimationPlayerEditor::_get_editor_step() const { ERR_FAIL_COND_V(!anim.is_valid(), 0.0); // Use more precise snapping when holding Shift - return Input::get_singleton()->is_key_pressed(KEY_SHIFT) ? anim->get_step() * 0.25 : anim->get_step(); + return Input::get_singleton()->is_key_pressed(Key::SHIFT) ? anim->get_step() * 0.25 : anim->get_step(); } return 0.0; @@ -1014,7 +1015,7 @@ void AnimationPlayerEditor::_seek_value_changed(float p_value, bool p_set, bool Ref<Animation> anim; anim = player->get_animation(current); - float pos = CLAMP(anim->get_length() * (p_value / frame->get_max()), 0, anim->get_length()); + float pos = CLAMP((double)anim->get_length() * (p_value / frame->get_max()), 0, (double)anim->get_length()); if (track_editor->is_snap_enabled()) { pos = Math::snapped(pos, _get_editor_step()); } @@ -1228,7 +1229,7 @@ void AnimationPlayerEditor::unhandled_key_input(const Ref<InputEvent> &p_ev) { Ref<InputEventKey> k = p_ev; if (is_visible_in_tree() && k.is_valid() && k->is_pressed() && !k->is_echo() && !k->is_alt_pressed() && !k->is_ctrl_pressed() && !k->is_meta_pressed()) { switch (k->get_keycode()) { - case KEY_A: { + case Key::A: { if (!k->is_shift_pressed()) { _play_bw_from_pressed(); } else { @@ -1236,11 +1237,11 @@ void AnimationPlayerEditor::unhandled_key_input(const Ref<InputEvent> &p_ev) { } accept_event(); } break; - case KEY_S: { + case Key::S: { _stop_pressed(); accept_event(); } break; - case KEY_D: { + case Key::D: { if (!k->is_shift_pressed()) { _play_from_pressed(); } else { @@ -1424,7 +1425,7 @@ void AnimationPlayerEditor::_prepare_onion_layers_2() { float pos = cpos + step_off * anim->get_step(); - bool valid = anim->has_loop() || (pos >= 0 && pos <= anim->get_length()); + bool valid = anim->get_loop_mode() != Animation::LoopMode::LOOP_NONE || (pos >= 0 && pos <= anim->get_length()); onion.captures_valid.write[cidx] = valid; if (valid) { player->seek(pos, true); diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index a1f96f21bf..191f5d9071 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -66,7 +66,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv } Ref<InputEventKey> k = p_event; - if (tool_select->is_pressed() && k.is_valid() && k->is_pressed() && k->get_keycode() == KEY_DELETE && !k->is_echo()) { + if (tool_select->is_pressed() && k.is_valid() && k->is_pressed() && k->get_keycode() == Key::KEY_DELETE && !k->is_echo()) { if (selected_node != StringName() || selected_transition_to != StringName() || selected_transition_from != StringName()) { _erase_selected(); accept_event(); @@ -76,7 +76,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv Ref<InputEventMouseButton> mb = p_event; //Add new node - if (mb.is_valid() && mb->is_pressed() && ((tool_select->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_RIGHT) || (tool_create->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT))) { + if (mb.is_valid() && mb->is_pressed() && ((tool_select->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) || (tool_create->is_pressed() && mb->get_button_index() == MouseButton::LEFT))) { menu->clear(); animations_menu->clear(); animations_to_add.clear(); @@ -124,7 +124,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv } // select node or push a field inside - if (mb.is_valid() && !mb->is_shift_pressed() && mb->is_pressed() && tool_select->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && !mb->is_shift_pressed() && mb->is_pressed() && tool_select->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { selected_transition_from = StringName(); selected_transition_to = StringName(); selected_node = StringName(); @@ -216,7 +216,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv } //end moving node - if (mb.is_valid() && dragging_selected_attempt && mb->get_button_index() == MOUSE_BUTTON_LEFT && !mb->is_pressed()) { + if (mb.is_valid() && dragging_selected_attempt && mb->get_button_index() == MouseButton::LEFT && !mb->is_pressed()) { if (dragging_selected) { Ref<AnimationNode> an = state_machine->get_node(selected_node); updating = true; @@ -237,7 +237,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv } //connect nodes - if (mb.is_valid() && ((tool_select->is_pressed() && mb->is_shift_pressed()) || tool_connect->is_pressed()) && mb->get_button_index() == MOUSE_BUTTON_LEFT && mb->is_pressed()) { + if (mb.is_valid() && ((tool_select->is_pressed() && mb->is_shift_pressed()) || tool_connect->is_pressed()) && mb->get_button_index() == MouseButton::LEFT && mb->is_pressed()) { for (int i = node_rects.size() - 1; i >= 0; i--) { //inverse to draw order if (node_rects[i].node.has_point(mb->get_position())) { //select node since nothing else was selected connecting = true; @@ -250,7 +250,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv } //end connecting nodes - if (mb.is_valid() && connecting && mb->get_button_index() == MOUSE_BUTTON_LEFT && !mb->is_pressed()) { + if (mb.is_valid() && connecting && mb->get_button_index() == MouseButton::LEFT && !mb->is_pressed()) { if (connecting_to_node != StringName()) { if (state_machine->has_transition(connecting_from, connecting_to_node)) { EditorNode::get_singleton()->show_warning(TTR("Transition exists!")); @@ -284,7 +284,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv Ref<InputEventMouseMotion> mm = p_event; //pan window - if (mm.is_valid() && mm->get_button_mask() & MOUSE_BUTTON_MASK_MIDDLE) { + if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_MIDDLE) != MouseButton::NONE) { h_scroll->set_value(h_scroll->get_value() - mm->get_relative().x); v_scroll->set_value(v_scroll->get_value() - mm->get_relative().y); } diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index aacfc3e305..1a216b3862 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -620,7 +620,7 @@ void EditorAssetLibrary::unhandled_key_input(const Ref<InputEvent> &p_event) { const Ref<InputEventKey> key = p_event; if (key.is_valid() && key->is_pressed()) { - if (key->get_keycode_with_modifiers() == (KEY_MASK_CMD | KEY_F) && is_visible_in_tree()) { + if (key->get_keycode_with_modifiers() == (KeyModifierMask::CMD | Key::F) && is_visible_in_tree()) { filter->grab_focus(); filter->select_all(); accept_event(); diff --git a/editor/plugins/audio_stream_editor_plugin.cpp b/editor/plugins/audio_stream_editor_plugin.cpp index 482c08f50a..c76713f534 100644 --- a/editor/plugins/audio_stream_editor_plugin.cpp +++ b/editor/plugins/audio_stream_editor_plugin.cpp @@ -157,7 +157,7 @@ void AudioStreamEditor::_draw_indicator() { void AudioStreamEditor::_on_input_indicator(Ref<InputEvent> p_event) { const Ref<InputEventMouseButton> mb = p_event; - if (mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT) { if (mb->is_pressed()) { _seek_to(mb->get_position().x); } @@ -232,7 +232,7 @@ AudioStreamEditor::AudioStreamEditor() { hbox->add_child(_play_button); _play_button->set_focus_mode(Control::FOCUS_NONE); _play_button->connect("pressed", callable_mp(this, &AudioStreamEditor::_play)); - _play_button->set_shortcut(ED_SHORTCUT("inspector/audio_preview_play_pause", TTR("Audio Preview Play/Pause"), KEY_SPACE)); + _play_button->set_shortcut(ED_SHORTCUT("inspector/audio_preview_play_pause", TTR("Audio Preview Play/Pause"), Key::SPACE)); _stop_button = memnew(Button); _stop_button->set_flat(true); diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 0e1bdf0155..02756916a5 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -333,7 +333,7 @@ Point2 CanvasItemEditor::snap_point(Point2 p_target, unsigned int p_modes, unsig snap_target[0] = SNAP_TARGET_NONE; snap_target[1] = SNAP_TARGET_NONE; - bool is_snap_active = smart_snap_active ^ Input::get_singleton()->is_key_pressed(KEY_CTRL); + bool is_snap_active = smart_snap_active ^ Input::get_singleton()->is_key_pressed(Key::CTRL); // Smart snap using the canvas position Vector2 output = p_target; @@ -461,7 +461,7 @@ Point2 CanvasItemEditor::snap_point(Point2 p_target, unsigned int p_modes, unsig } real_t CanvasItemEditor::snap_angle(real_t p_target, real_t p_start) const { - if (((smart_snap_active || snap_rotation) ^ Input::get_singleton()->is_key_pressed(KEY_CTRL)) && snap_rotation_step != 0) { + if (((smart_snap_active || snap_rotation) ^ Input::get_singleton()->is_key_pressed(Key::CTRL)) && snap_rotation_step != 0) { if (snap_relative) { return Math::snapped(p_target - snap_rotation_offset, snap_rotation_step) + snap_rotation_offset + (p_start - (int)(p_start / snap_rotation_step) * snap_rotation_step); } else { @@ -482,7 +482,7 @@ void CanvasItemEditor::unhandled_key_input(const Ref<InputEvent> &p_ev) { } if (k.is_valid()) { - if (k->get_keycode() == KEY_CTRL || k->get_keycode() == KEY_ALT || k->get_keycode() == KEY_SHIFT) { + if (k->get_keycode() == Key::CTRL || k->get_keycode() == Key::ALT || k->get_keycode() == Key::SHIFT) { viewport->update(); } @@ -950,7 +950,7 @@ bool CanvasItemEditor::_gui_input_rulers_and_guides(const Ref<InputEvent> &p_eve } // Start dragging a guide - if (b.is_valid() && b->get_button_index() == MOUSE_BUTTON_LEFT && b->is_pressed()) { + if (b.is_valid() && b->get_button_index() == MouseButton::LEFT && b->is_pressed()) { // Press button if (b->get_position().x < RULER_WIDTH && b->get_position().y < RULER_WIDTH) { // Drag a new double guide @@ -1009,7 +1009,7 @@ bool CanvasItemEditor::_gui_input_rulers_and_guides(const Ref<InputEvent> &p_eve } // Release confirms the guide move - if (b.is_valid() && b->get_button_index() == MOUSE_BUTTON_LEFT && !b->is_pressed()) { + if (b.is_valid() && b->get_button_index() == MouseButton::LEFT && !b->is_pressed()) { if (show_guides && EditorNode::get_singleton()->get_edited_scene()) { Transform2D xform = viewport_scrollable->get_transform() * transform; @@ -1123,7 +1123,7 @@ bool CanvasItemEditor::_gui_input_zoom_or_pan(const Ref<InputEvent> &p_event, bo if (pan_on_scroll) { // Perform horizontal scrolling first so we can check for Shift being held. if (b->is_pressed() && - (b->get_button_index() == MOUSE_BUTTON_WHEEL_LEFT || (b->is_shift_pressed() && b->get_button_index() == MOUSE_BUTTON_WHEEL_UP))) { + (b->get_button_index() == MouseButton::WHEEL_LEFT || (b->is_shift_pressed() && b->get_button_index() == MouseButton::WHEEL_UP))) { // Pan left view_offset.x -= int(EditorSettings::get_singleton()->get("editors/2d/pan_speed")) / zoom * b->get_factor(); update_viewport(); @@ -1131,7 +1131,7 @@ bool CanvasItemEditor::_gui_input_zoom_or_pan(const Ref<InputEvent> &p_event, bo } if (b->is_pressed() && - (b->get_button_index() == MOUSE_BUTTON_WHEEL_RIGHT || (b->is_shift_pressed() && b->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN))) { + (b->get_button_index() == MouseButton::WHEEL_RIGHT || (b->is_shift_pressed() && b->get_button_index() == MouseButton::WHEEL_DOWN))) { // Pan right view_offset.x += int(EditorSettings::get_singleton()->get("editors/2d/pan_speed")) / zoom * b->get_factor(); update_viewport(); @@ -1139,13 +1139,13 @@ bool CanvasItemEditor::_gui_input_zoom_or_pan(const Ref<InputEvent> &p_event, bo } } - if (b->is_pressed() && b->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN) { + if (b->is_pressed() && b->get_button_index() == MouseButton::WHEEL_DOWN) { // Scroll or pan down if (pan_on_scroll) { view_offset.y += int(EditorSettings::get_singleton()->get("editors/2d/pan_speed")) / zoom * b->get_factor(); update_viewport(); } else { - zoom_widget->set_zoom_by_increments(-1, Input::get_singleton()->is_key_pressed(KEY_ALT)); + zoom_widget->set_zoom_by_increments(-1, Input::get_singleton()->is_key_pressed(Key::ALT)); if (!Math::is_equal_approx(b->get_factor(), 1.0f)) { // Handle high-precision (analog) scrolling. zoom_widget->set_zoom(zoom * ((zoom_widget->get_zoom() / zoom - 1.f) * b->get_factor() + 1.f)); @@ -1155,13 +1155,13 @@ bool CanvasItemEditor::_gui_input_zoom_or_pan(const Ref<InputEvent> &p_event, bo return true; } - if (b->is_pressed() && b->get_button_index() == MOUSE_BUTTON_WHEEL_UP) { + if (b->is_pressed() && b->get_button_index() == MouseButton::WHEEL_UP) { // Scroll or pan up if (pan_on_scroll) { view_offset.y -= int(EditorSettings::get_singleton()->get("editors/2d/pan_speed")) / zoom * b->get_factor(); update_viewport(); } else { - zoom_widget->set_zoom_by_increments(1, Input::get_singleton()->is_key_pressed(KEY_ALT)); + zoom_widget->set_zoom_by_increments(1, Input::get_singleton()->is_key_pressed(Key::ALT)); if (!Math::is_equal_approx(b->get_factor(), 1.0f)) { // Handle high-precision (analog) scrolling. zoom_widget->set_zoom(zoom * ((zoom_widget->get_zoom() / zoom - 1.f) * b->get_factor() + 1.f)); @@ -1173,16 +1173,16 @@ 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_LEFT && tool == TOOL_PAN) || - (b->get_button_index() == MOUSE_BUTTON_LEFT && !EditorSettings::get_singleton()->get("editors/2d/simple_panning") && pan_pressed))) { + (b->get_button_index() == MouseButton::MIDDLE || + (b->get_button_index() == MouseButton::LEFT && tool == TOOL_PAN) || + (b->get_button_index() == MouseButton::LEFT && !EditorSettings::get_singleton()->get("editors/2d/simple_panning") && pan_pressed))) { // Pan the viewport panning = true; } } if (panning) { - if (!b->is_pressed() && (pan_on_scroll || (b->get_button_index() != MOUSE_BUTTON_WHEEL_DOWN && b->get_button_index() != MOUSE_BUTTON_WHEEL_UP))) { + if (!b->is_pressed() && (pan_on_scroll || (b->get_button_index() != MouseButton::WHEEL_DOWN && b->get_button_index() != MouseButton::WHEEL_UP))) { // Stop panning the viewport (for any mouse button press except zooming) panning = false; } @@ -1294,8 +1294,8 @@ bool CanvasItemEditor::_gui_input_pivot(const Ref<InputEvent> &p_event) { // Drag the pivot (in pivot mode / with V key) if (drag_type == DRAG_NONE) { - if ((b.is_valid() && b->is_pressed() && b->get_button_index() == MOUSE_BUTTON_LEFT && tool == TOOL_EDIT_PIVOT) || - (k.is_valid() && k->is_pressed() && !k->is_echo() && k->get_keycode() == KEY_V && tool == TOOL_SELECT && k->get_modifiers_mask() == 0)) { + if ((b.is_valid() && b->is_pressed() && b->get_button_index() == MouseButton::LEFT && tool == TOOL_EDIT_PIVOT) || + (k.is_valid() && k->is_pressed() && !k->is_echo() && k->get_keycode() == Key::V && tool == TOOL_SELECT && k->get_modifiers_mask() == Key::NONE)) { List<CanvasItem *> selection = _get_edited_canvas_items(); // Filters the selection with nodes that allow setting the pivot @@ -1345,8 +1345,8 @@ bool CanvasItemEditor::_gui_input_pivot(const Ref<InputEvent> &p_event) { // Confirm the pivot move if (drag_selection.size() >= 1 && - ((b.is_valid() && !b->is_pressed() && b->get_button_index() == MOUSE_BUTTON_LEFT && tool == TOOL_EDIT_PIVOT) || - (k.is_valid() && !k->is_pressed() && k->get_keycode() == KEY_V))) { + ((b.is_valid() && !b->is_pressed() && b->get_button_index() == MouseButton::LEFT && tool == TOOL_EDIT_PIVOT) || + (k.is_valid() && !k->is_pressed() && k->get_keycode() == Key::V))) { _commit_canvas_item_state( drag_selection, vformat( @@ -1359,7 +1359,7 @@ bool CanvasItemEditor::_gui_input_pivot(const Ref<InputEvent> &p_event) { } // Cancel a drag - if (b.is_valid() && b->get_button_index() == MOUSE_BUTTON_RIGHT && b->is_pressed()) { + if (b.is_valid() && b->get_button_index() == MouseButton::RIGHT && b->is_pressed()) { _restore_canvas_item_state(drag_selection); drag_type = DRAG_NONE; viewport->update(); @@ -1375,7 +1375,7 @@ bool CanvasItemEditor::_gui_input_rotate(const Ref<InputEvent> &p_event) { // Start rotation if (drag_type == DRAG_NONE) { - if (b.is_valid() && b->get_button_index() == MOUSE_BUTTON_LEFT && b->is_pressed()) { + if (b.is_valid() && b->get_button_index() == MouseButton::LEFT && b->is_pressed()) { if ((b->is_command_pressed() && !b->is_alt_pressed() && tool == TOOL_SELECT) || tool == TOOL_ROTATE) { List<CanvasItem *> selection = _get_edited_canvas_items(); @@ -1418,7 +1418,7 @@ bool CanvasItemEditor::_gui_input_rotate(const Ref<InputEvent> &p_event) { } // Confirms the node rotation - if (b.is_valid() && b->get_button_index() == MOUSE_BUTTON_LEFT && !b->is_pressed()) { + if (b.is_valid() && b->get_button_index() == MouseButton::LEFT && !b->is_pressed()) { if (drag_selection.size() != 1) { _commit_canvas_item_state( drag_selection, @@ -1442,7 +1442,7 @@ bool CanvasItemEditor::_gui_input_rotate(const Ref<InputEvent> &p_event) { } // Cancel a drag - if (b.is_valid() && b->get_button_index() == MOUSE_BUTTON_RIGHT && b->is_pressed()) { + if (b.is_valid() && b->get_button_index() == MouseButton::RIGHT && b->is_pressed()) { _restore_canvas_item_state(drag_selection); drag_type = DRAG_NONE; viewport->update(); @@ -1456,7 +1456,7 @@ bool CanvasItemEditor::_gui_input_open_scene_on_double_click(const Ref<InputEven Ref<InputEventMouseButton> b = p_event; // Open a sub-scene on double-click - if (b.is_valid() && b->get_button_index() == MOUSE_BUTTON_LEFT && b->is_pressed() && b->is_double_click() && tool == TOOL_SELECT) { + if (b.is_valid() && b->get_button_index() == MouseButton::LEFT && b->is_pressed() && b->is_double_click() && tool == TOOL_SELECT) { List<CanvasItem *> selection = _get_edited_canvas_items(); if (selection.size() == 1) { CanvasItem *canvas_item = selection[0]; @@ -1475,7 +1475,7 @@ bool CanvasItemEditor::_gui_input_anchors(const Ref<InputEvent> &p_event) { // Starts anchor dragging if needed if (drag_type == DRAG_NONE) { - if (b.is_valid() && b->get_button_index() == MOUSE_BUTTON_LEFT && b->is_pressed() && tool == TOOL_SELECT) { + if (b.is_valid() && b->get_button_index() == MouseButton::LEFT && b->is_pressed() && tool == TOOL_SELECT) { List<CanvasItem *> selection = _get_edited_canvas_items(); if (selection.size() == 1) { Control *control = Object::cast_to<Control>(selection[0]); @@ -1595,7 +1595,7 @@ bool CanvasItemEditor::_gui_input_anchors(const Ref<InputEvent> &p_event) { } // Confirms new anchor position - if (drag_selection.size() >= 1 && b.is_valid() && b->get_button_index() == MOUSE_BUTTON_LEFT && !b->is_pressed()) { + if (drag_selection.size() >= 1 && b.is_valid() && b->get_button_index() == MouseButton::LEFT && !b->is_pressed()) { _commit_canvas_item_state( drag_selection, vformat(TTR("Move CanvasItem \"%s\" Anchor"), drag_selection[0]->get_name())); @@ -1604,7 +1604,7 @@ bool CanvasItemEditor::_gui_input_anchors(const Ref<InputEvent> &p_event) { } // Cancel a drag - if (b.is_valid() && b->get_button_index() == MOUSE_BUTTON_RIGHT && b->is_pressed()) { + if (b.is_valid() && b->get_button_index() == MouseButton::RIGHT && b->is_pressed()) { _restore_canvas_item_state(drag_selection); drag_type = DRAG_NONE; viewport->update(); @@ -1620,7 +1620,7 @@ bool CanvasItemEditor::_gui_input_resize(const Ref<InputEvent> &p_event) { // Drag resize handles if (drag_type == DRAG_NONE) { - if (b.is_valid() && b->get_button_index() == MOUSE_BUTTON_LEFT && b->is_pressed() && tool == TOOL_SELECT) { + if (b.is_valid() && b->get_button_index() == MouseButton::LEFT && b->is_pressed() && tool == TOOL_SELECT) { List<CanvasItem *> selection = _get_edited_canvas_items(); if (selection.size() == 1) { CanvasItem *canvas_item = selection[0]; @@ -1774,7 +1774,7 @@ bool CanvasItemEditor::_gui_input_resize(const Ref<InputEvent> &p_event) { } // Confirm resize - if (drag_selection.size() >= 1 && b.is_valid() && b->get_button_index() == MOUSE_BUTTON_LEFT && !b->is_pressed()) { + if (drag_selection.size() >= 1 && b.is_valid() && b->get_button_index() == MouseButton::LEFT && !b->is_pressed()) { const Node2D *node2d = Object::cast_to<Node2D>(drag_selection[0]); if (node2d) { // Extends from Node2D. @@ -1811,7 +1811,7 @@ bool CanvasItemEditor::_gui_input_resize(const Ref<InputEvent> &p_event) { } // Cancel a drag - if (b.is_valid() && b->get_button_index() == MOUSE_BUTTON_RIGHT && b->is_pressed()) { + if (b.is_valid() && b->get_button_index() == MouseButton::RIGHT && b->is_pressed()) { _restore_canvas_item_state(drag_selection); snap_target[0] = SNAP_TARGET_NONE; snap_target[1] = SNAP_TARGET_NONE; @@ -1829,7 +1829,7 @@ bool CanvasItemEditor::_gui_input_scale(const Ref<InputEvent> &p_event) { // Drag resize handles if (drag_type == DRAG_NONE) { - if (b.is_valid() && b->get_button_index() == MOUSE_BUTTON_LEFT && b->is_pressed() && ((b->is_alt_pressed() && b->is_ctrl_pressed()) || tool == TOOL_SCALE)) { + if (b.is_valid() && b->get_button_index() == MouseButton::LEFT && b->is_pressed() && ((b->is_alt_pressed() && b->is_ctrl_pressed()) || tool == TOOL_SCALE)) { List<CanvasItem *> selection = _get_edited_canvas_items(); if (selection.size() == 1) { CanvasItem *canvas_item = selection[0]; @@ -1876,7 +1876,7 @@ bool CanvasItemEditor::_gui_input_scale(const Ref<InputEvent> &p_event) { Transform2D simple_xform = (viewport->get_transform() * unscaled_transform).affine_inverse() * transform; bool uniform = m->is_shift_pressed(); - bool is_ctrl = Input::get_singleton()->is_key_pressed(KEY_CTRL); + bool is_ctrl = Input::get_singleton()->is_key_pressed(Key::CTRL); Point2 drag_from_local = simple_xform.xform(drag_from); Point2 drag_to_local = simple_xform.xform(drag_to); @@ -1925,7 +1925,7 @@ bool CanvasItemEditor::_gui_input_scale(const Ref<InputEvent> &p_event) { } // Confirm resize - if (b.is_valid() && b->get_button_index() == MOUSE_BUTTON_LEFT && !b->is_pressed()) { + if (b.is_valid() && b->get_button_index() == MouseButton::LEFT && !b->is_pressed()) { if (drag_selection.size() != 1) { _commit_canvas_item_state( drag_selection, @@ -1950,7 +1950,7 @@ bool CanvasItemEditor::_gui_input_scale(const Ref<InputEvent> &p_event) { } // Cancel a drag - if (b.is_valid() && b->get_button_index() == MOUSE_BUTTON_RIGHT && b->is_pressed()) { + if (b.is_valid() && b->get_button_index() == MouseButton::RIGHT && b->is_pressed()) { _restore_canvas_item_state(drag_selection); drag_type = DRAG_NONE; viewport->update(); @@ -1967,7 +1967,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) { if (drag_type == DRAG_NONE) { //Start moving the nodes - if (b.is_valid() && b->get_button_index() == MOUSE_BUTTON_LEFT && b->is_pressed()) { + if (b.is_valid() && b->get_button_index() == MouseButton::LEFT && b->is_pressed()) { if ((b->is_alt_pressed() && !b->is_ctrl_pressed()) || tool == TOOL_MOVE) { List<CanvasItem *> selection = _get_edited_canvas_items(); @@ -2050,7 +2050,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) { } // Confirm the move (only if it was moved) - if (b.is_valid() && !b->is_pressed() && b->get_button_index() == MOUSE_BUTTON_LEFT) { + if (b.is_valid() && !b->is_pressed() && b->get_button_index() == MouseButton::LEFT) { if (transform.affine_inverse().xform(b->get_position()) != drag_from) { if (drag_selection.size() != 1) { _commit_canvas_item_state( @@ -2083,7 +2083,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) { } // Cancel a drag - if (b.is_valid() && b->get_button_index() == MOUSE_BUTTON_RIGHT && b->is_pressed()) { + if (b.is_valid() && b->get_button_index() == MouseButton::RIGHT && b->is_pressed()) { _restore_canvas_item_state(drag_selection, true); snap_target[0] = SNAP_TARGET_NONE; snap_target[1] = SNAP_TARGET_NONE; @@ -2095,7 +2095,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) { // Move the canvas items with the arrow keys if (k.is_valid() && k->is_pressed() && (tool == TOOL_SELECT || tool == TOOL_MOVE) && - (k->get_keycode() == KEY_UP || k->get_keycode() == KEY_DOWN || k->get_keycode() == KEY_LEFT || k->get_keycode() == KEY_RIGHT)) { + (k->get_keycode() == Key::UP || k->get_keycode() == Key::DOWN || k->get_keycode() == Key::LEFT || k->get_keycode() == Key::RIGHT)) { if (!k->is_echo()) { // Start moving the canvas items with the keyboard drag_selection = _get_edited_canvas_items(); @@ -2112,13 +2112,13 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) { bool move_local_base_rotated = k->is_ctrl_pressed() || k->is_meta_pressed(); Vector2 dir; - if (k->get_keycode() == KEY_UP) { + if (k->get_keycode() == Key::UP) { dir += Vector2(0, -1); - } else if (k->get_keycode() == KEY_DOWN) { + } else if (k->get_keycode() == Key::DOWN) { dir += Vector2(0, 1); - } else if (k->get_keycode() == KEY_LEFT) { + } else if (k->get_keycode() == Key::LEFT) { dir += Vector2(-1, 0); - } else if (k->get_keycode() == KEY_RIGHT) { + } else if (k->get_keycode() == Key::RIGHT) { dir += Vector2(1, 0); } if (k->is_shift_pressed()) { @@ -2166,12 +2166,12 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) { } if (k.is_valid() && !k->is_pressed() && drag_type == DRAG_KEY_MOVE && (tool == TOOL_SELECT || tool == TOOL_MOVE) && - (k->get_keycode() == KEY_UP || k->get_keycode() == KEY_DOWN || k->get_keycode() == KEY_LEFT || k->get_keycode() == KEY_RIGHT)) { + (k->get_keycode() == Key::UP || k->get_keycode() == Key::DOWN || k->get_keycode() == Key::LEFT || k->get_keycode() == Key::RIGHT)) { // Confirm canvas items move by arrow keys - if ((!Input::get_singleton()->is_key_pressed(KEY_UP)) && - (!Input::get_singleton()->is_key_pressed(KEY_DOWN)) && - (!Input::get_singleton()->is_key_pressed(KEY_LEFT)) && - (!Input::get_singleton()->is_key_pressed(KEY_RIGHT))) { + if ((!Input::get_singleton()->is_key_pressed(Key::UP)) && + (!Input::get_singleton()->is_key_pressed(Key::DOWN)) && + (!Input::get_singleton()->is_key_pressed(Key::LEFT)) && + (!Input::get_singleton()->is_key_pressed(Key::RIGHT))) { if (drag_selection.size() > 1) { _commit_canvas_item_state( drag_selection, @@ -2192,7 +2192,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) { return true; } - return (k.is_valid() && (k->get_keycode() == KEY_UP || k->get_keycode() == KEY_DOWN || k->get_keycode() == KEY_LEFT || k->get_keycode() == KEY_RIGHT)); // Accept the key event in any case + return (k.is_valid() && (k->get_keycode() == Key::UP || k->get_keycode() == Key::DOWN || k->get_keycode() == Key::LEFT || k->get_keycode() == Key::RIGHT)); // Accept the key event in any case } bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) { @@ -2202,8 +2202,8 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) { if (drag_type == DRAG_NONE) { if (b.is_valid() && - ((b->get_button_index() == MOUSE_BUTTON_RIGHT && b->is_alt_pressed() && tool == TOOL_SELECT) || - (b->get_button_index() == MOUSE_BUTTON_LEFT && tool == TOOL_LIST_SELECT))) { + ((b->get_button_index() == MouseButton::RIGHT && b->is_alt_pressed() && tool == TOOL_SELECT) || + (b->get_button_index() == MouseButton::LEFT && tool == TOOL_LIST_SELECT))) { // Popup the selection menu list Point2 click = transform.affine_inverse().xform(b->get_position()); @@ -2264,15 +2264,15 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) { } } - if (b.is_valid() && b->is_pressed() && b->get_button_index() == MOUSE_BUTTON_RIGHT && b->is_ctrl_pressed()) { - add_node_menu->set_position(get_global_transform().xform(get_local_mouse_position())); + if (b.is_valid() && b->is_pressed() && b->get_button_index() == MouseButton::RIGHT) { add_node_menu->set_size(Vector2(1, 1)); + add_node_menu->set_position(get_screen_position() + b->get_position()); add_node_menu->popup(); node_create_position = transform.affine_inverse().xform((get_local_mouse_position())); return true; } - if (b.is_valid() && b->get_button_index() == MOUSE_BUTTON_LEFT && b->is_pressed() && tool == TOOL_SELECT) { + if (b.is_valid() && b->get_button_index() == MouseButton::LEFT && b->is_pressed() && tool == TOOL_SELECT) { // Single item selection Point2 click = transform.affine_inverse().xform(b->get_position()); @@ -2348,7 +2348,7 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) { } if (drag_type == DRAG_BOX_SELECTION) { - if (b.is_valid() && !b->is_pressed() && b->get_button_index() == MOUSE_BUTTON_LEFT) { + if (b.is_valid() && !b->is_pressed() && b->get_button_index() == MouseButton::LEFT) { // Confirms box selection Node *scene = editor->get_edited_scene(); if (scene) { @@ -2377,7 +2377,7 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) { return true; } - if (b.is_valid() && b->is_pressed() && b->get_button_index() == MOUSE_BUTTON_RIGHT) { + if (b.is_valid() && b->is_pressed() && b->get_button_index() == MouseButton::RIGHT) { // Cancel box selection drag_type = DRAG_NONE; viewport->update(); @@ -2392,7 +2392,7 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) { } } - if (k.is_valid() && k->is_pressed() && k->get_keycode() == KEY_ESCAPE && drag_type == DRAG_NONE && tool == TOOL_SELECT) { + if (k.is_valid() && k->is_pressed() && k->get_keycode() == Key::ESCAPE && drag_type == DRAG_NONE && tool == TOOL_SELECT) { // Unselect everything editor_selection->clear(); viewport->update(); @@ -2414,7 +2414,7 @@ bool CanvasItemEditor::_gui_input_ruler_tool(const Ref<InputEvent> &p_event) { ruler_tool_origin = snap_point(viewport->get_local_mouse_position() / zoom + view_offset); } - if (b.is_valid() && b->get_button_index() == MOUSE_BUTTON_LEFT) { + if (b.is_valid() && b->get_button_index() == MouseButton::LEFT) { if (b->is_pressed()) { ruler_tool_active = true; } else { @@ -3354,8 +3354,8 @@ void CanvasItemEditor::_draw_selection() { } // Draw the move handles - bool is_ctrl = Input::get_singleton()->is_key_pressed(KEY_CTRL); - bool is_alt = Input::get_singleton()->is_key_pressed(KEY_ALT); + bool is_ctrl = Input::get_singleton()->is_key_pressed(Key::CTRL); + bool is_alt = Input::get_singleton()->is_key_pressed(Key::ALT); if (tool == TOOL_MOVE && show_transformation_gizmos) { if (_is_node_movable(canvas_item)) { Transform2D unscaled_transform = (xform * canvas_item->get_transform().affine_inverse() * canvas_item->_edit_get_transform()).orthonormalized(); @@ -3391,7 +3391,7 @@ void CanvasItemEditor::_draw_selection() { Transform2D simple_xform = viewport->get_transform() * unscaled_transform; Size2 scale_factor = Size2(SCALE_HANDLE_DISTANCE, SCALE_HANDLE_DISTANCE); - bool uniform = Input::get_singleton()->is_key_pressed(KEY_SHIFT); + bool uniform = Input::get_singleton()->is_key_pressed(Key::SHIFT); Point2 offset = (simple_xform.affine_inverse().xform(drag_to) - simple_xform.affine_inverse().xform(drag_from)) * zoom; if (drag_type == DRAG_SCALE_X) { @@ -5330,9 +5330,9 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { select_button->set_toggle_mode(true); select_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_SELECT)); select_button->set_pressed(true); - select_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/select_mode", TTR("Select Mode"), KEY_Q)); + select_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/select_mode", TTR("Select Mode"), Key::Q)); select_button->set_shortcut_context(this); - select_button->set_tooltip(keycode_get_string(KEY_MASK_CMD) + TTR("Drag: Rotate selected node around pivot.") + "\n" + TTR("Alt+Drag: Move selected node.") + "\n" + TTR("V: Set selected node's pivot position.") + "\n" + TTR("Alt+RMB: Show list of all nodes at position clicked, including locked.") + "\n" + keycode_get_string(KEY_MASK_CMD) + TTR("RMB: Add node at position clicked.")); + select_button->set_tooltip(keycode_get_string((Key)KeyModifierMask::CMD) + TTR("Drag: Rotate selected node around pivot.") + "\n" + TTR("Alt+Drag: Move selected node.") + "\n" + TTR("V: Set selected node's pivot position.") + "\n" + TTR("Alt+RMB: Show list of all nodes at position clicked, including locked.") + "\n" + keycode_get_string((Key)KeyModifierMask::CMD) + TTR("RMB: Add node at position clicked.")); hb->add_child(memnew(VSeparator)); @@ -5341,7 +5341,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { hb->add_child(move_button); move_button->set_toggle_mode(true); move_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_MOVE)); - move_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/move_mode", TTR("Move Mode"), KEY_W)); + move_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/move_mode", TTR("Move Mode"), Key::W)); move_button->set_shortcut_context(this); move_button->set_tooltip(TTR("Move Mode")); @@ -5350,7 +5350,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { hb->add_child(rotate_button); rotate_button->set_toggle_mode(true); rotate_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_ROTATE)); - rotate_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/rotate_mode", TTR("Rotate Mode"), KEY_E)); + rotate_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/rotate_mode", TTR("Rotate Mode"), Key::E)); rotate_button->set_shortcut_context(this); rotate_button->set_tooltip(TTR("Rotate Mode")); @@ -5359,7 +5359,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { hb->add_child(scale_button); scale_button->set_toggle_mode(true); scale_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_SCALE)); - scale_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/scale_mode", TTR("Scale Mode"), KEY_S)); + scale_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/scale_mode", TTR("Scale Mode"), Key::S)); scale_button->set_shortcut_context(this); scale_button->set_tooltip(TTR("Scale Mode")); @@ -5384,7 +5384,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { hb->add_child(pan_button); pan_button->set_toggle_mode(true); 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(ED_SHORTCUT("canvas_item_editor/pan_mode", TTR("Pan Mode"), Key::G)); pan_button->set_shortcut_context(this); pan_button->set_tooltip(TTR("You can also use Pan View shortcut (Space by default) to pan in any mode.")); @@ -5393,7 +5393,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { hb->add_child(ruler_button); ruler_button->set_toggle_mode(true); ruler_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_RULER)); - ruler_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/ruler_mode", TTR("Ruler Mode"), KEY_R)); + ruler_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/ruler_mode", TTR("Ruler Mode"), Key::R)); ruler_button->set_shortcut_context(this); ruler_button->set_tooltip(TTR("Ruler Mode")); @@ -5405,7 +5405,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { smart_snap_button->set_toggle_mode(true); smart_snap_button->connect("toggled", callable_mp(this, &CanvasItemEditor::_button_toggle_smart_snap)); smart_snap_button->set_tooltip(TTR("Toggle smart snapping.")); - smart_snap_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/use_smart_snap", TTR("Use Smart Snap"), KEY_MASK_SHIFT | KEY_S)); + smart_snap_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/use_smart_snap", TTR("Use Smart Snap"), KeyModifierMask::SHIFT | Key::S)); smart_snap_button->set_shortcut_context(this); grid_snap_button = memnew(Button); @@ -5414,7 +5414,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { grid_snap_button->set_toggle_mode(true); grid_snap_button->connect("toggled", callable_mp(this, &CanvasItemEditor::_button_toggle_grid_snap)); grid_snap_button->set_tooltip(TTR("Toggle grid snapping.")); - grid_snap_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/use_grid_snap", TTR("Use Grid Snap"), KEY_MASK_SHIFT | KEY_G)); + grid_snap_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/use_grid_snap", TTR("Use Grid Snap"), KeyModifierMask::SHIFT | Key::G)); grid_snap_button->set_shortcut_context(this); snap_config_menu = memnew(MenuButton); @@ -5457,7 +5457,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { lock_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(LOCK_SELECTED)); lock_button->set_tooltip(TTR("Lock selected node, preventing selection and movement.")); // Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused. - lock_button->set_shortcut(ED_SHORTCUT("editor/lock_selected_nodes", TTR("Lock Selected Node(s)"), KEY_MASK_CMD | KEY_L)); + lock_button->set_shortcut(ED_SHORTCUT("editor/lock_selected_nodes", TTR("Lock Selected Node(s)"), KeyModifierMask::CMD | Key::L)); unlock_button = memnew(Button); unlock_button->set_flat(true); @@ -5465,7 +5465,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { unlock_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(UNLOCK_SELECTED)); unlock_button->set_tooltip(TTR("Unlock selected node, allowing selection and movement.")); // Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused. - unlock_button->set_shortcut(ED_SHORTCUT("editor/unlock_selected_nodes", TTR("Unlock Selected Node(s)"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_L)); + unlock_button->set_shortcut(ED_SHORTCUT("editor/unlock_selected_nodes", TTR("Unlock Selected Node(s)"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::L)); group_button = memnew(Button); group_button->set_flat(true); @@ -5473,7 +5473,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { group_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(GROUP_SELECTED)); group_button->set_tooltip(TTR("Makes sure the object's children are not selectable.")); // Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused. - group_button->set_shortcut(ED_SHORTCUT("editor/group_selected_nodes", TTR("Group Selected Node(s)"), KEY_MASK_CMD | KEY_G)); + group_button->set_shortcut(ED_SHORTCUT("editor/group_selected_nodes", TTR("Group Selected Node(s)"), KeyModifierMask::CMD | Key::G)); ungroup_button = memnew(Button); ungroup_button->set_flat(true); @@ -5481,7 +5481,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { ungroup_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(UNGROUP_SELECTED)); ungroup_button->set_tooltip(TTR("Restores the object's children's ability to be selected.")); // Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused. - ungroup_button->set_shortcut(ED_SHORTCUT("editor/ungroup_selected_nodes", TTR("Ungroup Selected Node(s)"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_G)); + ungroup_button->set_shortcut(ED_SHORTCUT("editor/ungroup_selected_nodes", TTR("Ungroup Selected Node(s)"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::G)); hb->add_child(memnew(VSeparator)); @@ -5495,7 +5495,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { p->set_hide_on_checkable_item_selection(false); p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_show_bones", TTR("Show Bones")), SKELETON_SHOW_BONES); p->add_separator(); - p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_make_bones", TTR("Make Bone2D Node(s) from Node(s)"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_B), SKELETON_MAKE_BONES); + p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_make_bones", TTR("Make Bone2D Node(s) from Node(s)"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::B), SKELETON_MAKE_BONES); p->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback)); hb->add_child(memnew(VSeparator)); @@ -5519,21 +5519,21 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { p = view_menu->get_popup(); p->set_hide_on_checkable_item_selection(false); - p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_grid", TTR("Always Show Grid"), KEY_NUMBERSIGN), SHOW_GRID); - p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_helpers", TTR("Show Helpers"), KEY_H), SHOW_HELPERS); + p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_grid", TTR("Always Show Grid"), Key::NUMBERSIGN), SHOW_GRID); + p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_helpers", TTR("Show Helpers"), Key::H), SHOW_HELPERS); p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_rulers", TTR("Show Rulers")), SHOW_RULERS); - p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_guides", TTR("Show Guides"), KEY_Y), SHOW_GUIDES); + p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_guides", TTR("Show Guides"), Key::Y), SHOW_GUIDES); p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_origin", TTR("Show Origin")), SHOW_ORIGIN); p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_viewport", TTR("Show Viewport")), SHOW_VIEWPORT); p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_edit_locks", TTR("Show Group And Lock Icons")), SHOW_EDIT_LOCKS); p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_transformation_gizmos", TTR("Show Transformation Gizmos")), SHOW_TRANSFORMATION_GIZMOS); p->add_separator(); - p->add_shortcut(ED_SHORTCUT("canvas_item_editor/center_selection", TTR("Center Selection"), KEY_F), VIEW_CENTER_TO_SELECTION); - p->add_shortcut(ED_SHORTCUT("canvas_item_editor/frame_selection", TTR("Frame Selection"), KEY_MASK_SHIFT | KEY_F), VIEW_FRAME_TO_SELECTION); + p->add_shortcut(ED_SHORTCUT("canvas_item_editor/center_selection", TTR("Center Selection"), Key::F), VIEW_CENTER_TO_SELECTION); + p->add_shortcut(ED_SHORTCUT("canvas_item_editor/frame_selection", TTR("Frame Selection"), KeyModifierMask::SHIFT | Key::F), VIEW_FRAME_TO_SELECTION); p->add_shortcut(ED_SHORTCUT("canvas_item_editor/clear_guides", TTR("Clear Guides")), CLEAR_GUIDES); p->add_separator(); - p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/preview_canvas_scale", TTR("Preview Canvas Scale"), KEY_MASK_SHIFT | KEY_MASK_CMD | KEY_P), PREVIEW_CANVAS_SCALE); + p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/preview_canvas_scale", TTR("Preview Canvas Scale"), KeyModifierMask::SHIFT | KeyModifierMask::CMD | Key::P), PREVIEW_CANVAS_SCALE); hb->add_child(memnew(VSeparator)); @@ -5604,7 +5604,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { key_insert_button->set_focus_mode(FOCUS_NONE); key_insert_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(ANIM_INSERT_KEY)); key_insert_button->set_tooltip(TTR("Insert keys (based on mask).")); - key_insert_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/anim_insert_key", TTR("Insert Key"), KEY_INSERT)); + key_insert_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/anim_insert_key", TTR("Insert Key"), Key::INSERT)); key_insert_button->set_shortcut_context(this); animation_hb->add_child(key_insert_button); @@ -5627,11 +5627,11 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { p = animation_menu->get_popup(); p->add_shortcut(ED_GET_SHORTCUT("canvas_item_editor/anim_insert_key"), ANIM_INSERT_KEY); - p->add_shortcut(ED_SHORTCUT("canvas_item_editor/anim_insert_key_existing_tracks", TTR("Insert Key (Existing Tracks)"), KEY_MASK_CMD + KEY_INSERT), ANIM_INSERT_KEY_EXISTING); + p->add_shortcut(ED_SHORTCUT("canvas_item_editor/anim_insert_key_existing_tracks", TTR("Insert Key (Existing Tracks)"), KeyModifierMask::CMD + Key::INSERT), ANIM_INSERT_KEY_EXISTING); p->add_separator(); p->add_shortcut(ED_SHORTCUT("canvas_item_editor/anim_copy_pose", TTR("Copy Pose")), ANIM_COPY_POSE); p->add_shortcut(ED_SHORTCUT("canvas_item_editor/anim_paste_pose", TTR("Paste Pose")), ANIM_PASTE_POSE); - p->add_shortcut(ED_SHORTCUT("canvas_item_editor/anim_clear_pose", TTR("Clear Pose"), KEY_MASK_SHIFT | KEY_K), ANIM_CLEAR_POSE); + p->add_shortcut(ED_SHORTCUT("canvas_item_editor/anim_clear_pose", TTR("Clear Pose"), KeyModifierMask::SHIFT | Key::K), ANIM_CLEAR_POSE); snap_dialog = memnew(SnapDialog); snap_dialog->connect("confirmed", callable_mp(this, &CanvasItemEditor::_snap_changed)); @@ -5651,9 +5651,9 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { add_node_menu->add_icon_item(editor->get_scene_tree_dock()->get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")), TTR("Instance Scene Here")); add_node_menu->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_add_node_pressed)); - multiply_grid_step_shortcut = ED_SHORTCUT("canvas_item_editor/multiply_grid_step", TTR("Multiply grid step by 2"), KEY_KP_MULTIPLY); - divide_grid_step_shortcut = ED_SHORTCUT("canvas_item_editor/divide_grid_step", TTR("Divide grid step by 2"), KEY_KP_DIVIDE); - pan_view_shortcut = ED_SHORTCUT("canvas_item_editor/pan_view", TTR("Pan View"), KEY_SPACE); + multiply_grid_step_shortcut = ED_SHORTCUT("canvas_item_editor/multiply_grid_step", TTR("Multiply grid step by 2"), Key::KP_MULTIPLY); + divide_grid_step_shortcut = ED_SHORTCUT("canvas_item_editor/divide_grid_step", TTR("Divide grid step by 2"), Key::KP_DIVIDE); + pan_view_shortcut = ED_SHORTCUT("canvas_item_editor/pan_view", TTR("Pan View"), Key::SPACE); skeleton_menu->get_popup()->set_item_checked(skeleton_menu->get_popup()->get_item_index(SKELETON_SHOW_BONES), true); singleton = this; @@ -5662,16 +5662,16 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { // those shortcuts one by one. // Resetting zoom to 100% is a duplicate shortcut of `canvas_item_editor/reset_zoom`, // but it ensures both 1 and Ctrl + 0 can be used to reset zoom. - ED_SHORTCUT("canvas_item_editor/zoom_3.125_percent", TTR("Zoom to 3.125%"), KEY_MASK_SHIFT | KEY_5); - ED_SHORTCUT("canvas_item_editor/zoom_6.25_percent", TTR("Zoom to 6.25%"), KEY_MASK_SHIFT | KEY_4); - ED_SHORTCUT("canvas_item_editor/zoom_12.5_percent", TTR("Zoom to 12.5%"), KEY_MASK_SHIFT | KEY_3); - ED_SHORTCUT("canvas_item_editor/zoom_25_percent", TTR("Zoom to 25%"), KEY_MASK_SHIFT | KEY_2); - ED_SHORTCUT("canvas_item_editor/zoom_50_percent", TTR("Zoom to 50%"), KEY_MASK_SHIFT | KEY_1); - ED_SHORTCUT("canvas_item_editor/zoom_100_percent", TTR("Zoom to 100%"), KEY_1); - ED_SHORTCUT("canvas_item_editor/zoom_200_percent", TTR("Zoom to 200%"), KEY_2); - ED_SHORTCUT("canvas_item_editor/zoom_400_percent", TTR("Zoom to 400%"), KEY_3); - ED_SHORTCUT("canvas_item_editor/zoom_800_percent", TTR("Zoom to 800%"), KEY_4); - ED_SHORTCUT("canvas_item_editor/zoom_1600_percent", TTR("Zoom to 1600%"), KEY_5); + ED_SHORTCUT("canvas_item_editor/zoom_3.125_percent", TTR("Zoom to 3.125%"), KeyModifierMask::SHIFT | Key::KEY_5); + ED_SHORTCUT("canvas_item_editor/zoom_6.25_percent", TTR("Zoom to 6.25%"), KeyModifierMask::SHIFT | Key::KEY_4); + ED_SHORTCUT("canvas_item_editor/zoom_12.5_percent", TTR("Zoom to 12.5%"), KeyModifierMask::SHIFT | Key::KEY_3); + ED_SHORTCUT("canvas_item_editor/zoom_25_percent", TTR("Zoom to 25%"), KeyModifierMask::SHIFT | Key::KEY_2); + ED_SHORTCUT("canvas_item_editor/zoom_50_percent", TTR("Zoom to 50%"), KeyModifierMask::SHIFT | Key::KEY_1); + ED_SHORTCUT("canvas_item_editor/zoom_100_percent", TTR("Zoom to 100%"), Key::KEY_1); + ED_SHORTCUT("canvas_item_editor/zoom_200_percent", TTR("Zoom to 200%"), Key::KEY_2); + ED_SHORTCUT("canvas_item_editor/zoom_400_percent", TTR("Zoom to 400%"), Key::KEY_3); + ED_SHORTCUT("canvas_item_editor/zoom_800_percent", TTR("Zoom to 800%"), Key::KEY_4); + ED_SHORTCUT("canvas_item_editor/zoom_1600_percent", TTR("Zoom to 1600%"), Key::KEY_5); set_process_unhandled_key_input(true); @@ -5836,7 +5836,7 @@ void CanvasItemEditorViewport::_create_nodes(Node *parent, Node *child, String & Ref<Texture2D> texture = Ref<Texture2D>(Object::cast_to<Texture2D>(ResourceCache::get(path))); if (parent) { - editor_data->get_undo_redo().add_do_method(parent, "add_child", child); + editor_data->get_undo_redo().add_do_method(parent, "add_child", child, true); editor_data->get_undo_redo().add_do_method(child, "set_owner", editor->get_edited_scene()); editor_data->get_undo_redo().add_do_reference(child); editor_data->get_undo_redo().add_undo_method(parent, "remove_child", child); @@ -6059,9 +6059,9 @@ bool CanvasItemEditorViewport::_only_packed_scenes_selected() const { } void CanvasItemEditorViewport::drop_data(const Point2 &p_point, const Variant &p_data) { - bool is_shift = Input::get_singleton()->is_key_pressed(KEY_SHIFT); - bool is_ctrl = Input::get_singleton()->is_key_pressed(KEY_CTRL); - bool is_alt = Input::get_singleton()->is_key_pressed(KEY_ALT); + bool is_shift = Input::get_singleton()->is_key_pressed(Key::SHIFT); + bool is_ctrl = Input::get_singleton()->is_key_pressed(Key::CTRL); + bool is_alt = Input::get_singleton()->is_key_pressed(Key::ALT); selected_files.clear(); Dictionary d = p_data; @@ -6192,14 +6192,14 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte label = memnew(Label); label->add_theme_color_override("font_shadow_color", Color(0, 0, 0, 1)); - label->add_theme_constant_override("shadow_as_outline", 1 * EDSCALE); + label->add_theme_constant_override("shadow_outline_size", 1 * EDSCALE); label->hide(); canvas_item_editor->get_controls_container()->add_child(label); label_desc = memnew(Label); label_desc->add_theme_color_override("font_color", Color(0.6f, 0.6f, 0.6f, 1)); label_desc->add_theme_color_override("font_shadow_color", Color(0.2f, 0.2f, 0.2f, 1)); - label_desc->add_theme_constant_override("shadow_as_outline", 1 * EDSCALE); + label_desc->add_theme_constant_override("shadow_outline_size", 1 * EDSCALE); label_desc->add_theme_constant_override("line_spacing", 0); label_desc->hide(); canvas_item_editor->get_controls_container()->add_child(label_desc); diff --git a/editor/plugins/collision_polygon_3d_editor_plugin.cpp b/editor/plugins/collision_polygon_3d_editor_plugin.cpp index 53314db1e9..7a8680c4dd 100644 --- a/editor/plugins/collision_polygon_3d_editor_plugin.cpp +++ b/editor/plugins/collision_polygon_3d_editor_plugin.cpp @@ -142,7 +142,7 @@ EditorPlugin::AfterGUIInput CollisionPolygon3DEditor::forward_spatial_gui_input( switch (mode) { case MODE_CREATE: { - if (mb->get_button_index() == MOUSE_BUTTON_LEFT && mb->is_pressed()) { + if (mb->get_button_index() == MouseButton::LEFT && mb->is_pressed()) { if (!wip_active) { wip.clear(); wip.push_back(cpoint); @@ -166,14 +166,14 @@ EditorPlugin::AfterGUIInput CollisionPolygon3DEditor::forward_spatial_gui_input( return EditorPlugin::AFTER_GUI_INPUT_STOP; } } - } else if (mb->get_button_index() == MOUSE_BUTTON_RIGHT && mb->is_pressed() && wip_active) { + } else if (mb->get_button_index() == MouseButton::RIGHT && mb->is_pressed() && wip_active) { _wip_close(); } } break; case MODE_EDIT: { - if (mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb->get_button_index() == MouseButton::LEFT) { if (mb->is_pressed()) { if (mb->is_ctrl_pressed()) { if (poly.size() < 3) { @@ -267,7 +267,7 @@ EditorPlugin::AfterGUIInput CollisionPolygon3DEditor::forward_spatial_gui_input( } } } - if (mb->get_button_index() == MOUSE_BUTTON_RIGHT && mb->is_pressed() && edited_point == -1) { + if (mb->get_button_index() == MouseButton::RIGHT && mb->is_pressed() && edited_point == -1) { int closest_idx = -1; Vector2 closest_pos; real_t closest_dist = 1e10; @@ -301,7 +301,7 @@ EditorPlugin::AfterGUIInput CollisionPolygon3DEditor::forward_spatial_gui_input( Ref<InputEventMouseMotion> mm = p_event; if (mm.is_valid()) { - if (edited_point != -1 && (wip_active || mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT)) { + if (edited_point != -1 && (wip_active || (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE)) { Vector2 gpoint = mm->get_position(); Vector3 ray_from = p_camera->project_ray_origin(gpoint); @@ -317,7 +317,7 @@ EditorPlugin::AfterGUIInput CollisionPolygon3DEditor::forward_spatial_gui_input( Vector2 cpoint(spoint.x, spoint.y); - if (snap_ignore && !Input::get_singleton()->is_key_pressed(KEY_CTRL)) { + if (snap_ignore && !Input::get_singleton()->is_key_pressed(Key::CTRL)) { snap_ignore = false; } diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp index fb32d7b1fd..94fd9a5a08 100644 --- a/editor/plugins/collision_shape_2d_editor_plugin.cpp +++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp @@ -183,7 +183,7 @@ void CollisionShape2DEditor::set_handle(int idx, Point2 &p_point) { size.y = p_point.y * RECT_HANDLES[idx].y * 2; } - if (Input::get_singleton()->is_key_pressed(KEY_ALT)) { + if (Input::get_singleton()->is_key_pressed(Key::ALT)) { rect->set_size(size.abs()); node->set_global_position(original_transform.get_origin()); } else { @@ -333,7 +333,7 @@ bool CollisionShape2DEditor::forward_canvas_gui_input(const Ref<InputEvent> &p_e if (mb.is_valid()) { Vector2 gpoint = mb->get_position(); - if (mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb->get_button_index() == MouseButton::LEFT) { if (mb->is_pressed()) { for (int i = 0; i < handles.size(); i++) { if (xform.xform(handles[i]).distance_to(gpoint) < 8) { @@ -394,7 +394,7 @@ bool CollisionShape2DEditor::forward_canvas_gui_input(const Ref<InputEvent> &p_e return false; } - if (shape_type == RECTANGLE_SHAPE && k->get_keycode() == KEY_ALT) { + if (shape_type == RECTANGLE_SHAPE && k->get_keycode() == Key::ALT) { set_handle(edit_handle, last_point); // Update handle when Alt key is toggled. } } diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp index 43eb6a7ce9..005cf27e8a 100644 --- a/editor/plugins/curve_editor_plugin.cpp +++ b/editor/plugins/curve_editor_plugin.cpp @@ -115,16 +115,16 @@ void CurveEditor::gui_input(const Ref<InputEvent> &p_event) { } switch (mb.get_button_index()) { - case MOUSE_BUTTON_RIGHT: + case MouseButton::RIGHT: _context_click_pos = mpos; open_context_menu(get_global_transform().xform(mpos)); break; - case MOUSE_BUTTON_MIDDLE: + case MouseButton::MIDDLE: remove_point(_hover_point); break; - case MOUSE_BUTTON_LEFT: + case MouseButton::LEFT: _dragging = true; break; default: @@ -132,7 +132,7 @@ void CurveEditor::gui_input(const Ref<InputEvent> &p_event) { } } - if (!mb.is_pressed() && _dragging && mb.get_button_index() == MOUSE_BUTTON_LEFT) { + if (!mb.is_pressed() && _dragging && mb.get_button_index() == MouseButton::LEFT) { _dragging = false; if (_has_undo_data) { UndoRedo &ur = *EditorNode::get_singleton()->get_undo_redo(); @@ -210,7 +210,7 @@ void CurveEditor::gui_input(const Ref<InputEvent> &p_event) { tangent = 9999 * (dir.y >= 0 ? 1 : -1); } - bool link = !Input::get_singleton()->is_key_pressed(KEY_SHIFT); + bool link = !Input::get_singleton()->is_key_pressed(Key::SHIFT); if (_selected_tangent == TANGENT_LEFT) { curve.set_point_left_tangent(_selected_point, tangent); @@ -240,7 +240,7 @@ void CurveEditor::gui_input(const Ref<InputEvent> &p_event) { const InputEventKey &key = **key_ref; if (key.is_pressed() && _selected_point != -1) { - if (key.get_keycode() == KEY_DELETE) { + if (key.get_keycode() == Key::KEY_DELETE) { remove_point(_selected_point); } } diff --git a/editor/plugins/debugger_editor_plugin.cpp b/editor/plugins/debugger_editor_plugin.cpp index cc916aad8b..51e1b639a4 100644 --- a/editor/plugins/debugger_editor_plugin.cpp +++ b/editor/plugins/debugger_editor_plugin.cpp @@ -41,10 +41,10 @@ DebuggerEditorPlugin::DebuggerEditorPlugin(EditorNode *p_editor, MenuButton *p_debug_menu) { EditorDebuggerServer::initialize(); - ED_SHORTCUT("debugger/step_into", TTR("Step Into"), KEY_F11); - ED_SHORTCUT("debugger/step_over", TTR("Step Over"), KEY_F10); + ED_SHORTCUT("debugger/step_into", TTR("Step Into"), Key::F11); + ED_SHORTCUT("debugger/step_over", TTR("Step Over"), Key::F10); ED_SHORTCUT("debugger/break", TTR("Break")); - ED_SHORTCUT("debugger/continue", TTR("Continue"), KEY_F12); + ED_SHORTCUT("debugger/continue", TTR("Continue"), Key::F12); ED_SHORTCUT("debugger/keep_debugger_open", TTR("Keep Debugger Open")); ED_SHORTCUT("debugger/debug_with_external_editor", TTR("Debug with External Editor")); diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index 4cb2c0a76b..9702c7e734 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -297,12 +297,14 @@ EditorPackedScenePreviewPlugin::EditorPackedScenePreviewPlugin() { ////////////////////////////////////////////////////////////////// -void EditorMaterialPreviewPlugin::_preview_done(const Variant &p_udata) { - preview_done.set(); +void EditorMaterialPreviewPlugin::_generate_frame_started() { + RS::get_singleton()->viewport_set_update_mode(viewport, RS::VIEWPORT_UPDATE_ONCE); //once used for capture + + RS::get_singleton()->request_frame_drawn_callback(callable_mp(const_cast<EditorMaterialPreviewPlugin *>(this), &EditorMaterialPreviewPlugin::_preview_done)); } -void EditorMaterialPreviewPlugin::_bind_methods() { - ClassDB::bind_method("_preview_done", &EditorMaterialPreviewPlugin::_preview_done); +void EditorMaterialPreviewPlugin::_preview_done() { + preview_done.post(); } bool EditorMaterialPreviewPlugin::handles(const String &p_type) const { @@ -320,14 +322,9 @@ Ref<Texture2D> EditorMaterialPreviewPlugin::generate(const RES &p_from, const Si if (material->get_shader_mode() == Shader::MODE_SPATIAL) { RS::get_singleton()->mesh_surface_set_material(sphere, 0, material->get_rid()); - RS::get_singleton()->viewport_set_update_mode(viewport, RS::VIEWPORT_UPDATE_ONCE); //once used for capture + RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<EditorMaterialPreviewPlugin *>(this), &EditorMaterialPreviewPlugin::_generate_frame_started), Vector<Variant>(), Object::CONNECT_ONESHOT); - preview_done.clear(); - RS::get_singleton()->request_frame_drawn_callback(const_cast<EditorMaterialPreviewPlugin *>(this), "_preview_done", Variant()); - - while (!preview_done.is_set()) { - OS::get_singleton()->delay_usec(10); - } + preview_done.wait(); Ref<Image> img = RS::get_singleton()->texture_2d_get(viewport_texture); RS::get_singleton()->mesh_surface_set_material(sphere, 0, RID()); @@ -699,12 +696,14 @@ EditorAudioStreamPreviewPlugin::EditorAudioStreamPreviewPlugin() { /////////////////////////////////////////////////////////////////////////// -void EditorMeshPreviewPlugin::_preview_done(const Variant &p_udata) { - preview_done.set(); +void EditorMeshPreviewPlugin::_generate_frame_started() { + RS::get_singleton()->viewport_set_update_mode(viewport, RS::VIEWPORT_UPDATE_ONCE); //once used for capture + + RS::get_singleton()->request_frame_drawn_callback(callable_mp(const_cast<EditorMeshPreviewPlugin *>(this), &EditorMeshPreviewPlugin::_preview_done)); } -void EditorMeshPreviewPlugin::_bind_methods() { - ClassDB::bind_method("_preview_done", &EditorMeshPreviewPlugin::_preview_done); +void EditorMeshPreviewPlugin::_preview_done() { + preview_done.post(); } bool EditorMeshPreviewPlugin::handles(const String &p_type) const { @@ -735,14 +734,9 @@ Ref<Texture2D> EditorMeshPreviewPlugin::generate(const RES &p_from, const Size2 xform.origin.z -= rot_aabb.size.z * 2; RS::get_singleton()->instance_set_transform(mesh_instance, xform); - RS::get_singleton()->viewport_set_update_mode(viewport, RS::VIEWPORT_UPDATE_ONCE); //once used for capture + RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<EditorMeshPreviewPlugin *>(this), &EditorMeshPreviewPlugin::_generate_frame_started), Vector<Variant>(), Object::CONNECT_ONESHOT); - preview_done.clear(); - RS::get_singleton()->request_frame_drawn_callback(const_cast<EditorMeshPreviewPlugin *>(this), "_preview_done", Variant()); - - while (!preview_done.is_set()) { - OS::get_singleton()->delay_usec(10); - } + preview_done.wait(); Ref<Image> img = RS::get_singleton()->texture_2d_get(viewport_texture); ERR_FAIL_COND_V(img.is_null(), Ref<ImageTexture>()); @@ -814,12 +808,14 @@ EditorMeshPreviewPlugin::~EditorMeshPreviewPlugin() { /////////////////////////////////////////////////////////////////////////// -void EditorFontPreviewPlugin::_preview_done(const Variant &p_udata) { - preview_done.set(); +void EditorFontPreviewPlugin::_generate_frame_started() { + RS::get_singleton()->viewport_set_update_mode(viewport, RS::VIEWPORT_UPDATE_ONCE); //once used for capture + + RS::get_singleton()->request_frame_drawn_callback(callable_mp(const_cast<EditorFontPreviewPlugin *>(this), &EditorFontPreviewPlugin::_preview_done)); } -void EditorFontPreviewPlugin::_bind_methods() { - ClassDB::bind_method("_preview_done", &EditorFontPreviewPlugin::_preview_done); +void EditorFontPreviewPlugin::_preview_done() { + preview_done.post(); } bool EditorFontPreviewPlugin::handles(const String &p_type) const { @@ -857,13 +853,9 @@ Ref<Texture2D> EditorFontPreviewPlugin::generate_from_path(const String &p_path, font->draw_string(canvas_item, pos, sample, HALIGN_LEFT, -1.f, 50, Color(1, 1, 1)); - preview_done.clear(); - RS::get_singleton()->viewport_set_update_mode(viewport, RS::VIEWPORT_UPDATE_ONCE); //once used for capture - RS::get_singleton()->request_frame_drawn_callback(const_cast<EditorFontPreviewPlugin *>(this), "_preview_done", Variant()); + RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<EditorFontPreviewPlugin *>(this), &EditorFontPreviewPlugin::_generate_frame_started), Vector<Variant>(), Object::CONNECT_ONESHOT); - while (!preview_done.is_set()) { - OS::get_singleton()->delay_usec(10); - } + preview_done.wait(); RS::get_singleton()->canvas_item_clear(canvas_item); diff --git a/editor/plugins/editor_preview_plugins.h b/editor/plugins/editor_preview_plugins.h index 091feae5fb..bf52f5771d 100644 --- a/editor/plugins/editor_preview_plugins.h +++ b/editor/plugins/editor_preview_plugins.h @@ -92,12 +92,10 @@ class EditorMaterialPreviewPlugin : public EditorResourcePreviewGenerator { RID light2; RID light_instance2; RID camera; - mutable SafeFlag preview_done; + Semaphore preview_done; - void _preview_done(const Variant &p_udata); - -protected: - static void _bind_methods(); + void _generate_frame_started(); + void _preview_done(); public: virtual bool handles(const String &p_type) const override; @@ -136,12 +134,10 @@ class EditorMeshPreviewPlugin : public EditorResourcePreviewGenerator { RID light2; RID light_instance2; RID camera; - mutable SafeFlag preview_done; - - void _preview_done(const Variant &p_udata); + Semaphore preview_done; -protected: - static void _bind_methods(); + void _generate_frame_started(); + void _preview_done(); public: virtual bool handles(const String &p_type) const override; @@ -158,12 +154,10 @@ class EditorFontPreviewPlugin : public EditorResourcePreviewGenerator { RID viewport_texture; RID canvas; RID canvas_item; - mutable SafeFlag preview_done; + Semaphore preview_done; - void _preview_done(const Variant &p_udata); - -protected: - static void _bind_methods(); + void _generate_frame_started(); + void _preview_done(); public: virtual bool handles(const String &p_type) const override; @@ -177,12 +171,10 @@ public: class EditorTileMapPatternPreviewPlugin : public EditorResourcePreviewGenerator { GDCLASS(EditorTileMapPatternPreviewPlugin, EditorResourcePreviewGenerator); - mutable SafeFlag preview_done; - - void _preview_done(const Variant &p_udata); + Semaphore preview_done; -protected: - static void _bind_methods(); + void _generate_frame_started(); + void _preview_done(); public: virtual bool handles(const String &p_type) const override; diff --git a/editor/plugins/gradient_editor_plugin.cpp b/editor/plugins/gradient_editor_plugin.cpp index 355bdb69d8..da050abc02 100644 --- a/editor/plugins/gradient_editor_plugin.cpp +++ b/editor/plugins/gradient_editor_plugin.cpp @@ -46,6 +46,8 @@ void GradientEditor::_gradient_changed() { editing = true; Vector<Gradient::Point> points = gradient->get_points(); set_points(points); + set_interpolation_mode(gradient->get_interpolation_mode()); + update(); editing = false; } @@ -55,8 +57,10 @@ void GradientEditor::_ramp_changed() { undo_redo->create_action(TTR("Gradient Edited")); undo_redo->add_do_method(gradient.ptr(), "set_offsets", get_offsets()); undo_redo->add_do_method(gradient.ptr(), "set_colors", get_colors()); + undo_redo->add_do_method(gradient.ptr(), "set_interpolation_mode", get_interpolation_mode()); undo_redo->add_undo_method(gradient.ptr(), "set_offsets", gradient->get_offsets()); undo_redo->add_undo_method(gradient.ptr(), "set_colors", gradient->get_colors()); + undo_redo->add_undo_method(gradient.ptr(), "set_interpolation_mode", gradient->get_interpolation_mode()); undo_redo->commit_action(); editing = false; } @@ -69,6 +73,14 @@ void GradientEditor::set_gradient(const Ref<Gradient> &p_gradient) { connect("ramp_changed", callable_mp(this, &GradientEditor::_ramp_changed)); gradient->connect("changed", callable_mp(this, &GradientEditor::_gradient_changed)); set_points(gradient->get_points()); + set_interpolation_mode(gradient->get_interpolation_mode()); +} + +void GradientEditor::reverse_gradient() { + gradient->reverse(); + set_points(gradient->get_points()); + emit_signal(SNAME("ramp_changed")); + update(); } GradientEditor::GradientEditor() { @@ -77,6 +89,23 @@ GradientEditor::GradientEditor() { /////////////////////// +void GradientReverseButton::_notification(int p_what) { + if (p_what == NOTIFICATION_DRAW) { + Ref<Texture2D> icon = get_theme_icon(SNAME("ReverseGradient"), SNAME("EditorIcons")); + if (is_pressed()) { + draw_texture_rect(icon, Rect2(margin, margin, icon->get_width(), icon->get_height()), false, get_theme_color(SNAME("icon_pressed_color"), SNAME("Button"))); + } else { + draw_texture_rect(icon, Rect2(margin, margin, icon->get_width(), icon->get_height())); + } + } +} + +Size2 GradientReverseButton::get_minimum_size() const { + return (get_theme_icon(SNAME("ReverseGradient"), SNAME("EditorIcons"))->get_size() + Size2(margin * 2, margin * 2)); +} + +/////////////////////// + bool EditorInspectorPluginGradient::can_handle(Object *p_object) { return Object::cast_to<Gradient>(p_object) != nullptr; } @@ -85,9 +114,23 @@ void EditorInspectorPluginGradient::parse_begin(Object *p_object) { Gradient *gradient = Object::cast_to<Gradient>(p_object); Ref<Gradient> g(gradient); - GradientEditor *editor = memnew(GradientEditor); + editor = memnew(GradientEditor); editor->set_gradient(g); add_custom_control(editor); + + reverse_btn = memnew(GradientReverseButton); + + gradient_tools_hbox = memnew(HBoxContainer); + gradient_tools_hbox->add_child(reverse_btn); + + add_custom_control(gradient_tools_hbox); + + reverse_btn->connect("pressed", callable_mp(this, &EditorInspectorPluginGradient::_reverse_button_pressed)); + reverse_btn->set_tooltip(TTR("Reverse/mirror gradient.")); +} + +void EditorInspectorPluginGradient::_reverse_button_pressed() { + editor->reverse_gradient(); } GradientEditorPlugin::GradientEditorPlugin(EditorNode *p_node) { diff --git a/editor/plugins/gradient_editor_plugin.h b/editor/plugins/gradient_editor_plugin.h index bcbb86e422..95b7b466c9 100644 --- a/editor/plugins/gradient_editor_plugin.h +++ b/editor/plugins/gradient_editor_plugin.h @@ -50,12 +50,28 @@ protected: public: virtual Size2 get_minimum_size() const override; void set_gradient(const Ref<Gradient> &p_gradient); + void reverse_gradient(); GradientEditor(); }; +class GradientReverseButton : public BaseButton { + GDCLASS(GradientReverseButton, BaseButton); + + int margin = 2; + + void _notification(int p_what); + virtual Size2 get_minimum_size() const override; +}; + class EditorInspectorPluginGradient : public EditorInspectorPlugin { GDCLASS(EditorInspectorPluginGradient, EditorInspectorPlugin); + GradientEditor *editor; + HBoxContainer *gradient_tools_hbox; + GradientReverseButton *reverse_btn; + + void _reverse_button_pressed(); + public: virtual bool can_handle(Object *p_object) override; virtual void parse_begin(Object *p_object) override; diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp index dc16a7a325..4b18ac6e9f 100644 --- a/editor/plugins/mesh_editor_plugin.cpp +++ b/editor/plugins/mesh_editor_plugin.cpp @@ -36,7 +36,7 @@ void MeshEditor::gui_input(const Ref<InputEvent> &p_event) { ERR_FAIL_COND(p_event.is_null()); Ref<InputEventMouseMotion> mm = p_event; - if (mm.is_valid() && mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT) { + if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) { rot_x -= mm->get_relative().y * 0.01; rot_y -= mm->get_relative().x * 0.01; if (rot_x < -Math_PI / 2) { diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp index 574d3ef27e..7a85c5167b 100644 --- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp +++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp @@ -79,7 +79,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) { Node *owner = node == get_tree()->get_edited_scene_root() ? node : node->get_owner(); ur->create_action(TTR("Create Static Trimesh Body")); - ur->add_do_method(node, "add_child", body); + ur->add_do_method(node, "add_child", body, true); ur->add_do_method(body, "set_owner", owner); ur->add_do_method(cshape, "set_owner", owner); ur->add_do_reference(body); @@ -113,7 +113,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) { Node *owner = instance == get_tree()->get_edited_scene_root() ? instance : instance->get_owner(); - ur->add_do_method(instance, "add_child", body); + ur->add_do_method(instance, "add_child", body, true); ur->add_do_method(body, "set_owner", owner); ur->add_do_method(cshape, "set_owner", owner); ur->add_do_reference(body); @@ -146,7 +146,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) { ur->create_action(TTR("Create Trimesh Static Shape")); - ur->add_do_method(node->get_parent(), "add_child", cshape); + ur->add_do_method(node->get_parent(), "add_child", cshape, true); ur->add_do_method(node->get_parent(), "move_child", cshape, node->get_index() + 1); ur->add_do_method(cshape, "set_owner", owner); ur->add_do_reference(cshape); @@ -185,7 +185,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) { Node *owner = node->get_owner(); - ur->add_do_method(node->get_parent(), "add_child", cshape); + ur->add_do_method(node->get_parent(), "add_child", cshape, true); ur->add_do_method(node->get_parent(), "move_child", cshape, node->get_index() + 1); ur->add_do_method(cshape, "set_owner", owner); ur->add_do_reference(cshape); @@ -247,7 +247,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) { UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); ur->create_action(TTR("Create Navigation Mesh")); - ur->add_do_method(node, "add_child", nmi); + ur->add_do_method(node, "add_child", nmi, true); ur->add_do_method(nmi, "set_owner", owner); ur->add_do_reference(nmi); @@ -426,7 +426,7 @@ void MeshInstance3DEditor::_create_outline_mesh() { ur->create_action(TTR("Create Outline")); - ur->add_do_method(node, "add_child", mi); + ur->add_do_method(node, "add_child", mi, true); ur->add_do_method(mi, "set_owner", owner); ur->add_do_reference(mi); diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index b99ccc1012..b74d229d3e 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -185,7 +185,7 @@ void ViewportRotationControl::gui_input(const Ref<InputEvent> &p_event) { ERR_FAIL_COND(p_event.is_null()); const Ref<InputEventMouseButton> mb = p_event; - if (mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT) { Vector2 pos = mb->get_position(); if (mb->is_pressed()) { if (pos.distance_to(get_size() / 2.0) < get_size().x / 2.0) { @@ -901,36 +901,36 @@ void Node3DEditorViewport::_compute_edit(const Point2 &p_point) { } } -static int _get_key_modifier_setting(const String &p_property) { +static Key _get_key_modifier_setting(const String &p_property) { switch (EditorSettings::get_singleton()->get(p_property).operator int()) { case 0: - return 0; + return Key::NONE; case 1: - return KEY_SHIFT; + return Key::SHIFT; case 2: - return KEY_ALT; + return Key::ALT; case 3: - return KEY_META; + return Key::META; case 4: - return KEY_CTRL; + return Key::CTRL; } - return 0; + return Key::NONE; } -static int _get_key_modifier(Ref<InputEventWithModifiers> e) { +static Key _get_key_modifier(Ref<InputEventWithModifiers> e) { if (e->is_shift_pressed()) { - return KEY_SHIFT; + return Key::SHIFT; } if (e->is_alt_pressed()) { - return KEY_ALT; + return Key::ALT; } if (e->is_ctrl_pressed()) { - return KEY_CTRL; + return Key::CTRL; } if (e->is_meta_pressed()) { - return KEY_META; + return Key::META; } - return 0; + return Key::NONE; } bool Node3DEditorViewport::_transform_gizmo_select(const Vector2 &p_screenpos, bool p_highlight_only) { @@ -1336,7 +1336,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { const real_t zoom_factor = 1 + (ZOOM_FREELOOK_MULTIPLIER - 1) * b->get_factor(); switch (b->get_button_index()) { - case MOUSE_BUTTON_WHEEL_UP: { + case MouseButton::WHEEL_UP: { if (b->is_alt_pressed()) { scale_fov(-0.05); } else { @@ -1347,7 +1347,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { } } } break; - case MOUSE_BUTTON_WHEEL_DOWN: { + case MouseButton::WHEEL_DOWN: { if (b->is_alt_pressed()) { scale_fov(0.05); } else { @@ -1358,7 +1358,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { } } } break; - case MOUSE_BUTTON_RIGHT: { + case MouseButton::RIGHT: { NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation/navigation_scheme").operator int(); if (b->is_pressed() && _edit.gizmo.is_valid()) { @@ -1415,7 +1415,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { } if (b->is_pressed()) { - const int mod = _get_key_modifier(b); + const Key mod = _get_key_modifier(b); if (!orthogonal) { if (mod == _get_key_modifier_setting("editors/3d/freelook/freelook_activation_modifier")) { set_freelook_active(true); @@ -1432,7 +1432,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { } } break; - case MOUSE_BUTTON_MIDDLE: { + case MouseButton::MIDDLE: { if (b->is_pressed() && _edit.mode != TRANSFORM_NONE) { switch (_edit.plane) { case TRANSFORM_VIEW: { @@ -1463,7 +1463,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { } } } break; - case MOUSE_BUTTON_LEFT: { + case MouseButton::LEFT: { if (b->is_pressed()) { NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation/navigation_scheme").operator int(); if ((nav_scheme == NAVIGATION_MAYA || nav_scheme == NAVIGATION_MODO) && b->is_alt_pressed()) { @@ -1724,7 +1724,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { } } - if (spatial_editor->get_current_hover_gizmo().is_null() && !(m->get_button_mask() & 1) && !_edit.gizmo.is_valid()) { + if (spatial_editor->get_current_hover_gizmo().is_null() && (m->get_button_mask() & MouseButton::MASK_LEFT) == MouseButton::NONE && !_edit.gizmo.is_valid()) { _transform_gizmo_select(_edit.mouse_pos, true); } @@ -1737,7 +1737,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { String n = _edit.gizmo->get_handle_name(_edit.gizmo_handle); set_message(n + ": " + String(v)); - } else if (m->get_button_mask() & MOUSE_BUTTON_MASK_LEFT) { + } else if ((m->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) { if (nav_scheme == NAVIGATION_MAYA && m->is_alt_pressed()) { nav_mode = NAVIGATION_ORBIT; } else if (nav_scheme == NAVIGATION_MODO && m->is_alt_pressed() && m->is_shift_pressed()) { @@ -1827,7 +1827,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { } else { // Alternative planar scaling mode - if (_get_key_modifier(m) != KEY_SHIFT) { + if (_get_key_modifier(m) != Key::SHIFT) { motion = motion_mask.dot(motion) * motion_mask; } } @@ -2082,7 +2082,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { } } } - } else if ((m->get_button_mask() & MOUSE_BUTTON_MASK_RIGHT) || freelook_active) { + } else if ((m->get_button_mask() & MouseButton::MASK_RIGHT) != MouseButton::NONE || freelook_active) { if (nav_scheme == NAVIGATION_MAYA && m->is_alt_pressed()) { nav_mode = NAVIGATION_ZOOM; } else if (freelook_active) { @@ -2091,14 +2091,14 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { nav_mode = NAVIGATION_PAN; } - } else if (m->get_button_mask() & MOUSE_BUTTON_MASK_MIDDLE) { - const int mod = _get_key_modifier(m); + } else if ((m->get_button_mask() & MouseButton::MASK_MIDDLE) != MouseButton::NONE) { + const Key mod = _get_key_modifier(m); if (nav_scheme == NAVIGATION_GODOT) { if (mod == _get_key_modifier_setting("editors/3d/navigation/pan_modifier")) { nav_mode = NAVIGATION_PAN; } else if (mod == _get_key_modifier_setting("editors/3d/navigation/zoom_modifier")) { nav_mode = NAVIGATION_ZOOM; - } else if (mod == KEY_ALT || mod == _get_key_modifier_setting("editors/3d/navigation/orbit_modifier")) { + } else if (mod == Key::ALT || mod == _get_key_modifier_setting("editors/3d/navigation/orbit_modifier")) { // Always allow Alt as a modifier to better support graphic tablets. nav_mode = NAVIGATION_ORBIT; } @@ -2109,14 +2109,14 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { } } else if (EditorSettings::get_singleton()->get("editors/3d/navigation/emulate_3_button_mouse")) { // Handle trackpad (no external mouse) use case - const int mod = _get_key_modifier(m); + const Key mod = _get_key_modifier(m); - if (mod) { + if (mod != Key::NONE) { if (mod == _get_key_modifier_setting("editors/3d/navigation/pan_modifier")) { nav_mode = NAVIGATION_PAN; } else if (mod == _get_key_modifier_setting("editors/3d/navigation/zoom_modifier")) { nav_mode = NAVIGATION_ZOOM; - } else if (mod == KEY_ALT || mod == _get_key_modifier_setting("editors/3d/navigation/orbit_modifier")) { + } else if (mod == Key::ALT || mod == _get_key_modifier_setting("editors/3d/navigation/orbit_modifier")) { // Always allow Alt as a modifier to better support graphic tablets. nav_mode = NAVIGATION_ORBIT; } @@ -2164,13 +2164,13 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { NavigationMode nav_mode = NAVIGATION_NONE; if (nav_scheme == NAVIGATION_GODOT) { - const int mod = _get_key_modifier(pan_gesture); + const Key mod = _get_key_modifier(pan_gesture); if (mod == _get_key_modifier_setting("editors/3d/navigation/pan_modifier")) { nav_mode = NAVIGATION_PAN; } else if (mod == _get_key_modifier_setting("editors/3d/navigation/zoom_modifier")) { nav_mode = NAVIGATION_ZOOM; - } else if (mod == KEY_ALT || mod == _get_key_modifier_setting("editors/3d/navigation/orbit_modifier")) { + } else if (mod == Key::ALT || mod == _get_key_modifier_setting("editors/3d/navigation/orbit_modifier")) { // Always allow Alt as a modifier to better support graphic tablets. nav_mode = NAVIGATION_ORBIT; } @@ -2215,9 +2215,9 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { } if (EditorSettings::get_singleton()->get("editors/3d/navigation/emulate_numpad")) { - const uint32_t code = k->get_keycode(); - if (code >= KEY_0 && code <= KEY_9) { - k->set_keycode(code - KEY_0 + KEY_KP_0); + const Key code = k->get_keycode(); + if (code >= Key::KEY_0 && code <= Key::KEY_9) { + k->set_keycode(code - Key::KEY_0 + Key::KP_0); } } @@ -2245,12 +2245,14 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { _menu_option(VIEW_RIGHT); } if (ED_IS_SHORTCUT("spatial_editor/orbit_view_down", p_event)) { - cursor.x_rot -= Math_PI / 12.0; + // Clamp rotation to roughly -90..90 degrees so the user can't look upside-down and end up disoriented. + cursor.x_rot = CLAMP(cursor.x_rot - Math_PI / 12.0, -1.57, 1.57); view_type = VIEW_TYPE_USER; _update_name(); } if (ED_IS_SHORTCUT("spatial_editor/orbit_view_up", p_event)) { - cursor.x_rot += Math_PI / 12.0; + // Clamp rotation to roughly -90..90 degrees so the user can't look upside-down and end up disoriented. + cursor.x_rot = CLAMP(cursor.x_rot + Math_PI / 12.0, -1.57, 1.57); view_type = VIEW_TYPE_USER; _update_name(); } @@ -2314,11 +2316,11 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { if (!orthogonal && ED_IS_SHORTCUT("spatial_editor/freelook_toggle", p_event)) { set_freelook_active(!is_freelook_active()); - } else if (k->get_keycode() == KEY_ESCAPE) { + } else if (k->get_keycode() == Key::ESCAPE) { set_freelook_active(false); } - if (k->get_keycode() == KEY_SPACE) { + if (k->get_keycode() == Key::SPACE) { if (!k->is_pressed()) { emit_signal(SNAME("toggle_maximize_view"), this); } @@ -2885,13 +2887,13 @@ void Node3DEditorViewport::_notification(int p_what) { // Color labels depending on performance level ("good" = green, "OK" = yellow, "bad" = red). // Middle point is at 15 ms. - cpu_time_label->set_text(vformat(TTR("CPU Time: %s ms"), rtos(cpu_time).pad_decimals(1))); + cpu_time_label->set_text(vformat(TTR("CPU Time: %s ms"), rtos(cpu_time).pad_decimals(2))); cpu_time_label->add_theme_color_override( "font_color", frame_time_gradient->get_color_at_offset( Math::range_lerp(cpu_time, 0, 30, 0, 1))); - gpu_time_label->set_text(vformat(TTR("GPU Time: %s ms"), rtos(gpu_time).pad_decimals(1))); + gpu_time_label->set_text(vformat(TTR("GPU Time: %s ms"), rtos(gpu_time).pad_decimals(2))); // Middle point is at 15 ms. gpu_time_label->add_theme_color_override( "font_color", @@ -3936,9 +3938,13 @@ Vector3 Node3DEditorViewport::_get_instance_position(const Point2 &p_pos) const Vector3 point = world_pos + world_ray * MAX_DISTANCE; PhysicsDirectSpaceState3D *ss = get_tree()->get_root()->get_world_3d()->get_direct_space_state(); - PhysicsDirectSpaceState3D::RayResult result; - if (ss->intersect_ray(world_pos, world_pos + world_ray * MAX_DISTANCE, result)) { + PhysicsDirectSpaceState3D::RayParameters ray_params; + ray_params.from = world_pos; + ray_params.to = world_pos + world_ray * MAX_DISTANCE; + + PhysicsDirectSpaceState3D::RayResult result; + if (ss->intersect_ray(ray_params, result)) { point = result.position; } @@ -4192,8 +4198,8 @@ void Node3DEditorViewport::drop_data_fw(const Point2 &p_point, const Variant &p_ return; } - bool is_shift = Input::get_singleton()->is_key_pressed(KEY_SHIFT); - bool is_ctrl = Input::get_singleton()->is_key_pressed(KEY_CTRL); + bool is_shift = Input::get_singleton()->is_key_pressed(Key::SHIFT); + bool is_ctrl = Input::get_singleton()->is_key_pressed(Key::CTRL); selected_files.clear(); Dictionary d = p_data; @@ -4388,18 +4394,18 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, Edito view_menu->get_popup()->set_item_tooltip(shadeless_idx, unsupported_tooltip); } - ED_SHORTCUT("spatial_editor/freelook_left", TTR("Freelook Left"), KEY_A); - ED_SHORTCUT("spatial_editor/freelook_right", TTR("Freelook Right"), KEY_D); - ED_SHORTCUT("spatial_editor/freelook_forward", TTR("Freelook Forward"), KEY_W); - ED_SHORTCUT("spatial_editor/freelook_backwards", TTR("Freelook Backwards"), KEY_S); - ED_SHORTCUT("spatial_editor/freelook_up", TTR("Freelook Up"), KEY_E); - ED_SHORTCUT("spatial_editor/freelook_down", TTR("Freelook Down"), KEY_Q); - ED_SHORTCUT("spatial_editor/freelook_speed_modifier", TTR("Freelook Speed Modifier"), KEY_SHIFT); - ED_SHORTCUT("spatial_editor/freelook_slow_modifier", TTR("Freelook Slow Modifier"), KEY_ALT); + ED_SHORTCUT("spatial_editor/freelook_left", TTR("Freelook Left"), Key::A); + ED_SHORTCUT("spatial_editor/freelook_right", TTR("Freelook Right"), Key::D); + ED_SHORTCUT("spatial_editor/freelook_forward", TTR("Freelook Forward"), Key::W); + ED_SHORTCUT("spatial_editor/freelook_backwards", TTR("Freelook Backwards"), Key::S); + ED_SHORTCUT("spatial_editor/freelook_up", TTR("Freelook Up"), Key::E); + ED_SHORTCUT("spatial_editor/freelook_down", TTR("Freelook Down"), Key::Q); + ED_SHORTCUT("spatial_editor/freelook_speed_modifier", TTR("Freelook Speed Modifier"), Key::SHIFT); + ED_SHORTCUT("spatial_editor/freelook_slow_modifier", TTR("Freelook Slow Modifier"), Key::ALT); preview_camera = memnew(CheckBox); preview_camera->set_text(TTR("Preview")); - preview_camera->set_shortcut(ED_SHORTCUT("spatial_editor/toggle_camera_preview", TTR("Toggle Camera Preview"), KEY_MASK_CMD | KEY_P)); + preview_camera->set_shortcut(ED_SHORTCUT("spatial_editor/toggle_camera_preview", TTR("Toggle Camera Preview"), KeyModifierMask::CMD | Key::P)); vbox->add_child(preview_camera); preview_camera->set_h_size_flags(0); preview_camera->hide(); @@ -4513,7 +4519,7 @@ void Node3DEditorViewportContainer::gui_input(const Ref<InputEvent> &p_event) { Ref<InputEventMouseButton> mb = p_event; - if (mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT) { if (mb->is_pressed()) { Vector2 size = get_size(); @@ -6566,7 +6572,12 @@ void Node3DEditor::snap_selected_nodes_to_floor() { Vector3 to = from - Vector3(0.0, max_snap_height, 0.0); Set<RID> excluded = _get_physics_bodies_rid(sp); - if (ss->intersect_ray(from, to, result, excluded)) { + PhysicsDirectSpaceState3D::RayParameters ray_params; + ray_params.from = from; + ray_params.to = to; + ray_params.exclude = excluded; + + if (ss->intersect_ray(ray_params, result)) { snapped_to_floor = true; } } @@ -6583,7 +6594,12 @@ void Node3DEditor::snap_selected_nodes_to_floor() { Vector3 to = from - Vector3(0.0, max_snap_height, 0.0); Set<RID> excluded = _get_physics_bodies_rid(sp); - if (ss->intersect_ray(from, to, result, excluded)) { + PhysicsDirectSpaceState3D::RayParameters ray_params; + ray_params.from = from; + ray_params.to = to; + ray_params.exclude = excluded; + + if (ss->intersect_ray(ray_params, result)) { Vector3 position_offset = d["position_offset"]; Transform3D new_transform = sp->get_global_transform(); @@ -6609,7 +6625,7 @@ void Node3DEditor::unhandled_key_input(const Ref<InputEvent> &p_event) { return; } - snap_key_enabled = Input::get_singleton()->is_key_pressed(KEY_CTRL); + snap_key_enabled = Input::get_singleton()->is_key_pressed(Key::CTRL); } void Node3DEditor::_sun_environ_settings_pressed() { @@ -6621,7 +6637,7 @@ void Node3DEditor::_sun_environ_settings_pressed() { void Node3DEditor::_add_sun_to_scene(bool p_already_added_environment) { sun_environ_popup->hide(); - if (!p_already_added_environment && world_env_count == 0 && Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + if (!p_already_added_environment && world_env_count == 0 && Input::get_singleton()->is_key_pressed(Key::SHIFT)) { // Prevent infinite feedback loop between the sun and environment methods. _add_environment_to_scene(true); } @@ -6636,7 +6652,7 @@ void Node3DEditor::_add_sun_to_scene(bool p_already_added_environment) { Node *new_sun = preview_sun->duplicate(); undo_redo->create_action(TTR("Add Preview Sun to Scene")); - undo_redo->add_do_method(base, "add_child", new_sun); + undo_redo->add_do_method(base, "add_child", new_sun, true); // Move to the beginning of the scene tree since more "global" nodes // generally look better when placed at the top. undo_redo->add_do_method(base, "move_child", new_sun, 0); @@ -6649,7 +6665,7 @@ void Node3DEditor::_add_sun_to_scene(bool p_already_added_environment) { void Node3DEditor::_add_environment_to_scene(bool p_already_added_sun) { sun_environ_popup->hide(); - if (!p_already_added_sun && directional_light_count == 0 && Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + if (!p_already_added_sun && directional_light_count == 0 && Input::get_singleton()->is_key_pressed(Key::SHIFT)) { // Prevent infinite feedback loop between the sun and environment methods. _add_sun_to_scene(true); } @@ -6666,7 +6682,7 @@ void Node3DEditor::_add_environment_to_scene(bool p_already_added_sun) { new_env->set_environment(preview_environment->get_environment()->duplicate(true)); undo_redo->create_action(TTR("Add Preview Environment to Scene")); - undo_redo->add_do_method(base, "add_child", new_env); + undo_redo->add_do_method(base, "add_child", new_env, true); // Move to the beginning of the scene tree since more "global" nodes // generally look better when placed at the top. undo_redo->add_do_method(base, "move_child", new_env, 0); @@ -7132,7 +7148,7 @@ void Node3DEditor::_update_preview_environment() { } else { if (!preview_sun->get_parent()) { - add_child(preview_sun); + add_child(preview_sun, true); sun_state->hide(); sun_vb->show(); } @@ -7168,7 +7184,7 @@ void Node3DEditor::_update_preview_environment() { void Node3DEditor::_sun_direction_input(const Ref<InputEvent> &p_event) { Ref<InputEventMouseMotion> mm = p_event; - if (mm.is_valid() && mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT) { + if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) { sun_rotation.x += mm->get_relative().y * (0.02 * EDSCALE); sun_rotation.y -= mm->get_relative().x * (0.02 * EDSCALE); sun_rotation.x = CLAMP(sun_rotation.x, -Math_TAU / 4, Math_TAU / 4); @@ -7225,9 +7241,9 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { tool_button[TOOL_MODE_SELECT]->set_pressed(true); button_binds.write[0] = MENU_TOOL_SELECT; tool_button[TOOL_MODE_SELECT]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds); - tool_button[TOOL_MODE_SELECT]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_select", TTR("Select Mode"), KEY_Q)); + tool_button[TOOL_MODE_SELECT]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_select", TTR("Select Mode"), Key::Q)); tool_button[TOOL_MODE_SELECT]->set_shortcut_context(this); - tool_button[TOOL_MODE_SELECT]->set_tooltip(keycode_get_string(KEY_MASK_CMD) + TTR("Drag: Rotate selected node around pivot.") + "\n" + TTR("Alt+RMB: Show list of all nodes at position clicked, including locked.")); + tool_button[TOOL_MODE_SELECT]->set_tooltip(keycode_get_string((Key)KeyModifierMask::CMD) + TTR("Drag: Rotate selected node around pivot.") + "\n" + TTR("Alt+RMB: Show list of all nodes at position clicked, including locked.")); hbc_menu->add_child(memnew(VSeparator)); tool_button[TOOL_MODE_MOVE] = memnew(Button); @@ -7236,7 +7252,7 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { tool_button[TOOL_MODE_MOVE]->set_flat(true); button_binds.write[0] = MENU_TOOL_MOVE; tool_button[TOOL_MODE_MOVE]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds); - tool_button[TOOL_MODE_MOVE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_move", TTR("Move Mode"), KEY_W)); + tool_button[TOOL_MODE_MOVE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_move", TTR("Move Mode"), Key::W)); tool_button[TOOL_MODE_MOVE]->set_shortcut_context(this); tool_button[TOOL_MODE_ROTATE] = memnew(Button); @@ -7245,7 +7261,7 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { tool_button[TOOL_MODE_ROTATE]->set_flat(true); button_binds.write[0] = MENU_TOOL_ROTATE; tool_button[TOOL_MODE_ROTATE]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds); - tool_button[TOOL_MODE_ROTATE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_rotate", TTR("Rotate Mode"), KEY_E)); + tool_button[TOOL_MODE_ROTATE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_rotate", TTR("Rotate Mode"), Key::E)); tool_button[TOOL_MODE_ROTATE]->set_shortcut_context(this); tool_button[TOOL_MODE_SCALE] = memnew(Button); @@ -7254,7 +7270,7 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { tool_button[TOOL_MODE_SCALE]->set_flat(true); button_binds.write[0] = MENU_TOOL_SCALE; tool_button[TOOL_MODE_SCALE]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds); - tool_button[TOOL_MODE_SCALE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_scale", TTR("Scale Mode"), KEY_R)); + tool_button[TOOL_MODE_SCALE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_scale", TTR("Scale Mode"), Key::R)); tool_button[TOOL_MODE_SCALE]->set_shortcut_context(this); hbc_menu->add_child(memnew(VSeparator)); @@ -7274,7 +7290,7 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { tool_button[TOOL_LOCK_SELECTED]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds); tool_button[TOOL_LOCK_SELECTED]->set_tooltip(TTR("Lock selected node, preventing selection and movement.")); // Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused. - tool_button[TOOL_LOCK_SELECTED]->set_shortcut(ED_SHORTCUT("editor/lock_selected_nodes", TTR("Lock Selected Node(s)"), KEY_MASK_CMD | KEY_L)); + tool_button[TOOL_LOCK_SELECTED]->set_shortcut(ED_SHORTCUT("editor/lock_selected_nodes", TTR("Lock Selected Node(s)"), KeyModifierMask::CMD | Key::L)); tool_button[TOOL_UNLOCK_SELECTED] = memnew(Button); hbc_menu->add_child(tool_button[TOOL_UNLOCK_SELECTED]); @@ -7283,7 +7299,7 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { tool_button[TOOL_UNLOCK_SELECTED]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds); tool_button[TOOL_UNLOCK_SELECTED]->set_tooltip(TTR("Unlock selected node, allowing selection and movement.")); // Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused. - tool_button[TOOL_UNLOCK_SELECTED]->set_shortcut(ED_SHORTCUT("editor/unlock_selected_nodes", TTR("Unlock Selected Node(s)"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_L)); + tool_button[TOOL_UNLOCK_SELECTED]->set_shortcut(ED_SHORTCUT("editor/unlock_selected_nodes", TTR("Unlock Selected Node(s)"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::L)); tool_button[TOOL_GROUP_SELECTED] = memnew(Button); hbc_menu->add_child(tool_button[TOOL_GROUP_SELECTED]); @@ -7292,7 +7308,7 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { tool_button[TOOL_GROUP_SELECTED]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds); tool_button[TOOL_GROUP_SELECTED]->set_tooltip(TTR("Makes sure the object's children are not selectable.")); // Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused. - tool_button[TOOL_GROUP_SELECTED]->set_shortcut(ED_SHORTCUT("editor/group_selected_nodes", TTR("Group Selected Node(s)"), KEY_MASK_CMD | KEY_G)); + tool_button[TOOL_GROUP_SELECTED]->set_shortcut(ED_SHORTCUT("editor/group_selected_nodes", TTR("Group Selected Node(s)"), KeyModifierMask::CMD | Key::G)); tool_button[TOOL_UNGROUP_SELECTED] = memnew(Button); hbc_menu->add_child(tool_button[TOOL_UNGROUP_SELECTED]); @@ -7301,7 +7317,7 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { tool_button[TOOL_UNGROUP_SELECTED]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds); tool_button[TOOL_UNGROUP_SELECTED]->set_tooltip(TTR("Restores the object's children's ability to be selected.")); // Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused. - tool_button[TOOL_UNGROUP_SELECTED]->set_shortcut(ED_SHORTCUT("editor/ungroup_selected_nodes", TTR("Ungroup Selected Node(s)"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_G)); + tool_button[TOOL_UNGROUP_SELECTED]->set_shortcut(ED_SHORTCUT("editor/ungroup_selected_nodes", TTR("Ungroup Selected Node(s)"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::G)); hbc_menu->add_child(memnew(VSeparator)); @@ -7311,7 +7327,7 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_flat(true); button_binds.write[0] = MENU_TOOL_LOCAL_COORDS; tool_option_button[TOOL_OPT_LOCAL_COORDS]->connect("toggled", callable_mp(this, &Node3DEditor::_menu_item_toggled), button_binds); - tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_shortcut(ED_SHORTCUT("spatial_editor/local_coords", TTR("Use Local Space"), KEY_T)); + tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_shortcut(ED_SHORTCUT("spatial_editor/local_coords", TTR("Use Local Space"), Key::T)); tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_shortcut_context(this); tool_option_button[TOOL_OPT_USE_SNAP] = memnew(Button); @@ -7320,7 +7336,7 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { tool_option_button[TOOL_OPT_USE_SNAP]->set_flat(true); button_binds.write[0] = MENU_TOOL_USE_SNAP; tool_option_button[TOOL_OPT_USE_SNAP]->connect("toggled", callable_mp(this, &Node3DEditor::_menu_item_toggled), button_binds); - tool_option_button[TOOL_OPT_USE_SNAP]->set_shortcut(ED_SHORTCUT("spatial_editor/snap", TTR("Use Snap"), KEY_Y)); + tool_option_button[TOOL_OPT_USE_SNAP]->set_shortcut(ED_SHORTCUT("spatial_editor/snap", TTR("Use Snap"), Key::Y)); tool_option_button[TOOL_OPT_USE_SNAP]->set_shortcut_context(this); hbc_menu->add_child(memnew(VSeparator)); @@ -7366,27 +7382,27 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { preview_node = memnew(Node3D); preview_bounds = AABB(); - ED_SHORTCUT("spatial_editor/bottom_view", TTR("Bottom View"), KEY_MASK_ALT + KEY_KP_7); - ED_SHORTCUT("spatial_editor/top_view", TTR("Top View"), KEY_KP_7); - ED_SHORTCUT("spatial_editor/rear_view", TTR("Rear View"), KEY_MASK_ALT + KEY_KP_1); - 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); - ED_SHORTCUT("spatial_editor/focus_selection", TTR("Focus Selection"), KEY_F); - ED_SHORTCUT("spatial_editor/align_transform_with_view", TTR("Align Transform with View"), KEY_MASK_ALT + KEY_MASK_CMD + KEY_M); - ED_SHORTCUT("spatial_editor/align_rotation_with_view", TTR("Align Rotation with View"), KEY_MASK_ALT + KEY_MASK_CMD + KEY_F); - ED_SHORTCUT("spatial_editor/freelook_toggle", TTR("Toggle Freelook"), KEY_MASK_SHIFT + KEY_F); - ED_SHORTCUT("spatial_editor/decrease_fov", TTR("Decrease Field of View"), KEY_MASK_CMD + KEY_EQUAL); // Usually direct access key for `KEY_PLUS`. - ED_SHORTCUT("spatial_editor/increase_fov", TTR("Increase Field of View"), KEY_MASK_CMD + KEY_MINUS); - ED_SHORTCUT("spatial_editor/reset_fov", TTR("Reset Field of View to Default"), KEY_MASK_CMD + KEY_0); + ED_SHORTCUT("spatial_editor/bottom_view", TTR("Bottom View"), KeyModifierMask::ALT + Key::KP_7); + ED_SHORTCUT("spatial_editor/top_view", TTR("Top View"), Key::KP_7); + ED_SHORTCUT("spatial_editor/rear_view", TTR("Rear View"), KeyModifierMask::ALT + Key::KP_1); + ED_SHORTCUT("spatial_editor/front_view", TTR("Front View"), Key::KP_1); + ED_SHORTCUT("spatial_editor/left_view", TTR("Left View"), KeyModifierMask::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); + ED_SHORTCUT("spatial_editor/focus_selection", TTR("Focus Selection"), Key::F); + ED_SHORTCUT("spatial_editor/align_transform_with_view", TTR("Align Transform with View"), KeyModifierMask::ALT + KeyModifierMask::CMD + Key::M); + ED_SHORTCUT("spatial_editor/align_rotation_with_view", TTR("Align Rotation with View"), KeyModifierMask::ALT + KeyModifierMask::CMD + Key::F); + ED_SHORTCUT("spatial_editor/freelook_toggle", TTR("Toggle Freelook"), KeyModifierMask::SHIFT + Key::F); + ED_SHORTCUT("spatial_editor/decrease_fov", TTR("Decrease Field of View"), KeyModifierMask::CMD + Key::EQUAL); // Usually direct access key for `KEY_PLUS`. + ED_SHORTCUT("spatial_editor/increase_fov", TTR("Increase Field of View"), KeyModifierMask::CMD + Key::MINUS); + ED_SHORTCUT("spatial_editor/reset_fov", TTR("Reset Field of View to Default"), KeyModifierMask::CMD + Key::KEY_0); PopupMenu *p; @@ -7397,7 +7413,7 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { hbc_menu->add_child(transform_menu); p = transform_menu->get_popup(); - p->add_shortcut(ED_SHORTCUT("spatial_editor/snap_to_floor", TTR("Snap Object to Floor"), KEY_PAGEDOWN), MENU_SNAP_TO_FLOOR); + p->add_shortcut(ED_SHORTCUT("spatial_editor/snap_to_floor", TTR("Snap Object to Floor"), Key::PAGEDOWN), MENU_SNAP_TO_FLOOR); p->add_shortcut(ED_SHORTCUT("spatial_editor/transform_dialog", TTR("Transform Dialog...")), MENU_TRANSFORM_DIALOG); p->add_separator(); @@ -7429,19 +7445,19 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { accept = memnew(AcceptDialog); editor->get_gui_base()->add_child(accept); - p->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/1_viewport", TTR("1 Viewport"), KEY_MASK_CMD + KEY_1), MENU_VIEW_USE_1_VIEWPORT); - p->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/2_viewports", TTR("2 Viewports"), KEY_MASK_CMD + KEY_2), MENU_VIEW_USE_2_VIEWPORTS); - p->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/2_viewports_alt", TTR("2 Viewports (Alt)"), KEY_MASK_ALT + KEY_MASK_CMD + KEY_2), MENU_VIEW_USE_2_VIEWPORTS_ALT); - p->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/3_viewports", TTR("3 Viewports"), KEY_MASK_CMD + KEY_3), MENU_VIEW_USE_3_VIEWPORTS); - p->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/3_viewports_alt", TTR("3 Viewports (Alt)"), KEY_MASK_ALT + KEY_MASK_CMD + KEY_3), MENU_VIEW_USE_3_VIEWPORTS_ALT); - p->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/4_viewports", TTR("4 Viewports"), KEY_MASK_CMD + KEY_4), MENU_VIEW_USE_4_VIEWPORTS); + p->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/1_viewport", TTR("1 Viewport"), KeyModifierMask::CMD + Key::KEY_1), MENU_VIEW_USE_1_VIEWPORT); + p->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/2_viewports", TTR("2 Viewports"), KeyModifierMask::CMD + Key::KEY_2), MENU_VIEW_USE_2_VIEWPORTS); + p->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/2_viewports_alt", TTR("2 Viewports (Alt)"), KeyModifierMask::ALT + KeyModifierMask::CMD + Key::KEY_2), MENU_VIEW_USE_2_VIEWPORTS_ALT); + p->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/3_viewports", TTR("3 Viewports"), KeyModifierMask::CMD + Key::KEY_3), MENU_VIEW_USE_3_VIEWPORTS); + p->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/3_viewports_alt", TTR("3 Viewports (Alt)"), KeyModifierMask::ALT + KeyModifierMask::CMD + Key::KEY_3), MENU_VIEW_USE_3_VIEWPORTS_ALT); + p->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/4_viewports", TTR("4 Viewports"), KeyModifierMask::CMD + Key::KEY_4), MENU_VIEW_USE_4_VIEWPORTS); p->add_separator(); p->add_submenu_item(TTR("Gizmos"), "GizmosMenu"); p->add_separator(); p->add_check_shortcut(ED_SHORTCUT("spatial_editor/view_origin", TTR("View Origin")), MENU_VIEW_ORIGIN); - p->add_check_shortcut(ED_SHORTCUT("spatial_editor/view_grid", TTR("View Grid"), KEY_NUMBERSIGN), MENU_VIEW_GRID); + p->add_check_shortcut(ED_SHORTCUT("spatial_editor/view_grid", TTR("View Grid"), Key::NUMBERSIGN), MENU_VIEW_GRID); p->add_separator(); p->add_shortcut(ED_SHORTCUT("spatial_editor/settings", TTR("Settings...")), MENU_VIEW_CAMERA_SETTINGS); @@ -7854,7 +7870,7 @@ bool Node3DEditor::is_gizmo_visible() const { double Node3DEditor::get_translate_snap() const { double snap_value; - if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + if (Input::get_singleton()->is_key_pressed(Key::SHIFT)) { snap_value = snap_translate->get_text().to_float() / 10.0; } else { snap_value = snap_translate->get_text().to_float(); @@ -7865,7 +7881,7 @@ double Node3DEditor::get_translate_snap() const { double Node3DEditor::get_rotate_snap() const { double snap_value; - if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + if (Input::get_singleton()->is_key_pressed(Key::SHIFT)) { snap_value = snap_rotate->get_text().to_float() / 3.0; } else { snap_value = snap_rotate->get_text().to_float(); @@ -7876,7 +7892,7 @@ double Node3DEditor::get_rotate_snap() const { double Node3DEditor::get_scale_snap() const { double snap_value; - if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + if (Input::get_singleton()->is_key_pressed(Key::SHIFT)) { snap_value = snap_scale->get_text().to_float() / 2.0; } else { snap_value = snap_scale->get_text().to_float(); diff --git a/editor/plugins/ot_features_plugin.cpp b/editor/plugins/ot_features_plugin.cpp index fd42bce06e..c949621e28 100644 --- a/editor/plugins/ot_features_plugin.cpp +++ b/editor/plugins/ot_features_plugin.cpp @@ -185,12 +185,6 @@ bool EditorInspectorPluginOpenTypeFeatures::can_handle(Object *p_object) { return (Object::cast_to<Control>(p_object) != nullptr); } -void EditorInspectorPluginOpenTypeFeatures::parse_begin(Object *p_object) { -} - -void EditorInspectorPluginOpenTypeFeatures::parse_category(Object *p_object, const String &p_parse_category) { -} - bool EditorInspectorPluginOpenTypeFeatures::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) { if (p_path == "opentype_features/_new") { OpenTypeFeaturesAdd *editor = memnew(OpenTypeFeaturesAdd); diff --git a/editor/plugins/ot_features_plugin.h b/editor/plugins/ot_features_plugin.h index dbafa3bbf6..add491ed48 100644 --- a/editor/plugins/ot_features_plugin.h +++ b/editor/plugins/ot_features_plugin.h @@ -86,8 +86,6 @@ class EditorInspectorPluginOpenTypeFeatures : public EditorInspectorPlugin { public: virtual bool can_handle(Object *p_object) override; - virtual void parse_begin(Object *p_object) override; - virtual void parse_category(Object *p_object, const String &p_parse_category) override; virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override; }; diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp index 119ecddf63..79f8ce95cd 100644 --- a/editor/plugins/path_2d_editor_plugin.cpp +++ b/editor/plugins/path_2d_editor_plugin.cpp @@ -88,7 +88,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) { real_t dist_to_p_in = gpoint.distance_to(xform.xform(curve->get_point_position(i) + curve->get_point_in(i))); // Check for point movement start (for point + in/out controls). - if (mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb->get_button_index() == MouseButton::LEFT) { if (mode == MODE_EDIT && !mb->is_shift_pressed() && dist_to_p < grab_threshold) { // Points can only be moved in edit mode. @@ -118,7 +118,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) { } // Check for point deletion. - if ((mb->get_button_index() == MOUSE_BUTTON_RIGHT && mode == MODE_EDIT) || (mb->get_button_index() == MOUSE_BUTTON_LEFT && mode == MODE_DELETE)) { + if ((mb->get_button_index() == MouseButton::RIGHT && mode == MODE_EDIT) || (mb->get_button_index() == MouseButton::LEFT && mode == MODE_DELETE)) { if (dist_to_p < grab_threshold) { undo_redo->create_action(TTR("Remove Point from Curve")); undo_redo->add_do_method(curve.ptr(), "remove_point", i); @@ -149,7 +149,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) { } // Check for point creation. - if (mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT && ((mb->is_command_pressed() && mode == MODE_EDIT) || mode == MODE_CREATE)) { + if (mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT && ((mb->is_command_pressed() && mode == MODE_EDIT) || mode == MODE_CREATE)) { Ref<Curve2D> curve = node->get_curve(); undo_redo->create_action(TTR("Add Point to Curve")); @@ -170,7 +170,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) { } // Check for segment split. - if (mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT && mode == MODE_EDIT && on_edge) { + if (mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT && mode == MODE_EDIT && on_edge) { Vector2 gpoint2 = mb->get_position(); Ref<Curve2D> curve = node->get_curve(); @@ -207,7 +207,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) { } // Check for point movement completion. - if (!mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT && action != ACTION_NONE) { + if (!mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT && action != ACTION_NONE) { Ref<Curve2D> curve = node->get_curve(); Vector2 new_pos = moving_from + xform.affine_inverse().basis_xform(gpoint - moving_screen_from); @@ -537,7 +537,7 @@ Path2DEditor::Path2DEditor(EditorNode *p_editor) { curve_edit->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("CurveEdit"), SNAME("EditorIcons"))); curve_edit->set_toggle_mode(true); curve_edit->set_focus_mode(Control::FOCUS_NONE); - curve_edit->set_tooltip(TTR("Select Points") + "\n" + TTR("Shift+Drag: Select Control Points") + "\n" + keycode_get_string(KEY_MASK_CMD) + TTR("Click: Add Point") + "\n" + TTR("Left Click: Split Segment (in curve)") + "\n" + TTR("Right Click: Delete Point")); + curve_edit->set_tooltip(TTR("Select Points") + "\n" + TTR("Shift+Drag: Select Control Points") + "\n" + keycode_get_string((Key)KeyModifierMask::CMD) + TTR("Click: Add Point") + "\n" + TTR("Left Click: Split Segment (in curve)") + "\n" + TTR("Right Click: Delete Point")); curve_edit->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected), varray(MODE_EDIT)); base_hb->add_child(curve_edit); curve_edit_curve = memnew(Button); diff --git a/editor/plugins/path_3d_editor_plugin.cpp b/editor/plugins/path_3d_editor_plugin.cpp index f9a5f429d2..e83f6481f9 100644 --- a/editor/plugins/path_3d_editor_plugin.cpp +++ b/editor/plugins/path_3d_editor_plugin.cpp @@ -316,7 +316,7 @@ EditorPlugin::AfterGUIInput Path3DEditorPlugin::forward_spatial_gui_input(Camera set_handle_clicked(false); } - if (mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT && (curve_create->is_pressed() || (curve_edit->is_pressed() && mb->is_ctrl_pressed()))) { + if (mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT && (curve_create->is_pressed() || (curve_edit->is_pressed() && mb->is_ctrl_pressed()))) { //click into curve, break it down Vector<Vector3> v3a = c->tessellate(); int idx = 0; @@ -411,7 +411,7 @@ EditorPlugin::AfterGUIInput Path3DEditorPlugin::forward_spatial_gui_input(Camera //add new at pos } - } else if (mb->is_pressed() && ((mb->get_button_index() == MOUSE_BUTTON_LEFT && curve_del->is_pressed()) || (mb->get_button_index() == MOUSE_BUTTON_RIGHT && curve_edit->is_pressed()))) { + } else if (mb->is_pressed() && ((mb->get_button_index() == MouseButton::LEFT && curve_del->is_pressed()) || (mb->get_button_index() == MouseButton::RIGHT && curve_edit->is_pressed()))) { for (int i = 0; i < c->get_point_count(); i++) { real_t dist_to_p = p_camera->unproject_position(gt.xform(c->get_point_position(i))).distance_to(mbpos); real_t dist_to_p_out = p_camera->unproject_position(gt.xform(c->get_point_position(i) + c->get_point_out(i))).distance_to(mbpos); @@ -573,7 +573,7 @@ Path3DEditorPlugin::Path3DEditorPlugin(EditorNode *p_node) { curve_edit->set_toggle_mode(true); curve_edit->hide(); curve_edit->set_focus_mode(Control::FOCUS_NONE); - curve_edit->set_tooltip(TTR("Select Points") + "\n" + TTR("Shift+Drag: Select Control Points") + "\n" + keycode_get_string(KEY_MASK_CMD) + TTR("Click: Add Point") + "\n" + TTR("Right Click: Delete Point")); + curve_edit->set_tooltip(TTR("Select Points") + "\n" + TTR("Shift+Drag: Select Control Points") + "\n" + keycode_get_string((Key)KeyModifierMask::CMD) + TTR("Click: Add Point") + "\n" + TTR("Right Click: Delete Point")); Node3DEditor::get_singleton()->add_control_to_menu_panel(curve_edit); curve_create = memnew(Button); curve_create->set_flat(true); diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp index 5afe9ed60c..6ffe99d4d0 100644 --- a/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/editor/plugins/polygon_2d_editor_plugin.cpp @@ -447,7 +447,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) { Ref<InputEventMouseButton> mb = p_input; if (mb.is_valid()) { - if (mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb->get_button_index() == MouseButton::LEFT) { if (mb->is_pressed()) { uv_drag_from = snap_point(mb->get_position()); uv_drag = true; @@ -759,7 +759,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) { bone_painting = false; } } - } else if (mb->get_button_index() == MOUSE_BUTTON_RIGHT && mb->is_pressed()) { + } else if (mb->get_button_index() == MouseButton::RIGHT && mb->is_pressed()) { _cancel_editing(); if (bone_painting) { @@ -768,9 +768,9 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) { uv_edit_draw->update(); - } else if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP && mb->is_pressed()) { + } else if (mb->get_button_index() == MouseButton::WHEEL_UP && mb->is_pressed()) { uv_zoom->set_value(uv_zoom->get_value() / (1 - (0.1 * mb->get_factor()))); - } else if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN && mb->is_pressed()) { + } else if (mb->get_button_index() == MouseButton::WHEEL_DOWN && mb->is_pressed()) { uv_zoom->set_value(uv_zoom->get_value() * (1 - (0.1 * mb->get_factor()))); } } @@ -778,7 +778,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) { Ref<InputEventMouseMotion> mm = p_input; if (mm.is_valid()) { - if ((mm->get_button_mask() & MOUSE_BUTTON_MASK_MIDDLE) || Input::get_singleton()->is_key_pressed(KEY_SPACE)) { + if ((mm->get_button_mask() & MouseButton::MASK_MIDDLE) != MouseButton::NONE || Input::get_singleton()->is_key_pressed(Key::SPACE)) { Vector2 drag = mm->get_relative(); uv_hscroll->set_value(uv_hscroll->get_value() - drag.x); uv_vscroll->set_value(uv_vscroll->get_value() - drag.y); diff --git a/editor/plugins/root_motion_editor_plugin.cpp b/editor/plugins/root_motion_editor_plugin.cpp index ed91f174d1..0f3c50a861 100644 --- a/editor/plugins/root_motion_editor_plugin.cpp +++ b/editor/plugins/root_motion_editor_plugin.cpp @@ -271,11 +271,7 @@ EditorPropertyRootMotion::EditorPropertyRootMotion() { ////////////////////////// bool EditorInspectorRootMotionPlugin::can_handle(Object *p_object) { - return true; //can handle everything -} - -void EditorInspectorRootMotionPlugin::parse_begin(Object *p_object) { - //do none + return true; // Can handle everything. } bool EditorInspectorRootMotionPlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) { @@ -288,9 +284,5 @@ bool EditorInspectorRootMotionPlugin::parse_property(Object *p_object, const Var return true; } - return false; //can be overridden, although it will most likely be last anyway -} - -void EditorInspectorRootMotionPlugin::parse_end() { - //do none + return false; } diff --git a/editor/plugins/root_motion_editor_plugin.h b/editor/plugins/root_motion_editor_plugin.h index 1484af62e8..c05975b6c3 100644 --- a/editor/plugins/root_motion_editor_plugin.h +++ b/editor/plugins/root_motion_editor_plugin.h @@ -64,9 +64,7 @@ class EditorInspectorRootMotionPlugin : public EditorInspectorPlugin { public: virtual bool can_handle(Object *p_object) override; - virtual void parse_begin(Object *p_object) override; virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override; - virtual void parse_end() override; }; #endif // ROOT_MOTION_EDITOR_PLUGIN_H diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 3f98560a2f..e87d31f018 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -46,7 +46,7 @@ #include "editor/find_in_files.h" #include "editor/node_dock.h" #include "editor/plugins/shader_editor_plugin.h" -#include "modules/visual_script/visual_script_editor.h" +#include "modules/visual_script/editor/visual_script_editor.h" #include "scene/main/window.h" #include "scene/scene_string_names.h" #include "script_text_editor.h" @@ -227,12 +227,6 @@ void ScriptEditorBase::_bind_methods() { ADD_SIGNAL(MethodInfo("replace_in_files_requested", PropertyInfo(Variant::STRING, "text"))); } -static bool _is_built_in_script(Script *p_script) { - String path = p_script->get_path(); - - return path.find("::") != -1; -} - class EditorScriptCodeCompletionCache : public ScriptCodeCompletionCache { struct Cache { uint64_t time_loaded = 0; @@ -315,7 +309,7 @@ void ScriptEditorQuickOpen::_text_changed(const String &p_newtext) { void ScriptEditorQuickOpen::_sbox_input(const Ref<InputEvent> &p_ie) { Ref<InputEventKey> k = p_ie; - if (k.is_valid() && (k->get_keycode() == KEY_UP || k->get_keycode() == KEY_DOWN || k->get_keycode() == KEY_PAGEUP || k->get_keycode() == KEY_PAGEDOWN)) { + if (k.is_valid() && (k->get_keycode() == Key::UP || k->get_keycode() == Key::DOWN || k->get_keycode() == Key::PAGEUP || k->get_keycode() == Key::PAGEDOWN)) { search_options->gui_input(k); search_box->accept_event(); } @@ -764,7 +758,7 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save, bool p_history_back) { if (p_save && file.is_valid()) { // Do not try to save internal scripts, but prompt to save in-memory // scripts which are not saved to disk yet (have empty path). - if (file->get_path().find("local://") == -1 && file->get_path().find("::") == -1) { + if (file->is_built_in()) { save_current_script(); } } @@ -910,7 +904,7 @@ void ScriptEditor::_resave_scripts(const String &p_str) { RES script = se->get_edited_resource(); - if (script->get_path() == "" || script->get_path().find("local://") != -1 || script->get_path().find("::") != -1) { + if (script->is_built_in()) { continue; //internal script, who cares } @@ -951,7 +945,7 @@ void ScriptEditor::_reload_scripts() { RES edited_res = se->get_edited_resource(); - if (edited_res->get_path() == "" || edited_res->get_path().find("local://") != -1 || edited_res->get_path().find("::") != -1) { + if (edited_res->is_built_in()) { continue; //internal script, who cares } @@ -995,10 +989,6 @@ void ScriptEditor::_res_saved_callback(const Ref<Resource> &p_res) { RES script = se->get_edited_resource(); - if (script->get_path() == "" || script->get_path().find("local://") != -1 || script->get_path().find("::") != -1) { - continue; //internal script, who cares - } - if (script == p_res) { se->tag_saved_version(); } @@ -1008,6 +998,31 @@ void ScriptEditor::_res_saved_callback(const Ref<Resource> &p_res) { _trigger_live_script_reload(); } +void ScriptEditor::_scene_saved_callback(const String &p_path) { + // If scene was saved, mark all built-in scripts from that scene as saved. + for (int i = 0; i < tab_container->get_child_count(); i++) { + ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i)); + if (!se) { + continue; + } + + RES edited_res = se->get_edited_resource(); + + if (!edited_res->is_built_in()) { + continue; // External script, who cares. + } + + if (edited_res->get_path().get_slice("::", 0) == p_path) { + se->tag_saved_version(); + } + + Ref<Script> scr = edited_res; + if (scr.is_valid() && scr->is_tool()) { + scr->reload(true); + } + } +} + void ScriptEditor::_trigger_live_script_reload() { if (!pending_auto_reload && auto_reload_running_scripts) { call_deferred(SNAME("_live_auto_reload_running_scripts")); @@ -1037,7 +1052,7 @@ bool ScriptEditor::_test_script_times_on_disk(RES p_for_script) { continue; } - if (edited_res->get_path() == "" || edited_res->get_path().find("local://") != -1 || edited_res->get_path().find("::") != -1) { + if (edited_res->is_built_in()) { continue; //internal script, who cares } @@ -1531,6 +1546,7 @@ void ScriptEditor::_notification(int p_what) { editor->connect("stop_pressed", callable_mp(this, &ScriptEditor::_editor_stop)); editor->connect("script_add_function_request", callable_mp(this, &ScriptEditor::_add_callback)); editor->connect("resource_saved", callable_mp(this, &ScriptEditor::_res_saved_callback)); + editor->connect("scene_saved", callable_mp(this, &ScriptEditor::_scene_saved_callback)); editor->get_filesystem_dock()->connect("files_moved", callable_mp(this, &ScriptEditor::_files_moved)); editor->get_filesystem_dock()->connect("file_removed", callable_mp(this, &ScriptEditor::_file_removed)); script_list->connect("item_selected", callable_mp(this, &ScriptEditor::_script_selected)); @@ -1624,8 +1640,8 @@ void ScriptEditor::close_builtin_scripts_from_scene(const String &p_scene) { continue; } - if (script->get_path().find("::") != -1 && script->get_path().begins_with(p_scene)) { //is an internal script and belongs to scene being closed - _close_tab(i); + if (script->is_built_in() && script->get_path().begins_with(p_scene)) { //is an internal script and belongs to scene being closed + _close_tab(i, false); i--; } } @@ -1708,7 +1724,7 @@ void ScriptEditor::_help_overview_selected(int p_idx) { } void ScriptEditor::_script_selected(int p_idx) { - grab_focus_block = !Input::get_singleton()->is_mouse_button_pressed(MOUSE_BUTTON_LEFT); //amazing hack, simply amazing + grab_focus_block = !Input::get_singleton()->is_mouse_button_pressed(MouseButton::LEFT); //amazing hack, simply amazing _go_to_tab(script_list->get_item_metadata(p_idx)); grab_focus_block = false; @@ -1932,20 +1948,7 @@ void ScriptEditor::_update_script_names() { // to update original path to previously edited resource. se->set_meta("_edit_res_path", path); } - bool built_in = !path.is_resource_file(); - String name; - - if (built_in) { - name = path.get_file(); - const String &resource_name = se->get_edited_resource()->get_name(); - if (resource_name != "") { - // If the built-in script has a custom resource name defined, - // display the built-in script name as follows: `ResourceName (scene_file.tscn)` - name = vformat("%s (%s)", resource_name, name.substr(0, name.find("::", 0))); - } - } else { - name = se->get_name(); - } + String name = se->get_name(); _ScriptEditorItemData sd; sd.icon = icon; @@ -2180,9 +2183,10 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra Ref<Script> script = p_resource; // Don't open dominant script if using an external editor. - const bool use_external_editor = + bool use_external_editor = EditorSettings::get_singleton()->get("text_editor/external/use_external_editor") || (script.is_valid() && script->get_language()->overrides_external_editor()); + use_external_editor = use_external_editor && !(script.is_valid() && script->is_built_in()); // Ignore external editor for built-in scripts. const bool open_dominant = EditorSettings::get_singleton()->get("text_editor/behavior/files/open_dominant_script_on_scene_change"); const bool should_open = (open_dominant && !use_external_editor) || !EditorNode::get_singleton()->is_changing_scene(); @@ -2408,7 +2412,17 @@ void ScriptEditor::save_current_script() { } } - editor->save_resource(resource); + if (resource->is_built_in()) { + // If built-in script, save the scene instead. + const String scene_path = resource->get_path().get_slice("::", 0); + if (!scene_path.is_empty()) { + Vector<String> scene_to_save; + scene_to_save.push_back(scene_path); + editor->save_scene_list(scene_to_save); + } + } else { + editor->save_resource(resource); + } if (script != nullptr) { const Vector<DocData::ClassDoc> &documentations = script->get_documentation(); @@ -2421,6 +2435,8 @@ void ScriptEditor::save_current_script() { } void ScriptEditor::save_all_scripts() { + Vector<String> scenes_to_save; + for (int i = 0; i < tab_container->get_child_count(); i++) { ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i)); if (!se) { @@ -2450,7 +2466,7 @@ void ScriptEditor::save_all_scripts() { se->apply_code(); } - if (edited_res->get_path() != "" && edited_res->get_path().find("local://") == -1 && edited_res->get_path().find("::") == -1) { + if (!edited_res->is_built_in()) { Ref<TextFile> text_file = edited_res; Ref<Script> script = edited_res; @@ -2479,9 +2495,19 @@ void ScriptEditor::save_all_scripts() { update_doc(doc.name); } } + } else { + // For built-in scripts, save their scenes instead. + const String scene_path = edited_res->get_path().get_slice("::", 0); + if (!scenes_to_save.has(scene_path)) { + scenes_to_save.push_back(scene_path); + } } } + if (!scenes_to_save.is_empty()) { + editor->save_scene_list(scenes_to_save); + } + _update_script_names(); EditorFileSystem::get_singleton()->update_script_classes(); } @@ -2570,7 +2596,7 @@ void ScriptEditor::_add_callback(Object *p_obj, const String &p_function, const script_list->select(script_list->find_metadata(i)); // Save the current script so the changes can be picked up by an external editor. - if (!_is_built_in_script(script.ptr())) { // But only if it's not built-in script. + if (!script.ptr()->is_built_in()) { // But only if it's not built-in script. save_current_script(); } @@ -2925,11 +2951,11 @@ void ScriptEditor::input(const Ref<InputEvent> &p_event) { // This must be hardcoded as the editor shortcuts dialog doesn't allow assigning // more than one shortcut per action. if (mb.is_valid() && mb->is_pressed() && is_visible_in_tree()) { - if (mb->get_button_index() == MOUSE_BUTTON_XBUTTON1) { + if (mb->get_button_index() == MouseButton::MB_XBUTTON1) { _history_back(); } - if (mb->get_button_index() == MOUSE_BUTTON_XBUTTON2) { + if (mb->get_button_index() == MouseButton::MB_XBUTTON2) { _history_forward(); } } @@ -2970,7 +2996,7 @@ void ScriptEditor::_script_list_gui_input(const Ref<InputEvent> &ev) { Ref<InputEventMouseButton> mb = ev; if (mb.is_valid() && mb->is_pressed()) { switch (mb->get_button_index()) { - case MOUSE_BUTTON_MIDDLE: { + case MouseButton::MIDDLE: { // Right-click selects automatically; middle-click does not. int idx = script_list->get_item_at_position(mb->get_position(), true); if (idx >= 0) { @@ -2980,7 +3006,7 @@ void ScriptEditor::_script_list_gui_input(const Ref<InputEvent> &ev) { } } break; - case MOUSE_BUTTON_RIGHT: { + case MouseButton::RIGHT: { _make_script_list_context_menu(); } break; default: @@ -3250,15 +3276,15 @@ void ScriptEditor::_update_selected_editor_menu() { EditorHelp *eh = Object::cast_to<EditorHelp>(tab_container->get_current_tab_control()); script_search_menu->get_popup()->clear(); if (eh) { - script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find", TTR("Find..."), KEY_MASK_CMD | KEY_F), HELP_SEARCH_FIND); - script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_next", TTR("Find Next"), KEY_F3), HELP_SEARCH_FIND_NEXT); - script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_previous", TTR("Find Previous"), KEY_MASK_SHIFT | KEY_F3), HELP_SEARCH_FIND_PREVIOUS); + script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find", TTR("Find..."), KeyModifierMask::CMD | Key::F), HELP_SEARCH_FIND); + script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_next", TTR("Find Next"), Key::F3), HELP_SEARCH_FIND_NEXT); + script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_previous", TTR("Find Previous"), KeyModifierMask::SHIFT | Key::F3), HELP_SEARCH_FIND_PREVIOUS); script_search_menu->get_popup()->add_separator(); - script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_in_files", TTR("Find in Files"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F), SEARCH_IN_FILES); + script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_in_files", TTR("Find in Files"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::F), SEARCH_IN_FILES); script_search_menu->show(); } else { if (tab_container->get_child_count() == 0) { - script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_in_files", TTR("Find in Files"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F), SEARCH_IN_FILES); + script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_in_files", TTR("Find in Files"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::F), SEARCH_IN_FILES); script_search_menu->show(); } else { script_search_menu->hide(); @@ -3346,9 +3372,10 @@ Array ScriptEditor::_get_open_script_editors() const { void ScriptEditor::set_scene_root_script(Ref<Script> p_script) { // Don't open dominant script if using an external editor. - const bool use_external_editor = + bool use_external_editor = EditorSettings::get_singleton()->get("text_editor/external/use_external_editor") || (p_script.is_valid() && p_script->get_language()->overrides_external_editor()); + use_external_editor = use_external_editor && !(p_script.is_valid() && p_script->is_built_in()); // Ignore external editor for built-in scripts. const bool open_dominant = EditorSettings::get_singleton()->get("text_editor/behavior/files/open_dominant_script_on_scene_change"); if (open_dominant && !use_external_editor && p_script.is_valid()) { @@ -3438,6 +3465,9 @@ void ScriptEditor::_on_find_in_files_result_selected(String fpath, int line_numb shader_editor->make_visible(true); shader_editor->get_shader_editor()->goto_line_selection(line_number - 1, begin, end); return; + } else if (fpath.get_extension() == "tscn") { + editor->load_scene(fpath); + return; } else { Ref<Script> script = res; if (script.is_valid()) { @@ -3638,11 +3668,11 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { find_replace_bar->hide(); ED_SHORTCUT("script_editor/window_sort", TTR("Sort")); - ED_SHORTCUT("script_editor/window_move_up", TTR("Move Up"), KEY_MASK_SHIFT | KEY_MASK_ALT | KEY_UP); - ED_SHORTCUT("script_editor/window_move_down", TTR("Move Down"), KEY_MASK_SHIFT | KEY_MASK_ALT | KEY_DOWN); - // FIXME: These should be `KEY_GREATER` and `KEY_LESS` but those don't work. - ED_SHORTCUT("script_editor/next_script", TTR("Next Script"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_PERIOD); - ED_SHORTCUT("script_editor/prev_script", TTR("Previous Script"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_COMMA); + ED_SHORTCUT("script_editor/window_move_up", TTR("Move Up"), KeyModifierMask::SHIFT | KeyModifierMask::ALT | Key::UP); + ED_SHORTCUT("script_editor/window_move_down", TTR("Move Down"), KeyModifierMask::SHIFT | KeyModifierMask::ALT | Key::DOWN); + // FIXME: These should be `Key::GREATER` and `Key::LESS` but those don't work. + ED_SHORTCUT("script_editor/next_script", TTR("Next Script"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::PERIOD); + ED_SHORTCUT("script_editor/prev_script", TTR("Previous Script"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::COMMA); set_process_input(true); set_process_unhandled_input(true); @@ -3655,7 +3685,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/new", TTR("New Script...")), FILE_NEW); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/new_textfile", TTR("New Text File...")), FILE_NEW_TEXTFILE); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/open", TTR("Open...")), FILE_OPEN); - file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/reopen_closed_script", TTR("Reopen Closed Script"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_T), FILE_REOPEN_CLOSED); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/reopen_closed_script", TTR("Reopen Closed Script"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::T), FILE_REOPEN_CLOSED); file_menu->get_popup()->add_submenu_item(TTR("Open Recent"), "RecentScripts", FILE_OPEN_RECENT); recent_scripts = memnew(PopupMenu); @@ -3665,17 +3695,17 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { _update_recent_scripts(); file_menu->get_popup()->add_separator(); - file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/save", TTR("Save"), KEY_MASK_ALT | KEY_MASK_CMD | KEY_S), FILE_SAVE); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/save", TTR("Save"), KeyModifierMask::ALT | KeyModifierMask::CMD | Key::S), FILE_SAVE); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/save_as", TTR("Save As...")), FILE_SAVE_AS); - file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/save_all", TTR("Save All"), KEY_MASK_SHIFT | KEY_MASK_ALT | KEY_S), FILE_SAVE_ALL); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/save_all", TTR("Save All"), KeyModifierMask::SHIFT | KeyModifierMask::ALT | Key::S), FILE_SAVE_ALL); file_menu->get_popup()->add_separator(); - file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/reload_script_soft", TTR("Soft Reload Script"), KEY_MASK_CMD | KEY_MASK_ALT | KEY_R), FILE_TOOL_RELOAD_SOFT); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/reload_script_soft", TTR("Soft Reload Script"), KeyModifierMask::CMD | KeyModifierMask::ALT | Key::R), FILE_TOOL_RELOAD_SOFT); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/copy_path", TTR("Copy Script Path")), FILE_COPY_PATH); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/show_in_file_system", TTR("Show in FileSystem")), SHOW_IN_FILE_SYSTEM); file_menu->get_popup()->add_separator(); - file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/history_previous", TTR("History Previous"), KEY_MASK_ALT | KEY_LEFT), WINDOW_PREV); - file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/history_next", TTR("History Next"), KEY_MASK_ALT | KEY_RIGHT), WINDOW_NEXT); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/history_previous", TTR("History Previous"), KeyModifierMask::ALT | Key::LEFT), WINDOW_PREV); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/history_next", TTR("History Next"), KeyModifierMask::ALT | Key::RIGHT), WINDOW_NEXT); file_menu->get_popup()->add_separator(); file_menu->get_popup()->add_submenu_item(TTR("Theme"), "Theme", FILE_THEME); @@ -3692,16 +3722,16 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { theme_submenu->add_shortcut(ED_SHORTCUT("script_editor/save_theme_as", TTR("Save Theme As...")), THEME_SAVE_AS); file_menu->get_popup()->add_separator(); - file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/close_file", TTR("Close"), KEY_MASK_CMD | KEY_W), FILE_CLOSE); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/close_file", TTR("Close"), KeyModifierMask::CMD | Key::W), FILE_CLOSE); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/close_all", TTR("Close All")), CLOSE_ALL); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/close_other_tabs", TTR("Close Other Tabs")), CLOSE_OTHER_TABS); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/close_docs", TTR("Close Docs")), CLOSE_DOCS); file_menu->get_popup()->add_separator(); - file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/run_file", TTR("Run"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_X), FILE_RUN); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/run_file", TTR("Run"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::X), FILE_RUN); file_menu->get_popup()->add_separator(); - file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/toggle_scripts_panel", TTR("Toggle Scripts Panel"), KEY_MASK_CMD | KEY_BACKSLASH), TOGGLE_SCRIPTS_PANEL); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/toggle_scripts_panel", TTR("Toggle Scripts Panel"), KeyModifierMask::CMD | Key::BACKSLASH), TOGGLE_SCRIPTS_PANEL); file_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptEditor::_menu_option)); script_search_menu = memnew(MenuButton); @@ -3858,7 +3888,7 @@ void ScriptEditorPlugin::edit(Object *p_object) { Script *p_script = Object::cast_to<Script>(p_object); String res_path = p_script->get_path().get_slice("::", 0); - if (_is_built_in_script(p_script)) { + if (p_script->is_built_in()) { if (ResourceLoader::get_resource_type(res_path) == "PackedScene") { if (!EditorNode::get_singleton()->is_scene_open(res_path)) { EditorNode::get_singleton()->load_scene(res_path); @@ -3954,7 +3984,7 @@ ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) { EDITOR_DEF("text_editor/external/exec_flags", "{file}"); EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING, "text_editor/external/exec_flags", PROPERTY_HINT_PLACEHOLDER_TEXT, "Call flags with placeholders: {project}, {file}, {col}, {line}.")); - ED_SHORTCUT("script_editor/reopen_closed_script", TTR("Reopen Closed Script"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_T); + ED_SHORTCUT("script_editor/reopen_closed_script", TTR("Reopen Closed Script"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::T); ED_SHORTCUT("script_editor/clear_recent", TTR("Clear Recent Scripts")); } diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index 2b0bdfd109..0adeca031e 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -365,6 +365,7 @@ class ScriptEditor : public PanelContainer { void _add_callback(Object *p_obj, const String &p_function, const PackedStringArray &p_args); void _res_saved_callback(const Ref<Resource> &p_res); + void _scene_saved_callback(const String &p_path); bool open_textfile_after_create = true; bool trim_trailing_whitespace_on_save; diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 219498b5e7..93adced59d 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -375,18 +375,21 @@ void ScriptTextEditor::ensure_focus() { String ScriptTextEditor::get_name() { String name; - if (script->get_path().find("local://") == -1 && script->get_path().find("::") == -1) { - name = script->get_path().get_file(); - if (is_unsaved()) { - if (script->get_path().is_empty()) { - name = TTR("[unsaved]"); - } - name += "(*)"; + name = script->get_path().get_file(); + if (name.is_empty()) { + // This appears for newly created built-in scripts before saving the scene. + name = TTR("[unsaved]"); + } else if (script->is_built_in()) { + const String &script_name = script->get_name(); + if (script_name != "") { + // If the built-in script has a custom resource name defined, + // display the built-in script name as follows: `ResourceName (scene_file.tscn)` + name = vformat("%s (%s)", script_name, name.get_slice("::", 0)); } - } else if (script->get_name() != "") { - name = script->get_name(); - } else { - name = script->get_class() + "(" + itos(script->get_instance_id()) + ")"; + } + + if (is_unsaved()) { + name += "(*)"; } return name; @@ -658,7 +661,7 @@ void ScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_fo continue; } - if (script->get_path() == "" || script->get_path().find("local://") != -1 || script->get_path().find("::") != -1) { + if (script->is_built_in()) { continue; //internal script, who cares, though weird } @@ -1459,7 +1462,7 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data Array files = d["files"]; String text_to_drop; - bool preload = Input::get_singleton()->is_key_pressed(KEY_CTRL); + bool preload = Input::get_singleton()->is_key_pressed(Key::CTRL); for (int i = 0; i < files.size(); i++) { if (i > 0) { text_to_drop += ", "; @@ -1523,7 +1526,7 @@ void ScriptTextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) { bool create_menu = false; CodeEdit *tx = code_editor->get_text_editor(); - if (mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_RIGHT && mb->is_pressed()) { + if (mb.is_valid() && mb->get_button_index() == MouseButton::RIGHT && mb->is_pressed()) { local_pos = mb->get_global_position() - tx->get_global_position(); create_menu = true; } else if (k.is_valid() && k->is_action("ui_menu", true)) { @@ -1626,10 +1629,7 @@ void ScriptTextEditor::_color_changed(const Color &p_color) { } String line = code_editor->get_text_editor()->get_line(color_position.x); - int color_args_pos = line.find(color_args, color_position.y); - String line_with_replaced_args = line; - line_with_replaced_args.erase(color_args_pos, color_args.length()); - line_with_replaced_args = line_with_replaced_args.insert(color_args_pos, new_args); + String line_with_replaced_args = line.replace(color_args, new_args); color_args = new_args; code_editor->get_text_editor()->begin_complex_operation(); @@ -1804,9 +1804,9 @@ void ScriptTextEditor::_enable_code_editor() { edit_menu->get_popup()->add_child(convert_case); edit_menu->get_popup()->add_submenu_item(TTR("Convert Case"), "convert_case"); - convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_uppercase", TTR("Uppercase"), KEY_MASK_SHIFT | KEY_F4), EDIT_TO_UPPERCASE); - convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_lowercase", TTR("Lowercase"), KEY_MASK_SHIFT | KEY_F5), EDIT_TO_LOWERCASE); - convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/capitalize", TTR("Capitalize"), KEY_MASK_SHIFT | KEY_F6), EDIT_CAPITALIZE); + convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_uppercase", TTR("Uppercase"), KeyModifierMask::SHIFT | Key::F4), EDIT_TO_UPPERCASE); + convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_lowercase", TTR("Lowercase"), KeyModifierMask::SHIFT | Key::F5), EDIT_TO_LOWERCASE); + convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/capitalize", TTR("Capitalize"), KeyModifierMask::SHIFT | Key::F6), EDIT_CAPITALIZE); convert_case->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option)); edit_menu->get_popup()->add_child(highlighter_menu); @@ -1953,60 +1953,60 @@ static ScriptEditorBase *create_editor(const RES &p_resource) { } void ScriptTextEditor::register_editor() { - ED_SHORTCUT("script_text_editor/move_up", TTR("Move Up"), KEY_MASK_ALT | KEY_UP); - ED_SHORTCUT("script_text_editor/move_down", TTR("Move Down"), KEY_MASK_ALT | KEY_DOWN); - ED_SHORTCUT("script_text_editor/delete_line", TTR("Delete Line"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_K); + ED_SHORTCUT("script_text_editor/move_up", TTR("Move Up"), KeyModifierMask::ALT | Key::UP); + ED_SHORTCUT("script_text_editor/move_down", TTR("Move Down"), KeyModifierMask::ALT | Key::DOWN); + ED_SHORTCUT("script_text_editor/delete_line", TTR("Delete Line"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::K); // Leave these at zero, same can be accomplished with tab/shift-tab, including selection. // The next/previous in history shortcut in this case makes a lot more sense. - ED_SHORTCUT("script_text_editor/indent_left", TTR("Indent Left"), KEY_NONE); - ED_SHORTCUT("script_text_editor/indent_right", TTR("Indent Right"), KEY_NONE); - ED_SHORTCUT("script_text_editor/toggle_comment", TTR("Toggle Comment"), KEY_MASK_CMD | KEY_K); - ED_SHORTCUT("script_text_editor/toggle_fold_line", TTR("Fold/Unfold Line"), KEY_MASK_ALT | KEY_F); - ED_SHORTCUT("script_text_editor/fold_all_lines", TTR("Fold All Lines"), KEY_NONE); - ED_SHORTCUT("script_text_editor/unfold_all_lines", TTR("Unfold All Lines"), KEY_NONE); - ED_SHORTCUT("script_text_editor/duplicate_selection", TTR("Duplicate Selection"), KEY_MASK_SHIFT | KEY_MASK_CMD | KEY_D); - ED_SHORTCUT_OVERRIDE("script_text_editor/duplicate_selection", "macos", KEY_MASK_SHIFT | KEY_MASK_CMD | KEY_C); - ED_SHORTCUT("script_text_editor/evaluate_selection", TTR("Evaluate Selection"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_E); - ED_SHORTCUT("script_text_editor/trim_trailing_whitespace", TTR("Trim Trailing Whitespace"), KEY_MASK_CMD | KEY_MASK_ALT | KEY_T); - ED_SHORTCUT("script_text_editor/convert_indent_to_spaces", TTR("Convert Indent to Spaces"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_Y); - ED_SHORTCUT("script_text_editor/convert_indent_to_tabs", TTR("Convert Indent to Tabs"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_I); - ED_SHORTCUT("script_text_editor/auto_indent", TTR("Auto Indent"), KEY_MASK_CMD | KEY_I); + ED_SHORTCUT("script_text_editor/indent_left", TTR("Indent Left"), Key::NONE); + ED_SHORTCUT("script_text_editor/indent_right", TTR("Indent Right"), Key::NONE); + ED_SHORTCUT("script_text_editor/toggle_comment", TTR("Toggle Comment"), KeyModifierMask::CMD | Key::K); + ED_SHORTCUT("script_text_editor/toggle_fold_line", TTR("Fold/Unfold Line"), KeyModifierMask::ALT | Key::F); + ED_SHORTCUT("script_text_editor/fold_all_lines", TTR("Fold All Lines"), Key::NONE); + ED_SHORTCUT("script_text_editor/unfold_all_lines", TTR("Unfold All Lines"), Key::NONE); + ED_SHORTCUT("script_text_editor/duplicate_selection", TTR("Duplicate Selection"), KeyModifierMask::SHIFT | KeyModifierMask::CMD | Key::D); + ED_SHORTCUT_OVERRIDE("script_text_editor/duplicate_selection", "macos", KeyModifierMask::SHIFT | KeyModifierMask::CMD | Key::C); + ED_SHORTCUT("script_text_editor/evaluate_selection", TTR("Evaluate Selection"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::E); + ED_SHORTCUT("script_text_editor/trim_trailing_whitespace", TTR("Trim Trailing Whitespace"), KeyModifierMask::CMD | KeyModifierMask::ALT | Key::T); + ED_SHORTCUT("script_text_editor/convert_indent_to_spaces", TTR("Convert Indent to Spaces"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::Y); + ED_SHORTCUT("script_text_editor/convert_indent_to_tabs", TTR("Convert Indent to Tabs"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::I); + ED_SHORTCUT("script_text_editor/auto_indent", TTR("Auto Indent"), KeyModifierMask::CMD | Key::I); - ED_SHORTCUT_AND_COMMAND("script_text_editor/find", TTR("Find..."), KEY_MASK_CMD | KEY_F); + ED_SHORTCUT_AND_COMMAND("script_text_editor/find", TTR("Find..."), KeyModifierMask::CMD | Key::F); - ED_SHORTCUT("script_text_editor/find_next", TTR("Find Next"), KEY_F3); - ED_SHORTCUT_OVERRIDE("script_text_editor/find_next", "macos", KEY_MASK_CMD | KEY_G); + ED_SHORTCUT("script_text_editor/find_next", TTR("Find Next"), Key::F3); + ED_SHORTCUT_OVERRIDE("script_text_editor/find_next", "macos", KeyModifierMask::CMD | Key::G); - ED_SHORTCUT("script_text_editor/find_previous", TTR("Find Previous"), KEY_MASK_SHIFT | KEY_F3); - ED_SHORTCUT_OVERRIDE("script_text_editor/find_previous", "macos", KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_G); + ED_SHORTCUT("script_text_editor/find_previous", TTR("Find Previous"), KeyModifierMask::SHIFT | Key::F3); + ED_SHORTCUT_OVERRIDE("script_text_editor/find_previous", "macos", KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::G); - ED_SHORTCUT_AND_COMMAND("script_text_editor/replace", TTR("Replace..."), KEY_MASK_CMD | KEY_R); - ED_SHORTCUT_OVERRIDE("script_text_editor/replace", "macos", KEY_MASK_ALT | KEY_MASK_CMD | KEY_F); + ED_SHORTCUT_AND_COMMAND("script_text_editor/replace", TTR("Replace..."), KeyModifierMask::CMD | Key::R); + ED_SHORTCUT_OVERRIDE("script_text_editor/replace", "macos", KeyModifierMask::ALT | KeyModifierMask::CMD | Key::F); - ED_SHORTCUT("script_text_editor/find_in_files", TTR("Find in Files..."), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F); - ED_SHORTCUT("script_text_editor/replace_in_files", TTR("Replace in Files..."), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_R); + ED_SHORTCUT("script_text_editor/find_in_files", TTR("Find in Files..."), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::F); + ED_SHORTCUT("script_text_editor/replace_in_files", TTR("Replace in Files..."), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::R); - ED_SHORTCUT("script_text_editor/contextual_help", TTR("Contextual Help"), KEY_MASK_ALT | KEY_F1); - ED_SHORTCUT_OVERRIDE("script_text_editor/contextual_help", "macos", KEY_MASK_ALT | KEY_MASK_SHIFT | KEY_SPACE); + ED_SHORTCUT("script_text_editor/contextual_help", TTR("Contextual Help"), KeyModifierMask::ALT | Key::F1); + ED_SHORTCUT_OVERRIDE("script_text_editor/contextual_help", "macos", KeyModifierMask::ALT | KeyModifierMask::SHIFT | Key::SPACE); - ED_SHORTCUT("script_text_editor/toggle_bookmark", TTR("Toggle Bookmark"), KEY_MASK_CMD | KEY_MASK_ALT | KEY_B); - ED_SHORTCUT("script_text_editor/goto_next_bookmark", TTR("Go to Next Bookmark"), KEY_MASK_CMD | KEY_B); - ED_SHORTCUT("script_text_editor/goto_previous_bookmark", TTR("Go to Previous Bookmark"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_B); - ED_SHORTCUT("script_text_editor/remove_all_bookmarks", TTR("Remove All Bookmarks"), KEY_NONE); + ED_SHORTCUT("script_text_editor/toggle_bookmark", TTR("Toggle Bookmark"), KeyModifierMask::CMD | KeyModifierMask::ALT | Key::B); + ED_SHORTCUT("script_text_editor/goto_next_bookmark", TTR("Go to Next Bookmark"), KeyModifierMask::CMD | Key::B); + ED_SHORTCUT("script_text_editor/goto_previous_bookmark", TTR("Go to Previous Bookmark"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::B); + ED_SHORTCUT("script_text_editor/remove_all_bookmarks", TTR("Remove All Bookmarks"), Key::NONE); - ED_SHORTCUT("script_text_editor/goto_function", TTR("Go to Function..."), KEY_MASK_ALT | KEY_MASK_CMD | KEY_F); - ED_SHORTCUT_OVERRIDE("script_text_editor/goto_function", "macos", KEY_MASK_CTRL | KEY_MASK_CMD | KEY_J); + ED_SHORTCUT("script_text_editor/goto_function", TTR("Go to Function..."), KeyModifierMask::ALT | KeyModifierMask::CMD | Key::F); + ED_SHORTCUT_OVERRIDE("script_text_editor/goto_function", "macos", KeyModifierMask::CTRL | KeyModifierMask::CMD | Key::J); - ED_SHORTCUT("script_text_editor/goto_line", TTR("Go to Line..."), KEY_MASK_CMD | KEY_L); + ED_SHORTCUT("script_text_editor/goto_line", TTR("Go to Line..."), KeyModifierMask::CMD | Key::L); - ED_SHORTCUT("script_text_editor/toggle_breakpoint", TTR("Toggle Breakpoint"), KEY_F9); - ED_SHORTCUT_OVERRIDE("script_text_editor/toggle_breakpoint", "macos", KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_B); + ED_SHORTCUT("script_text_editor/toggle_breakpoint", TTR("Toggle Breakpoint"), Key::F9); + ED_SHORTCUT_OVERRIDE("script_text_editor/toggle_breakpoint", "macos", KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::B); - ED_SHORTCUT("script_text_editor/remove_all_breakpoints", TTR("Remove All Breakpoints"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F9); - ED_SHORTCUT("script_text_editor/goto_next_breakpoint", TTR("Go to Next Breakpoint"), KEY_MASK_CMD | KEY_PERIOD); - ED_SHORTCUT("script_text_editor/goto_previous_breakpoint", TTR("Go to Previous Breakpoint"), KEY_MASK_CMD | KEY_COMMA); + ED_SHORTCUT("script_text_editor/remove_all_breakpoints", TTR("Remove All Breakpoints"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::F9); + ED_SHORTCUT("script_text_editor/goto_next_breakpoint", TTR("Go to Next Breakpoint"), KeyModifierMask::CMD | Key::PERIOD); + ED_SHORTCUT("script_text_editor/goto_previous_breakpoint", TTR("Go to Previous Breakpoint"), KeyModifierMask::CMD | Key::COMMA); ScriptEditor::register_create_script_editor_function(create_editor); } diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index 2731582288..6032267717 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -34,6 +34,7 @@ #include "core/io/resource_saver.h" #include "core/os/keyboard.h" #include "core/os/os.h" +#include "core/version_generated.gen.h" #include "editor/editor_node.h" #include "editor/editor_scale.h" #include "editor/editor_settings.h" @@ -142,10 +143,10 @@ void ShaderTextEditor::_load_theme_settings() { } } - const Color member_variable_color = EDITOR_GET("text_editor/theme/highlighting/member_variable_color"); + const Color user_type_color = EDITOR_GET("text_editor/theme/highlighting/user_type_color"); for (const String &E : built_ins) { - syntax_highlighter->add_keyword_color(E, member_variable_color); + syntax_highlighter->add_keyword_color(E, user_type_color); } // Colorize comments. @@ -384,7 +385,7 @@ void ShaderEditor::_menu_option(int p_option) { shader_editor->remove_all_bookmarks(); } break; case HELP_DOCS: { - OS::get_singleton()->shell_open("https://docs.godotengine.org/en/latest/tutorials/shaders/shader_reference/index.html"); + OS::get_singleton()->shell_open(vformat("%s/tutorials/shaders/shader_reference/index.html", VERSION_DOCS_URL)); } break; } if (p_option != SEARCH_FIND && p_option != SEARCH_REPLACE && p_option != SEARCH_GOTO_LINE) { @@ -482,8 +483,7 @@ void ShaderEditor::_check_for_external_edit() { return; } - // internal shader. - if (shader->get_path() == "" || shader->get_path().find("local://") != -1 || shader->get_path().find("::") != -1) { + if (shader->is_built_in()) { return; } @@ -530,7 +530,7 @@ void ShaderEditor::save_external_data(const String &p_str) { } apply_shaders(); - if (shader->get_path() != "" && shader->get_path().find("local://") == -1 && shader->get_path().find("::") == -1) { + if (!shader->is_built_in()) { //external shader, save it ResourceSaver::save(shader->get_path(), shader); } @@ -553,7 +553,7 @@ void ShaderEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) { Ref<InputEventMouseButton> mb = ev; if (mb.is_valid()) { - if (mb->get_button_index() == MOUSE_BUTTON_RIGHT && mb->is_pressed()) { + if (mb->get_button_index() == MouseButton::RIGHT && mb->is_pressed()) { CodeEdit *tx = shader_editor->get_text_editor(); Point2i pos = tx->get_line_column_at_pos(mb->get_global_position() - tx->get_global_position()); diff --git a/editor/plugins/skeleton_2d_editor_plugin.cpp b/editor/plugins/skeleton_2d_editor_plugin.cpp index c350004f0f..510e264c48 100644 --- a/editor/plugins/skeleton_2d_editor_plugin.cpp +++ b/editor/plugins/skeleton_2d_editor_plugin.cpp @@ -52,34 +52,34 @@ void Skeleton2DEditor::_menu_option(int p_option) { } switch (p_option) { - case MENU_OPTION_MAKE_REST: { + case MENU_OPTION_SET_REST: { if (node->get_bone_count() == 0) { err_dialog->set_text(TTR("This skeleton has no bones, create some children Bone2D nodes.")); err_dialog->popup_centered(); return; } UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); - ur->create_action(TTR("Create Rest Pose from Bones")); + ur->create_action(TTR("Set Rest Pose to Bones")); for (int i = 0; i < node->get_bone_count(); i++) { Bone2D *bone = node->get_bone(i); - ur->add_do_method(bone, "set_rest", bone->get_transform()); - ur->add_undo_method(bone, "set_rest", bone->get_rest()); + ur->add_do_method(bone, "set_transform", bone->get_rest()); + ur->add_undo_method(bone, "set_transform", bone->get_transform()); } ur->commit_action(); } break; - case MENU_OPTION_SET_REST: { + case MENU_OPTION_MAKE_REST: { if (node->get_bone_count() == 0) { err_dialog->set_text(TTR("This skeleton has no bones, create some children Bone2D nodes.")); err_dialog->popup_centered(); return; } UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); - ur->create_action(TTR("Set Rest Pose to Bones")); + ur->create_action(TTR("Create Rest Pose from Bones")); for (int i = 0; i < node->get_bone_count(); i++) { Bone2D *bone = node->get_bone(i); - ur->add_do_method(bone, "set_transform", bone->get_rest()); - ur->add_undo_method(bone, "set_transform", bone->get_transform()); + ur->add_do_method(bone, "set_rest", bone->get_transform()); + ur->add_undo_method(bone, "set_rest", bone->get_rest()); } ur->commit_action(); @@ -98,10 +98,10 @@ Skeleton2DEditor::Skeleton2DEditor() { options->set_text(TTR("Skeleton2D")); options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Skeleton2D"), SNAME("EditorIcons"))); - options->get_popup()->add_item(TTR("Reset to Rest Pose"), MENU_OPTION_MAKE_REST); + options->get_popup()->add_item(TTR("Reset to Rest Pose"), MENU_OPTION_SET_REST); options->get_popup()->add_separator(); // Use the "Overwrite" word to highlight that this is a destructive operation. - options->get_popup()->add_item(TTR("Overwrite Rest Pose"), MENU_OPTION_SET_REST); + options->get_popup()->add_item(TTR("Overwrite Rest Pose"), MENU_OPTION_MAKE_REST); options->set_switch_on_hover(true); options->get_popup()->connect("id_pressed", callable_mp(this, &Skeleton2DEditor::_menu_option)); diff --git a/editor/plugins/skeleton_2d_editor_plugin.h b/editor/plugins/skeleton_2d_editor_plugin.h index dacd8fe43f..066888f685 100644 --- a/editor/plugins/skeleton_2d_editor_plugin.h +++ b/editor/plugins/skeleton_2d_editor_plugin.h @@ -40,8 +40,8 @@ class Skeleton2DEditor : public Control { GDCLASS(Skeleton2DEditor, Control); enum Menu { - MENU_OPTION_MAKE_REST, MENU_OPTION_SET_REST, + MENU_OPTION_MAKE_REST, }; Skeleton2D *node; diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp index 0b8a56503c..5f21c8c881 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.cpp +++ b/editor/plugins/skeleton_3d_editor_plugin.cpp @@ -681,7 +681,7 @@ void Skeleton3DEditor::create_editors() { key_insert_button->set_focus_mode(FOCUS_NONE); key_insert_button->connect("pressed", callable_mp(this, &Skeleton3DEditor::insert_keys), varray(false)); key_insert_button->set_tooltip(TTR("Insert key of bone poses already exist track.")); - key_insert_button->set_shortcut(ED_SHORTCUT("skeleton_3d_editor/insert_key_to_existing_tracks", TTR("Insert Key (Existing Tracks)"), KEY_INSERT)); + key_insert_button->set_shortcut(ED_SHORTCUT("skeleton_3d_editor/insert_key_to_existing_tracks", TTR("Insert Key (Existing Tracks)"), Key::INSERT)); animation_hb->add_child(key_insert_button); key_insert_all_button = memnew(Button); @@ -689,7 +689,7 @@ void Skeleton3DEditor::create_editors() { key_insert_all_button->set_focus_mode(FOCUS_NONE); key_insert_all_button->connect("pressed", callable_mp(this, &Skeleton3DEditor::insert_keys), varray(true)); key_insert_all_button->set_tooltip(TTR("Insert key of all bone poses.")); - key_insert_all_button->set_shortcut(ED_SHORTCUT("skeleton_3d_editor/insert_key_of_all_bones", TTR("Insert Key (All Bones)"), KEY_MASK_CMD + KEY_INSERT)); + key_insert_all_button->set_shortcut(ED_SHORTCUT("skeleton_3d_editor/insert_key_of_all_bones", TTR("Insert Key (All Bones)"), KeyModifierMask::CMD + Key::INSERT)); animation_hb->add_child(key_insert_all_button); // Bone tree. @@ -1028,7 +1028,7 @@ EditorPlugin::AfterGUIInput Skeleton3DEditorPlugin::forward_spatial_gui_input(Ca 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 (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT) { if (ne->get_tool_mode() != Node3DEditor::TOOL_MODE_SELECT) { if (!ne->is_gizmo_visible()) { return EditorPlugin::AFTER_GUI_INPUT_STOP; diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index 8a8d80891a..d455f4618b 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -126,7 +126,7 @@ void SpriteFramesEditor::_sheet_preview_draw() { void SpriteFramesEditor::_sheet_preview_input(const Ref<InputEvent> &p_event) { const Ref<InputEventMouseButton> mb = p_event; - if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { const int idx = _sheet_preview_position_to_frame_index(mb->get_position()); if (idx != -1) { @@ -166,12 +166,12 @@ void SpriteFramesEditor::_sheet_preview_input(const Ref<InputEvent> &p_event) { } } - if (mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { frames_toggled_by_mouse_hover.clear(); } const Ref<InputEventMouseMotion> mm = p_event; - if (mm.is_valid() && mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT) { + if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) { // Select by holding down the mouse button on frames. const int idx = _sheet_preview_position_to_frame_index(mm->get_position()); @@ -200,11 +200,11 @@ void SpriteFramesEditor::_sheet_scroll_input(const Ref<InputEvent> &p_event) { // Zoom in/out using Ctrl + mouse wheel. This is done on the ScrollContainer // to allow performing this action anywhere, even if the cursor isn't // hovering the texture in the workspace. - if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP && mb->is_pressed() && mb->is_ctrl_pressed()) { + if (mb->get_button_index() == MouseButton::WHEEL_UP && mb->is_pressed() && mb->is_ctrl_pressed()) { _sheet_zoom_in(); // Don't scroll up after zooming in. accept_event(); - } else if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN && mb->is_pressed() && mb->is_ctrl_pressed()) { + } else if (mb->get_button_index() == MouseButton::WHEEL_DOWN && mb->is_pressed() && mb->is_ctrl_pressed()) { _sheet_zoom_out(); // Don't scroll down after zooming out. accept_event(); @@ -746,11 +746,11 @@ void SpriteFramesEditor::_tree_input(const Ref<InputEvent> &p_event) { const Ref<InputEventMouseButton> mb = p_event; if (mb.is_valid()) { - if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP && mb->is_pressed() && mb->is_ctrl_pressed()) { + if (mb->get_button_index() == MouseButton::WHEEL_UP && mb->is_pressed() && mb->is_ctrl_pressed()) { _zoom_in(); // Don't scroll up after zooming in. accept_event(); - } else if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN && mb->is_pressed() && mb->is_ctrl_pressed()) { + } else if (mb->get_button_index() == MouseButton::WHEEL_DOWN && mb->is_pressed() && mb->is_ctrl_pressed()) { _zoom_out(); // Don't scroll down after zooming out. accept_event(); @@ -1006,7 +1006,7 @@ void SpriteFramesEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da if (String(d["type"]) == "files") { Vector<String> files = d["files"]; - if (Input::get_singleton()->is_key_pressed(KEY_CTRL)) { + if (Input::get_singleton()->is_key_pressed(Key::CTRL)) { _prepare_sprite_sheet(files[0]); } else { _file_load_request(files, at_pos); diff --git a/editor/plugins/style_box_editor_plugin.cpp b/editor/plugins/style_box_editor_plugin.cpp index 91c5e96f08..1c7f319280 100644 --- a/editor/plugins/style_box_editor_plugin.cpp +++ b/editor/plugins/style_box_editor_plugin.cpp @@ -44,13 +44,6 @@ void EditorInspectorPluginStyleBox::parse_begin(Object *p_object) { add_custom_control(preview); } -bool EditorInspectorPluginStyleBox::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, bool p_wide) { - return false; //do not want -} - -void EditorInspectorPluginStyleBox::parse_end() { -} - void StyleBoxPreview::edit(const Ref<StyleBox> &p_stylebox) { if (stylebox.is_valid()) { stylebox->disconnect("changed", callable_mp(this, &StyleBoxPreview::_sb_changed)); diff --git a/editor/plugins/style_box_editor_plugin.h b/editor/plugins/style_box_editor_plugin.h index 8ca348bd80..d82e5ab05e 100644 --- a/editor/plugins/style_box_editor_plugin.h +++ b/editor/plugins/style_box_editor_plugin.h @@ -61,8 +61,6 @@ class EditorInspectorPluginStyleBox : public EditorInspectorPlugin { public: virtual bool can_handle(Object *p_object) override; virtual void parse_begin(Object *p_object) override; - virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override; - virtual void parse_end() override; }; class StyleBoxEditorPlugin : public EditorPlugin { diff --git a/editor/plugins/text_control_editor_plugin.cpp b/editor/plugins/text_control_editor_plugin.cpp new file mode 100644 index 0000000000..c878c83430 --- /dev/null +++ b/editor/plugins/text_control_editor_plugin.cpp @@ -0,0 +1,375 @@ +/*************************************************************************/ +/* text_control_editor_plugin.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + +#include "text_control_editor_plugin.h" + +#include "editor/editor_scale.h" + +void TextControlEditor::_notification(int p_notification) { + switch (p_notification) { + case NOTIFICATION_ENTER_TREE: { + if (!EditorFileSystem::get_singleton()->is_connected("filesystem_changed", callable_mp(this, &TextControlEditor::_reload_fonts))) { + EditorFileSystem::get_singleton()->connect("filesystem_changed", callable_mp(this, &TextControlEditor::_reload_fonts), make_binds("")); + } + [[fallthrough]]; + } + case NOTIFICATION_THEME_CHANGED: { + clear_formatting->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons"))); + } break; + case NOTIFICATION_EXIT_TREE: { + if (EditorFileSystem::get_singleton()->is_connected("filesystem_changed", callable_mp(this, &TextControlEditor::_reload_fonts))) { + EditorFileSystem::get_singleton()->disconnect("filesystem_changed", callable_mp(this, &TextControlEditor::_reload_fonts)); + } + } break; + default: + break; + } +} + +void TextControlEditor::_find_resources(EditorFileSystemDirectory *p_dir) { + for (int i = 0; i < p_dir->get_subdir_count(); i++) { + _find_resources(p_dir->get_subdir(i)); + } + + for (int i = 0; i < p_dir->get_file_count(); i++) { + if (p_dir->get_file_type(i) == "FontData") { + Ref<FontData> fd = ResourceLoader::load(p_dir->get_file_path(i)); + if (fd.is_valid()) { + String name = fd->get_font_name(); + String sty = fd->get_font_style_name(); + if (sty.is_empty()) { + sty = "Default"; + } + fonts[name][sty] = p_dir->get_file_path(i); + } + } + } +} + +void TextControlEditor::_reload_fonts(const String &p_path) { + fonts.clear(); + _find_resources(EditorFileSystem::get_singleton()->get_filesystem()); + _update_control(); +} + +void TextControlEditor::_update_fonts_menu() { + font_list->clear(); + font_list->add_item(TTR("[Theme Default]"), FONT_INFO_THEME_DEFAULT); + if (custom_font.is_valid()) { + font_list->add_item(TTR("[Custom Font]"), FONT_INFO_USER_CUSTOM); + } + + int id = FONT_INFO_ID; + for (Map<String, Map<String, String>>::Element *E = fonts.front(); E; E = E->next()) { + font_list->add_item(E->key(), id++); + } + + if (font_list->get_item_count() > 1) { + font_list->show(); + } else { + font_list->hide(); + } +} + +void TextControlEditor::_update_styles_menu() { + font_style_list->clear(); + if ((font_list->get_selected_id() >= FONT_INFO_ID)) { + const String &name = font_list->get_item_text(font_list->get_selected()); + for (Map<String, String>::Element *E = fonts[name].front(); E; E = E->next()) { + font_style_list->add_item(E->key()); + } + } else { + font_style_list->add_item("Default"); + } + + if (font_style_list->get_item_count() > 1) { + font_style_list->show(); + } else { + font_style_list->hide(); + } +} + +void TextControlEditor::_update_control() { + if (edited_control) { + // Get override names. + if (edited_control->is_class("RichTextLabel")) { + edited_color = "default_color"; + edited_font = "normal_font"; + edited_font_size = "normal_font_size"; + } else { + edited_color = "font_color"; + edited_font = "font"; + edited_font_size = "font_size"; + } + + // Get font override. + Ref<Font> font; + if (edited_control->has_theme_font_override(edited_font)) { + font = edited_control->get_theme_font(edited_font); + } + if (font.is_valid()) { + if (font->get_data_count() != 1) { + // Composite font, save it to "custom_font" to allow undoing font change. + custom_font = font; + _update_fonts_menu(); + font_list->select(FONT_INFO_USER_CUSTOM); + _update_styles_menu(); + font_style_list->select(0); + } else { + // Single face font, search for the font with matching name and style. + String name = font->get_data(0)->get_font_name(); + String style = font->get_data(0)->get_font_style_name(); + if (fonts.has(name) && fonts[name].has(style)) { + _update_fonts_menu(); + for (int i = 0; i < font_list->get_item_count(); i++) { + if (font_list->get_item_text(i) == name) { + font_list->select(i); + break; + } + } + _update_styles_menu(); + for (int i = 0; i < font_style_list->get_item_count(); i++) { + if (font_style_list->get_item_text(i) == style) { + font_style_list->select(i); + break; + } + } + } else { + // Unknown font, save it to "custom_font" to allow undoing font change. + custom_font = font; + _update_fonts_menu(); + font_list->select(FONT_INFO_USER_CUSTOM); + _update_styles_menu(); + font_style_list->select(0); + } + } + } else { + // No font override, select "Theme Default". + _update_fonts_menu(); + font_list->select(FONT_INFO_THEME_DEFAULT); + _update_styles_menu(); + font_style_list->select(0); + } + + // Get other theme overrides. + font_size_list->set_value(edited_control->get_theme_font_size(edited_font_size)); + outline_size_list->set_value(edited_control->get_theme_constant("outline_size")); + + font_color_picker->set_pick_color(edited_control->get_theme_color(edited_color)); + outline_color_picker->set_pick_color(edited_control->get_theme_color("font_outline_color")); + } +} + +void TextControlEditor::_font_selected(int p_id) { + _update_styles_menu(); + _set_font(); +} + +void TextControlEditor::_font_style_selected(int p_id) { + _set_font(); +} + +void TextControlEditor::_set_font() { + if (edited_control) { + if (font_list->get_selected_id() == FONT_INFO_THEME_DEFAULT) { + // Remove font override. + edited_control->remove_theme_font_override(edited_font); + return; + } else if (font_list->get_selected_id() == FONT_INFO_USER_CUSTOM) { + // Restore "custom_font". + edited_control->add_theme_font_override(edited_font, custom_font); + return; + } else { + // Load new font resource using selected name and style. + String name = font_list->get_item_text(font_list->get_selected()); + String sty = font_style_list->get_item_text(font_style_list->get_selected()); + if (sty.is_empty()) { + sty = "Default"; + } + if (fonts.has(name)) { + Ref<FontData> fd = ResourceLoader::load(fonts[name][sty]); + if (fd.is_valid()) { + Ref<Font> f; + f.instantiate(); + f->add_data(fd); + edited_control->add_theme_font_override(edited_font, f); + } + } + } + } +} + +void TextControlEditor::_font_size_selected(double p_size) { + if (edited_control) { + edited_control->add_theme_font_size_override(edited_font_size, p_size); + } +} + +void TextControlEditor::_outline_size_selected(double p_size) { + if (edited_control) { + edited_control->add_theme_constant_override("outline_size", p_size); + } +} + +void TextControlEditor::_font_color_changed(const Color &p_color) { + if (edited_control) { + edited_control->add_theme_color_override(edited_color, p_color); + } +} + +void TextControlEditor::_outline_color_changed(const Color &p_color) { + if (edited_control) { + edited_control->add_theme_color_override("font_outline_color", p_color); + } +} + +void TextControlEditor::_clear_formatting() { + if (edited_control) { + edited_control->begin_bulk_theme_override(); + edited_control->remove_theme_font_override(edited_font); + edited_control->remove_theme_font_size_override(edited_font_size); + edited_control->remove_theme_color_override(edited_color); + edited_control->remove_theme_color_override("font_outline_color"); + edited_control->remove_theme_constant_override("outline_size"); + edited_control->end_bulk_theme_override(); + _update_control(); + } +} + +void TextControlEditor::edit(Object *p_object) { + Control *ctrl = Object::cast_to<Control>(p_object); + if (!ctrl) { + edited_control = nullptr; + custom_font = Ref<Font>(); + } else { + edited_control = ctrl; + custom_font = Ref<Font>(); + _update_control(); + } +} + +bool TextControlEditor::handles(Object *p_object) const { + Control *ctrl = Object::cast_to<Control>(p_object); + if (!ctrl) { + return false; + } else { + bool valid = false; + ctrl->get("text", &valid); + return valid; + } +} + +TextControlEditor::TextControlEditor() { + add_child(memnew(VSeparator)); + + font_list = memnew(OptionButton); + font_list->set_flat(true); + font_list->set_tooltip(TTR("Font")); + add_child(font_list); + font_list->connect("item_selected", callable_mp(this, &TextControlEditor::_font_selected)); + + font_style_list = memnew(OptionButton); + font_style_list->set_flat(true); + font_style_list->set_tooltip(TTR("Font style")); + font_style_list->set_toggle_mode(true); + add_child(font_style_list); + font_style_list->connect("item_selected", callable_mp(this, &TextControlEditor::_font_style_selected)); + + font_size_list = memnew(SpinBox); + font_size_list->set_tooltip(TTR("Font Size")); + font_size_list->get_line_edit()->add_theme_constant_override("minimum_character_width", 2); + font_size_list->set_min(6); + font_size_list->set_step(1); + font_size_list->set_max(96); + font_size_list->get_line_edit()->set_flat(true); + add_child(font_size_list); + font_size_list->connect("value_changed", callable_mp(this, &TextControlEditor::_font_size_selected)); + + font_color_picker = memnew(ColorPickerButton); + font_color_picker->set_custom_minimum_size(Size2(20, 0) * EDSCALE); + font_color_picker->set_flat(true); + font_color_picker->set_tooltip(TTR("Text Color")); + add_child(font_color_picker); + font_color_picker->connect("color_changed", callable_mp(this, &TextControlEditor::_font_color_changed)); + + add_child(memnew(VSeparator)); + + outline_size_list = memnew(SpinBox); + outline_size_list->set_tooltip(TTR("Outline Size")); + outline_size_list->get_line_edit()->add_theme_constant_override("minimum_character_width", 2); + outline_size_list->set_min(0); + outline_size_list->set_step(1); + outline_size_list->set_max(96); + outline_size_list->get_line_edit()->set_flat(true); + add_child(outline_size_list); + outline_size_list->connect("value_changed", callable_mp(this, &TextControlEditor::_outline_size_selected)); + + outline_color_picker = memnew(ColorPickerButton); + outline_color_picker->set_custom_minimum_size(Size2(20, 0) * EDSCALE); + outline_color_picker->set_flat(true); + outline_color_picker->set_tooltip(TTR("Outline Color")); + add_child(outline_color_picker); + outline_color_picker->connect("color_changed", callable_mp(this, &TextControlEditor::_outline_color_changed)); + + add_child(memnew(VSeparator)); + + clear_formatting = memnew(Button); + clear_formatting->set_flat(true); + clear_formatting->set_tooltip(TTR("Clear Formatting")); + add_child(clear_formatting); + clear_formatting->connect("pressed", callable_mp(this, &TextControlEditor::_clear_formatting)); +} + +/*************************************************************************/ + +void TextControlEditorPlugin::edit(Object *p_object) { + text_ctl_editor->edit(p_object); +} + +bool TextControlEditorPlugin::handles(Object *p_object) const { + return text_ctl_editor->handles(p_object); +} + +void TextControlEditorPlugin::make_visible(bool p_visible) { + if (p_visible) { + text_ctl_editor->show(); + } else { + text_ctl_editor->hide(); + text_ctl_editor->edit(nullptr); + } +} + +TextControlEditorPlugin::TextControlEditorPlugin(EditorNode *p_node) { + editor = p_node; + text_ctl_editor = memnew(TextControlEditor); + CanvasItemEditor::get_singleton()->add_control_to_menu_panel(text_ctl_editor); + + text_ctl_editor->hide(); +} diff --git a/editor/plugins/text_control_editor_plugin.h b/editor/plugins/text_control_editor_plugin.h new file mode 100644 index 0000000000..7f4aa3754c --- /dev/null +++ b/editor/plugins/text_control_editor_plugin.h @@ -0,0 +1,119 @@ +/*************************************************************************/ +/* text_control_editor_plugin.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + +#ifndef TEXT_CONTROL_EDITOR_PLUGIN_H +#define TEXT_CONTROL_EDITOR_PLUGIN_H + +#include "canvas_item_editor_plugin.h" +#include "editor/editor_file_system.h" +#include "editor/editor_inspector.h" +#include "editor/editor_node.h" +#include "editor/editor_plugin.h" +#include "scene/gui/color_rect.h" +#include "scene/gui/menu_button.h" +#include "scene/gui/option_button.h" +#include "scene/gui/popup_menu.h" + +/*************************************************************************/ + +class TextControlEditor : public HBoxContainer { + GDCLASS(TextControlEditor, HBoxContainer); + + enum FontInfoID { + FONT_INFO_THEME_DEFAULT = 0, + FONT_INFO_USER_CUSTOM = 1, + FONT_INFO_ID = 100, + }; + + Map<String, Map<String, String>> fonts; + + OptionButton *font_list = nullptr; + SpinBox *font_size_list = nullptr; + OptionButton *font_style_list = nullptr; + ColorPickerButton *font_color_picker = nullptr; + SpinBox *outline_size_list = nullptr; + ColorPickerButton *outline_color_picker = nullptr; + Button *clear_formatting = nullptr; + + Control *edited_control = nullptr; + String edited_color; + String edited_font; + String edited_font_size; + Ref<Font> custom_font; + +protected: + void _notification(int p_notification); + static void _bind_methods(){}; + + void _find_resources(EditorFileSystemDirectory *p_dir); + void _reload_fonts(const String &p_path); + + void _update_fonts_menu(); + void _update_styles_menu(); + void _update_control(); + + void _font_selected(int p_id); + void _font_style_selected(int p_id); + void _set_font(); + + void _font_size_selected(double p_size); + void _outline_size_selected(double p_size); + + void _font_color_changed(const Color &p_color); + void _outline_color_changed(const Color &p_color); + + void _clear_formatting(); + +public: + void edit(Object *p_object); + bool handles(Object *p_object) const; + + TextControlEditor(); +}; + +/*************************************************************************/ + +class TextControlEditorPlugin : public EditorPlugin { + GDCLASS(TextControlEditorPlugin, EditorPlugin); + + TextControlEditor *text_ctl_editor; + EditorNode *editor; + +public: + virtual String get_name() const override { return "TextControlFontEditor"; } + bool has_main_screen() const override { return false; } + virtual void edit(Object *p_object) override; + virtual bool handles(Object *p_object) const override; + virtual void make_visible(bool p_visible) override; + + TextControlEditorPlugin(EditorNode *p_node); +}; + +#endif // TEXT_CONTROL_EDITOR_PLUGIN_H diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp index 1fc7eb98e0..ebfe6c9ee3 100644 --- a/editor/plugins/text_editor.cpp +++ b/editor/plugins/text_editor.cpp @@ -65,18 +65,21 @@ void TextEditor::_load_theme_settings() { String TextEditor::get_name() { String name; - if (text_file->get_path().find("local://") == -1 && text_file->get_path().find("::") == -1) { - name = text_file->get_path().get_file(); - if (is_unsaved()) { - if (text_file->get_path().is_empty()) { - name = TTR("[unsaved]"); - } - name += "(*)"; + name = text_file->get_path().get_file(); + if (name.is_empty()) { + // This appears for newly created built-in text_files before saving the scene. + name = TTR("[unsaved]"); + } else if (text_file->is_built_in()) { + const String &text_file_name = text_file->get_name(); + if (text_file_name != "") { + // If the built-in text_file has a custom resource name defined, + // display the built-in text_file name as follows: `ResourceName (scene_file.tscn)` + name = vformat("%s (%s)", text_file_name, name.get_slice("::", 0)); } - } else if (text_file->get_name() != "") { - name = text_file->get_name(); - } else { - name = text_file->get_class() + "(" + itos(text_file->get_instance_id()) + ")"; + } + + if (is_unsaved()) { + name += "(*)"; } return name; @@ -422,7 +425,7 @@ void TextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) { Ref<InputEventMouseButton> mb = ev; if (mb.is_valid()) { - if (mb->get_button_index() == MOUSE_BUTTON_RIGHT) { + if (mb->get_button_index() == MouseButton::RIGHT) { CodeEdit *tx = code_editor->get_text_editor(); Point2i pos = tx->get_line_column_at_pos(mb->get_global_position() - tx->get_global_position()); diff --git a/editor/plugins/texture_3d_editor_plugin.cpp b/editor/plugins/texture_3d_editor_plugin.cpp index bd1923f4ab..b4e394a1c0 100644 --- a/editor/plugins/texture_3d_editor_plugin.cpp +++ b/editor/plugins/texture_3d_editor_plugin.cpp @@ -173,7 +173,7 @@ Texture3DEditor::Texture3DEditor() { info->set_v_grow_direction(GROW_DIRECTION_BEGIN); info->add_theme_color_override("font_color", Color(1, 1, 1, 1)); info->add_theme_color_override("font_shadow_color", Color(0, 0, 0, 0.5)); - info->add_theme_constant_override("shadow_as_outline", 1); + info->add_theme_constant_override("shadow_outline_size", 1); info->add_theme_constant_override("shadow_offset_x", 2); info->add_theme_constant_override("shadow_offset_y", 2); diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp index b9ec6bf5ab..e25b0270b4 100644 --- a/editor/plugins/texture_editor_plugin.cpp +++ b/editor/plugins/texture_editor_plugin.cpp @@ -101,7 +101,7 @@ TexturePreview::TexturePreview(Ref<Texture2D> p_texture, bool p_show_metadata) { metadata_label->add_theme_color_override("font_outline_color", Color::named("black")); metadata_label->add_theme_constant_override("outline_size", 2 * EDSCALE); - metadata_label->add_theme_constant_override("shadow_as_outline", 1); + metadata_label->add_theme_constant_override("shadow_outline_size", 1); metadata_label->set_h_size_flags(Control::SIZE_SHRINK_END); metadata_label->set_v_size_flags(Control::SIZE_SHRINK_END); diff --git a/editor/plugins/texture_layered_editor_plugin.cpp b/editor/plugins/texture_layered_editor_plugin.cpp index 424e018a47..1f536d13cf 100644 --- a/editor/plugins/texture_layered_editor_plugin.cpp +++ b/editor/plugins/texture_layered_editor_plugin.cpp @@ -38,7 +38,7 @@ void TextureLayeredEditor::gui_input(const Ref<InputEvent> &p_event) { ERR_FAIL_COND(p_event.is_null()); Ref<InputEventMouseMotion> mm = p_event; - if (mm.is_valid() && mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT) { + if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) { y_rot += -mm->get_relative().x * 0.01; x_rot += mm->get_relative().y * 0.01; _update_material(); @@ -249,7 +249,7 @@ TextureLayeredEditor::TextureLayeredEditor() { info->set_v_grow_direction(GROW_DIRECTION_BEGIN); info->add_theme_color_override("font_color", Color(1, 1, 1, 1)); info->add_theme_color_override("font_shadow_color", Color(0, 0, 0, 0.5)); - info->add_theme_constant_override("shadow_as_outline", 1); + info->add_theme_constant_override("shadow_outline_size", 1); info->add_theme_constant_override("shadow_offset_x", 2); info->add_theme_constant_override("shadow_offset_y", 2); diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp index ce90d61616..8e1c81a876 100644 --- a/editor/plugins/texture_region_editor_plugin.cpp +++ b/editor/plugins/texture_region_editor_plugin.cpp @@ -284,7 +284,7 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) { Ref<InputEventMouseButton> mb = p_input; if (mb.is_valid()) { - if (mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb->get_button_index() == MouseButton::LEFT) { if (mb->is_pressed()) { if (node_ninepatch || obj_styleBox.is_valid()) { edited_margin = -1; @@ -330,7 +330,7 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) { for (const Rect2 &E : autoslice_cache) { if (E.has_point(point)) { rect = E; - if (Input::get_singleton()->is_key_pressed(KEY_CTRL) && !(Input::get_singleton()->is_key_pressed(Key(KEY_SHIFT | KEY_ALT)))) { + if (Input::get_singleton()->is_key_pressed(Key::CTRL) && !(Input::get_singleton()->is_key_pressed(Key(Key::SHIFT | Key::ALT)))) { Rect2 r; if (atlas_tex.is_valid()) { r = atlas_tex->get_region(); @@ -446,7 +446,7 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) { creating = false; } - } else if (mb->get_button_index() == MOUSE_BUTTON_RIGHT && mb->is_pressed()) { + } else if (mb->get_button_index() == MouseButton::RIGHT && mb->is_pressed()) { if (drag) { drag = false; if (edited_margin >= 0) { @@ -465,9 +465,9 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) { drag_index = -1; } } - } else if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP && mb->is_pressed()) { + } else if (mb->get_button_index() == MouseButton::WHEEL_UP && mb->is_pressed()) { _zoom_on_position(draw_zoom * ((0.95 + (0.05 * mb->get_factor())) / 0.95), mb->get_position()); - } else if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN && mb->is_pressed()) { + } else if (mb->get_button_index() == MouseButton::WHEEL_DOWN && mb->is_pressed()) { _zoom_on_position(draw_zoom * (1 - (0.05 * mb->get_factor())), mb->get_position()); } } @@ -475,7 +475,7 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) { Ref<InputEventMouseMotion> mm = p_input; if (mm.is_valid()) { - if (mm->get_button_mask() & MOUSE_BUTTON_MASK_MIDDLE || Input::get_singleton()->is_key_pressed(KEY_SPACE)) { + if ((mm->get_button_mask() & MouseButton::MASK_MIDDLE) != MouseButton::NONE || Input::get_singleton()->is_key_pressed(Key::SPACE)) { Vector2 dragged(mm->get_relative().x / draw_zoom, mm->get_relative().y / draw_zoom); hscroll->set_value(hscroll->get_value() - dragged.x); vscroll->set_value(vscroll->get_value() - dragged.y); diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index 127219546d..f94439f344 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -1711,13 +1711,13 @@ void ThemeItemEditorDialog::_edit_theme_item_gui_input(const Ref<InputEvent> &p_ } switch (k->get_keycode()) { - case KEY_KP_ENTER: - case KEY_ENTER: { + case Key::KP_ENTER: + case Key::ENTER: { _confirm_edit_theme_item(); edit_theme_item_dialog->hide(); edit_theme_item_dialog->set_input_as_handled(); } break; - case KEY_ESCAPE: { + case Key::ESCAPE: { edit_theme_item_dialog->hide(); edit_theme_item_dialog->set_input_as_handled(); } break; @@ -2848,7 +2848,7 @@ void ThemeTypeEditor::_font_size_item_changed(float p_value, String p_item_name) edited_theme->set_font_size(p_item_name, edited_type, int(p_value)); } -void ThemeTypeEditor::_edit_resource_item(RES p_resource) { +void ThemeTypeEditor::_edit_resource_item(RES p_resource, bool p_edit) { EditorNode::get_singleton()->edit_resource(p_resource); } diff --git a/editor/plugins/theme_editor_plugin.h b/editor/plugins/theme_editor_plugin.h index b6becbb1c7..f5ad577aff 100644 --- a/editor/plugins/theme_editor_plugin.h +++ b/editor/plugins/theme_editor_plugin.h @@ -362,7 +362,7 @@ class ThemeTypeEditor : public MarginContainer { void _color_item_changed(Color p_value, String p_item_name); void _constant_item_changed(float p_value, String p_item_name); void _font_size_item_changed(float p_value, String p_item_name); - void _edit_resource_item(RES p_resource); + void _edit_resource_item(RES p_resource, bool p_edit); void _font_item_changed(Ref<Font> p_value, String p_item_name); void _icon_item_changed(Ref<Texture2D> p_value, String p_item_name); void _stylebox_item_changed(Ref<StyleBox> p_value, String p_item_name); diff --git a/editor/plugins/theme_editor_preview.cpp b/editor/plugins/theme_editor_preview.cpp index e13a10fe3f..df0b35908b 100644 --- a/editor/plugins/theme_editor_preview.cpp +++ b/editor/plugins/theme_editor_preview.cpp @@ -144,7 +144,7 @@ void ThemeEditorPreview::_gui_input_picker_overlay(const Ref<InputEvent> &p_even Ref<InputEventMouseButton> mb = p_event; - if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { if (hovered_control) { StringName theme_type = hovered_control->get_theme_type_variation(); if (theme_type == StringName()) { diff --git a/editor/plugins/tiles/tile_atlas_view.cpp b/editor/plugins/tiles/tile_atlas_view.cpp index c064073b77..604143ef93 100644 --- a/editor/plugins/tiles/tile_atlas_view.cpp +++ b/editor/plugins/tiles/tile_atlas_view.cpp @@ -46,7 +46,7 @@ void TileAtlasView::gui_input(const Ref<InputEvent> &p_event) { if (mb.is_valid()) { drag_type = DRAG_TYPE_NONE; - Vector2i scroll_vec = Vector2((mb->get_button_index() == MOUSE_BUTTON_WHEEL_LEFT) - (mb->get_button_index() == MOUSE_BUTTON_WHEEL_RIGHT), (mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP) - (mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN)); + Vector2i scroll_vec = Vector2((mb->get_button_index() == MouseButton::WHEEL_LEFT) - (mb->get_button_index() == MouseButton::WHEEL_RIGHT), (mb->get_button_index() == MouseButton::WHEEL_UP) - (mb->get_button_index() == MouseButton::WHEEL_DOWN)); if (scroll_vec != Vector2()) { if (mb->is_ctrl_pressed()) { if (mb->is_shift_pressed()) { @@ -69,7 +69,7 @@ void TileAtlasView::gui_input(const Ref<InputEvent> &p_event) { } } - if (mb->get_button_index() == MOUSE_BUTTON_MIDDLE || mb->get_button_index() == MOUSE_BUTTON_RIGHT) { + if (mb->get_button_index() == MouseButton::MIDDLE || mb->get_button_index() == MouseButton::RIGHT) { if (mb->is_pressed()) { drag_type = DRAG_TYPE_PAN; } else { diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp index e9d80bb4b8..d165f44334 100644 --- a/editor/plugins/tiles/tile_data_editors.cpp +++ b/editor/plugins/tiles/tile_data_editors.cpp @@ -125,7 +125,14 @@ void GenericTilePolygonEditor::_base_control_draw() { Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color"); const Ref<Texture2D> handle = get_theme_icon(SNAME("EditorPathSharpHandle"), SNAME("EditorIcons")); const Ref<Texture2D> add_handle = get_theme_icon(SNAME("EditorHandleAdd"), SNAME("EditorIcons")); + const Ref<StyleBox> focus_stylebox = get_theme_stylebox(SNAME("Focus"), SNAME("EditorStyles")); + // Draw the focus rectangle. + if (base_control->has_focus()) { + base_control->draw_style_box(focus_stylebox, Rect2(Vector2(), base_control->get_size())); + } + + // Draw tile-related things. Size2 tile_size = tile_set->get_tile_size(); Transform2D xform; @@ -240,9 +247,10 @@ void GenericTilePolygonEditor::_zoom_changed() { } void GenericTilePolygonEditor::_advanced_menu_item_pressed(int p_item_pressed) { + UndoRedo *undo_redo = use_undo_redo ? editor_undo_redo : memnew(UndoRedo); switch (p_item_pressed) { case RESET_TO_DEFAULT_TILE: { - undo_redo->create_action(TTR("Edit Polygons")); + undo_redo->create_action(TTR("Reset Polygons")); undo_redo->add_do_method(this, "clear_polygons"); Vector<Vector2> polygon = tile_set->get_tile_shape_polygon(); for (int i = 0; i < polygon.size(); i++) { @@ -260,7 +268,7 @@ void GenericTilePolygonEditor::_advanced_menu_item_pressed(int p_item_pressed) { undo_redo->commit_action(true); } break; case CLEAR_TILE: { - undo_redo->create_action(TTR("Edit Polygons")); + undo_redo->create_action(TTR("Clear Polygons")); undo_redo->add_do_method(this, "clear_polygons"); undo_redo->add_do_method(base_control, "update"); undo_redo->add_do_method(this, "emit_signal", "polygons_changed"); @@ -272,9 +280,50 @@ void GenericTilePolygonEditor::_advanced_menu_item_pressed(int p_item_pressed) { undo_redo->add_undo_method(this, "emit_signal", "polygons_changed"); undo_redo->commit_action(true); } break; + case ROTATE_RIGHT: + case ROTATE_LEFT: + case FLIP_HORIZONTALLY: + case FLIP_VERTICALLY: { + undo_redo->create_action(TTR("Rotate Polygons Left")); + for (unsigned int i = 0; i < polygons.size(); i++) { + Vector<Point2> new_polygon; + for (int point_index = 0; point_index < polygons[i].size(); point_index++) { + Vector2 point = polygons[i][point_index]; + switch (p_item_pressed) { + case ROTATE_RIGHT: { + point = Vector2(-point.y, point.x); + } break; + case ROTATE_LEFT: { + point = Vector2(point.y, -point.x); + } break; + case FLIP_HORIZONTALLY: { + point = Vector2(-point.x, point.y); + } break; + case FLIP_VERTICALLY: { + point = Vector2(point.x, -point.y); + } break; + default: + break; + } + new_polygon.push_back(point); + } + undo_redo->add_do_method(this, "set_polygon", i, new_polygon); + } + undo_redo->add_do_method(base_control, "update"); + undo_redo->add_do_method(this, "emit_signal", "polygons_changed"); + for (unsigned int i = 0; i < polygons.size(); i++) { + undo_redo->add_undo_method(this, "set_polygon", polygons[i]); + } + undo_redo->add_undo_method(base_control, "update"); + undo_redo->add_undo_method(this, "emit_signal", "polygons_changed"); + undo_redo->commit_action(true); + } break; default: break; } + if (!use_undo_redo) { + memdelete(undo_redo); + } } void GenericTilePolygonEditor::_grab_polygon_point(Vector2 p_pos, const Transform2D &p_polygon_xform, int &r_polygon_index, int &r_point_index) { @@ -359,6 +408,7 @@ void GenericTilePolygonEditor::_snap_to_half_pixel(Point2 &r_point) { } void GenericTilePolygonEditor::_base_control_gui_input(Ref<InputEvent> p_event) { + UndoRedo *undo_redo = use_undo_redo ? editor_undo_redo : memnew(UndoRedo); real_t grab_threshold = EDITOR_GET("editors/polygon_editor/point_grab_radius"); hovered_polygon_index = -1; @@ -399,15 +449,15 @@ void GenericTilePolygonEditor::_base_control_gui_input(Ref<InputEvent> p_event) Ref<InputEventMouseButton> mb = p_event; if (mb.is_valid()) { - if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP && mb->is_ctrl_pressed()) { + if (mb->get_button_index() == MouseButton::WHEEL_UP && mb->is_ctrl_pressed()) { editor_zoom_widget->set_zoom_by_increments(1); _zoom_changed(); accept_event(); - } else if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN && mb->is_ctrl_pressed()) { + } else if (mb->get_button_index() == MouseButton::WHEEL_DOWN && mb->is_ctrl_pressed()) { editor_zoom_widget->set_zoom_by_increments(-1); _zoom_changed(); accept_event(); - } else if (mb->get_button_index() == MOUSE_BUTTON_LEFT) { + } else if (mb->get_button_index() == MouseButton::LEFT) { if (mb->is_pressed()) { if (tools_button_group->get_pressed_button() != button_create) { in_creation_polygon.clear(); @@ -504,7 +554,7 @@ void GenericTilePolygonEditor::_base_control_gui_input(Ref<InputEvent> p_event) drag_point_index = -1; } - } else if (mb->get_button_index() == MOUSE_BUTTON_RIGHT) { + } else if (mb->get_button_index() == MouseButton::RIGHT) { if (mb->is_pressed()) { if (tools_button_group->get_pressed_button() == button_edit) { // Remove point or pan. @@ -538,7 +588,7 @@ void GenericTilePolygonEditor::_base_control_gui_input(Ref<InputEvent> p_event) } else { drag_type = DRAG_TYPE_NONE; } - } else if (mb->get_button_index() == MOUSE_BUTTON_MIDDLE) { + } else if (mb->get_button_index() == MouseButton::MIDDLE) { if (mb->is_pressed()) { drag_type = DRAG_TYPE_PAN; drag_last_pos = mb->get_position(); @@ -549,21 +599,47 @@ void GenericTilePolygonEditor::_base_control_gui_input(Ref<InputEvent> p_event) } base_control->update(); + + if (!use_undo_redo) { + memdelete(undo_redo); + } +} + +void GenericTilePolygonEditor::set_use_undo_redo(bool p_use_undo_redo) { + use_undo_redo = p_use_undo_redo; } void GenericTilePolygonEditor::set_tile_set(Ref<TileSet> p_tile_set) { - if (tile_set != p_tile_set) { - // Set the default tile shape - clear_polygons(); - if (p_tile_set.is_valid()) { - 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); + ERR_FAIL_COND(!p_tile_set.is_valid()); + if (tile_set == p_tile_set) { + return; + } + + // Set the default tile shape + clear_polygons(); + if (p_tile_set.is_valid()) { + 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; + + // Set the default zoom value. + int default_control_y_size = 200 * EDSCALE; + Vector2 zoomed_tile = editor_zoom_widget->get_zoom() * tile_set->get_tile_size(); + while (zoomed_tile.y < default_control_y_size) { + editor_zoom_widget->set_zoom_by_increments(6, false); + zoomed_tile = editor_zoom_widget->get_zoom() * tile_set->get_tile_size(); + } + while (zoomed_tile.y > default_control_y_size) { + editor_zoom_widget->set_zoom_by_increments(-6, false); + zoomed_tile = editor_zoom_widget->get_zoom() * tile_set->get_tile_size(); + } + editor_zoom_widget->set_zoom_by_increments(-6, false); + _zoom_changed(); } void GenericTilePolygonEditor::set_background(Ref<Texture2D> p_texture, Rect2 p_region, Vector2 p_offset, bool p_flip_h, bool p_flip_v, bool p_transpose, Color p_modulate) { @@ -644,6 +720,12 @@ void GenericTilePolygonEditor::_notification(int p_what) { 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("GuiTabMenuHl"), SNAME("EditorIcons"))); + + PopupMenu *p = button_advanced_menu->get_popup(); + p->set_item_icon(p->get_item_index(ROTATE_RIGHT), get_theme_icon(SNAME("RotateRight"), SNAME("EditorIcons"))); + p->set_item_icon(p->get_item_index(ROTATE_LEFT), get_theme_icon(SNAME("RotateLeft"), SNAME("EditorIcons"))); + p->set_item_icon(p->get_item_index(FLIP_HORIZONTALLY), get_theme_icon(SNAME("MirrorX"), SNAME("EditorIcons"))); + p->set_item_icon(p->get_item_index(FLIP_VERTICALLY), get_theme_icon(SNAME("MirrorY"), SNAME("EditorIcons"))); break; } } @@ -670,18 +752,21 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() { button_create->set_toggle_mode(true); button_create->set_button_group(tools_button_group); button_create->set_pressed(true); + button_create->set_tooltip(TTR("Add polygon tool")); toolbar->add_child(button_create); button_edit = memnew(Button); button_edit->set_flat(true); button_edit->set_toggle_mode(true); button_edit->set_button_group(tools_button_group); + button_edit->set_tooltip(TTR("Edit points tool")); toolbar->add_child(button_edit); button_delete = memnew(Button); button_delete->set_flat(true); button_delete->set_toggle_mode(true); button_delete->set_button_group(tools_button_group); + button_delete->set_tooltip(TTR("Delete points tool")); toolbar->add_child(button_delete); button_advanced_menu = memnew(MenuButton); @@ -689,7 +774,13 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() { button_advanced_menu->set_toggle_mode(true); button_advanced_menu->get_popup()->add_item(TTR("Reset to default tile shape"), RESET_TO_DEFAULT_TILE); button_advanced_menu->get_popup()->add_item(TTR("Clear"), CLEAR_TILE); + button_advanced_menu->get_popup()->add_separator(); + button_advanced_menu->get_popup()->add_icon_item(get_theme_icon(SNAME("RotateRight"), SNAME("EditorIcons")), TTR("Rotate Right"), ROTATE_RIGHT); + button_advanced_menu->get_popup()->add_icon_item(get_theme_icon(SNAME("RotateLeft"), SNAME("EditorIcons")), TTR("Rotate Left"), ROTATE_LEFT); + button_advanced_menu->get_popup()->add_icon_item(get_theme_icon(SNAME("MirrorX"), SNAME("EditorIcons")), TTR("Flip Horizontally"), FLIP_HORIZONTALLY); + button_advanced_menu->get_popup()->add_icon_item(get_theme_icon(SNAME("MirrorY"), SNAME("EditorIcons")), TTR("Flip Vertically"), FLIP_VERTICALLY); button_advanced_menu->get_popup()->connect("id_pressed", callable_mp(this, &GenericTilePolygonEditor::_advanced_menu_item_pressed)); + button_advanced_menu->set_focus_mode(FOCUS_ALL); toolbar->add_child(button_advanced_menu); toolbar->add_child(memnew(VSeparator)); @@ -698,6 +789,7 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() { button_pixel_snap->set_flat(true); button_pixel_snap->set_toggle_mode(true); button_pixel_snap->set_pressed(true); + button_pixel_snap->set_tooltip(TTR("Snap to half-pixel")); toolbar->add_child(button_pixel_snap); Control *root = memnew(Control); @@ -717,6 +809,7 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() { base_control->connect("draw", callable_mp(this, &GenericTilePolygonEditor::_base_control_draw)); base_control->connect("gui_input", callable_mp(this, &GenericTilePolygonEditor::_base_control_gui_input)); base_control->set_clip_contents(true); + base_control->set_focus_mode(Control::FOCUS_CLICK); root->add_child(base_control); editor_zoom_widget = memnew(EditorZoomWidget); @@ -836,7 +929,7 @@ void TileDataDefaultEditor::forward_painting_atlas_gui_input(TileAtlasView *p_ti Ref<InputEventMouseButton> mb = p_event; if (mb.is_valid()) { - if (mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb->get_button_index() == MouseButton::LEFT) { if (mb->is_pressed()) { if (picker_button->is_pressed()) { Vector2i coords = p_tile_atlas_view->get_atlas_tile_coords_at_pos(mb->get_position()); @@ -927,7 +1020,7 @@ void TileDataDefaultEditor::forward_painting_alternatives_gui_input(TileAtlasVie Ref<InputEventMouseButton> mb = p_event; if (mb.is_valid()) { - if (mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb->get_button_index() == MouseButton::LEFT) { if (mb->is_pressed()) { if (picker_button->is_pressed()) { Vector3i tile = p_tile_atlas_view->get_alternative_tile_at_pos(mb->get_position()); @@ -1082,7 +1175,7 @@ TileDataDefaultEditor::TileDataDefaultEditor() { picker_button = memnew(Button); 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_shortcut(ED_SHORTCUT("tiles_editor/picker", "Picker", Key::P)); toolbar->add_child(picker_button); } @@ -1432,7 +1525,7 @@ TileDataCollisionEditor::TileDataCollisionEditor() { 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; + property_editors["angular_velocity"] = angular_velocity_editor; _polygons_changed(); } @@ -1873,7 +1966,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t Ref<InputEventMouseButton> mb = p_event; if (mb.is_valid()) { - if (mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb->get_button_index() == MouseButton::LEFT) { if (mb->is_pressed()) { if (picker_button->is_pressed()) { Vector2i coords = p_tile_atlas_view->get_atlas_tile_coords_at_pos(mb->get_position()); @@ -2214,7 +2307,7 @@ void TileDataTerrainsEditor::forward_painting_alternatives_gui_input(TileAtlasVi Ref<InputEventMouseButton> mb = p_event; if (mb.is_valid()) { - if (mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb->get_button_index() == MouseButton::LEFT) { if (mb->is_pressed()) { if (picker_button->is_pressed()) { Vector3i tile = p_tile_atlas_view->get_alternative_tile_at_pos(mb->get_position()); @@ -2385,7 +2478,7 @@ TileDataTerrainsEditor::TileDataTerrainsEditor() { picker_button = memnew(Button); 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_shortcut(ED_SHORTCUT("tiles_editor/picker", "Picker", Key::P)); toolbar->add_child(picker_button); // Setup diff --git a/editor/plugins/tiles/tile_data_editors.h b/editor/plugins/tiles/tile_data_editors.h index acb4c5882d..3fc5e738bb 100644 --- a/editor/plugins/tiles/tile_data_editors.h +++ b/editor/plugins/tiles/tile_data_editors.h @@ -94,7 +94,8 @@ private: LocalVector<Vector<Point2>> polygons; bool multiple_polygon_mode = false; - UndoRedo *undo_redo = EditorNode::get_undo_redo(); + bool use_undo_redo = true; + UndoRedo *editor_undo_redo = EditorNode::get_undo_redo(); // UI int hovered_polygon_index = -1; @@ -108,7 +109,7 @@ private: DRAG_TYPE_CREATE_POINT, DRAG_TYPE_PAN, }; - DragType drag_type; + DragType drag_type = DRAG_TYPE_NONE; int drag_polygon_index; int drag_point_index; Vector2 drag_last_pos; @@ -143,6 +144,10 @@ private: enum AdvancedMenuOption { RESET_TO_DEFAULT_TILE, CLEAR_TILE, + ROTATE_RIGHT, + ROTATE_LEFT, + FLIP_HORIZONTALLY, + FLIP_VERTICALLY, }; void _base_control_draw(); @@ -161,6 +166,8 @@ protected: static void _bind_methods(); public: + void set_use_undo_redo(bool p_use_undo_redo); + void set_tile_set(Ref<TileSet> p_tile_set); void set_background(Ref<Texture2D> p_texture, Rect2 p_region = Rect2(), Vector2 p_offset = Vector2(), bool p_flip_h = false, bool p_flip_v = false, bool p_transpose = false, Color p_modulate = Color(1.0, 1.0, 1.0, 0.0)); diff --git a/editor/plugins/tiles/tile_map_editor.cpp b/editor/plugins/tiles/tile_map_editor.cpp index 39fbd86f77..73b1fc7c67 100644 --- a/editor/plugins/tiles/tile_map_editor.cpp +++ b/editor/plugins/tiles/tile_map_editor.cpp @@ -415,7 +415,7 @@ void TileMapEditorTilesPlugin::_scenes_list_multi_selected(int p_index, bool p_s TileMapCell selected = TileMapCell(source_id, Vector2i(), scene_id); // Clear the selection if shift is not pressed. - if (!Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + if (!Input::get_singleton()->is_key_pressed(Key::SHIFT)) { tile_set_selection.clear(); } @@ -590,10 +590,10 @@ 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 || mb->get_button_index() == MOUSE_BUTTON_RIGHT) { + if (mb->get_button_index() == MouseButton::LEFT || mb->get_button_index() == MouseButton::RIGHT) { if (mb->is_pressed()) { // Pressed - if (erase_button->is_pressed() || mb->get_button_index() == MOUSE_BUTTON_RIGHT) { + if (erase_button->is_pressed() || mb->get_button_index() == MouseButton::RIGHT) { drag_erasing = true; } @@ -617,12 +617,12 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p } } else { // Check if we are picking a tile. - if (picker_button->is_pressed() || (Input::get_singleton()->is_key_pressed(KEY_CTRL) && !Input::get_singleton()->is_key_pressed(KEY_SHIFT))) { + 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 && !Input::get_singleton()->is_key_pressed(KEY_CTRL) && !Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + 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(); @@ -638,11 +638,11 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p 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(); - } 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))) { + } 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 || (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))) { + } 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(); @@ -713,7 +713,7 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over // Draw the selection. 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))) { + 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 } else { Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color"); @@ -783,7 +783,7 @@ 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() && !(drag_type == DRAG_TYPE_NONE && Input::get_singleton()->is_key_pressed(KEY_CTRL) && !Input::get_singleton()->is_key_pressed(KEY_SHIFT))) { + } 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. @@ -1212,14 +1212,14 @@ void TileMapEditorTilesPlugin::_stop_dragging() { undo_redo->create_action(TTR("Change selection")); undo_redo->add_undo_method(this, "_set_tile_map_selection", _get_tile_map_selection()); - if (!Input::get_singleton()->is_key_pressed(KEY_SHIFT) && !Input::get_singleton()->is_key_pressed(KEY_CTRL)) { + if (!Input::get_singleton()->is_key_pressed(Key::SHIFT) && !Input::get_singleton()->is_key_pressed(Key::CTRL)) { tile_map_selection.clear(); } 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(); for (int x = rect.position.x; x <= rect.get_end().x; x++) { for (int y = rect.position.y; y <= rect.get_end().y; y++) { Vector2i coords = Vector2i(x, y); - if (Input::get_singleton()->is_key_pressed(KEY_CTRL)) { + if (Input::get_singleton()->is_key_pressed(Key::CTRL)) { if (tile_map_selection.has(coords)) { tile_map_selection.erase(coords); } @@ -1734,7 +1734,7 @@ void TileMapEditorTilesPlugin::_tile_atlas_control_gui_input(const Ref<InputEven } Ref<InputEventMouseButton> mb = p_event; - if (mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT) { if (mb->is_pressed()) { // Pressed tile_set_dragging_selection = true; tile_set_drag_start_mouse_pos = tile_atlas_control->get_local_mouse_position(); @@ -1892,7 +1892,7 @@ void TileMapEditorTilesPlugin::_tile_alternatives_control_gui_input(const Ref<In } Ref<InputEventMouseButton> mb = p_event; - if (mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT) { if (mb->is_pressed()) { // Pressed // Left click pressed. if (!mb->is_shift_pressed()) { @@ -1957,11 +1957,11 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { CanvasItemEditor::get_singleton()->get_viewport_control()->connect("mouse_exited", callable_mp(this, &TileMapEditorTilesPlugin::_mouse_exited_viewport)); // --- Shortcuts --- - ED_SHORTCUT("tiles_editor/cut", TTR("Cut"), KEY_MASK_CMD | KEY_X); - ED_SHORTCUT("tiles_editor/copy", TTR("Copy"), KEY_MASK_CMD | KEY_C); - ED_SHORTCUT("tiles_editor/paste", TTR("Paste"), KEY_MASK_CMD | KEY_V); - ED_SHORTCUT("tiles_editor/cancel", TTR("Cancel"), KEY_ESCAPE); - ED_SHORTCUT("tiles_editor/delete", TTR("Delete"), KEY_DELETE); + ED_SHORTCUT("tiles_editor/cut", TTR("Cut"), KeyModifierMask::CMD | Key::X); + ED_SHORTCUT("tiles_editor/copy", TTR("Copy"), KeyModifierMask::CMD | Key::C); + ED_SHORTCUT("tiles_editor/paste", TTR("Paste"), KeyModifierMask::CMD | Key::V); + ED_SHORTCUT("tiles_editor/cancel", TTR("Cancel"), Key::ESCAPE); + ED_SHORTCUT("tiles_editor/delete", TTR("Delete"), Key::KEY_DELETE); // --- Initialize references --- tile_map_clipboard.instantiate(); @@ -1979,7 +1979,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { select_tool_button->set_flat(true); select_tool_button->set_toggle_mode(true); select_tool_button->set_button_group(tool_buttons_group); - select_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/selection_tool", "Selection", KEY_S)); + select_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/selection_tool", "Selection", Key::S)); select_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTilesPlugin::_update_toolbar)); tilemap_tiles_tools_buttons->add_child(select_tool_button); @@ -1987,7 +1987,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { paint_tool_button->set_flat(true); 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_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); @@ -1996,7 +1996,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { line_tool_button->set_flat(true); line_tool_button->set_toggle_mode(true); line_tool_button->set_button_group(tool_buttons_group); - line_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/line_tool", "Line", KEY_L)); + line_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/line_tool", "Line", Key::L)); line_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTilesPlugin::_update_toolbar)); tilemap_tiles_tools_buttons->add_child(line_tool_button); @@ -2004,7 +2004,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { rect_tool_button->set_flat(true); rect_tool_button->set_toggle_mode(true); rect_tool_button->set_button_group(tool_buttons_group); - rect_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/rect_tool", "Rect", KEY_R)); + rect_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/rect_tool", "Rect", Key::R)); rect_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTilesPlugin::_update_toolbar)); tilemap_tiles_tools_buttons->add_child(rect_tool_button); @@ -2012,7 +2012,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { bucket_tool_button->set_flat(true); bucket_tool_button->set_toggle_mode(true); bucket_tool_button->set_button_group(tool_buttons_group); - bucket_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/bucket_tool", "Bucket", KEY_B)); + bucket_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/bucket_tool", "Bucket", Key::B)); bucket_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTilesPlugin::_update_toolbar)); tilemap_tiles_tools_buttons->add_child(bucket_tool_button); toolbar->add_child(tilemap_tiles_tools_buttons); @@ -2028,7 +2028,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { picker_button = memnew(Button); 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_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); @@ -2037,7 +2037,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { erase_button = memnew(Button); 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_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); @@ -2766,10 +2766,10 @@ bool TileMapEditorTerrainsPlugin::forward_canvas_gui_input(const Ref<InputEvent> 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 || mb->get_button_index() == MOUSE_BUTTON_RIGHT) { + if (mb->get_button_index() == MouseButton::LEFT || mb->get_button_index() == MouseButton::RIGHT) { if (mb->is_pressed()) { // Pressed - if (erase_button->is_pressed() || mb->get_button_index() == MOUSE_BUTTON_RIGHT) { + if (erase_button->is_pressed() || mb->get_button_index() == MouseButton::RIGHT) { drag_erasing = true; } @@ -2777,7 +2777,7 @@ bool TileMapEditorTerrainsPlugin::forward_canvas_gui_input(const Ref<InputEvent> drag_type = DRAG_TYPE_PICK; } else { // Paint otherwise. - if (tool_buttons_group->get_pressed_button() == paint_tool_button && !Input::get_singleton()->is_key_pressed(KEY_CTRL) && !Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + if (tool_buttons_group->get_pressed_button() == paint_tool_button && !Input::get_singleton()->is_key_pressed(Key::CTRL) && !Input::get_singleton()->is_key_pressed(Key::SHIFT)) { if (selected_terrain_set < 0 || !selected_terrains_pattern.is_valid()) { return true; } @@ -2792,14 +2792,14 @@ bool TileMapEditorTerrainsPlugin::forward_canvas_gui_input(const Ref<InputEvent> drag_modified[E.key] = tile_map->get_cell(tile_map_layer, E.key); tile_map->set_cell(tile_map_layer, E.key, E.value.source_id, E.value.get_atlas_coords(), E.value.alternative_tile); } - } else if (tool_buttons_group->get_pressed_button() == line_tool_button || (tool_buttons_group->get_pressed_button() == paint_tool_button && Input::get_singleton()->is_key_pressed(KEY_SHIFT) && !Input::get_singleton()->is_key_pressed(KEY_CTRL))) { + } else if (tool_buttons_group->get_pressed_button() == line_tool_button || (tool_buttons_group->get_pressed_button() == paint_tool_button && Input::get_singleton()->is_key_pressed(Key::SHIFT) && !Input::get_singleton()->is_key_pressed(Key::CTRL))) { if (selected_terrain_set < 0 || !selected_terrains_pattern.is_valid()) { return true; } drag_type = DRAG_TYPE_LINE; drag_start_mouse_pos = mpos; drag_modified.clear(); - } else if (tool_buttons_group->get_pressed_button() == rect_tool_button || (tool_buttons_group->get_pressed_button() == paint_tool_button && Input::get_singleton()->is_key_pressed(KEY_SHIFT) && Input::get_singleton()->is_key_pressed(KEY_CTRL))) { + } else if (tool_buttons_group->get_pressed_button() == rect_tool_button || (tool_buttons_group->get_pressed_button() == paint_tool_button && Input::get_singleton()->is_key_pressed(Key::SHIFT) && Input::get_singleton()->is_key_pressed(Key::CTRL))) { if (selected_terrain_set < 0 || !selected_terrains_pattern.is_valid()) { return true; } @@ -2884,7 +2884,7 @@ void TileMapEditorTerrainsPlugin::forward_canvas_draw_over_viewport(Control *p_o tile_xform.set_scale(tile_shape_size); tile_set->draw_tile_shape(p_overlay, xform * tile_xform, Color(1.0, 1.0, 1.0), false); } - } else if (!picker_button->is_pressed() && !(drag_type == DRAG_TYPE_NONE && Input::get_singleton()->is_key_pressed(KEY_CTRL) && !Input::get_singleton()->is_key_pressed(KEY_SHIFT))) { + } else if (!picker_button->is_pressed() && !(drag_type == DRAG_TYPE_NONE && Input::get_singleton()->is_key_pressed(Key::CTRL) && !Input::get_singleton()->is_key_pressed(Key::SHIFT))) { bool expand_grid = false; if (tool_buttons_group->get_pressed_button() == paint_tool_button && drag_type == DRAG_TYPE_NONE) { // Preview for a single tile. @@ -3230,7 +3230,7 @@ TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() { paint_tool_button->set_toggle_mode(true); paint_tool_button->set_button_group(tool_buttons_group); paint_tool_button->set_pressed(true); - paint_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/paint_tool", "Paint", KEY_D)); + paint_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/paint_tool", "Paint", Key::D)); paint_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_toolbar)); tilemap_tiles_tools_buttons->add_child(paint_tool_button); @@ -3238,7 +3238,7 @@ TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() { line_tool_button->set_flat(true); line_tool_button->set_toggle_mode(true); line_tool_button->set_button_group(tool_buttons_group); - line_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/line_tool", "Line", KEY_L)); + line_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/line_tool", "Line", Key::L)); line_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_toolbar)); tilemap_tiles_tools_buttons->add_child(line_tool_button); @@ -3246,7 +3246,7 @@ TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() { rect_tool_button->set_flat(true); rect_tool_button->set_toggle_mode(true); rect_tool_button->set_button_group(tool_buttons_group); - rect_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/rect_tool", "Rect", KEY_R)); + rect_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/rect_tool", "Rect", Key::R)); rect_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_toolbar)); tilemap_tiles_tools_buttons->add_child(rect_tool_button); @@ -3254,7 +3254,7 @@ TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() { bucket_tool_button->set_flat(true); bucket_tool_button->set_toggle_mode(true); bucket_tool_button->set_button_group(tool_buttons_group); - bucket_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/bucket_tool", "Bucket", KEY_B)); + bucket_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/bucket_tool", "Bucket", Key::B)); bucket_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_toolbar)); tilemap_tiles_tools_buttons->add_child(bucket_tool_button); @@ -3271,7 +3271,7 @@ TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() { picker_button = memnew(Button); 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_shortcut(ED_SHORTCUT("tiles_editor/picker", "Picker", Key::P)); picker_button->connect("pressed", callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport)); tools_settings->add_child(picker_button); @@ -3279,7 +3279,7 @@ TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() { erase_button = memnew(Button); 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_shortcut(ED_SHORTCUT("tiles_editor/eraser", "Eraser", Key::E)); erase_button->connect("pressed", callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport)); tools_settings->add_child(erase_button); @@ -3897,8 +3897,8 @@ TileMapEditor::TileMapEditor() { set_process_internal(true); // Shortcuts. - ED_SHORTCUT("tiles_editor/select_next_layer", TTR("Select Next Tile Map Layer"), KEY_PAGEUP); - ED_SHORTCUT("tiles_editor/select_previous_layer", TTR("Select Previous Tile Map Layer"), KEY_PAGEDOWN); + ED_SHORTCUT("tiles_editor/select_next_layer", TTR("Select Next Tile Map Layer"), Key::PAGEUP); + ED_SHORTCUT("tiles_editor/select_previous_layer", TTR("Select Previous Tile Map Layer"), Key::PAGEDOWN); // TileMap editor plugins tile_map_editor_plugins.push_back(memnew(TileMapEditorTilesPlugin)); diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp index ae744f697b..a48c0e795c 100644 --- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp +++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp @@ -99,6 +99,7 @@ void TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::_get_property_list 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, "texture_region_size", PROPERTY_HINT_NONE, "")); + p_list->push_back(PropertyInfo(Variant::BOOL, "use_texture_padding", PROPERTY_HINT_NONE, "")); } void TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::_bind_methods() { @@ -1141,7 +1142,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<InputEven Ref<InputEventMouseButton> mb = p_event; if (mb.is_valid()) { Vector2 mouse_local_pos = tile_atlas_control->get_local_mouse_position(); - if (mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb->get_button_index() == MouseButton::LEFT) { if (mb->is_pressed()) { // Left click pressed. if (tools_button_group->get_pressed_button() == tool_setup_atlas_source_button) { @@ -1287,7 +1288,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<InputEven alternative_tiles_control_unscaled->update(); tile_atlas_view->update(); return; - } else if (mb->get_button_index() == MOUSE_BUTTON_RIGHT) { + } else if (mb->get_button_index() == MouseButton::RIGHT) { // Right click pressed. if (mb->is_pressed()) { drag_type = DRAG_TYPE_MAY_POPUP_MENU; @@ -1426,7 +1427,7 @@ void TileSetAtlasSourceEditor::_end_dragging() { // Determine if we clear, then add or remove to the selection. bool add_to_selection = true; - if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + if (Input::get_singleton()->is_key_pressed(Key::SHIFT)) { Vector2i coords = tile_set_atlas_source->get_tile_at_coords(start_base_tiles_coords); if (coords != TileSetSource::INVALID_ATLAS_COORDS) { if (selection.has({ coords, 0 })) { @@ -1891,7 +1892,7 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_gui_input(const Ref<In drag_type = DRAG_TYPE_NONE; Vector2 mouse_local_pos = alternative_tiles_control->get_local_mouse_position(); - if (mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb->get_button_index() == MouseButton::LEFT) { if (mb->is_pressed()) { // Left click pressed. if (tools_button_group->get_pressed_button() == tool_select_button) { @@ -1907,7 +1908,7 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_gui_input(const Ref<In _update_tile_id_label(); } } - } else if (mb->get_button_index() == MOUSE_BUTTON_RIGHT) { + } else if (mb->get_button_index() == MouseButton::RIGHT) { if (mb->is_pressed()) { // Right click pressed Vector3 tile = tile_atlas_view->get_alternative_tile_at_pos(mouse_local_pos); @@ -2061,7 +2062,7 @@ void TileSetAtlasSourceEditor::_undo_redo_inspector_callback(Object *p_undo_redo int new_polygons_count = p_new_value; 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++) { + for (int i = new_polygons_count; i < old_polygons_count; 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)); @@ -2453,7 +2454,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() { tools_settings_erase_button = memnew(Button); tools_settings_erase_button->set_flat(true); tools_settings_erase_button->set_toggle_mode(true); - tools_settings_erase_button->set_shortcut(ED_SHORTCUT("tiles_editor/eraser", "Eraser", KEY_E)); + tools_settings_erase_button->set_shortcut(ED_SHORTCUT("tiles_editor/eraser", "Eraser", Key::E)); tools_settings_erase_button->set_shortcut_context(this); tool_settings->add_child(tools_settings_erase_button); @@ -2485,7 +2486,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() { right_panel->add_child(tile_atlas_view); base_tile_popup_menu = memnew(PopupMenu); - base_tile_popup_menu->add_shortcut(ED_SHORTCUT("tiles_editor/delete", TTR("Delete"), KEY_DELETE), TILE_DELETE); + base_tile_popup_menu->add_shortcut(ED_SHORTCUT("tiles_editor/delete", TTR("Delete"), Key::KEY_DELETE), TILE_DELETE); base_tile_popup_menu->add_item(TTR("Create an Alternative Tile"), TILE_CREATE_ALTERNATIVE); base_tile_popup_menu->connect("id_pressed", callable_mp(this, &TileSetAtlasSourceEditor::_menu_option)); tile_atlas_view->add_child(base_tile_popup_menu); @@ -2508,7 +2509,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() { tile_atlas_control_unscaled->set_mouse_filter(Control::MOUSE_FILTER_IGNORE); alternative_tile_popup_menu = memnew(PopupMenu); - alternative_tile_popup_menu->add_shortcut(ED_SHORTCUT("tiles_editor/delete_tile", TTR("Delete"), KEY_DELETE), TILE_DELETE); + alternative_tile_popup_menu->add_shortcut(ED_SHORTCUT("tiles_editor/delete_tile", TTR("Delete"), Key::KEY_DELETE), TILE_DELETE); alternative_tile_popup_menu->connect("id_pressed", callable_mp(this, &TileSetAtlasSourceEditor::_menu_option)); tile_atlas_view->add_child(alternative_tile_popup_menu); @@ -2534,9 +2535,194 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() { 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)); + + // Inspector plugin. + Ref<EditorInspectorPluginTileData> tile_data_inspector_plugin; + tile_data_inspector_plugin.instantiate(); + EditorInspector::add_inspector_plugin(tile_data_inspector_plugin); } TileSetAtlasSourceEditor::~TileSetAtlasSourceEditor() { memdelete(tile_proxy_object); memdelete(atlas_source_proxy_object); } + +////// EditorPropertyTilePolygon ////// + +void EditorPropertyTilePolygon::_add_focusable_children(Node *p_node) { + Control *control = Object::cast_to<Control>(p_node); + if (control && control->get_focus_mode() != Control::FOCUS_NONE) { + add_focusable(control); + } + for (int i = 0; i < p_node->get_child_count(); i++) { + _add_focusable_children(p_node->get_child(i)); + } +} + +void EditorPropertyTilePolygon::_polygons_changed() { + if (String(count_property).is_empty()) { + if (base_type == "OccluderPolygon2D") { + // Single OccluderPolygon2D. + Ref<OccluderPolygon2D> occluder; + if (generic_tile_polygon_editor->get_polygon_count() >= 1) { + occluder.instantiate(); + occluder->set_polygon(generic_tile_polygon_editor->get_polygon(0)); + } + emit_changed(get_edited_property(), occluder); + } else if (base_type == "NavigationPolygon") { + Ref<NavigationPolygon> navigation_polygon; + if (generic_tile_polygon_editor->get_polygon_count() >= 1) { + navigation_polygon.instantiate(); + for (int i = 0; i < generic_tile_polygon_editor->get_polygon_count(); i++) { + Vector<Vector2> polygon = generic_tile_polygon_editor->get_polygon(i); + navigation_polygon->add_outline(polygon); + } + navigation_polygon->make_polygons_from_outlines(); + } + emit_changed(get_edited_property(), navigation_polygon); + } + } else { + if (base_type.is_empty()) { + // Multiple array of vertices. + Vector<String> changed_properties; + Array values; + int count = generic_tile_polygon_editor->get_polygon_count(); + changed_properties.push_back(count_property); + values.push_back(count); + for (int i = 0; i < count; i++) { + changed_properties.push_back(vformat(element_pattern, i)); + values.push_back(generic_tile_polygon_editor->get_polygon(i)); + } + emit_signal("multiple_properties_changed", changed_properties, values, false); + } + } +} + +void EditorPropertyTilePolygon::update_property() { + TileSetAtlasSourceEditor::AtlasTileProxyObject *atlas_tile_proxy_object = Object::cast_to<TileSetAtlasSourceEditor::AtlasTileProxyObject>(get_edited_object()); + ERR_FAIL_COND(!atlas_tile_proxy_object); + ERR_FAIL_COND(atlas_tile_proxy_object->get_edited_tiles().is_empty()); + + TileSetAtlasSource *tile_set_atlas_source = atlas_tile_proxy_object->get_edited_tile_set_atlas_source(); + generic_tile_polygon_editor->set_tile_set(Ref<TileSet>(tile_set_atlas_source->get_tile_set())); + + // Set the background + Vector2i coords = atlas_tile_proxy_object->get_edited_tiles().front()->get().tile; + int alternative = atlas_tile_proxy_object->get_edited_tiles().front()->get().alternative; + TileData *tile_data = Object::cast_to<TileData>(tile_set_atlas_source->get_tile_data(coords, alternative)); + generic_tile_polygon_editor->set_background(tile_set_atlas_source->get_texture(), tile_set_atlas_source->get_tile_texture_region(coords), tile_set_atlas_source->get_tile_effective_texture_offset(coords, alternative), tile_data->get_flip_h(), tile_data->get_flip_v(), tile_data->get_transpose(), tile_data->get_modulate()); + + // Reset the polygons. + generic_tile_polygon_editor->clear_polygons(); + + if (String(count_property).is_empty()) { + if (base_type == "OccluderPolygon2D") { + // Single OccluderPolygon2D. + Ref<OccluderPolygon2D> occluder = get_edited_object()->get(get_edited_property()); + generic_tile_polygon_editor->clear_polygons(); + if (occluder.is_valid()) { + generic_tile_polygon_editor->add_polygon(occluder->get_polygon()); + } + } else if (base_type == "NavigationPolygon") { + // Single OccluderPolygon2D. + Ref<NavigationPolygon> navigation_polygon = get_edited_object()->get(get_edited_property()); + generic_tile_polygon_editor->clear_polygons(); + if (navigation_polygon.is_valid()) { + for (int i = 0; i < navigation_polygon->get_outline_count(); i++) { + generic_tile_polygon_editor->add_polygon(navigation_polygon->get_outline(i)); + } + } + } + } else { + int count = get_edited_object()->get(count_property); + if (base_type.is_empty()) { + // Multiple array of vertices. + generic_tile_polygon_editor->clear_polygons(); + for (int i = 0; i < count; i++) { + generic_tile_polygon_editor->add_polygon(get_edited_object()->get(vformat(element_pattern, i))); + } + } + } +} + +void EditorPropertyTilePolygon::setup_single_mode(const StringName &p_property, const String &p_base_type) { + set_object_and_property(nullptr, p_property); + base_type = p_base_type; + + generic_tile_polygon_editor->set_multiple_polygon_mode(false); +} + +void EditorPropertyTilePolygon::setup_multiple_mode(const StringName &p_property, const StringName &p_count_property, const String &p_element_pattern, const String &p_base_type) { + set_object_and_property(nullptr, p_property); + count_property = p_count_property; + element_pattern = p_element_pattern; + base_type = p_base_type; + + generic_tile_polygon_editor->set_multiple_polygon_mode(true); +} + +EditorPropertyTilePolygon::EditorPropertyTilePolygon() { + // Setup the polygon editor. + generic_tile_polygon_editor = memnew(GenericTilePolygonEditor); + generic_tile_polygon_editor->set_use_undo_redo(false); + generic_tile_polygon_editor->clear_polygons(); + add_child(generic_tile_polygon_editor); + generic_tile_polygon_editor->connect("polygons_changed", callable_mp(this, &EditorPropertyTilePolygon::_polygons_changed)); + + // Add all focussable children of generic_tile_polygon_editor as focussable. + _add_focusable_children(generic_tile_polygon_editor); +} + +////// EditorInspectorPluginTileData ////// + +bool EditorInspectorPluginTileData::can_handle(Object *p_object) { + return Object::cast_to<TileSetAtlasSourceEditor::AtlasTileProxyObject>(p_object) != nullptr; +} + +bool EditorInspectorPluginTileData::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) { + Vector<String> components = String(p_path).split("/", true, 2); + if (components.size() == 2 && components[0].begins_with("occlusion_layer_") && components[0].trim_prefix("occlusion_layer_").is_valid_int()) { + // Occlusion layers. + int layer_index = components[0].trim_prefix("occlusion_layer_").to_int(); + ERR_FAIL_COND_V(layer_index < 0, false); + if (components[1] == "polygon") { + EditorPropertyTilePolygon *ep = memnew(EditorPropertyTilePolygon); + ep->setup_single_mode(p_path, "OccluderPolygon2D"); + add_property_editor(p_path, ep); + return true; + } + } else if (components.size() >= 2 && components[0].begins_with("physics_layer_") && components[0].trim_prefix("physics_layer_").is_valid_int()) { + // Physics layers. + int layer_index = components[0].trim_prefix("physics_layer_").to_int(); + ERR_FAIL_COND_V(layer_index < 0, false); + if (components[1] == "polygons_count") { + EditorPropertyTilePolygon *ep = memnew(EditorPropertyTilePolygon); + ep->setup_multiple_mode(vformat("physics_layer_%d/polygons", layer_index), vformat("physics_layer_%d/polygons_count", layer_index), vformat("physics_layer_%d/polygon_%%d/points", layer_index), ""); + Vector<String> properties; + properties.push_back(p_path); + int count = p_object->get(vformat("physics_layer_%d/polygons_count", layer_index)); + for (int i = 0; i < count; i++) { + properties.push_back(vformat(vformat("physics_layer_%d/polygon_%d/points", layer_index, i))); + } + add_property_editor_for_multiple_properties("Polygons", properties, ep); + return true; + } else if (components.size() == 3 && components[1].begins_with("polygon_") && components[1].trim_prefix("polygon_").is_valid_int()) { + int polygon_index = components[1].trim_prefix("polygon_").to_int(); + ERR_FAIL_COND_V(polygon_index < 0, false); + if (components[2] == "points") { + return true; + } + } + } else if (components.size() == 2 && components[0].begins_with("navigation_layer_") && components[0].trim_prefix("navigation_layer_").is_valid_int()) { + // Navigation layers. + int layer_index = components[0].trim_prefix("navigation_layer_").to_int(); + ERR_FAIL_COND_V(layer_index < 0, false); + if (components[1] == "polygon") { + EditorPropertyTilePolygon *ep = memnew(EditorPropertyTilePolygon); + ep->setup_single_mode(p_path, "NavigationPolygon"); + add_property_editor(p_path, ep); + return true; + } + } + return false; +} diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.h b/editor/plugins/tiles/tile_set_atlas_source_editor.h index ea6f2847ae..bd1fd2e7d0 100644 --- a/editor/plugins/tiles/tile_set_atlas_source_editor.h +++ b/editor/plugins/tiles/tile_set_atlas_source_editor.h @@ -43,7 +43,7 @@ class TileSet; class TileSetAtlasSourceEditor : public HBoxContainer { GDCLASS(TileSetAtlasSourceEditor, HBoxContainer); -private: +public: // A class to store which tiles are selected. struct TileSelection { Vector2i tile = TileSetSource::INVALID_ATLAS_COORDS; @@ -99,6 +99,9 @@ private: static void _bind_methods(); public: + TileSetAtlasSource *get_edited_tile_set_atlas_source() const { return tile_set_atlas_source; }; + Set<TileSelection> get_edited_tiles() const { return tiles; }; + // Update the proxyed object. void edit(TileSetAtlasSource *p_tile_set_atlas_source, Set<TileSelection> p_tiles = Set<TileSelection>()); @@ -107,6 +110,7 @@ private: } }; +private: Ref<TileSet> tile_set; TileSetAtlasSource *tile_set_atlas_source = nullptr; int tile_set_atlas_source_id = TileSet::INVALID_SOURCE; @@ -281,4 +285,34 @@ public: ~TileSetAtlasSourceEditor(); }; +class EditorPropertyTilePolygon : public EditorProperty { + GDCLASS(EditorPropertyTilePolygon, EditorProperty); + + StringName count_property; + String element_pattern; + String base_type; + + void _add_focusable_children(Node *p_node); + + GenericTilePolygonEditor *generic_tile_polygon_editor; + void _polygons_changed(); + +public: + virtual void update_property() override; + void setup_single_mode(const StringName &p_property, const String &p_base_type); + void setup_multiple_mode(const StringName &p_property, const StringName &p_count_property, const String &p_element_pattern, const String &p_base_type); + EditorPropertyTilePolygon(); +}; + +class EditorInspectorPluginTileData : public EditorInspectorPlugin { + GDCLASS(EditorInspectorPluginTileData, EditorInspectorPlugin); + + void _occlusion_polygon_set_callback(); + void _polygons_changed(Object *p_generic_tile_polygon_editor, Object *p_object, const String &p_path); + +public: + virtual bool can_handle(Object *p_object) override; + virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override; +}; + #endif // TILE_SET_ATLAS_SOURCE_EDITOR_H diff --git a/editor/plugins/tiles/tiles_editor_plugin.cpp b/editor/plugins/tiles/tiles_editor_plugin.cpp index f1918073fb..47dfc57b0f 100644 --- a/editor/plugins/tiles/tiles_editor_plugin.cpp +++ b/editor/plugins/tiles/tiles_editor_plugin.cpp @@ -47,8 +47,12 @@ TilesEditorPlugin *TilesEditorPlugin::singleton = nullptr; -void TilesEditorPlugin::_pattern_preview_done(const Variant &p_udata) { - pattern_preview_done.set(); +void TilesEditorPlugin::_preview_frame_started() { + RS::get_singleton()->request_frame_drawn_callback(callable_mp(const_cast<TilesEditorPlugin *>(this), &TilesEditorPlugin::_pattern_preview_done)); +} + +void TilesEditorPlugin::_pattern_preview_done() { + pattern_preview_done.post(); } void TilesEditorPlugin::_thread_func(void *ud) { @@ -112,12 +116,9 @@ void TilesEditorPlugin::_thread() { // Add the viewport at the lasst moment to avoid rendering too early. EditorNode::get_singleton()->add_child(viewport); - pattern_preview_done.clear(); - RS::get_singleton()->request_frame_drawn_callback(const_cast<TilesEditorPlugin *>(this), "_pattern_preview_done", Variant()); + RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<TilesEditorPlugin *>(this), &TilesEditorPlugin::_preview_frame_started), Vector<Variant>(), Object::CONNECT_ONESHOT); - while (!pattern_preview_done.is_set()) { - OS::get_singleton()->delay_usec(10); - } + pattern_preview_done.wait(); Ref<Image> image = viewport->get_texture()->get_image(); Ref<ImageTexture> image_texture; @@ -274,10 +275,6 @@ bool TilesEditorPlugin::handles(Object *p_object) const { return p_object->is_class("TileMap") || p_object->is_class("TileSet"); } -void TilesEditorPlugin::_bind_methods() { - ClassDB::bind_method(D_METHOD("_pattern_preview_done", "pattern"), &TilesEditorPlugin::_pattern_preview_done); -} - TilesEditorPlugin::TilesEditorPlugin(EditorNode *p_node) { set_process_internal(true); diff --git a/editor/plugins/tiles/tiles_editor_plugin.h b/editor/plugins/tiles/tiles_editor_plugin.h index dd52bdc31a..33493040f6 100644 --- a/editor/plugins/tiles/tiles_editor_plugin.h +++ b/editor/plugins/tiles/tiles_editor_plugin.h @@ -77,14 +77,14 @@ private: Thread pattern_preview_thread; SafeFlag pattern_thread_exit; SafeFlag pattern_thread_exited; - mutable SafeFlag pattern_preview_done; - void _pattern_preview_done(const Variant &p_udata); + Semaphore pattern_preview_done; + void _preview_frame_started(); + void _pattern_preview_done(); static void _thread_func(void *ud); void _thread(); protected: void _notification(int p_what); - static void _bind_methods(); public: _FORCE_INLINE_ static TilesEditorPlugin *get_singleton() { return singleton; } diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp index aaa29bcb7a..b97095ef39 100644 --- a/editor/plugins/version_control_editor_plugin.cpp +++ b/editor/plugins/version_control_editor_plugin.cpp @@ -488,7 +488,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() { commit_message->connect("text_changed", callable_mp(this, &VersionControlEditorPlugin::_update_commit_button)); commit_message->connect("gui_input", callable_mp(this, &VersionControlEditorPlugin::_commit_message_gui_input)); commit_box_vbc->add_child(commit_message); - ED_SHORTCUT("version_control/commit", TTR("Commit"), KEY_MASK_CMD | KEY_ENTER); + ED_SHORTCUT("version_control/commit", TTR("Commit"), KeyModifierMask::CMD | Key::ENTER); commit_button = memnew(Button); commit_button->set_text(TTR("Commit Changes")); diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index c06eafae50..a4706bf0d9 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -3051,7 +3051,7 @@ void VisualShaderEditor::_graph_gui_input(const Ref<InputEvent> &p_event) { Ref<InputEventMouseButton> mb = p_event; VisualShader::Type type = get_current_shader_type(); - if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_RIGHT) { + if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) { selected_constants.clear(); selected_uniforms.clear(); selected_comment = -1; @@ -3211,7 +3211,7 @@ void VisualShaderEditor::_show_members_dialog(bool at_mouse_pos, VisualShaderNod void VisualShaderEditor::_sbox_input(const Ref<InputEvent> &p_ie) { Ref<InputEventKey> ie = p_ie; - if (ie.is_valid() && (ie->get_keycode() == KEY_UP || ie->get_keycode() == KEY_DOWN || ie->get_keycode() == KEY_ENTER || ie->get_keycode() == KEY_KP_ENTER)) { + if (ie.is_valid() && (ie->get_keycode() == Key::UP || ie->get_keycode() == Key::DOWN || ie->get_keycode() == Key::ENTER || ie->get_keycode() == Key::KP_ENTER)) { members->gui_input(ie); node_filter->accept_event(); } @@ -4527,6 +4527,7 @@ VisualShaderEditor::VisualShaderEditor() { add_options.push_back(AddOption("MultiplyByAxisAngle", "Particles", "Transform", "VisualShaderNodeParticleMultiplyByAxisAngle", "A node for help to multiply a position input vector by rotation using specific axis. Intended to work with emitters.", -1, VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_EMIT | TYPE_FLAGS_PROCESS | TYPE_FLAGS_COLLIDE, Shader::MODE_PARTICLES)); add_options.push_back(AddOption("BoxEmitter", "Particles", "Emitters", "VisualShaderNodeParticleBoxEmitter", "", -1, VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("MeshEmitter", "Particles", "Emitters", "VisualShaderNodeParticleMeshEmitter", "", -1, VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); add_options.push_back(AddOption("RingEmitter", "Particles", "Emitters", "VisualShaderNodeParticleRingEmitter", "", -1, VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); add_options.push_back(AddOption("SphereEmitter", "Particles", "Emitters", "VisualShaderNodeParticleSphereEmitter", "", -1, VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); @@ -4977,7 +4978,7 @@ public: } } - void setup(Ref<Resource> p_parent_resource, Vector<EditorProperty *> p_properties, const Vector<StringName> &p_names, Ref<VisualShaderNode> p_node) { + void setup(Ref<Resource> p_parent_resource, Vector<EditorProperty *> p_properties, const Vector<StringName> &p_names, const Map<StringName, String> &p_overrided_names, Ref<VisualShaderNode> p_node) { parent_resource = p_parent_resource; updating = false; node = p_node; @@ -4993,7 +4994,11 @@ public: Label *prop_name = memnew(Label); String prop_name_str = p_names[i]; - prop_name_str = prop_name_str.capitalize() + ":"; + if (p_overrided_names.has(p_names[i])) { + prop_name_str = p_overrided_names[p_names[i]] + ":"; + } else { + prop_name_str = prop_name_str.capitalize() + ":"; + } prop_name->set_text(prop_name_str); prop_name->set_visible(false); hbox->add_child(prop_name); @@ -5085,7 +5090,7 @@ Control *VisualShaderNodePluginDefault::create_editor(const Ref<Resource> &p_par properties.push_back(pinfo[i].name); } VisualShaderNodePluginDefaultEditor *editor = memnew(VisualShaderNodePluginDefaultEditor); - editor->setup(p_parent_resource, editors, properties, p_node); + editor->setup(p_parent_resource, editors, properties, p_node->get_editable_properties_names(), p_node); return editor; } @@ -5182,11 +5187,7 @@ EditorPropertyShaderMode::EditorPropertyShaderMode() { } bool EditorInspectorShaderModePlugin::can_handle(Object *p_object) { - return true; //can handle everything -} - -void EditorInspectorShaderModePlugin::parse_begin(Object *p_object) { - //do none + return true; // Can handle everything. } bool EditorInspectorShaderModePlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) { @@ -5199,11 +5200,7 @@ bool EditorInspectorShaderModePlugin::parse_property(Object *p_object, const Var return true; } - return false; //can be overridden, although it will most likely be last anyway -} - -void EditorInspectorShaderModePlugin::parse_end() { - //do none + return false; } ////////////////////////////////// @@ -5220,7 +5217,9 @@ void VisualShaderNodePortPreview::_shader_changed() { preview_shader.instantiate(); preview_shader->set_code(shader_code); for (int i = 0; i < default_textures.size(); i++) { - preview_shader->set_default_texture_param(default_textures[i].name, default_textures[i].param); + for (int j = 0; j < default_textures[i].params.size(); j++) { + preview_shader->set_default_texture_param(default_textures[i].name, default_textures[i].params[j], j); + } } Ref<ShaderMaterial> material; diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h index c4a392469b..74ccda3c9a 100644 --- a/editor/plugins/visual_shader_editor_plugin.h +++ b/editor/plugins/visual_shader_editor_plugin.h @@ -523,9 +523,7 @@ class EditorInspectorShaderModePlugin : public EditorInspectorPlugin { public: virtual bool can_handle(Object *p_object) override; - virtual void parse_begin(Object *p_object) override; virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override; - virtual void parse_end() override; }; class VisualShaderNodePortPreview : public Control { diff --git a/editor/project_export.cpp b/editor/project_export.cpp index ad9c81458f..d48d45d848 100644 --- a/editor/project_export.cpp +++ b/editor/project_export.cpp @@ -38,6 +38,7 @@ #include "core/io/resource_saver.h" #include "core/os/os.h" #include "core/string/optimized_translation.h" +#include "core/version_generated.gen.h" #include "editor_data.h" #include "editor_node.h" #include "editor_scale.h" @@ -456,7 +457,7 @@ void ProjectExportDialog::_enc_filters_changed(const String &p_filters) { } void ProjectExportDialog::_open_key_help_link() { - OS::get_singleton()->shell_open("https://docs.godotengine.org/en/latest/development/compiling/compiling_with_script_encryption_key.html"); + OS::get_singleton()->shell_open(vformat("%s/development/compiling/compiling_with_script_encryption_key.html", VERSION_DOCS_URL)); } void ProjectExportDialog::_enc_pck_changed(bool p_pressed) { diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 150dde79e5..7b942adb54 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -52,6 +52,7 @@ #include "scene/gui/texture_rect.h" #include "scene/main/window.h" #include "servers/display_server.h" +#include "servers/navigation_server_3d.h" static inline String get_project_key_from_path(const String &dir) { return dir.replace("/", "::"); @@ -1735,7 +1736,7 @@ void ProjectList::_panel_input(const Ref<InputEvent> &p_ev, Node *p_hb) { int clicked_index = p_hb->get_index(); const Item &clicked_project = _projects[clicked_index]; - if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { if (mb->is_shift_pressed() && _selected_project_keys.size() > 0 && _last_clicked != "" && clicked_project.project_key != _last_clicked) { int anchor_index = -1; for (int i = 0; i < _projects.size(); ++i) { @@ -1899,7 +1900,7 @@ void ProjectManager::unhandled_key_input(const Ref<InputEvent> &p_ev) { // This is handled by the platform implementation on macOS, // so only define the shortcut on other platforms #ifndef OSX_ENABLED - if (k->get_keycode_with_modifiers() == (KEY_MASK_CMD | KEY_Q)) { + if (k->get_keycode_with_modifiers() == (KeyModifierMask::CMD | Key::Q)) { _dim_window(); get_tree()->quit(); } @@ -1912,24 +1913,24 @@ void ProjectManager::unhandled_key_input(const Ref<InputEvent> &p_ev) { bool keycode_handled = true; switch (k->get_keycode()) { - case KEY_ENTER: { + case Key::ENTER: { _open_selected_projects_ask(); } break; - case KEY_HOME: { + case Key::HOME: { if (_project_list->get_project_count() > 0) { _project_list->select_project(0); _update_project_buttons(); } } break; - case KEY_END: { + case Key::END: { if (_project_list->get_project_count() > 0) { _project_list->select_project(_project_list->get_project_count() - 1); _update_project_buttons(); } } break; - case KEY_UP: { + case Key::UP: { if (k->is_shift_pressed()) { break; } @@ -1943,7 +1944,7 @@ void ProjectManager::unhandled_key_input(const Ref<InputEvent> &p_ev) { break; } - case KEY_DOWN: { + case Key::DOWN: { if (k->is_shift_pressed()) { break; } @@ -1956,7 +1957,7 @@ void ProjectManager::unhandled_key_input(const Ref<InputEvent> &p_ev) { } } break; - case KEY_F: { + case Key::F: { if (k->is_command_pressed()) { this->search_box->grab_focus(); } else { @@ -2382,6 +2383,11 @@ ProjectManager::ProjectManager() { EditorSettings::create(); } + // Turn off some servers we aren't going to be using in the Project Manager. + NavigationServer3D::get_singleton()->set_active(false); + PhysicsServer3D::get_singleton()->set_active(false); + PhysicsServer2D::get_singleton()->set_active(false); + EditorSettings::get_singleton()->set_optimize_save(false); //just write settings as they came { @@ -2520,19 +2526,19 @@ ProjectManager::ProjectManager() { Button *create = memnew(Button); create->set_text(TTR("New Project")); - create->set_shortcut(ED_SHORTCUT("project_manager/new_project", TTR("New Project"), KEY_MASK_CMD | KEY_N)); + create->set_shortcut(ED_SHORTCUT("project_manager/new_project", TTR("New Project"), KeyModifierMask::CMD | Key::N)); create->connect("pressed", callable_mp(this, &ProjectManager::_new_project)); tree_vb->add_child(create); Button *import = memnew(Button); import->set_text(TTR("Import")); - import->set_shortcut(ED_SHORTCUT("project_manager/import_project", TTR("Import Project"), KEY_MASK_CMD | KEY_I)); + import->set_shortcut(ED_SHORTCUT("project_manager/import_project", TTR("Import Project"), KeyModifierMask::CMD | Key::I)); import->connect("pressed", callable_mp(this, &ProjectManager::_import_project)); tree_vb->add_child(import); Button *scan = memnew(Button); scan->set_text(TTR("Scan")); - scan->set_shortcut(ED_SHORTCUT("project_manager/scan_projects", TTR("Scan Projects"), KEY_MASK_CMD | KEY_S)); + scan->set_shortcut(ED_SHORTCUT("project_manager/scan_projects", TTR("Scan Projects"), KeyModifierMask::CMD | Key::S)); scan->connect("pressed", callable_mp(this, &ProjectManager::_scan_projects)); tree_vb->add_child(scan); @@ -2540,25 +2546,26 @@ ProjectManager::ProjectManager() { open_btn = memnew(Button); open_btn->set_text(TTR("Edit")); - open_btn->set_shortcut(ED_SHORTCUT("project_manager/edit_project", TTR("Edit Project"), KEY_MASK_CMD | KEY_E)); + open_btn->set_shortcut(ED_SHORTCUT("project_manager/edit_project", TTR("Edit Project"), KeyModifierMask::CMD | Key::E)); open_btn->connect("pressed", callable_mp(this, &ProjectManager::_open_selected_projects_ask)); tree_vb->add_child(open_btn); run_btn = memnew(Button); run_btn->set_text(TTR("Run")); - run_btn->set_shortcut(ED_SHORTCUT("project_manager/run_project", TTR("Run Project"), KEY_MASK_CMD | KEY_R)); + run_btn->set_shortcut(ED_SHORTCUT("project_manager/run_project", TTR("Run Project"), KeyModifierMask::CMD | Key::R)); run_btn->connect("pressed", callable_mp(this, &ProjectManager::_run_project)); tree_vb->add_child(run_btn); rename_btn = memnew(Button); rename_btn->set_text(TTR("Rename")); - rename_btn->set_shortcut(ED_SHORTCUT("project_manager/rename_project", TTR("Rename Project"), KEY_F2)); + // The F2 shortcut isn't overridden with Enter on macOS as Enter is already used to edit a project. + rename_btn->set_shortcut(ED_SHORTCUT("project_manager/rename_project", TTR("Rename Project"), Key::F2)); rename_btn->connect("pressed", callable_mp(this, &ProjectManager::_rename_project)); tree_vb->add_child(rename_btn); erase_btn = memnew(Button); erase_btn->set_text(TTR("Remove")); - erase_btn->set_shortcut(ED_SHORTCUT("project_manager/remove_project", TTR("Remove Project"), KEY_DELETE)); + erase_btn->set_shortcut(ED_SHORTCUT("project_manager/remove_project", TTR("Remove Project"), Key::KEY_DELETE)); erase_btn->connect("pressed", callable_mp(this, &ProjectManager::_erase_project)); tree_vb->add_child(erase_btn); diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index db560af657..f10ecab34e 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -1343,7 +1343,7 @@ void CustomPropertyEditor::_action_pressed(int p_which) { void CustomPropertyEditor::_drag_easing(const Ref<InputEvent> &p_ev) { Ref<InputEventMouseMotion> mm = p_ev; - if (mm.is_valid() && mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT) { + if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) { float rel = mm->get_relative().x; if (rel == 0) { return; @@ -1628,7 +1628,7 @@ real_t CustomPropertyEditor::_parse_real_expression(String text) { } void CustomPropertyEditor::_emit_changed_whole_or_field() { - if (!Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + if (!Input::get_singleton()->is_key_pressed(Key::SHIFT)) { emit_signal(SNAME("variant_changed")); } else { emit_signal(SNAME("variant_field_changed"), field_names[focused_value_editor]); @@ -1671,7 +1671,7 @@ void CustomPropertyEditor::_focus_exit() { } void CustomPropertyEditor::config_action_buttons(const List<String> &p_strings) { - Ref<StyleBox> sb = action_buttons[0]->get_theme_stylebox(SNAME("panel")); + Ref<StyleBox> sb = action_buttons[0]->get_theme_stylebox(SNAME("button")); int margin_top = sb->get_margin(SIDE_TOP); int margin_left = sb->get_margin(SIDE_LEFT); int margin_bottom = sb->get_margin(SIDE_BOTTOM); @@ -1804,26 +1804,18 @@ CustomPropertyEditor::CustomPropertyEditor() { } text_edit = memnew(TextEdit); - add_child(text_edit); + value_vbox->add_child(text_edit); text_edit->set_anchors_and_offsets_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 5); + text_edit->set_v_size_flags(Control::SIZE_EXPAND_FILL); text_edit->set_offset(SIDE_BOTTOM, -30); text_edit->hide(); text_edit->connect("text_changed", callable_mp(this, &CustomPropertyEditor::_text_edit_changed)); - for (int i = 0; i < MAX_ACTION_BUTTONS; i++) { - action_buttons[i] = memnew(Button); - action_buttons[i]->hide(); - add_child(action_buttons[i]); - Vector<Variant> binds; - binds.push_back(i); - action_buttons[i]->connect("pressed", callable_mp(this, &CustomPropertyEditor::_action_pressed), binds); - } - color_picker = nullptr; file = memnew(EditorFileDialog); - add_child(file); + value_vbox->add_child(file); file->hide(); file->connect("file_selected", callable_mp(this, &CustomPropertyEditor::_file_selected)); @@ -1831,46 +1823,58 @@ CustomPropertyEditor::CustomPropertyEditor() { error = memnew(ConfirmationDialog); error->set_title(TTR("Error!")); - add_child(error); + value_vbox->add_child(error); scene_tree = memnew(SceneTreeDialog); - add_child(scene_tree); + value_vbox->add_child(scene_tree); scene_tree->connect("selected", callable_mp(this, &CustomPropertyEditor::_node_path_selected)); scene_tree->get_scene_tree()->set_show_enabled_subscene(true); texture_preview = memnew(TextureRect); - add_child(texture_preview); + value_vbox->add_child(texture_preview); texture_preview->hide(); easing_draw = memnew(Control); - add_child(easing_draw); + value_vbox->add_child(easing_draw); easing_draw->hide(); easing_draw->connect("draw", callable_mp(this, &CustomPropertyEditor::_draw_easing)); easing_draw->connect("gui_input", callable_mp(this, &CustomPropertyEditor::_drag_easing)); easing_draw->set_default_cursor_shape(Control::CURSOR_MOVE); type_button = memnew(MenuButton); - add_child(type_button); + value_vbox->add_child(type_button); type_button->hide(); type_button->get_popup()->connect("id_pressed", callable_mp(this, &CustomPropertyEditor::_type_create_selected)); menu = memnew(PopupMenu); // menu->set_pass_on_modal_close_click(false); - add_child(menu); + value_vbox->add_child(menu); menu->connect("id_pressed", callable_mp(this, &CustomPropertyEditor::_menu_option)); evaluator = nullptr; spinbox = memnew(SpinBox); - add_child(spinbox); + value_vbox->add_child(spinbox); spinbox->set_anchors_and_offsets_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 5); spinbox->connect("value_changed", callable_mp(this, &CustomPropertyEditor::_range_modified)); slider = memnew(HSlider); - add_child(slider); + value_vbox->add_child(slider); slider->set_anchors_and_offsets_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 5); slider->connect("value_changed", callable_mp(this, &CustomPropertyEditor::_range_modified)); + action_hboxes = memnew(HBoxContainer); + action_hboxes->set_alignment(BoxContainer::ALIGN_CENTER); + value_vbox->add_child(action_hboxes); + for (int i = 0; i < MAX_ACTION_BUTTONS; i++) { + action_buttons[i] = memnew(Button); + action_buttons[i]->hide(); + action_hboxes->add_child(action_buttons[i]); + Vector<Variant> binds; + binds.push_back(i); + action_buttons[i]->connect("pressed", callable_mp(this, &CustomPropertyEditor::_action_pressed), binds); + } + create_dialog = nullptr; property_select = nullptr; } diff --git a/editor/property_editor.h b/editor/property_editor.h index 23771b7494..2565c6ee27 100644 --- a/editor/property_editor.h +++ b/editor/property_editor.h @@ -110,6 +110,7 @@ class CustomPropertyEditor : public PopupPanel { int focused_value_editor; Label *value_label[MAX_VALUE_EDITORS]; HScrollBar *scroll[4]; + HBoxContainer *action_hboxes; Button *action_buttons[MAX_ACTION_BUTTONS]; MenuButton *type_button; Vector<String> inheritors_array; diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp index f167ded4e7..877b4552c1 100644 --- a/editor/property_selector.cpp +++ b/editor/property_selector.cpp @@ -44,10 +44,10 @@ void PropertySelector::_sbox_input(const Ref<InputEvent> &p_ie) { if (k.is_valid()) { switch (k->get_keycode()) { - case KEY_UP: - case KEY_DOWN: - case KEY_PAGEUP: - case KEY_PAGEDOWN: { + case Key::UP: + case Key::DOWN: + case Key::PAGEUP: + case Key::PAGEDOWN: { search_options->gui_input(k); search_box->accept_event(); diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp index f0ec78bde6..7868414d89 100644 --- a/editor/quick_open.cpp +++ b/editor/quick_open.cpp @@ -167,10 +167,10 @@ void EditorQuickOpen::_sbox_input(const Ref<InputEvent> &p_ie) { Ref<InputEventKey> k = p_ie; if (k.is_valid()) { switch (k->get_keycode()) { - case KEY_UP: - case KEY_DOWN: - case KEY_PAGEUP: - case KEY_PAGEDOWN: { + case Key::UP: + case Key::DOWN: + case Key::PAGEUP: + case Key::PAGEDOWN: { search_options->gui_input(k); search_box->accept_event(); diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp index 2792c193d9..eb73f88e61 100644 --- a/editor/rename_dialog.cpp +++ b/editor/rename_dialog.cpp @@ -30,6 +30,7 @@ #include "rename_dialog.h" +#include "modules/modules_enabled.gen.h" // For regex. #ifdef MODULE_REGEX_ENABLED #include "core/string/print_string.h" @@ -461,7 +462,7 @@ String RenameDialog::_substitute(const String &subject, const Node *node, int co void RenameDialog::_error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, bool p_editor_notify, ErrorHandlerType p_type) { RenameDialog *self = (RenameDialog *)p_self; - String source_file(p_file); + String source_file = String::utf8(p_file); // Only show first error that is related to "regex" if (self->has_errors || source_file.find("regex") < 0) { @@ -470,9 +471,9 @@ void RenameDialog::_error_handler(void *p_self, const char *p_func, const char * String err_str; if (p_errorexp && p_errorexp[0]) { - err_str = p_errorexp; + err_str = String::utf8(p_errorexp); } else { - err_str = p_error; + err_str = String::utf8(p_error); } self->has_errors = true; diff --git a/editor/rename_dialog.h b/editor/rename_dialog.h index 4db3ef6740..f383877eb2 100644 --- a/editor/rename_dialog.h +++ b/editor/rename_dialog.h @@ -31,17 +31,16 @@ #ifndef RENAME_DIALOG_H #define RENAME_DIALOG_H -#include "modules/modules_enabled.gen.h" +#include "modules/modules_enabled.gen.h" // For regex. #ifdef MODULE_REGEX_ENABLED +#include "core/object/undo_redo.h" +#include "editor/scene_tree_editor.h" #include "scene/gui/check_box.h" #include "scene/gui/dialogs.h" #include "scene/gui/option_button.h" #include "scene/gui/spin_box.h" -#include "core/object/undo_redo.h" -#include "editor/scene_tree_editor.h" - /** @author Blazej Floch */ diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 4a59eb4fb3..0b293c9caf 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -47,10 +47,13 @@ #include "editor/plugins/script_editor_plugin.h" #include "editor/shader_create_dialog.h" #include "scene/main/window.h" +#include "scene/property_utils.h" #include "scene/resources/packed_scene.h" #include "servers/display_server.h" #include "servers/rendering_server.h" +#include "modules/modules_enabled.gen.h" // For regex. + void SceneTreeDock::_nodes_drag_begin() { if (restore_script_editor_on_drag) { EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT); @@ -67,7 +70,7 @@ void SceneTreeDock::input(const Ref<InputEvent> &p_event) { Ref<InputEventMouseButton> mb = p_event; - if (mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { + if (mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { restore_script_editor_on_drag = false; //lost chance } } @@ -213,7 +216,7 @@ void SceneTreeDock::_perform_instantiate_scenes(const Vector<String> &p_files, N for (int i = 0; i < instances.size(); i++) { Node *instantiated_scene = instances[i]; - editor_data->get_undo_redo().add_do_method(parent, "add_child", instantiated_scene); + editor_data->get_undo_redo().add_do_method(parent, "add_child", instantiated_scene, true); if (p_pos >= 0) { editor_data->get_undo_redo().add_do_method(parent, "move_child", instantiated_scene, p_pos + i); } @@ -258,8 +261,8 @@ void SceneTreeDock::_replace_with_branch_scene(const String &p_file, Node *base) int pos = base->get_index(); undo_redo->add_do_method(parent, "remove_child", base); undo_redo->add_undo_method(parent, "remove_child", instantiated_scene); - undo_redo->add_do_method(parent, "add_child", instantiated_scene); - undo_redo->add_undo_method(parent, "add_child", base); + undo_redo->add_do_method(parent, "add_child", instantiated_scene, true); + undo_redo->add_undo_method(parent, "add_child", base, true); undo_redo->add_do_method(parent, "move_child", instantiated_scene, pos); undo_redo->add_undo_method(parent, "move_child", base, pos); @@ -511,7 +514,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { ERR_CONTINUE(!dup); - editor_data->get_undo_redo().add_do_method(paste_parent, "add_child", dup); + editor_data->get_undo_redo().add_do_method(paste_parent, "add_child", dup, true); for (KeyValue<const Node *, Node *> &E2 : duplimap) { Node *d = E2.value; @@ -813,7 +816,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { editor_data->get_undo_redo().create_action(TTR("Make node as Root")); editor_data->get_undo_redo().add_do_method(node->get_parent(), "remove_child", node); editor_data->get_undo_redo().add_do_method(editor, "set_edited_scene", node); - editor_data->get_undo_redo().add_do_method(node, "add_child", root); + editor_data->get_undo_redo().add_do_method(node, "add_child", root, true); editor_data->get_undo_redo().add_do_method(node, "set_scene_file_path", root->get_scene_file_path()); editor_data->get_undo_redo().add_do_method(root, "set_scene_file_path", String()); editor_data->get_undo_redo().add_do_method(node, "set_owner", (Object *)nullptr); @@ -824,7 +827,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { editor_data->get_undo_redo().add_undo_method(node, "set_scene_file_path", String()); editor_data->get_undo_redo().add_undo_method(node, "remove_child", root); editor_data->get_undo_redo().add_undo_method(editor, "set_edited_scene", root); - editor_data->get_undo_redo().add_undo_method(node->get_parent(), "add_child", node); + editor_data->get_undo_redo().add_undo_method(node->get_parent(), "add_child", node, true); editor_data->get_undo_redo().add_undo_method(node->get_parent(), "move_child", node, node->get_index()); editor_data->get_undo_redo().add_undo_method(root, "set_owner", (Object *)nullptr); editor_data->get_undo_redo().add_undo_method(node, "set_owner", root); @@ -1192,7 +1195,7 @@ void SceneTreeDock::_node_collapsed(Object *p_obj) { return; } - if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + if (Input::get_singleton()->is_key_pressed(Key::SHIFT)) { _set_collapsed_recursive(ti, ti->is_collapsed()); } } @@ -1785,7 +1788,7 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V } editor_data->get_undo_redo().add_do_method(node->get_parent(), "remove_child", node); - editor_data->get_undo_redo().add_do_method(new_parent, "add_child", node); + editor_data->get_undo_redo().add_do_method(new_parent, "add_child", node, true); if (p_position_in_parent >= 0) { editor_data->get_undo_redo().add_do_method(new_parent, "move_child", node, p_position_in_parent + inc); @@ -1858,7 +1861,7 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V int child_pos = node->get_index(); - editor_data->get_undo_redo().add_undo_method(node->get_parent(), "add_child", node); + editor_data->get_undo_redo().add_undo_method(node->get_parent(), "add_child", node, true); editor_data->get_undo_redo().add_undo_method(node->get_parent(), "move_child", node, child_pos); editor_data->get_undo_redo().add_undo_method(this, "_set_owners", edited_scene, owners); if (AnimationPlayerEditor::get_singleton()->get_track_editor()->get_root() == node) { @@ -2071,7 +2074,7 @@ void SceneTreeDock::_delete_confirm(bool p_cut) { } editor_data->get_undo_redo().add_do_method(n->get_parent(), "remove_child", n); - editor_data->get_undo_redo().add_undo_method(n->get_parent(), "add_child", n); + editor_data->get_undo_redo().add_undo_method(n->get_parent(), "add_child", n, true); editor_data->get_undo_redo().add_undo_method(n->get_parent(), "move_child", n, n->get_index()); if (AnimationPlayerEditor::get_singleton()->get_track_editor()->get_root() == n) { editor_data->get_undo_redo().add_undo_method(AnimationPlayerEditor::get_singleton()->get_track_editor(), "set_root", n); @@ -2153,7 +2156,7 @@ void SceneTreeDock::_do_create(Node *p_parent) { editor_data->get_undo_redo().create_action(TTR("Create Node")); if (edited_scene) { - editor_data->get_undo_redo().add_do_method(p_parent, "add_child", child); + editor_data->get_undo_redo().add_do_method(p_parent, "add_child", child, true); editor_data->get_undo_redo().add_do_method(child, "set_owner", edited_scene); editor_data->get_undo_redo().add_do_method(editor_selection, "clear"); editor_data->get_undo_redo().add_do_method(editor_selection, "add_node", child); @@ -2615,7 +2618,7 @@ void SceneTreeDock::_nodes_dragged(Array p_nodes, NodePath p_to, int p_type) { int to_pos = -1; _normalize_drop(to_node, to_pos, p_type); - _do_reparent(to_node, to_pos, nodes, !Input::get_singleton()->is_key_pressed(KEY_SHIFT)); + _do_reparent(to_node, to_pos, nodes, !Input::get_singleton()->is_key_pressed(Key::SHIFT)); } void SceneTreeDock::_add_children_to_popup(Object *p_obj, int p_depth) { @@ -2826,7 +2829,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) { if (profile_allow_editing) { menu->add_separator(); - menu->add_icon_shortcut(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), ED_SHORTCUT("scene_tree/delete", TTR("Delete Node(s)"), KEY_DELETE), TOOL_ERASE); + menu->add_icon_shortcut(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), ED_SHORTCUT("scene_tree/delete", TTR("Delete Node(s)"), Key::KEY_DELETE), TOOL_ERASE); } menu->set_size(Size2(1, 1)); menu->set_position(p_menu_pos); @@ -2943,7 +2946,7 @@ void SceneTreeDock::open_script_dialog(Node *p_for_node, bool p_extend) { } } -void SceneTreeDock::attach_shader_to_selected() { +void SceneTreeDock::attach_shader_to_selected(int p_preferred_mode) { if (selected_shader_material.is_null()) { return; } @@ -2970,13 +2973,13 @@ void SceneTreeDock::attach_shader_to_selected() { shader_create_dialog->connect("shader_created", callable_mp(this, &SceneTreeDock::_shader_created)); shader_create_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_shader_creation_closed)); shader_create_dialog->connect("cancelled", callable_mp(this, &SceneTreeDock::_shader_creation_closed)); - shader_create_dialog->config(path); + shader_create_dialog->config(path, true, true, p_preferred_mode); shader_create_dialog->popup_centered(); } -void SceneTreeDock::open_shader_dialog(Ref<ShaderMaterial> &p_for_material) { +void SceneTreeDock::open_shader_dialog(Ref<ShaderMaterial> &p_for_material, int p_preferred_mode) { selected_shader_material = p_for_material; - attach_shader_to_selected(); + attach_shader_to_selected(p_preferred_mode); } void SceneTreeDock::open_add_child_dialog() { @@ -3132,7 +3135,9 @@ void SceneTreeDock::_clear_clipboard() { void SceneTreeDock::_create_remap_for_node(Node *p_node, Map<RES, RES> &r_remap) { List<PropertyInfo> props; p_node->get_property_list(&props); - bool is_instantiated = EditorPropertyRevert::may_node_be_in_instance(p_node); + + Vector<SceneState::PackState> states_stack; + bool states_stack_ready = false; for (const PropertyInfo &E : props) { if (!(E.usage & PROPERTY_USAGE_STORAGE)) { @@ -3143,16 +3148,17 @@ void SceneTreeDock::_create_remap_for_node(Node *p_node, Map<RES, RES> &r_remap) if (v.is_ref()) { RES res = v; if (res.is_valid()) { - if (is_instantiated) { - Variant orig; - if (EditorPropertyRevert::get_instantiated_node_original_property(p_node, E.name, orig)) { - if (!EditorPropertyRevert::is_node_property_different(p_node, v, orig)) { - continue; - } - } + if (!states_stack_ready) { + states_stack = PropertyUtils::get_node_states_stack(p_node); + states_stack_ready = true; } - if ((res->get_path() == "" || res->get_path().find("::") > -1) && !r_remap.has(res)) { + Variant orig = PropertyUtils::get_property_default_value(p_node, E.name, &states_stack); + if (!PropertyUtils::is_property_value_different(v, orig)) { + continue; + } + + if (res->is_built_in() && !r_remap.has(res)) { _create_remap_for_resource(res, r_remap); } } @@ -3179,7 +3185,7 @@ void SceneTreeDock::_create_remap_for_resource(RES p_resource, Map<RES, RES> &r_ if (v.is_ref()) { RES res = v; if (res.is_valid()) { - if ((res->get_path() == "" || res->get_path().find("::") > -1) && !r_remap.has(res)) { + if (res->is_built_in() && !r_remap.has(res)) { _create_remap_for_resource(res, r_remap); } } @@ -3223,28 +3229,32 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel HBoxContainer *filter_hbc = memnew(HBoxContainer); filter_hbc->add_theme_constant_override("separate", 0); - ED_SHORTCUT("scene_tree/rename", TTR("Rename"), KEY_F2); - ED_SHORTCUT("scene_tree/batch_rename", TTR("Batch Rename"), KEY_MASK_SHIFT | KEY_F2); - ED_SHORTCUT("scene_tree/add_child_node", TTR("Add Child Node"), KEY_MASK_CMD | KEY_A); - ED_SHORTCUT("scene_tree/instance_scene", TTR("Instantiate Child Scene"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_A); + ED_SHORTCUT("scene_tree/rename", TTR("Rename"), Key::F2); + ED_SHORTCUT_OVERRIDE("scene_tree/rename", "macos", Key::ENTER); + + ED_SHORTCUT("scene_tree/batch_rename", TTR("Batch Rename"), KeyModifierMask::SHIFT | Key::F2); + ED_SHORTCUT_OVERRIDE("scene_tree/batch_rename", "macos", KeyModifierMask::SHIFT | Key::ENTER); + + ED_SHORTCUT("scene_tree/add_child_node", TTR("Add Child Node"), KeyModifierMask::CMD | Key::A); + ED_SHORTCUT("scene_tree/instance_scene", TTR("Instantiate Child Scene"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::A); ED_SHORTCUT("scene_tree/expand_collapse_all", TTR("Expand/Collapse All")); - ED_SHORTCUT("scene_tree/cut_node", TTR("Cut"), KEY_MASK_CMD | KEY_X); - ED_SHORTCUT("scene_tree/copy_node", TTR("Copy"), KEY_MASK_CMD | KEY_C); - ED_SHORTCUT("scene_tree/paste_node", TTR("Paste"), KEY_MASK_CMD | KEY_V); + ED_SHORTCUT("scene_tree/cut_node", TTR("Cut"), KeyModifierMask::CMD | Key::X); + ED_SHORTCUT("scene_tree/copy_node", TTR("Copy"), KeyModifierMask::CMD | Key::C); + ED_SHORTCUT("scene_tree/paste_node", TTR("Paste"), KeyModifierMask::CMD | Key::V); ED_SHORTCUT("scene_tree/change_node_type", TTR("Change Type")); ED_SHORTCUT("scene_tree/attach_script", TTR("Attach Script")); ED_SHORTCUT("scene_tree/extend_script", TTR("Extend Script")); ED_SHORTCUT("scene_tree/detach_script", TTR("Detach Script")); - ED_SHORTCUT("scene_tree/move_up", TTR("Move Up"), KEY_MASK_CMD | KEY_UP); - ED_SHORTCUT("scene_tree/move_down", TTR("Move Down"), KEY_MASK_CMD | KEY_DOWN); - ED_SHORTCUT("scene_tree/duplicate", TTR("Duplicate"), KEY_MASK_CMD | KEY_D); + ED_SHORTCUT("scene_tree/move_up", TTR("Move Up"), KeyModifierMask::CMD | Key::UP); + ED_SHORTCUT("scene_tree/move_down", TTR("Move Down"), KeyModifierMask::CMD | Key::DOWN); + ED_SHORTCUT("scene_tree/duplicate", TTR("Duplicate"), KeyModifierMask::CMD | Key::D); ED_SHORTCUT("scene_tree/reparent", TTR("Reparent")); ED_SHORTCUT("scene_tree/reparent_to_new_node", TTR("Reparent to New Node")); ED_SHORTCUT("scene_tree/make_root", TTR("Make Scene Root")); ED_SHORTCUT("scene_tree/save_branch_as_scene", TTR("Save Branch as Scene")); - ED_SHORTCUT("scene_tree/copy_node_path", TTR("Copy Node Path"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_C); - ED_SHORTCUT("scene_tree/delete_no_confirm", TTR("Delete (No Confirm)"), KEY_MASK_SHIFT | KEY_DELETE); - ED_SHORTCUT("scene_tree/delete", TTR("Delete"), KEY_DELETE); + ED_SHORTCUT("scene_tree/copy_node_path", TTR("Copy Node Path"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::C); + ED_SHORTCUT("scene_tree/delete_no_confirm", TTR("Delete (No Confirm)"), KeyModifierMask::SHIFT | Key::KEY_DELETE); + ED_SHORTCUT("scene_tree/delete", TTR("Delete"), Key::KEY_DELETE); button_add = memnew(Button); button_add->set_flat(true); diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h index 66000602fa..c6e47fa002 100644 --- a/editor/scene_tree_dock.h +++ b/editor/scene_tree_dock.h @@ -48,6 +48,8 @@ #include "scene/gui/tree.h" #include "scene_tree_editor.h" +#include "modules/modules_enabled.gen.h" // For regex. + class EditorNode; class ShaderCreateDialog; @@ -300,8 +302,8 @@ public: void attach_script_to_selected(bool p_extend); void open_script_dialog(Node *p_for_node, bool p_extend); - void attach_shader_to_selected(); - void open_shader_dialog(Ref<ShaderMaterial> &p_for_material); + void attach_shader_to_selected(int p_preferred_mode = -1); + void open_shader_dialog(Ref<ShaderMaterial> &p_for_material, int p_preferred_mode = -1); void open_add_child_dialog(); void open_instance_child_dialog(); diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp index 78dc85aa7d..684f8aa37e 100644 --- a/editor/settings_config_dialog.cpp +++ b/editor/settings_config_dialog.cpp @@ -164,7 +164,7 @@ void EditorSettingsDialog::unhandled_input(const Ref<InputEvent> &p_event) { handled = true; } - if (k->get_keycode_with_modifiers() == (KEY_MASK_CMD | KEY_F)) { + if (k->get_keycode_with_modifiers() == (KeyModifierMask::CMD | Key::F)) { _focus_current_search_box(); handled = true; } diff --git a/editor/shader_create_dialog.cpp b/editor/shader_create_dialog.cpp index 8b02544156..23bdc06f95 100644 --- a/editor/shader_create_dialog.cpp +++ b/editor/shader_create_dialog.cpp @@ -324,7 +324,7 @@ void ShaderCreateDialog::_path_submitted(const String &p_path) { ok_pressed(); } -void ShaderCreateDialog::config(const String &p_base_path, bool p_built_in_enabled, bool p_load_enabled) { +void ShaderCreateDialog::config(const String &p_base_path, bool p_built_in_enabled, bool p_load_enabled, int p_preferred_mode) { if (p_base_path != "") { initial_base_path = p_base_path.get_basename(); file_path->set_text(initial_base_path + "." + language_data[language_menu->get_selected()].default_extension); @@ -338,6 +338,11 @@ void ShaderCreateDialog::config(const String &p_base_path, bool p_built_in_enabl built_in_enabled = p_built_in_enabled; load_enabled = p_load_enabled; + if (p_preferred_mode > -1) { + mode_menu->select(p_preferred_mode); + _mode_changed(p_preferred_mode); + } + _language_changed(current_language); _path_changed(file_path->get_text()); } diff --git a/editor/shader_create_dialog.h b/editor/shader_create_dialog.h index 6962fa3d8d..be0a0cad06 100644 --- a/editor/shader_create_dialog.h +++ b/editor/shader_create_dialog.h @@ -108,7 +108,7 @@ protected: static void _bind_methods(); public: - void config(const String &p_base_path, bool p_built_in_enabled = true, bool p_load_enabled = true); + void config(const String &p_base_path, bool p_built_in_enabled = true, bool p_load_enabled = true, int p_preferred_mode = -1); ShaderCreateDialog(); }; diff --git a/editor/translations/af.po b/editor/translations/af.po index a38a5103d2..2e733a4fb8 100644 --- a/editor/translations/af.po +++ b/editor/translations/af.po @@ -11143,11 +11143,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/ar.po b/editor/translations/ar.po index 67b76771d2..a32b919cf2 100644 --- a/editor/translations/ar.po +++ b/editor/translations/ar.po @@ -61,8 +61,8 @@ msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-09-19 11:14+0000\n" -"Last-Translator: Mohammed Mubarak <modymu9@gmail.com>\n" +"PO-Revision-Date: 2021-10-30 00:50+0000\n" +"Last-Translator: HASSAN GAMER - حسن جيمر <gamerhassan55@gmail.com>\n" "Language-Team: Arabic <https://hosted.weblate.org/projects/godot-engine/" "godot/ar/>\n" "Language: ar\n" @@ -641,9 +641,8 @@ msgid "Go to Previous Step" msgstr "إذهب إلى الخطوة السابقة" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Apply Reset" -msgstr "إعادة تعيين" +msgstr "طَبق إعادة تعيين" #: editor/animation_track_editor.cpp msgid "Optimize Animation" @@ -1108,17 +1107,16 @@ msgid "Owners Of:" msgstr "ملاك:" #: editor/dependency_editor.cpp -#, fuzzy msgid "" "Remove the selected files from the project? (Cannot be undone.)\n" "Depending on your filesystem configuration, the files will either be moved " "to the system trash or deleted permanently." msgstr "" -"حذف الملفات المختارة من المشروع؟ (لا يمكن استعادتها)\n" -"يمكنك إيجاد الملفات المحذوفة في سلة مهملات النظام حيث يمكنك إسترجاعها." +"حذف الملفات المُختارة من المشروع؟ (لا يمكن استعادتها).\n" +"حسب إِعدادات مُدير ملفاتِك, إِما سيتم نقل الملقات إِلى سلة المُهملات أَو سيتم حذفها " +"نهائياً." #: editor/dependency_editor.cpp -#, fuzzy msgid "" "The files being removed are required by other resources in order for them to " "work.\n" @@ -1126,9 +1124,10 @@ msgid "" "Depending on your filesystem configuration, the files will either be moved " "to the system trash or deleted permanently." msgstr "" -"الملفات التي يتم إزالتها مطلوبة من قبل موارد أخرى من اجل ان تعمل.\n" -"هل تريد إزالتها على أي حال؟ (لا تراجع)\n" -"يمكنك العثور على الملفات التي تمت إزالتها في مهملات النظام لاستعادتها." +"الملفات التي يتم إزالتها مطلوبة من قبل موارد أخرى من اجل أَن تعمل.\n" +"هل تريد إزالتها على أي حال؟ (لا تراجع).\n" +"حسب إِعدادات مُدير ملفاتِك, إِما سيتم نقل الملقات إِلى سلة المُهملات أَو سيتم حذفها " +"نهائياً." #: editor/dependency_editor.cpp msgid "Cannot remove:" @@ -11284,14 +11283,14 @@ msgstr "" "عنه query على الأقل حرف `/` واحد." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "زر " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "الزر الفيزيائي" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "زر " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "زر Joy" diff --git a/editor/translations/az.po b/editor/translations/az.po index 76fb760ac1..77470b2db5 100644 --- a/editor/translations/az.po +++ b/editor/translations/az.po @@ -10699,11 +10699,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/bg.po b/editor/translations/bg.po index c4ad5a3993..11a94b8796 100644 --- a/editor/translations/bg.po +++ b/editor/translations/bg.po @@ -10720,11 +10720,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/bn.po b/editor/translations/bn.po index 96a57f9dd5..b3efe37fe4 100644 --- a/editor/translations/bn.po +++ b/editor/translations/bn.po @@ -11793,14 +11793,14 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "কী/চাবি " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "কী/চাবি " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "জয়স্টিক বোতাম" diff --git a/editor/translations/br.po b/editor/translations/br.po index 071e1f021c..690ede66ef 100644 --- a/editor/translations/br.po +++ b/editor/translations/br.po @@ -10614,11 +10614,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/ca.po b/editor/translations/ca.po index 26f7646086..92dd5fff63 100644 --- a/editor/translations/ca.po +++ b/editor/translations/ca.po @@ -11447,14 +11447,14 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Tecla " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Tecla " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Botó de la Maneta" diff --git a/editor/translations/cs.po b/editor/translations/cs.po index 598ff4163c..721a03dfc5 100644 --- a/editor/translations/cs.po +++ b/editor/translations/cs.po @@ -26,13 +26,14 @@ # Václav Blažej <vaclavblazej@seznam.cz>, 2020, 2021. # ProfJack <profjackcz@gmail.com>, 2021. # swifterik <blaha.j502@gmail.com>, 2021. +# Daniel <dan@ger.cz>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-09-15 00:46+0000\n" -"Last-Translator: Zbyněk <zbynek.fiala@gmail.com>\n" +"PO-Revision-Date: 2021-10-27 21:45+0000\n" +"Last-Translator: Daniel <dan@ger.cz>\n" "Language-Team: Czech <https://hosted.weblate.org/projects/godot-engine/godot/" "cs/>\n" "Language: cs\n" @@ -389,15 +390,13 @@ msgstr "Animace: vložit" #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp -#, fuzzy msgid "node '%s'" -msgstr "Nelze otevřít '%s'." +msgstr "uzel '%s'" #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp -#, fuzzy msgid "animation" -msgstr "Animace" +msgstr "animace" #: editor/animation_track_editor.cpp msgid "AnimationPlayer can't animate itself, only other players." @@ -405,9 +404,8 @@ msgstr "AnimationPlayer nemůže animovat sám sebe, pouze ostatní přehrávač #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp -#, fuzzy msgid "property '%s'" -msgstr "Vlastnost '%s' neexistuje." +msgstr "vlastnost '%s'" #: editor/animation_track_editor.cpp msgid "Anim Create & Insert" @@ -554,7 +552,7 @@ msgstr "Seskupit stopy podle uzlu nebo je zobrazit jako jednoduchý seznam." #: editor/animation_track_editor.cpp msgid "Snap:" -msgstr "Přichycení:" +msgstr "Přichytit:" #: editor/animation_track_editor.cpp msgid "Animation step value." @@ -965,7 +963,6 @@ msgid "Edit..." msgstr "Upravit..." #: editor/connections_dialog.cpp -#, fuzzy msgid "Go to Method" msgstr "Přejít na metodu" @@ -987,7 +984,7 @@ msgstr "Žádné výsledky pro \"%s\"." #: editor/create_dialog.cpp editor/property_selector.cpp msgid "No description available for %s." -msgstr "" +msgstr "Pro %s není dostupný popis." #: editor/create_dialog.cpp editor/editor_file_dialog.cpp #: editor/filesystem_dock.cpp @@ -1087,17 +1084,16 @@ msgid "Owners Of:" msgstr "Vlastníci:" #: editor/dependency_editor.cpp -#, fuzzy msgid "" "Remove the selected files from the project? (Cannot be undone.)\n" "Depending on your filesystem configuration, the files will either be moved " "to the system trash or deleted permanently." msgstr "" -"Odebrat vybrané soubory z projektu? (Nelze vrátit zpět)\n" -"Odebrané soubory budou v systémovém koši a obnovit je." +"Odebrat vybrané soubory z projektu? (Nelze vrátit zpět.)\n" +"V závislosti na konfiguraci souborového systému budou soubory buď přesunuty " +"do systémového koše, nebo trvale odstraněny." #: editor/dependency_editor.cpp -#, fuzzy msgid "" "The files being removed are required by other resources in order for them to " "work.\n" @@ -1105,9 +1101,10 @@ msgid "" "Depending on your filesystem configuration, the files will either be moved " "to the system trash or deleted permanently." msgstr "" -"Soubory ke smazání potřebují jiné zdroje ke své činnosti.\n" -"Přesto je chcete smazat? (nelze vrátit zpět)\n" -"Odebrané soubory budou v systémovém koši a obnovit je." +"Odstraňované soubory potřebují jiné zdroje ke své činnosti.\n" +"Chcete je přesto odstranit? (Nelze vrátit zpět.)\n" +"V závislosti na konfiguraci souborového systému budou soubory buď přesunuty " +"do systémového koše, nebo trvale odstraněny." #: editor/dependency_editor.cpp msgid "Cannot remove:" @@ -1179,7 +1176,7 @@ msgstr "Děkujeme za komunitu Godotu!" #: editor/editor_about.cpp editor/editor_node.cpp editor/project_manager.cpp msgid "Click to copy." -msgstr "" +msgstr "Klikněte pro zkopírování." #: editor/editor_about.cpp msgid "Godot Engine contributors" @@ -1277,41 +1274,37 @@ msgid "Licenses" msgstr "Licence" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Error opening asset file for \"%s\" (not in ZIP format)." -msgstr "Chyba při otevírání balíčku (není ve formátu ZIP)." +msgstr "Chyba při otevírání balíčku \"%s\" (není ve formátu ZIP)." #: editor/editor_asset_installer.cpp -#, fuzzy msgid "%s (already exists)" msgstr "%s (již existuje)" #: editor/editor_asset_installer.cpp msgid "Contents of asset \"%s\" - %d file(s) conflict with your project:" -msgstr "" +msgstr "Obsah balíčku \"%s\" - %d souborů koliduje s vaším projektem:" #: editor/editor_asset_installer.cpp msgid "Contents of asset \"%s\" - No files conflict with your project:" msgstr "" +"Obsah balíčku \"%s\" - Žádné soubory nejsou v konfliktu s vaším projektem:" #: editor/editor_asset_installer.cpp msgid "Uncompressing Assets" msgstr "Dekomprese uživatelského obsahu" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "The following files failed extraction from asset \"%s\":" -msgstr "Selhala extrakce následujících souborů z balíčku:" +msgstr "Následující soubory se nepodařilo extrahovat z balíčku \"%s\":" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "(and %s more files)" -msgstr "A %s dalších souborů." +msgstr "(a %s dalších souborů)" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Asset \"%s\" installed successfully!" -msgstr "Balíček byl úspěšně nainstalován!" +msgstr "Balíček \"%s\" byl úspěšně nainstalován!" #: editor/editor_asset_installer.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -1323,7 +1316,6 @@ msgid "Install" msgstr "Instalovat" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Asset Installer" msgstr "Instalátor balíčků" @@ -1556,13 +1548,12 @@ msgid "Can't add autoload:" msgstr "Nelze přidat auto-načítání:" #: editor/editor_autoload_settings.cpp -#, fuzzy msgid "%s is an invalid path. File does not exist." -msgstr "Soubor neexistuje." +msgstr "%s je neplatná cesta. Soubor neexistuje." #: editor/editor_autoload_settings.cpp msgid "%s is an invalid path. Not in resource path (res://)." -msgstr "" +msgstr "%s je neplatná cesta. Není v cestě ke zdrojům (res://)." #: editor/editor_autoload_settings.cpp msgid "Add AutoLoad" @@ -1586,9 +1577,8 @@ msgid "Name" msgstr "Název" #: editor/editor_autoload_settings.cpp -#, fuzzy msgid "Global Variable" -msgstr "Proměnná" +msgstr "Globální proměnná" #: editor/editor_data.cpp msgid "Paste Params" @@ -1762,48 +1752,50 @@ msgstr "Importovat panel" #: editor/editor_feature_profile.cpp msgid "Allows to view and edit 3D scenes." -msgstr "" +msgstr "Umožňuje prohlížet a upravovat 3D scény." #: editor/editor_feature_profile.cpp msgid "Allows to edit scripts using the integrated script editor." -msgstr "" +msgstr "Umožňuje upravovat skripty pomocí integrovaného editoru skriptů." #: editor/editor_feature_profile.cpp msgid "Provides built-in access to the Asset Library." -msgstr "" +msgstr "Poskytuje integrovaný přístup ke Knihovně balíčků." #: editor/editor_feature_profile.cpp msgid "Allows editing the node hierarchy in the Scene dock." -msgstr "" +msgstr "Umožňuje upravovat hierarchii uzlů v doku scény." #: editor/editor_feature_profile.cpp msgid "" "Allows to work with signals and groups of the node selected in the Scene " "dock." -msgstr "" +msgstr "Umožňuje pracovat se signály a skupinami uzlu vybraného v doku scény." #: editor/editor_feature_profile.cpp msgid "Allows to browse the local file system via a dedicated dock." msgstr "" +"Umožňuje procházet místní souborový systém prostřednictvím vyhrazeného doku." #: editor/editor_feature_profile.cpp msgid "" "Allows to configure import settings for individual assets. Requires the " "FileSystem dock to function." msgstr "" +"Umožňuje konfigurovat nastavení importu pro jednotlivé zdroje. Pro svou " +"funkci vyžaduje dok Souborový systém." #: editor/editor_feature_profile.cpp -#, fuzzy msgid "(current)" -msgstr "(Aktuální)" +msgstr "(aktuální)" #: editor/editor_feature_profile.cpp msgid "(none)" -msgstr "" +msgstr "(žádný)" #: editor/editor_feature_profile.cpp msgid "Remove currently selected profile, '%s'? Cannot be undone." -msgstr "" +msgstr "Odstranit aktuálně vybraný profil, '%s'? Nelze vrátit zpět." #: editor/editor_feature_profile.cpp msgid "Profile must be a valid filename and must not contain '.'" @@ -1834,19 +1826,16 @@ msgid "Enable Contextual Editor" msgstr "Aktivovat kontextový editor" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Class Properties:" -msgstr "Vlastnosti:" +msgstr "Vlastnosti třídy:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Main Features:" -msgstr "Vlastnosti" +msgstr "Hlavní funkce:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Nodes and Classes:" -msgstr "Povolené třídy:" +msgstr "Uzly a třídy:" #: editor/editor_feature_profile.cpp msgid "File '%s' format is invalid, import aborted." @@ -1863,7 +1852,6 @@ msgid "Error saving profile to path: '%s'." msgstr "Chyba při ukládání profilu do cesty: '%s '." #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Reset to Default" msgstr "Obnovit výchozí" @@ -1872,14 +1860,12 @@ msgid "Current Profile:" msgstr "Aktuální profil:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Create Profile" -msgstr "Smazat profil" +msgstr "Vytvořit profil" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Remove Profile" -msgstr "Odstranit dlaždici" +msgstr "Odstranit profil" #: editor/editor_feature_profile.cpp msgid "Available Profiles:" @@ -1899,18 +1885,16 @@ msgid "Export" msgstr "Export" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Configure Selected Profile:" -msgstr "Aktuální profil:" +msgstr "Konfigurace vybraného profilu:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Extra Options:" -msgstr "Možnosti třídy:" +msgstr "Další možnosti:" #: editor/editor_feature_profile.cpp msgid "Create or import a profile to edit available classes and properties." -msgstr "" +msgstr "Vytvořte nebo importujte profil a upravte dostupné třídy a vlastnosti." #: editor/editor_feature_profile.cpp msgid "New profile name:" @@ -1937,9 +1921,8 @@ msgid "Select Current Folder" msgstr "Vybrat stávající složku" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp -#, fuzzy msgid "File exists, overwrite?" -msgstr "Soubor už existuje. Přepsat?" +msgstr "Soubor existuje, přepsat?" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Select This Folder" @@ -2337,6 +2320,9 @@ msgid "" "Update Continuously is enabled, which can increase power usage. Click to " "disable it." msgstr "" +"Aktivuje se při překreslování okna editoru.\n" +"Je zapnuta funkce Průběžná aktualizace, která může zvýšit spotřebu energie. " +"Klepnutím ji zakážete." #: editor/editor_node.cpp msgid "Spins when the editor window redraws." @@ -2433,9 +2419,8 @@ msgstr "" "(instance nebo dědičnosti)." #: editor/editor_node.cpp -#, fuzzy msgid "Could not save one or more scenes!" -msgstr "Nelze spustit podproces!" +msgstr "Nelze uložit jednu nebo více scén!" #: editor/editor_node.cpp msgid "Save All Scenes" @@ -2577,20 +2562,23 @@ msgstr "Uložit změny '%s' před zavřením?" #: editor/editor_node.cpp msgid "%s no longer exists! Please specify a new save location." -msgstr "" +msgstr "%s již neexistuje! Zadejte prosím nové umístění pro uložení." #: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." msgstr "" +"Aktuální scéna nemá kořenový uzel, ale přesto bylo uloženo %d upravených " +"externích zdrojů." #: editor/editor_node.cpp -#, fuzzy msgid "" "A root node is required to save the scene. You can add a root node using the " "Scene tree dock." -msgstr "Pro uložení scény je vyžadován kořenový uzel." +msgstr "" +"Pro uložení scény je nutný kořenový uzel. Kořenový uzel můžete přidat pomocí " +"doku Strom scény." #: editor/editor_node.cpp msgid "Save Scene As..." @@ -2622,29 +2610,27 @@ msgstr "Aktuální scéna neuložena. Přesto otevřít?" #: editor/editor_node.cpp msgid "Can't undo while mouse buttons are pressed." -msgstr "" +msgstr "Nelze vrátit zpět, když jsou stisknuta tlačítka myši." #: editor/editor_node.cpp msgid "Nothing to undo." -msgstr "" +msgstr "Není co vracet." #: editor/editor_node.cpp -#, fuzzy msgid "Undo: %s" -msgstr "Zpět" +msgstr "Zpět: %s" #: editor/editor_node.cpp msgid "Can't redo while mouse buttons are pressed." -msgstr "" +msgstr "Nelze opakovat, když jsou stisknuta tlačítka myši." #: editor/editor_node.cpp msgid "Nothing to redo." -msgstr "" +msgstr "Není co opakovat." #: editor/editor_node.cpp -#, fuzzy msgid "Redo: %s" -msgstr "Znovu" +msgstr "Opakovat: %s" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." @@ -2929,11 +2915,11 @@ msgstr "Konvertovat na..." #: editor/editor_node.cpp msgid "MeshLibrary..." -msgstr "MeshLibrary..." +msgstr "Knihovna modelů..." #: editor/editor_node.cpp msgid "TileSet..." -msgstr "TileSet..." +msgstr "Sada dlaždic..." #: editor/editor_node.cpp editor/plugins/script_text_editor.cpp #: scene/gui/line_edit.cpp scene/gui/text_edit.cpp @@ -2991,9 +2977,8 @@ msgid "Orphan Resource Explorer..." msgstr "Průzkumník osiřelých zdrojů..." #: editor/editor_node.cpp -#, fuzzy msgid "Reload Current Project" -msgstr "Přejmenovat projekt" +msgstr "Znovu načíst aktuální projekt" #: editor/editor_node.cpp msgid "Quit to Project List" @@ -3151,13 +3136,12 @@ msgid "Help" msgstr "Nápověda" #: editor/editor_node.cpp -#, fuzzy msgid "Online Documentation" -msgstr "Otevřít dokumentaci" +msgstr "Online dokumentace" #: editor/editor_node.cpp msgid "Questions & Answers" -msgstr "" +msgstr "Otázky & odpovědi" #: editor/editor_node.cpp msgid "Report a Bug" @@ -3165,7 +3149,7 @@ msgstr "Nahlásit chybu" #: editor/editor_node.cpp msgid "Suggest a Feature" -msgstr "" +msgstr "Navrhnout funkci" #: editor/editor_node.cpp msgid "Send Docs Feedback" @@ -3176,9 +3160,8 @@ msgid "Community" msgstr "Komunita" #: editor/editor_node.cpp -#, fuzzy msgid "About Godot" -msgstr "O aplikaci" +msgstr "O aplikaci Godot" #: editor/editor_node.cpp msgid "Support Godot Development" @@ -3271,14 +3254,12 @@ msgid "Manage Templates" msgstr "Spravovat šablony" #: editor/editor_node.cpp -#, fuzzy msgid "Install from file" msgstr "Instalovat ze souboru" #: editor/editor_node.cpp -#, fuzzy msgid "Select android sources file" -msgstr "Vyberte zdrojovou síť:" +msgstr "Vyberte soubor se zdroji pro Android" #: editor/editor_node.cpp msgid "" @@ -3326,9 +3307,8 @@ msgid "Merge With Existing" msgstr "Sloučit s existující" #: editor/editor_node.cpp -#, fuzzy msgid "Apply MeshInstance Transforms" -msgstr "Animace: Změna transformace" +msgstr "Použít transformace MeshInstance" #: editor/editor_node.cpp msgid "Open & Run a Script" @@ -3365,9 +3345,8 @@ msgid "Select" msgstr "Vybrat" #: editor/editor_node.cpp -#, fuzzy msgid "Select Current" -msgstr "Vybrat stávající složku" +msgstr "Vybrat aktuální" #: editor/editor_node.cpp msgid "Open 2D Editor" @@ -3402,9 +3381,8 @@ msgid "No sub-resources found." msgstr "Nebyly nalezeny žádné dílčí zdroje." #: editor/editor_path.cpp -#, fuzzy msgid "Open a list of sub-resources." -msgstr "Nebyly nalezeny žádné dílčí zdroje." +msgstr "Otevřete seznam dílčích zdrojů." #: editor/editor_plugin.cpp msgid "Creating Mesh Previews" @@ -3431,14 +3409,12 @@ msgid "Update" msgstr "Aktualizovat" #: editor/editor_plugin_settings.cpp -#, fuzzy msgid "Version" -msgstr "Verze:" +msgstr "Verze" #: editor/editor_plugin_settings.cpp -#, fuzzy msgid "Author" -msgstr "Autoři" +msgstr "Autor" #: editor/editor_plugin_settings.cpp #: editor/plugins/version_control_editor_plugin.cpp @@ -3451,14 +3427,12 @@ msgid "Measure:" msgstr "Měření:" #: editor/editor_profiler.cpp -#, fuzzy msgid "Frame Time (ms)" -msgstr "Čas snímku (sek.)" +msgstr "Čas snímku (ms)" #: editor/editor_profiler.cpp -#, fuzzy msgid "Average Time (ms)" -msgstr "Průměrný čas (sek.)" +msgstr "Průměrný čas (ms)" #: editor/editor_profiler.cpp msgid "Frame %" @@ -3485,6 +3459,12 @@ msgid "" "functions called by that function.\n" "Use this to find individual functions to optimize." msgstr "" +"Včetně: Zahrnuje čas z jiných funkcí volaných touto funkcí.\n" +"Slouží k odhalení úzkých míst.\n" +"\n" +"Vlastní: Započítává pouze čas strávený v samotné funkci, nikoli v jiných " +"funkcích volaných touto funkcí.\n" +"Použijte k vyhledání jednotlivých funkcí, které je třeba optimalizovat." #: editor/editor_profiler.cpp msgid "Frame #:" @@ -3589,7 +3569,7 @@ msgstr "" #: editor/editor_resource_picker.cpp msgid "Quick Load" -msgstr "" +msgstr "Rychlé načtení" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "Make Unique" @@ -3610,9 +3590,8 @@ msgid "Paste" msgstr "Vložit" #: editor/editor_resource_picker.cpp editor/property_editor.cpp -#, fuzzy msgid "Convert to %s" -msgstr "Konvertovat na %s" +msgstr "Převést na %s" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "New %s" @@ -3662,11 +3641,9 @@ msgid "Did you forget the '_run' method?" msgstr "Nezapoměl jste metodu '_run'?" #: editor/editor_spin_slider.cpp -#, fuzzy msgid "Hold %s to round to integers. Hold Shift for more precise changes." msgstr "" -"Podržte Ctrl pro zaokrouhlení na celá čísla. Podržte Shift pro přesnější " -"úpravy." +"Podržte %s pro zaokrouhlení na celá čísla. Pro přesnější změny podržte Shift." #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" @@ -3686,49 +3663,43 @@ msgstr "Import z uzlu:" #: editor/export_template_manager.cpp msgid "Open the folder containing these templates." -msgstr "" +msgstr "Otevřít složku obsahující tyto šablony." #: editor/export_template_manager.cpp msgid "Uninstall these templates." -msgstr "" +msgstr "Odinstalovat tyto šablony." #: editor/export_template_manager.cpp -#, fuzzy msgid "There are no mirrors available." -msgstr "Neexistuje '%s' soubor." +msgstr "Nejsou k dispozici žádná zrcadla." #: editor/export_template_manager.cpp -#, fuzzy msgid "Retrieving the mirror list..." -msgstr "Získávání zrcadel, prosím čekejte..." +msgstr "Získávání seznamu zrcadel..." #: editor/export_template_manager.cpp msgid "Starting the download..." -msgstr "" +msgstr "Zahájení stahování..." #: editor/export_template_manager.cpp msgid "Error requesting URL:" msgstr "Chyba žádosti o URL:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Connecting to the mirror..." -msgstr "Připojuji se k zrcadlu..." +msgstr "Připojení k zrcadlu..." #: editor/export_template_manager.cpp -#, fuzzy msgid "Can't resolve the requested address." -msgstr "Nelze přeložit název hostitele:" +msgstr "Nelze dohledat požadovanou adresu." #: editor/export_template_manager.cpp -#, fuzzy msgid "Can't connect to the mirror." -msgstr "Nelze se připojit k hostiteli:" +msgstr "Nelze se připojit k zrcadlu." #: editor/export_template_manager.cpp -#, fuzzy msgid "No response from the mirror." -msgstr "Žádná odpověď od hostitele:" +msgstr "Zrcadlo neodpovídá." #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -3736,18 +3707,16 @@ msgid "Request failed." msgstr "Požadavek selhal." #: editor/export_template_manager.cpp -#, fuzzy msgid "Request ended up in a redirect loop." -msgstr "Požadavek se nezdařil, příliš mnoho přesměrování" +msgstr "Požadavek skončil ve smyčce přesměrování." #: editor/export_template_manager.cpp -#, fuzzy msgid "Request failed:" -msgstr "Požadavek selhal." +msgstr "Požadavek selhal:" #: editor/export_template_manager.cpp msgid "Download complete; extracting templates..." -msgstr "" +msgstr "Stažení dokončeno; extrahování šablon..." #: editor/export_template_manager.cpp msgid "Cannot remove temporary file:" @@ -3766,13 +3735,13 @@ msgid "Error getting the list of mirrors." msgstr "Chyba při získávání seznamu zrcadel." #: editor/export_template_manager.cpp -#, fuzzy msgid "Error parsing JSON with the list of mirrors. Please report this issue!" -msgstr "Chyba parsování JSON mirror list. Prosím nahlaste tuto chybu!" +msgstr "" +"Chyba při parsování JSON se seznamem zrcadel. Nahlaste prosím tento problém!" #: editor/export_template_manager.cpp msgid "Best available mirror" -msgstr "" +msgstr "Nejlepší dostupné zrcadlo" #: editor/export_template_manager.cpp msgid "" @@ -3825,24 +3794,20 @@ msgid "SSL Handshake Error" msgstr "Selhání SSL handshaku" #: editor/export_template_manager.cpp -#, fuzzy msgid "Can't open the export templates file." -msgstr "Nelze otevřít zip soubor exportních šablon." +msgstr "Nelze otevřít soubor exportních šablon." #: editor/export_template_manager.cpp -#, fuzzy msgid "Invalid version.txt format inside the export templates file: %s." -msgstr "Neplatný formát version.txt uvnitř šablon: %s." +msgstr "Nesprávný formát version.txt uvnitř souboru exportních šablon: %s." #: editor/export_template_manager.cpp -#, fuzzy msgid "No version.txt found inside the export templates file." -msgstr "Nenalezena version.txt uvnitř šablon." +msgstr "V souboru exportních šablon nebyl nalezen soubor version.txt." #: editor/export_template_manager.cpp -#, fuzzy msgid "Error creating path for extracting templates:" -msgstr "Chyba při vytváření cesty pro šablony:" +msgstr "Chyba při vytváření cesty pro extrakci šablon:" #: editor/export_template_manager.cpp msgid "Extracting Export Templates" @@ -3853,9 +3818,8 @@ msgid "Importing:" msgstr "Importování:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Remove templates for the version '%s'?" -msgstr "Odstranit šablonu verze '%s'?" +msgstr "Odstranit šablony pro verzi '%s'?" #: editor/export_template_manager.cpp msgid "Uncompressing Android Build Sources" @@ -3872,67 +3836,62 @@ msgstr "Aktuální verze:" #: editor/export_template_manager.cpp msgid "Export templates are missing. Download them or install from a file." msgstr "" +"Chybí šablony pro export. Stáhněte si je nebo je nainstalujte ze souboru." #: editor/export_template_manager.cpp msgid "Export templates are installed and ready to be used." -msgstr "" +msgstr "Exportní šablony jsou nainstalovány a připraveny k použití." #: editor/export_template_manager.cpp -#, fuzzy msgid "Open Folder" -msgstr "Otevřít soubor" +msgstr "Otevřít složku" #: editor/export_template_manager.cpp msgid "Open the folder containing installed templates for the current version." -msgstr "" +msgstr "Otevře složku obsahující nainstalované šablony pro aktuální verzi." #: editor/export_template_manager.cpp msgid "Uninstall" msgstr "Odinstalovat" #: editor/export_template_manager.cpp -#, fuzzy msgid "Uninstall templates for the current version." -msgstr "Počáteční hodnota pro počítadlo" +msgstr "Odinstalování šablon pro aktuální verzi." #: editor/export_template_manager.cpp -#, fuzzy msgid "Download from:" -msgstr "Chyba při stahování" +msgstr "Stáhnout z:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Open in Web Browser" -msgstr "Spustit v prohlížeči" +msgstr "Otevřít v prohlížeči" #: editor/export_template_manager.cpp -#, fuzzy msgid "Copy Mirror URL" -msgstr "Kopírovat chybu" +msgstr "Kopírovat URL zrcadla" #: editor/export_template_manager.cpp msgid "Download and Install" -msgstr "" +msgstr "Stáhnout a instalovat" #: editor/export_template_manager.cpp msgid "" "Download and install templates for the current version from the best " "possible mirror." msgstr "" +"Stáhnutí a instalace šablon pro aktuální verzi z nejlepšího možného zrcadla." #: editor/export_template_manager.cpp msgid "Official export templates aren't available for development builds." msgstr "Oficiální šablony exportu nejsou k dispozici pro vývojová sestavení." #: editor/export_template_manager.cpp -#, fuzzy msgid "Install from File" msgstr "Instalovat ze souboru" #: editor/export_template_manager.cpp -#, fuzzy msgid "Install templates from a local file." -msgstr "Importovat šablony ze ZIP souboru" +msgstr "Instalace šablon z místního souboru." #: editor/export_template_manager.cpp editor/find_in_files.cpp #: editor/progress_dialog.cpp scene/gui/dialogs.cpp @@ -3940,19 +3899,16 @@ msgid "Cancel" msgstr "Zrušit" #: editor/export_template_manager.cpp -#, fuzzy msgid "Cancel the download of the templates." -msgstr "Nelze otevřít zip soubor exportních šablon." +msgstr "Zrušit stahování šablon." #: editor/export_template_manager.cpp -#, fuzzy msgid "Other Installed Versions:" -msgstr "Instalované verze:" +msgstr "Další nainstalované verze:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Uninstall Template" -msgstr "Odinstalovat" +msgstr "Odinstalovat šablonu" #: editor/export_template_manager.cpp msgid "Select Template File" @@ -3967,6 +3923,8 @@ msgid "" "The templates will continue to download.\n" "You may experience a short editor freeze when they finish." msgstr "" +"Šablony se budou stahovat i nadále.\n" +"Po dokončení může dojít ke krátkému zamrznutí editoru." #: editor/filesystem_dock.cpp msgid "Favorites" @@ -4113,35 +4071,32 @@ msgid "Collapse All" msgstr "Sbalit vše" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Sort files" -msgstr "Hledat soubory" +msgstr "Seřadit soubory" #: editor/filesystem_dock.cpp msgid "Sort by Name (Ascending)" -msgstr "" +msgstr "Seřadit podle názvu (vzestupně)" #: editor/filesystem_dock.cpp msgid "Sort by Name (Descending)" -msgstr "" +msgstr "Seřadit podle názvu (sestupně)" #: editor/filesystem_dock.cpp msgid "Sort by Type (Ascending)" -msgstr "" +msgstr "Seřadit podle typu (vzestupně)" #: editor/filesystem_dock.cpp msgid "Sort by Type (Descending)" -msgstr "" +msgstr "Seřadit podle typu (sestupně)" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Sort by Last Modified" -msgstr "Datum modifikace" +msgstr "Seřadit podle poslední změny" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Sort by First Modified" -msgstr "Datum modifikace" +msgstr "Seřadit podle první změny" #: editor/filesystem_dock.cpp msgid "Duplicate..." @@ -4153,7 +4108,7 @@ msgstr "Přejmenovat..." #: editor/filesystem_dock.cpp msgid "Focus the search box" -msgstr "" +msgstr "Přejít do vyhledávacího pole" #: editor/filesystem_dock.cpp msgid "Previous Folder/File" @@ -4440,6 +4395,10 @@ msgid "" "Selecting another resource in the FileSystem dock without clicking Reimport " "first will discard changes made in the Import dock." msgstr "" +"Máte čekající změny, které ještě nebyly použity. Klepnutím na tlačítko Znovu " +"importovat uplatníte změny provedené v možnostech importu.\n" +"Výběrem jiného zdroje v doku Souborový systém bez předchozího kliknutí na " +"tlačítko Znovu importovat se změny provedené v doku Import zruší." #: editor/import_dock.cpp msgid "Import As:" @@ -4469,14 +4428,12 @@ msgid "Failed to load resource." msgstr "Selhalo nahrání zdroje." #: editor/inspector_dock.cpp -#, fuzzy msgid "Copy Properties" -msgstr "Vlastnosti" +msgstr "Kopírovat vlastnosti" #: editor/inspector_dock.cpp -#, fuzzy msgid "Paste Properties" -msgstr "Vlastnosti" +msgstr "Vložit vlastnosti" #: editor/inspector_dock.cpp msgid "Make Sub-Resources Unique" @@ -4501,23 +4458,20 @@ msgid "Save As..." msgstr "Uložit jako..." #: editor/inspector_dock.cpp -#, fuzzy msgid "Extra resource options." -msgstr "Není v cestě ke zdroji." +msgstr "Další možnosti zdrojů." #: editor/inspector_dock.cpp -#, fuzzy msgid "Edit Resource from Clipboard" -msgstr "Editovat schránku zdrojů" +msgstr "Upravit zdroj ze schránky" #: editor/inspector_dock.cpp msgid "Copy Resource" msgstr "Kopírovat zdroj" #: editor/inspector_dock.cpp -#, fuzzy msgid "Make Resource Built-In" -msgstr "Vytvořit vestavěný" +msgstr "Vytvořit vestavěný zdroj" #: editor/inspector_dock.cpp msgid "Go to the previous edited object in history." @@ -4532,9 +4486,8 @@ msgid "History of recently edited objects." msgstr "Historie naposledy upravených objektů." #: editor/inspector_dock.cpp -#, fuzzy msgid "Open documentation for this object." -msgstr "Otevřít dokumentaci" +msgstr "Otevřít dokumentaci k tomuto objektu." #: editor/inspector_dock.cpp editor/scene_tree_dock.cpp msgid "Open Documentation" @@ -4545,9 +4498,8 @@ msgid "Filter properties" msgstr "Filtrovat vlastnosti" #: editor/inspector_dock.cpp -#, fuzzy msgid "Manage object properties." -msgstr "Vlastnosti objektu." +msgstr "Spravovat vlastnosti objektu." #: editor/inspector_dock.cpp msgid "Changes may be lost!" @@ -4791,9 +4743,8 @@ msgid "Blend:" msgstr "Prolínání:" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Parameter Changed:" -msgstr "Parametr změněn" +msgstr "Změněný parametr:" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp @@ -5519,11 +5470,11 @@ msgstr "všichni" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Search templates, projects, and demos" -msgstr "" +msgstr "Vyhledávání šablon, projektů a ukázek" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Search assets (excluding templates, projects, and demos)" -msgstr "" +msgstr "Vyhledávání zdrojů (kromě šablon, projektů a ukázek)" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Import..." @@ -5567,7 +5518,7 @@ msgstr "ZIP soubor asetů" #: editor/plugins/audio_stream_editor_plugin.cpp msgid "Audio Preview Play/Pause" -msgstr "" +msgstr "Náhled zvuku Přehrát/Pozastavit" #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "" @@ -5578,13 +5529,12 @@ msgstr "" "Uložte scénu a zkuste to znovu." #: editor/plugins/baked_lightmap_editor_plugin.cpp -#, fuzzy msgid "" "No meshes to bake. Make sure they contain an UV2 channel and that the 'Use " "In Baked Light' and 'Generate Lightmap' flags are on." msgstr "" -"Žádné sítě k zapečení. Ujistěte se, že obsahují kanál UV2 a že je nastaven " -"příznak \"Zapéct světlo\"." +"Žádné sítě k zapečení. Ujistěte se, že obsahují kanál UV2 a že jsou zapnuté " +"přepínače \"Použít v zapečeném světle\" a \"Generovat světelnou mapu\"." #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "Failed creating lightmap images, make sure path is writable." @@ -5727,15 +5677,13 @@ msgstr "Přemístit CanvasItem \"%s\" na (%d, %d)" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Locked" -msgstr "Uzamčít vybraný" +msgstr "Zamčeno" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Grouped" -msgstr "Skupiny" +msgstr "Seskupené" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -5839,13 +5787,12 @@ msgstr "Upravit kotvy" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "" "Project Camera Override\n" "Overrides the running project's camera with the editor viewport camera." msgstr "" -"Přepsat herní kameru\n" -"Herní kamera se nahradí kamerou z pohledu editoru." +"Přepsání projektové kamery\n" +"Přepíše kameru spuštěného projektu kamerou v pohledu editoru." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5854,6 +5801,9 @@ msgid "" "No project instance running. Run the project from the editor to use this " "feature." msgstr "" +"Přepsání projektové kamery\n" +"Není spuštěna žádná instance projektu. Chcete-li tuto funkci použít, spusťte " +"projekt z editoru." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5921,31 +5871,26 @@ msgstr "Režim výběru" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Drag: Rotate selected node around pivot." -msgstr "Odstranit vybraný uzel nebo přechod." +msgstr "Přetažení: Otáčení vybraného uzlu kolem pivotu." #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Alt+Drag: Move selected node." -msgstr "Alt+Táhnutí: Přemístit" +msgstr "Alt+přetažení: Přesun vybraného uzlu." #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "V: Set selected node's pivot position." -msgstr "Odstranit vybraný uzel nebo přechod." +msgstr "V: Nastavení polohy pivotu vybraného uzlu." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Alt+RMB: Show list of all nodes at position clicked, including locked." msgstr "" -"Zobrazit seznam objektů v bodě kliknutí\n" -"(stejné jako Alt+PTM v režimu výběru)." +"Alt+PTM: Zobrazí seznam všech uzlů na kliknuté pozici, včetně uzamčených." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "RMB: Add node at position clicked." -msgstr "" +msgstr "PTM: Přidání uzlu na pozici, na kterou bylo kliknuto." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -6183,14 +6128,12 @@ msgid "Clear Pose" msgstr "Vymazat pózu" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Add Node Here" -msgstr "Přidat uzel" +msgstr "Přidání uzlu sem" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Instance Scene Here" -msgstr "Scéna/Scény instance" +msgstr "Instance scény sem" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Multiply grid step by 2" @@ -6206,49 +6149,43 @@ msgstr "Přesunout pohled" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Zoom to 3.125%" -msgstr "" +msgstr "Přiblížení na 3,125 %" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Zoom to 6.25%" -msgstr "" +msgstr "Přiblížení na 6,25 %" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Zoom to 12.5%" -msgstr "" +msgstr "Přiblížení na 12,5 %" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 25%" -msgstr "Zmenšit" +msgstr "Přiblížení na 25 %" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 50%" -msgstr "Zmenšit" +msgstr "Přiblížení na 50 %" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 100%" -msgstr "Zmenšit" +msgstr "Přiblížení na 100 %" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 200%" -msgstr "Zmenšit" +msgstr "Přiblížení na 200 %" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 400%" -msgstr "Zmenšit" +msgstr "Přiblížení na 400 %" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 800%" -msgstr "Zmenšit" +msgstr "Přiblížení na 800 %" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Zoom to 1600%" -msgstr "" +msgstr "Přiblížení na 1600 %" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Add %s" @@ -6493,9 +6430,8 @@ msgid "Couldn't create a single convex collision shape." msgstr "Vytvoření jediného konvexního kolizního tvaru se nezdařilo." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Simplified Convex Shape" -msgstr "Vytvořit jediný konvexní tvar" +msgstr "Vytvoření zjednodušeného konvexního tvaru" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Single Convex Shape" @@ -6530,9 +6466,8 @@ msgid "No mesh to debug." msgstr "Žádná mesh pro debugování." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Mesh has no UV in layer %d." -msgstr "Model nemá UV v této vrstvě" +msgstr "Model nemá ve vrstvě %d žádné UV." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "MeshInstance lacks a Mesh!" @@ -6607,6 +6542,9 @@ msgid "" "This is similar to single collision shape, but can result in a simpler " "geometry in some cases, at the cost of accuracy." msgstr "" +"Vytvoří zjednodušený konvexní kolizní tvar.\n" +"Je podobný jednoduchému koliznímu tvaru, ale v některých případech může vést " +"k jednodušší geometrii na úkor přesnosti." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Multiple Convex Collision Siblings" @@ -6652,7 +6590,7 @@ msgstr "Rozbalit UV2 pro Lightmapu/AO" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh" -msgstr "Vytvořit síť obrysu" +msgstr "Vytvoření obrysového modelu" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Outline Size:" @@ -6676,7 +6614,7 @@ msgstr "" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Mesh Library" -msgstr "Knihovna síťí" +msgstr "Knihovna modelů" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Add Item" @@ -6739,7 +6677,7 @@ msgstr "Povrch je neplatný (žádné stěny)." #: editor/plugins/multimesh_editor_plugin.cpp msgid "Select a Source Mesh:" -msgstr "Vyberte zdrojovou síť:" +msgstr "Vyberte zdrojový model:" #: editor/plugins/multimesh_editor_plugin.cpp msgid "Select a Target Surface:" @@ -7272,14 +7210,12 @@ msgid "Flip Portals" msgstr "Převrátit horizontálně" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Room Generate Points" -msgstr "Počet vygenerovaných bodů:" +msgstr "Generovat body místnosti" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Generate Points" -msgstr "Počet vygenerovaných bodů:" +msgstr "Generovat body" #: editor/plugins/room_manager_editor_plugin.cpp #, fuzzy @@ -7894,12 +7830,12 @@ msgstr "Perspektivní" #. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled. #: editor/plugins/spatial_editor_plugin.cpp msgid " [auto]" -msgstr "" +msgstr " [auto]" #. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled. #: editor/plugins/spatial_editor_plugin.cpp msgid " [portals active]" -msgstr "" +msgstr " [aktivní portály]" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Aborted." @@ -7928,20 +7864,17 @@ msgid "None" msgstr "Žádné" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rotate" -msgstr "Režim otáčení" +msgstr "Otočit" #. TRANSLATORS: This refers to the movement that changes the position of an object. #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Translate" -msgstr "Posunout:" +msgstr "Posunout" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Scale" -msgstr "Zvětšení:" +msgstr "Zvětšit" #: editor/plugins/spatial_editor_plugin.cpp msgid "Scaling: " @@ -7964,52 +7897,44 @@ msgid "Animation Key Inserted." msgstr "Animační klíč vložen." #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Pitch:" -msgstr "Stoupání" +msgstr "Stoupání:" #: editor/plugins/spatial_editor_plugin.cpp msgid "Yaw:" -msgstr "" +msgstr "Odklon (Yaw):" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Size:" -msgstr "Velikost: " +msgstr "Velikost:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Objects Drawn:" -msgstr "Objekty vykreslené" +msgstr "Kreslené objekty:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Material Changes:" -msgstr "Změny materiálu" +msgstr "Změny materiálu:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Shader Changes:" -msgstr "Změny shaderu" +msgstr "Změny shaderu:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Surface Changes:" -msgstr "Změny povrchu" +msgstr "Změny povrchu:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Draw Calls:" -msgstr "Vykreslovací volání" +msgstr "Vykreslovací volání:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Vertices:" -msgstr "Vrcholy" +msgstr "Vrcholy:" #: editor/plugins/spatial_editor_plugin.cpp msgid "FPS: %d (%s ms)" -msgstr "" +msgstr "FPS: %d (%s ms)" #: editor/plugins/spatial_editor_plugin.cpp msgid "Top View." @@ -8156,6 +8081,8 @@ msgstr "Rotace pohledu uzamknuta" msgid "" "To zoom further, change the camera's clipping planes (View -> Settings...)" msgstr "" +"Chcete-li přiblížení zvětšit, změňte roviny oříznutí kamery (Zobrazit -> " +"Nastavení...)" #: editor/plugins/spatial_editor_plugin.cpp msgid "" @@ -8172,7 +8099,7 @@ msgstr "Konvertovat na %s" #: editor/plugins/spatial_editor_plugin.cpp msgid "XForm Dialog" -msgstr "XForm Dialog" +msgstr "XForm dialog" #: editor/plugins/spatial_editor_plugin.cpp msgid "" @@ -8313,7 +8240,7 @@ msgstr "4 výřezy" #: editor/plugins/spatial_editor_plugin.cpp msgid "Gizmos" -msgstr "Gizmos" +msgstr "Gizma" #: editor/plugins/spatial_editor_plugin.cpp msgid "View Origin" @@ -8609,7 +8536,7 @@ msgstr "Vytvořit rámečky ze Sprite Sheet" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "SpriteFrames" -msgstr "SpriteFrames" +msgstr "Snímky spritu" #: editor/plugins/texture_region_editor_plugin.cpp msgid "Set Region Rect" @@ -8695,18 +8622,16 @@ msgid "{num} font(s)" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "No fonts found." -msgstr "Nenalezeno!" +msgstr "Nebyla nalezena žádná písma." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} icon(s)" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "No icons found." -msgstr "Nenalezeno!" +msgstr "Nebyly nalezeny žádné ikony." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} stylebox(es)" @@ -8735,9 +8660,8 @@ msgid "Importing items {n}/{n}" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Updating the editor" -msgstr "Ukončit editor?" +msgstr "Aktualizace editoru" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -8754,14 +8678,12 @@ msgid "With Data" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select by data type:" -msgstr "Vybrat uzel" +msgstr "Výběr podle typu dat:" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible color items." -msgstr "Vyberte složku pro skenování" +msgstr "Vybrat všechny viditelné barevné položky." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible color items and their data." @@ -8772,9 +8694,8 @@ msgid "Deselect all visible color items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible constant items." -msgstr "Nejprve vyberte nastavení ze seznamu!" +msgstr "Vybrat všechny viditelné konstantní položky." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible constant items and their data." @@ -8785,9 +8706,8 @@ msgid "Deselect all visible constant items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible font items." -msgstr "Nejprve vyberte nastavení ze seznamu!" +msgstr "Vybrat všechny viditelné položky písma." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible font items and their data." @@ -8798,19 +8718,16 @@ msgid "Deselect all visible font items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible icon items." -msgstr "Nejprve vyberte nastavení ze seznamu!" +msgstr "Vybrat všechny viditelné položky ikon." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible icon items and their data." -msgstr "Nejprve vyberte nastavení ze seznamu!" +msgstr "Vybrat všechny viditelné položky ikon a jejich data." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Deselect all visible icon items." -msgstr "Nejprve vyberte nastavení ze seznamu!" +msgstr "Zrušit výběr všech viditelných položek ikon." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible stylebox items." @@ -8831,19 +8748,16 @@ msgid "" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Collapse types." -msgstr "Sbalit vše" +msgstr "Sbalit typy." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Expand types." -msgstr "Rozbalit vše" +msgstr "Rozbalit typy." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all Theme items." -msgstr "Vybrat soubor šablony" +msgstr "Vybrat všechny položky motivu." #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -8997,9 +8911,8 @@ msgid "Add Type:" msgstr "Typ:" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Item:" -msgstr "Přidat položku" +msgstr "Přidat položku:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9007,9 +8920,8 @@ msgid "Add StyleBox Item" msgstr "Přidat všechny položky" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Items:" -msgstr "Odstranit položku" +msgstr "Odstranit položky:" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove Class Items" @@ -9050,9 +8962,8 @@ msgid "Editor Theme" msgstr "Editovat téma" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select Another Theme Resource:" -msgstr "Smazat zdroj" +msgstr "Vybrerte jiný zdroj motivu:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9095,9 +9006,8 @@ msgid "Add Item Type" msgstr "Přidat položku" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Node Types:" -msgstr "Typ uzlu" +msgstr "Typy uzlu:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9118,9 +9028,8 @@ msgid "Override all default type items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Theme:" -msgstr "Téma" +msgstr "Motiv:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9142,9 +9051,8 @@ msgid "Default Preview" msgstr "Obnovit náhled" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select UI Scene:" -msgstr "Vyberte zdrojovou síť:" +msgstr "Vyberte scénu uživatelského rozhraní:" #: editor/plugins/theme_editor_preview.cpp msgid "" @@ -9421,7 +9329,7 @@ msgstr "Bitmaska" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Priority" -msgstr "Priority" +msgstr "Priorita" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Icon" @@ -9796,7 +9704,7 @@ msgstr "Boolean" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Sampler" -msgstr "Sampler" +msgstr "Vzorkovač" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Add input port" @@ -10642,12 +10550,11 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "VisualShader" -msgstr "VisualShader" +msgstr "Vizuální shader" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Edit Visual Property:" -msgstr "Upravit vizuální vlastnost" +msgstr "Upravit vizuální vlastnost:" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Visual Shader Mode Changed" @@ -10959,7 +10866,7 @@ msgstr "Instalační cesta k projektu:" #: editor/project_manager.cpp msgid "Renderer:" -msgstr "Renderer:" +msgstr "Vykreslovač:" #: editor/project_manager.cpp msgid "OpenGL ES 3.0" @@ -11092,14 +10999,12 @@ msgid "Are you sure to run %d projects at once?" msgstr "Jste si jisti, že chcete spustit %d projektů najednou?" #: editor/project_manager.cpp -#, fuzzy msgid "Remove %d projects from the list?" -msgstr "Vyberte zařízení ze seznamu" +msgstr "Odstranit %d projektů ze seznamu?" #: editor/project_manager.cpp -#, fuzzy msgid "Remove this project from the list?" -msgstr "Vyberte zařízení ze seznamu" +msgstr "Odstranit tento projekt ze seznamu?" #: editor/project_manager.cpp msgid "" @@ -11235,14 +11140,14 @@ msgstr "" "jeden znak \"/\"." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Klávesa " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Klávesa " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Tlačítko gamepadu" @@ -12747,7 +12652,7 @@ msgstr "GridMap Vyplnit výběr" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" -msgstr "Grid Map" +msgstr "Mřížková mapa" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Snap View" @@ -12880,7 +12785,7 @@ msgstr "Zapéct NavMesh" #: modules/recast/navigation_mesh_editor_plugin.cpp msgid "Clear the navigation mesh." -msgstr "Vymazat navigační síť." +msgstr "Vymazat navigační model." #: modules/recast/navigation_mesh_generator.cpp msgid "Setting up Configuration..." @@ -13382,14 +13287,12 @@ msgid "Running on %s" msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Exporting APK..." -msgstr "Exportování všeho" +msgstr "Exportování APK..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Uninstalling..." -msgstr "Odinstalovat" +msgstr "Odinstalování..." #: platform/android/export/export_plugin.cpp #, fuzzy @@ -13397,9 +13300,8 @@ msgid "Installing to device, please wait..." msgstr "Načítání, prosím čekejte..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not install to device: %s" -msgstr "Nelze spustit podproces!" +msgstr "Nepodařilo se nainstalovat do zařízení: %s" #: platform/android/export/export_plugin.cpp #, fuzzy @@ -13521,16 +13423,12 @@ msgid "Signing debug %s..." msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Signing release %s..." -msgstr "" -"Skenování souborů,\n" -"Prosím, čekejte..." +msgstr "Podepisování vydání %s..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not find keystore, unable to export." -msgstr "Nelze otevřít šablonu pro export:" +msgstr "Nepodařilo se najít úložiště klíčů, nelze exportovat." #: platform/android/export/export_plugin.cpp msgid "'apksigner' returned with error #%d" @@ -13591,14 +13489,12 @@ msgid "" msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not export project files to gradle project\n" -msgstr "Nelze upravit project.godot v umístění projektu." +msgstr "Nelze exportovat soubory projektu do projektu gradle\n" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not write expansion package file!" -msgstr "Nelze zapsat soubor:" +msgstr "Nelze zapsat soubor rozšiřujícího balíčku!" #: platform/android/export/export_plugin.cpp msgid "Building Android Project (gradle)" @@ -13635,11 +13531,12 @@ msgid "Creating APK..." msgstr "Vytvářím kontury..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "" "Could not find template APK to export:\n" "%s" -msgstr "Nelze otevřít šablonu pro export:" +msgstr "" +"Nepodařilo se najít šablonu APK pro export:\n" +"%s" #: platform/android/export/export_plugin.cpp msgid "" @@ -13655,9 +13552,8 @@ msgid "Adding files..." msgstr "Přidávám %s..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not export project files" -msgstr "Nelze zapsat soubor:" +msgstr "Nelze exportovat soubory projektu" #: platform/android/export/export_plugin.cpp msgid "Aligning APK..." @@ -13722,14 +13618,12 @@ msgid "Could not read HTML shell:" msgstr "Nebylo možné přečíst HTML shell:" #: platform/javascript/export/export.cpp -#, fuzzy msgid "Could not create HTTP server directory:" -msgstr "Nelze vytvořit složku." +msgstr "Nepodařilo se vytvořit adresář serveru HTTP:" #: platform/javascript/export/export.cpp -#, fuzzy msgid "Error starting HTTP server:" -msgstr "Chyba při ukládání scény." +msgstr "Chyba při spuštění serveru HTTP:" #: platform/osx/export/export.cpp #, fuzzy @@ -14361,7 +14255,7 @@ msgstr "" #: scene/3d/soft_body.cpp msgid "This body will be ignored until you set a mesh." -msgstr "Toto tělo bude ignorováno dokud nenastavíte síť." +msgstr "Toto těleso bude ignorováno, dokud nenastavíte model." #: scene/3d/soft_body.cpp msgid "" @@ -14475,7 +14369,7 @@ msgstr "HSV" #: scene/gui/color_picker.cpp msgid "Raw" -msgstr "Raw" +msgstr "Surový" #: scene/gui/color_picker.cpp msgid "Switch between hexadecimal and code values." diff --git a/editor/translations/da.po b/editor/translations/da.po index af1038552e..fcef08f4e1 100644 --- a/editor/translations/da.po +++ b/editor/translations/da.po @@ -23,7 +23,7 @@ msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-04-26 22:31+0000\n" +"PO-Revision-Date: 2021-10-31 22:17+0000\n" "Last-Translator: Kim Nielsen <kimmowich@stofanet.dk>\n" "Language-Team: Danish <https://hosted.weblate.org/projects/godot-engine/" "godot/da/>\n" @@ -32,7 +32,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.7-dev\n" +"X-Generator: Weblate 4.9-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -5291,7 +5291,7 @@ msgstr "Slut" #: editor/plugins/animation_state_machine_editor.cpp msgid "Immediate" -msgstr "Umiddelbart" +msgstr "Umiddelbar" #: editor/plugins/animation_state_machine_editor.cpp msgid "Sync" @@ -5332,8 +5332,8 @@ msgid "" "Shift+LMB to create connections." msgstr "" "Vælg og flyt nodes.\n" -"RMB for at tilføje ny nodes.\n" -"Shift+LMB for at oprette forbindelse." +"RMB for at tilføje nye nodes.\n" +"Shift+LMB for at oprette forbindelser." #: editor/plugins/animation_state_machine_editor.cpp msgid "Create new nodes." @@ -5367,7 +5367,7 @@ msgstr "Afspil Mode:" #: editor/plugins/animation_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "AnimationTree" -msgstr "Animation Tree" +msgstr "Animation Træ" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "New name:" @@ -5380,11 +5380,11 @@ msgstr "Skalér:" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Fade In (s):" -msgstr "" +msgstr "Fade ind (s):" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Fade Out (s):" -msgstr "" +msgstr "Fade Ud (s):" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Blend" @@ -5409,7 +5409,7 @@ msgstr "" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Start!" -msgstr "" +msgstr "Start!" #: editor/plugins/animation_tree_player_editor_plugin.cpp #: editor/plugins/multimesh_editor_plugin.cpp @@ -5442,11 +5442,11 @@ msgstr "Tilføj Input" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Clear Auto-Advance" -msgstr "" +msgstr "Ryd Automatisk Fremrykning" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Set Auto-Advance" -msgstr "" +msgstr "Sæt Automatisk Fremrykning" #: editor/plugins/animation_tree_player_editor_plugin.cpp #, fuzzy @@ -5463,7 +5463,7 @@ msgstr "Animationstræ er ugyldigt." #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Animation Node" -msgstr "" +msgstr "Animations Node" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "OneShot Node" @@ -5487,15 +5487,15 @@ msgstr "" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "TimeScale Node" -msgstr "" +msgstr "Tidsskala Node" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "TimeSeek Node" -msgstr "" +msgstr "Tidssøgning Node" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Transition Node" -msgstr "" +msgstr "Overgangs Node" #: editor/plugins/animation_tree_player_editor_plugin.cpp #, fuzzy @@ -5525,52 +5525,49 @@ msgid "Download" msgstr "Download" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Connection error, please try again." msgstr "Forbindelsesfejl, prøv venligst igen." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Can't connect." -msgstr "Ingen forbindelse." +msgstr "Kan ikke oprette forbindelse." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Can't connect to host:" -msgstr "Kan ikke forbinde til host:" +msgstr "Kan ikke forbinde til værten:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "No response from host:" -msgstr "Ingen respons fra host:" +msgstr "Intet svar fra værten:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "No response." -msgstr "Ingen reaktion." +msgstr "Intet svar." #: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy msgid "Can't resolve hostname:" -msgstr "" +msgstr "Kan ikke løse værtsnavnet:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Can't resolve." msgstr "Kan ikke løses." #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Request failed, return code:" msgstr "Forespørgsel mislykkedes, returkode:" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Cannot save response to:" -msgstr "Kan ikke gemme respons i:" +msgstr "Kan ikke gemme svar til:" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Write error." msgstr "Skrivefejl." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Request failed, too many redirects" -msgstr "" +msgstr "Anmodningen mislykkedes, for mange omdirigeringer" #: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy @@ -5578,12 +5575,10 @@ msgid "Redirect loop." msgstr "Omdiriger Løkke." #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Request failed, timeout" msgstr "Forespørgsel mislykkedes, tiden udløb." #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Timeout." msgstr "Tiden udløb." @@ -5593,23 +5588,24 @@ msgstr "Fejlet:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Bad download hash, assuming file has been tampered with." -msgstr "" +msgstr "Dårligt download-hash, formoder at filen er blevet manipuleret." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Expected:" -msgstr "" +msgstr "Forventet:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Got:" -msgstr "" +msgstr "Fik:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Failed SHA-256 hash check" -msgstr "" +msgstr "Mislykkedes SHA-256 hash-tjek" #: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy msgid "Asset Download Error:" -msgstr "" +msgstr "Asset Download Fejl:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Downloading (%s / %s)..." @@ -5620,8 +5616,9 @@ msgid "Downloading..." msgstr "Downloader..." #: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy msgid "Resolving..." -msgstr "" +msgstr "Løser..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Error making request" @@ -5632,9 +5629,8 @@ msgid "Idle" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Install..." -msgstr "Installér..." +msgstr "Installere.." #: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy @@ -5643,19 +5639,20 @@ msgstr "Prøv igen" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Download Error" -msgstr "" +msgstr "Fejl i Download" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Download for this asset is already in progress!" -msgstr "" +msgstr "Download for dette asset er allerede i gang!" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Recently Updated" -msgstr "" +msgstr "Nyligt Opdateret" #: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy msgid "Least Recently Updated" -msgstr "" +msgstr "Seneste Nyligt Opdateret" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Name (A-Z)" @@ -5678,9 +5675,8 @@ msgid "First" msgstr "Første" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Previous" -msgstr "Forrige fane" +msgstr "Forrige" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Next" @@ -5696,11 +5692,12 @@ msgstr "Alle" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Search templates, projects, and demos" -msgstr "" +msgstr "Søg skabeloner, projekter og demoer" #: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy msgid "Search assets (excluding templates, projects, and demos)" -msgstr "" +msgstr "Søge assets (undtagen skabeloner, projekter og demoer)" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Import..." @@ -5743,14 +5740,18 @@ msgid "Assets ZIP File" msgstr "Assets zipfil" #: editor/plugins/audio_stream_editor_plugin.cpp +#, fuzzy msgid "Audio Preview Play/Pause" -msgstr "" +msgstr "Lyd forhåndsvisning Afspil/pause" #: editor/plugins/baked_lightmap_editor_plugin.cpp +#, fuzzy msgid "" "Can't determine a save path for lightmap images.\n" "Save your scene and try again." msgstr "" +"Kan ikke finde et sted at gemme lightmap images.\n" +"Gem din scene, og prøv igen." #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "" @@ -11420,11 +11421,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/de.po b/editor/translations/de.po index 9f6f7ee0bf..ecc7ec9611 100644 --- a/editor/translations/de.po +++ b/editor/translations/de.po @@ -73,13 +73,14 @@ # jmih03 <joerni@mail.de>, 2021. # Dominik Moos <dominik.moos@protonmail.com>, 2021. # Zae Chao <zaevi@live.com>, 2021. +# Tim <tim14speckenwirth@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-10-23 10:13+0000\n" -"Last-Translator: Zae Chao <zaevi@live.com>\n" +"PO-Revision-Date: 2021-10-31 22:17+0000\n" +"Last-Translator: Tim <tim14speckenwirth@gmail.com>\n" "Language-Team: German <https://hosted.weblate.org/projects/godot-engine/" "godot/de/>\n" "Language: de\n" @@ -11218,14 +11219,14 @@ msgstr "" "der Suchanfrage vorhanden sein." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Taste " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "Physische Taste" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Taste " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Joysticktaste" @@ -14383,7 +14384,7 @@ msgid "" "Please check the RoomList branch has been assigned in the RoomManager." msgstr "" "RoomList-Pfad ist ungültig.\n" -"Wurde der RoomList-Zweig im RoomManager zugewiesen?" +"Bitte überprüfen Sie, ob der RoomList-Zweig im RoomManager zugewiesen wurde." #: scene/3d/room_manager.cpp msgid "RoomList contains no Rooms, aborting." @@ -14420,8 +14421,9 @@ msgid "" "Error calculating room bounds.\n" "Ensure all rooms contain geometry or manual bounds." msgstr "" -"Fehler beim Berechnen der Raumbegrenzungen.\n" -"Enthalten alle Räume Geometrie oder manuelle Begrenzungen?" +"Fehler bei der Berechnung von Raumbegrenzungen.\n" +"Stellen Sie sicher, dass alle Räume Geometrie oder manuelle Begrenzungen " +"enthalten." #: scene/3d/soft_body.cpp msgid "This body will be ignored until you set a mesh." diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot index 60507c472d..778947373b 100644 --- a/editor/translations/editor.pot +++ b/editor/translations/editor.pot @@ -10587,11 +10587,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/el.po b/editor/translations/el.po index d8d6251838..07e55d9a90 100644 --- a/editor/translations/el.po +++ b/editor/translations/el.po @@ -11340,14 +11340,14 @@ msgstr "" "περιέχει τουλάχιστον έναν χαρακτήρα `/`." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Κλειδί " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Κλειδί " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Κουμπί Joystick" diff --git a/editor/translations/eo.po b/editor/translations/eo.po index c0aa10e89f..9ccaacaa39 100644 --- a/editor/translations/eo.po +++ b/editor/translations/eo.po @@ -11061,14 +11061,14 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Klavo " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Klavo " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Butono de stirstango" diff --git a/editor/translations/es.po b/editor/translations/es.po index bc314e8294..b1b3ba6b69 100644 --- a/editor/translations/es.po +++ b/editor/translations/es.po @@ -70,13 +70,14 @@ # Erick Figueroa <querecuto@hotmail.com>, 2021. # jonagamerpro1234 ss <js398704@gmail.com>, 2021. # davidrogel <david.rogel.pernas@icloud.com>, 2021. +# Anderson Guzman Abreu <chicobello1111@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-10-23 10:13+0000\n" -"Last-Translator: Lisandro Lorea <lisandrolorea@gmail.com>\n" +"PO-Revision-Date: 2021-10-31 22:17+0000\n" +"Last-Translator: Anderson Guzman Abreu <chicobello1111@gmail.com>\n" "Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/" "godot/es/>\n" "Language: es\n" @@ -2233,7 +2234,7 @@ msgstr "Buscar en la Ayuda" #: editor/editor_help_search.cpp msgid "Case Sensitive" -msgstr "Respetar Mayus./Minus." +msgstr "Respeta Mayus./Minus." #: editor/editor_help_search.cpp msgid "Show Hierarchy" @@ -11212,14 +11213,14 @@ msgstr "" "al menos un carácter `/`." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Tecla " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "Tecla Física" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Tecla " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Botón del Mando" diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po index dbff18af4e..1276ebe607 100644 --- a/editor/translations/es_AR.po +++ b/editor/translations/es_AR.po @@ -11148,14 +11148,14 @@ msgstr "" "al menos un carácter `/`." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Tecla " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "Tecla Física" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Tecla " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Bottón de Joystick" diff --git a/editor/translations/et.po b/editor/translations/et.po index ccc2681d0f..bc58f54d39 100644 --- a/editor/translations/et.po +++ b/editor/translations/et.po @@ -10768,11 +10768,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/eu.po b/editor/translations/eu.po index 9a2948582e..54b7590858 100644 --- a/editor/translations/eu.po +++ b/editor/translations/eu.po @@ -10726,11 +10726,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/fa.po b/editor/translations/fa.po index e61aa0a6c7..cc894bba12 100644 --- a/editor/translations/fa.po +++ b/editor/translations/fa.po @@ -11249,11 +11249,11 @@ msgstr "" "`کاراکتر باشد." #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/fi.po b/editor/translations/fi.po index a7dca1dd0d..830a83ccd8 100644 --- a/editor/translations/fi.po +++ b/editor/translations/fi.po @@ -17,7 +17,7 @@ msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-10-18 15:35+0000\n" +"PO-Revision-Date: 2021-10-28 22:09+0000\n" "Last-Translator: Tapani Niemi <tapani.niemi@kapsi.fi>\n" "Language-Team: Finnish <https://hosted.weblate.org/projects/godot-engine/" "godot/fi/>\n" @@ -1302,7 +1302,7 @@ msgstr "Assettien asentaja" #: editor/editor_audio_buses.cpp msgid "Speakers" -msgstr "Kaiuttimiet" +msgstr "Kaiuttimet" #: editor/editor_audio_buses.cpp msgid "Add Effect" @@ -2210,7 +2210,7 @@ msgstr "Signaali" #: editor/editor_help_search.cpp msgid "Constant" -msgstr "Muuttumaton" +msgstr "Vakio" #: editor/editor_help_search.cpp msgid "Property" @@ -5027,7 +5027,7 @@ msgstr "Pakota valkoisen modulaatio" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Include Gizmos (3D)" -msgstr "Näytä 3D-muokkaimet" +msgstr "Näytä 3D-vempaimet" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Pin AnimationPlayer" @@ -7997,7 +7997,7 @@ msgstr "Näytä ympäristö" #: editor/plugins/spatial_editor_plugin.cpp msgid "View Gizmos" -msgstr "Näytä muokkaimet" +msgstr "Näytä vempaimet" #: editor/plugins/spatial_editor_plugin.cpp msgid "View Information" @@ -8100,9 +8100,9 @@ msgid "" msgstr "" "Napsauta vaihtaaksesi näkyvyystilojen välillä.\n" "\n" -"Avoin silmä: muokkain on näkyvissä.\n" -"Suljettu silmä: muokkain on piilotettu.\n" -"Puoliavoin silmä: muokkain on näkyvissä myös läpikuultamattomien pintojen " +"Avoin silmä: vempain on näkyvissä.\n" +"Suljettu silmä: vempain on piilotettu.\n" +"Puoliavoin silmä: vempain on näkyvissä myös läpikuultamattomien pintojen " "läpi (\"röntgen\")." #: editor/plugins/spatial_editor_plugin.cpp @@ -8228,7 +8228,7 @@ msgstr "4 Näyttöruutua" #: editor/plugins/spatial_editor_plugin.cpp msgid "Gizmos" -msgstr "Muokkaimet" +msgstr "Vempaimet" #: editor/plugins/spatial_editor_plugin.cpp msgid "View Origin" @@ -8313,7 +8313,7 @@ msgstr "Jälki" #: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" -msgstr "Nimetön muokkain" +msgstr "Nimetön vempain" #: editor/plugins/sprite_editor_plugin.cpp msgid "Create Mesh2D" @@ -8481,7 +8481,7 @@ msgstr "Lisää tekstuuri tiedostosta" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Add Frames from a Sprite Sheet" -msgstr "Lisää ruudut Sprite Sheetistä" +msgstr "Lisää ruudut sprite-arkista" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Insert Empty (Before)" @@ -8517,7 +8517,7 @@ msgstr "Valitse tai tyhjää kaikki ruudut" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Create Frames from Sprite Sheet" -msgstr "Luo ruudut Sprite Sheetistä" +msgstr "Luo ruudut sprite-arkista" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "SpriteFrames" @@ -11083,14 +11083,14 @@ msgstr "" "mukana vähintään yksi `/` merkki." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Näppäin " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "Fyysinen avain" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Näppäin " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Ohjaimen painike" diff --git a/editor/translations/fil.po b/editor/translations/fil.po index 44176ea6bc..6452afd85e 100644 --- a/editor/translations/fil.po +++ b/editor/translations/fil.po @@ -10636,11 +10636,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/fr.po b/editor/translations/fr.po index 872b22322e..5661d9bb62 100644 --- a/editor/translations/fr.po +++ b/editor/translations/fr.po @@ -11266,14 +11266,14 @@ msgstr "" "recherche doit inclure au moins un caractère `/`." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Touche " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "Touche physique" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Touche " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Bouton de joystick" diff --git a/editor/translations/ga.po b/editor/translations/ga.po index de8d178967..25b6ffc4eb 100644 --- a/editor/translations/ga.po +++ b/editor/translations/ga.po @@ -10617,11 +10617,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/gl.po b/editor/translations/gl.po index ff6fc36818..7d310fe7f9 100644 --- a/editor/translations/gl.po +++ b/editor/translations/gl.po @@ -11089,14 +11089,14 @@ msgstr "" "polo menos un carácter '/'." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Botón: " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Botón: " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Botón Joystick" diff --git a/editor/translations/he.po b/editor/translations/he.po index 9e41b7f9c4..094b9c7850 100644 --- a/editor/translations/he.po +++ b/editor/translations/he.po @@ -11249,14 +11249,14 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "מקש " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "מקש " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "" diff --git a/editor/translations/hi.po b/editor/translations/hi.po index 585fb5e33c..637ce36b91 100644 --- a/editor/translations/hi.po +++ b/editor/translations/hi.po @@ -14,13 +14,14 @@ # Bishwajeet Parhi <bishwajeet.techmaster@gmail.com>, 2020. # l4KKY <greenforcesave@gmail.com>, 2020. # harvinder rathor <harvinderr09@gmail.com>, 2021. +# Sumanyu Aggarwal <sumanyu.code@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-05-03 21:29+0000\n" -"Last-Translator: harvinder rathor <harvinderr09@gmail.com>\n" +"PO-Revision-Date: 2021-10-28 22:09+0000\n" +"Last-Translator: Sumanyu Aggarwal <sumanyu.code@gmail.com>\n" "Language-Team: Hindi <https://hosted.weblate.org/projects/godot-engine/godot/" "hi/>\n" "Language: hi\n" @@ -28,7 +29,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.7-dev\n" +"X-Generator: Weblate 4.9-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -383,7 +384,7 @@ msgstr "" #: editor/animation_track_editor.cpp #, fuzzy msgid "animation" -msgstr "कार्यों:" +msgstr "एनिमेशन" #: editor/animation_track_editor.cpp msgid "AnimationPlayer can't animate itself, only other players." @@ -3677,14 +3678,12 @@ msgid "Can't resolve the requested address." msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Can't connect to the mirror." -msgstr "कनेक्ट नहीं कर सकते।" +msgstr "शीशे से जोड़ नहीं सकते|" #: editor/export_template_manager.cpp -#, fuzzy msgid "No response from the mirror." -msgstr "कोई जवाब नहीं।" +msgstr "शीशे से कोई जवाब नहीं।" #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -10996,11 +10995,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/hr.po b/editor/translations/hr.po index a61ff60a0e..bc30be7c08 100644 --- a/editor/translations/hr.po +++ b/editor/translations/hr.po @@ -10692,11 +10692,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/hu.po b/editor/translations/hu.po index 3ceb60fa99..fbce7de381 100644 --- a/editor/translations/hu.po +++ b/editor/translations/hu.po @@ -17,13 +17,14 @@ # Újvári Marcell <mmarci72@gmail.com>, 2021. # Gergő Pistai <gergopistai@gmail.com>, 2021. # Misi <varady.misi@gmail.com>, 2021. +# Looky1173 <lgl1173and2006@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-10-09 16:52+0000\n" -"Last-Translator: Misi <varady.misi@gmail.com>\n" +"PO-Revision-Date: 2021-10-31 22:17+0000\n" +"Last-Translator: Looky1173 <lgl1173and2006@gmail.com>\n" "Language-Team: Hungarian <https://hosted.weblate.org/projects/godot-engine/" "godot/hu/>\n" "Language: hu\n" @@ -490,7 +491,7 @@ msgstr "Animáció - Kulcsok Mozgatása" #: editor/animation_track_editor.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Clipboard is empty!" -msgstr "" +msgstr "A vágólap üres!" #: editor/animation_track_editor.cpp msgid "Paste Tracks" @@ -1173,7 +1174,7 @@ msgstr "Köszönet a Godot közösségétől!" #: editor/editor_about.cpp editor/editor_node.cpp editor/project_manager.cpp msgid "Click to copy." -msgstr "" +msgstr "Kattints a másoláshoz." #: editor/editor_about.cpp msgid "Godot Engine contributors" @@ -1558,6 +1559,8 @@ msgstr "A fájl nem létezik." #: editor/editor_autoload_settings.cpp msgid "%s is an invalid path. Not in resource path (res://)." msgstr "" +"%s egy érvénytelen elérési útvonal. Nincs az erőforrás elérési útvonalában " +"(res://)." #: editor/editor_autoload_settings.cpp msgid "Add AutoLoad" @@ -1756,8 +1759,9 @@ msgid "Import Dock" msgstr "Dock importálása" #: editor/editor_feature_profile.cpp +#, fuzzy msgid "Allows to view and edit 3D scenes." -msgstr "" +msgstr "Lehetővé teszi a 3D jelenetek megtekintését és szerkesztését." #: editor/editor_feature_profile.cpp msgid "Allows to edit scripts using the integrated script editor." @@ -11019,14 +11023,14 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Kulcs " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Kulcs " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Joy gomb" diff --git a/editor/translations/id.po b/editor/translations/id.po index b45942a7c4..784409cddb 100644 --- a/editor/translations/id.po +++ b/editor/translations/id.po @@ -11169,14 +11169,14 @@ msgstr "" "mengandung paling tidak satu karakter `/`." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Kunci " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Kunci " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Tombol Joystick" diff --git a/editor/translations/is.po b/editor/translations/is.po index 0d4f9a00f5..4c9221925a 100644 --- a/editor/translations/is.po +++ b/editor/translations/is.po @@ -10757,11 +10757,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/it.po b/editor/translations/it.po index 8ec6f16734..5dfecbf0e8 100644 --- a/editor/translations/it.po +++ b/editor/translations/it.po @@ -66,8 +66,8 @@ msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-10-11 15:44+0000\n" -"Last-Translator: Luigi <luibass92@live.it>\n" +"PO-Revision-Date: 2021-10-24 20:52+0000\n" +"Last-Translator: Riteo Siuga <riteo@posteo.net>\n" "Language-Team: Italian <https://hosted.weblate.org/projects/godot-engine/" "godot/it/>\n" "Language: it\n" @@ -1948,7 +1948,7 @@ msgstr "Rendi attuale" #: editor/editor_feature_profile.cpp editor/editor_node.cpp #: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp msgid "Import" -msgstr "Importazione" +msgstr "Importa" #: editor/editor_feature_profile.cpp editor/project_export.cpp msgid "Export" @@ -11471,14 +11471,14 @@ msgstr "" "contenere almeno un carattere `/`." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Tasto " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Tasto " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Pulsante Joy" diff --git a/editor/translations/ja.po b/editor/translations/ja.po index 4a2075e20b..0f9ea94f57 100644 --- a/editor/translations/ja.po +++ b/editor/translations/ja.po @@ -11092,14 +11092,14 @@ msgstr "" "とも1つ必要です。" #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "キー " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "物理キー" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "キー " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "ゲームパッドのボタン" diff --git a/editor/translations/ka.po b/editor/translations/ka.po index 548e016719..1ce6deba73 100644 --- a/editor/translations/ka.po +++ b/editor/translations/ka.po @@ -11004,11 +11004,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/km.po b/editor/translations/km.po index 860accd0c5..e54ab26b7b 100644 --- a/editor/translations/km.po +++ b/editor/translations/km.po @@ -10596,11 +10596,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/ko.po b/editor/translations/ko.po index b9faa4762e..649e623c63 100644 --- a/editor/translations/ko.po +++ b/editor/translations/ko.po @@ -25,13 +25,15 @@ # Postive_ Cloud <postive12@gmail.com>, 2021. # dewcked <dewcked@protonmail.ch>, 2021. # SteamB23 <steamb23@outlook.com>, 2021. +# Jaemin Park <ppparkje@naver.com>, 2021. +# 신동규 <rlsl0422@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-10-07 10:25+0000\n" -"Last-Translator: SteamB23 <steamb23@outlook.com>\n" +"PO-Revision-Date: 2021-11-03 13:15+0000\n" +"Last-Translator: Myeongjin Lee <aranet100@gmail.com>\n" "Language-Team: Korean <https://hosted.weblate.org/projects/godot-engine/" "godot/ko/>\n" "Language: ko\n" @@ -522,18 +524,18 @@ msgid "" "Alternatively, use an import preset that imports animations to separate " "files." msgstr "" -"이 애니메이션은 불러온 씬에 속해 있습니다. 불러온 트랙의 변경사항은 저장되지 " +"이 애니메이션은 가져온 씬에 속해 있습니다. 가져온 트랙의 변경사항은 저장되지 " "않습니다.\n" "\n" -"저장 기능을 활성화하려면 커스텀 트랙을 추가하고, 씬의 불러오기기 설정으로 가" +"저장 기능을 활성화하려면 커스텀 트랙을 추가하고, 씬의 가져오기 설정으로 가" "서\n" "\"Animation > Storage\" 설정을 \"Files\"로, \"Animation > Keep Custom Tracks" "\" 설정을 활성화한 뒤, 다시 가져오십시오.\n" -"아니면 불러오기 프리셋으로 애니메이션을 별도의 파일로 불러올 수도 있습니다." +"아니면 가져오기 프리셋으로 애니메이션을 별도의 파일로 가져올 수도 있습니다." #: editor/animation_track_editor.cpp msgid "Warning: Editing imported animation" -msgstr "경고: 불러온 애니메이션을 편집하고 있음" +msgstr "경고: 가져온 애니메이션을 편집하고 있음" #: editor/animation_track_editor.cpp msgid "Select an AnimationPlayer node to create and edit animations." @@ -1740,7 +1742,7 @@ msgstr "파일시스템 독" #: editor/editor_feature_profile.cpp msgid "Import Dock" -msgstr "독 불러오기" +msgstr "독 가져오기" #: editor/editor_feature_profile.cpp msgid "Allows to view and edit 3D scenes." @@ -1773,7 +1775,7 @@ msgid "" "Allows to configure import settings for individual assets. Requires the " "FileSystem dock to function." msgstr "" -"개별 애셋에 대한 불러오기 설정을 구성할 수 있게 합니다. 작동하려면 파일시스" +"개별 애셋에 대한 가져오기 설정을 구성할 수 있게 합니다. 작동하려면 파일시스" "템 독이 필요합니다." #: editor/editor_feature_profile.cpp @@ -1830,15 +1832,15 @@ msgstr "노드와 클래스:" #: editor/editor_feature_profile.cpp msgid "File '%s' format is invalid, import aborted." -msgstr "파일 '%s' 형식이 올바르지 않습니다. 불러오기를 중단합니다." +msgstr "파일 '%s' 형식이 올바르지 않습니다. 가져오기를 중단합니다." #: editor/editor_feature_profile.cpp msgid "" "Profile '%s' already exists. Remove it first before importing, import " "aborted." msgstr "" -"프로필 '%s'이(가) 이미 있습니다. 불러오기 전에 이미 있는 프로필을 먼저 제거하" -"세요. 불러오기를 중단합니다." +"프로필 '%s'이(가) 이미 있습니다. 가져오기 전에 이미 있는 프로필을 먼저 제거하" +"세요. 가져오기를 중단합니다." #: editor/editor_feature_profile.cpp msgid "Error saving profile to path: '%s'." @@ -1871,7 +1873,7 @@ msgstr "현재 프로필로 설정" #: editor/editor_feature_profile.cpp editor/editor_node.cpp #: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp msgid "Import" -msgstr "불러오기" +msgstr "가져오기" #: editor/editor_feature_profile.cpp editor/project_export.cpp msgid "Export" @@ -1887,7 +1889,7 @@ msgstr "별도의 옵션:" #: editor/editor_feature_profile.cpp msgid "Create or import a profile to edit available classes and properties." -msgstr "사용 가능한 클래스와 속성을 편집하려면 프로필을 만들거나 불러오세요." +msgstr "사용 가능한 클래스와 속성을 편집하려면 프로필을 만들거나 가져오세요." #: editor/editor_feature_profile.cpp msgid "New profile name:" @@ -1899,7 +1901,7 @@ msgstr "Godot 기능 프로필" #: editor/editor_feature_profile.cpp msgid "Import Profile(s)" -msgstr "프로필 불러오기" +msgstr "프로필 가져오기" #: editor/editor_feature_profile.cpp msgid "Export Profile" @@ -2074,7 +2076,7 @@ msgstr "" #: editor/editor_file_system.cpp msgid "(Re)Importing Assets" -msgstr "애셋 (다시) 불러오기" +msgstr "애셋 (다시) 가져오는 중" #: editor/editor_help.cpp msgid "Top" @@ -2323,7 +2325,7 @@ msgstr "에디터 창에 변화가 있을 때마다 회전합니다." #: editor/editor_node.cpp msgid "Imported resources can't be saved." -msgstr "불러온 리소스를 저장할 수 없습니다." +msgstr "가져온 리소스를 저장할 수 없습니다." #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: editor/plugins/theme_editor_plugin.cpp @@ -2412,9 +2414,8 @@ msgstr "" "는 것 같습니다." #: editor/editor_node.cpp -#, fuzzy msgid "Could not save one or more scenes!" -msgstr "변환된 텍스쳐를 저장할 수 없음:" +msgstr "하나 이상의 장면을 저장할수 없습니다!" #: editor/editor_node.cpp msgid "Save All Scenes" @@ -2472,8 +2473,8 @@ msgid "" "Please read the documentation relevant to importing scenes to better " "understand this workflow." msgstr "" -"이 리소스는 불러온 씬에 속한 리소스이므로 편집할 수 없습니다.\n" -"이 워크플로를 이해하려면 씬 불러오기(Importing Scenes)와 관련된 문서를 읽어주" +"이 리소스는 가져온 씬에 속한 리소스이므로 편집할 수 없습니다.\n" +"이 워크플로를 이해하려면 씬 가져오기(Importing Scenes)와 관련된 문서를 읽어주" "세요." #: editor/editor_node.cpp @@ -2489,8 +2490,8 @@ msgid "" "This resource was imported, so it's not editable. Change its settings in the " "import panel and then re-import." msgstr "" -"이 리소스는 불러온 것이므로 편집할 수 없습니다. 불러오기 패널에서 설정을 변경" -"한 뒤 다시 불러오세요." +"이 리소스는 가져온 것이므로 편집할 수 없습니다. 가져오기 패널에서 설정을 변경" +"한 뒤 다시 가져오세요." #: editor/editor_node.cpp msgid "" @@ -2499,9 +2500,9 @@ msgid "" "Please read the documentation relevant to importing scenes to better " "understand this workflow." msgstr "" -"이 씬은 불러온 것이므로 변경사항이 유지되지 않습니다.\n" +"이 씬은 가져온 것이므로 변경사항이 유지되지 않습니다.\n" "이 씬을 인스턴스화하거나 상속하면 편집할 수 있습니다.\n" -"이 워크플로를 이해하려면 씬 불러오기(Importing Scenes)와 관련된 문서를 읽어주" +"이 워크플로를 이해하려면 씬 가져오기(Importing Scenes)와 관련된 문서를 읽어주" "세요." #: editor/editor_node.cpp @@ -2555,7 +2556,7 @@ msgstr "닫기 전에 '%s'에 변경사항을 저장하시겠습니까?" #: editor/editor_node.cpp msgid "%s no longer exists! Please specify a new save location." -msgstr "" +msgstr "%s은(는) 더 이상 존재하지 않습니다! 새 저장 위치를 지정해 주세요." #: editor/editor_node.cpp msgid "" @@ -2736,7 +2737,7 @@ msgid "" "Scene '%s' was automatically imported, so it can't be modified.\n" "To make changes to it, a new inherited scene can be created." msgstr "" -"씬 '%s'을(를) 자동으로 불러왔으므로 수정할 수 없습니다.\n" +"씬 '%s'을(를) 자동으로 가져왔으므로 수정할 수 없습니다.\n" "이 씬을 편집하려면 새로운 상속 씬을 만들어야 합니다." #: editor/editor_node.cpp @@ -2745,7 +2746,7 @@ msgid "" "open the scene, then save it inside the project path." msgstr "" "씬을 불러오는 중 오류가 발생했습니다. 씬은 프로젝트 경로 안에 있어야 합니다. " -"'불러오기'를 사용해서 씬을 열고, 그 씬을 프로젝트 경로 안에 저장하세요." +"'가져오기'를 사용해서 씬을 열고, 그 씬을 프로젝트 경로 안에 저장하세요." #: editor/editor_node.cpp msgid "Scene '%s' has broken dependencies:" @@ -3285,7 +3286,7 @@ msgstr "" #: editor/editor_node.cpp msgid "Import Templates From ZIP File" -msgstr "ZIP 파일에서 템플릿 불러오기" +msgstr "ZIP 파일에서 템플릿 가져오기" #: editor/editor_node.cpp msgid "Template Package" @@ -3636,7 +3637,7 @@ msgstr "%s를 눌러 정수로 반올림합니다. Shift를 눌러 좀 더 정 #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" -msgstr "불러올 노드 선택" +msgstr "가져올 노드 선택" #: editor/editor_sub_scene.cpp editor/project_manager.cpp msgid "Browse" @@ -3648,7 +3649,7 @@ msgstr "씬 경로:" #: editor/editor_sub_scene.cpp msgid "Import From Node:" -msgstr "노드에서 불러오기:" +msgstr "노드에서 가져오기:" #: editor/export_template_manager.cpp msgid "Open the folder containing these templates." @@ -3803,7 +3804,7 @@ msgstr "내보내기 템플릿 압축 푸는 중" #: editor/export_template_manager.cpp msgid "Importing:" -msgstr "불러오는 중:" +msgstr "가져오는 중:" #: editor/export_template_manager.cpp msgid "Remove templates for the version '%s'?" @@ -3921,14 +3922,14 @@ msgstr "즐겨찾기" #: editor/filesystem_dock.cpp msgid "Status: Import of file failed. Please fix file and reimport manually." msgstr "" -"상태: 파일 불러오기에 실패했습니다. 수동으로 파일을 수정하고 다시 불러와주세" +"상태: 파일 가져오기에 실패했습니다. 수동으로 파일을 수정하고 다시 가져와주세" "요." #: editor/filesystem_dock.cpp msgid "" "Importing has been disabled for this file, so it can't be opened for editing." msgstr "" -"이 파일에 대해 불러오기가 비활성화되었으며, 편집을 위해 열 수 없습니다." +"이 파일에 대해 가져오기가 비활성화되었으며, 편집을 위해 열 수 없습니다." #: editor/filesystem_dock.cpp msgid "Cannot move/rename resources root." @@ -4264,52 +4265,52 @@ msgstr "그룹 관리" #: editor/import/resource_importer_scene.cpp msgid "Import as Single Scene" -msgstr "단일 씬으로 불러오기" +msgstr "단일 씬으로 가져오기" #: editor/import/resource_importer_scene.cpp msgid "Import with Separate Animations" -msgstr "별도의 애니메이션으로 불러오기" +msgstr "별도의 애니메이션으로 가져오기" #: editor/import/resource_importer_scene.cpp msgid "Import with Separate Materials" -msgstr "별도의 머티리얼로 불러오기" +msgstr "별도의 머티리얼로 가져오기" #: editor/import/resource_importer_scene.cpp msgid "Import with Separate Objects" -msgstr "별도의 오브젝트로 불러오기" +msgstr "별도의 오브젝트로 가져오기" #: editor/import/resource_importer_scene.cpp msgid "Import with Separate Objects+Materials" -msgstr "별도의 오브젝트와 머티리얼로 불러오기" +msgstr "별도의 오브젝트와 머티리얼로 가져오기" #: editor/import/resource_importer_scene.cpp msgid "Import with Separate Objects+Animations" -msgstr "별도의 오브젝트와 애니메이션으로 불러오기" +msgstr "별도의 오브젝트와 애니메이션으로 가져오기" #: editor/import/resource_importer_scene.cpp msgid "Import with Separate Materials+Animations" -msgstr "별도의 머티리얼과 애니메이션으로 불러오기" +msgstr "별도의 머티리얼과 애니메이션으로 가져오기" #: editor/import/resource_importer_scene.cpp msgid "Import with Separate Objects+Materials+Animations" -msgstr "별도의 오브젝트, 머티리얼과 애니메이션으로 불러오기" +msgstr "별도의 오브젝트, 머티리얼과 애니메이션으로 가져오기" #: editor/import/resource_importer_scene.cpp msgid "Import as Multiple Scenes" -msgstr "여러 개의 씬으로 불러오기" +msgstr "여러 개의 씬으로 가져오기" #: editor/import/resource_importer_scene.cpp msgid "Import as Multiple Scenes+Materials" -msgstr "여러 개의 씬과 머티리얼로 불러오기" +msgstr "여러 개의 씬과 머티리얼로 가져오기" #: editor/import/resource_importer_scene.cpp #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Import Scene" -msgstr "씬 불러오기" +msgstr "씬 가져오기" #: editor/import/resource_importer_scene.cpp msgid "Importing Scene..." -msgstr "씬 불러오는 중..." +msgstr "씬 가져오는 중..." #: editor/import/resource_importer_scene.cpp msgid "Generating Lightmaps" @@ -4357,7 +4358,7 @@ msgstr "디폴트로 재설정" #: editor/import_dock.cpp msgid "Keep File (No Import)" -msgstr "파일 유지 (불러오기 없음)" +msgstr "파일 유지 (가져오기 없음)" #: editor/import_dock.cpp msgid "%d Files" @@ -4365,7 +4366,7 @@ msgstr "파일 %d개" #: editor/import_dock.cpp msgid "Set as Default for '%s'" -msgstr "'%s'을(를) 디폴트으로 설정" +msgstr "'%s'을(를) 디폴트로 설정" #: editor/import_dock.cpp msgid "Clear Default for '%s'" @@ -4373,7 +4374,7 @@ msgstr "'%s'을(를) 디폴트에서 지우기" #: editor/import_dock.cpp msgid "Reimport" -msgstr "다시 불러오기" +msgstr "다시 가져오기" #: editor/import_dock.cpp msgid "" @@ -4385,7 +4386,7 @@ msgstr "" #: editor/import_dock.cpp msgid "Import As:" -msgstr "다음 형식으로 불러오기:" +msgstr "다음 형식으로 가져오기:" #: editor/import_dock.cpp msgid "Preset" @@ -4393,11 +4394,11 @@ msgstr "프리셋" #: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" -msgstr "씬 저장, 다시 불러오기 및 다시 시작" +msgstr "씬 저장, 다시 가져오기 및 다시 시작" #: editor/import_dock.cpp msgid "Changing the type of an imported file requires editor restart." -msgstr "불러온 파일의 타입을 바꾸려면 에디터를 다시 시작해야 합니다." +msgstr "가져온 파일의 타입을 바꾸려면 에디터를 다시 시작해야 합니다." #: editor/import_dock.cpp msgid "" @@ -5271,7 +5272,7 @@ msgstr "전환 노드" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Import Animations..." -msgstr "애니메이션 불러오기..." +msgstr "애니메이션 가져오기..." #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Edit Node Filters" @@ -5355,7 +5356,7 @@ msgstr "실패함:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Bad download hash, assuming file has been tampered with." -msgstr "잘못된 다운로드 해시. 파일이 변조된 것 같아요." +msgstr "잘못된 다운로드 해시. 파일이 변조된 것 같습니다." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Expected:" @@ -5463,7 +5464,7 @@ msgstr "애셋 검색 (템플릿, 프로젝트, 및 데모 제외)" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Import..." -msgstr "불러오기..." +msgstr "가져오기..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Plugins..." @@ -6600,11 +6601,11 @@ msgstr "선택한 항목 제거" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Import from Scene (Ignore Transforms)" -msgstr "씬에서 불러오기 (변형 무시)" +msgstr "씬에서 가져오기 (변형 무시)" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Import from Scene (Apply Transforms)" -msgstr "씬에서 불러오기 (변형 적용)" +msgstr "씬에서 가져오기 (변형 적용)" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Update from Scene" @@ -7240,11 +7241,11 @@ msgstr "저장 중 오류" #: editor/plugins/script_editor_plugin.cpp msgid "Error importing theme." -msgstr "테마 불러오는 중 오류." +msgstr "테마 가져오는 중 오류." #: editor/plugins/script_editor_plugin.cpp msgid "Error Importing" -msgstr "불러오는 중 오류" +msgstr "가져오는 중 오류" #: editor/plugins/script_editor_plugin.cpp msgid "New Text File..." @@ -7279,7 +7280,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp msgid "Import Theme" -msgstr "테마 불러오기" +msgstr "테마 가져오기" #: editor/plugins/script_editor_plugin.cpp msgid "Error while saving theme" @@ -7336,12 +7337,10 @@ msgid "Move Down" msgstr "아래로 이동" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Next Script" msgstr "다음 스크립트" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Previous Script" msgstr "이전 스크립트" @@ -7384,7 +7383,7 @@ msgstr "테마" #: editor/plugins/script_editor_plugin.cpp msgid "Import Theme..." -msgstr "테마 불러오기..." +msgstr "테마 가져오기..." #: editor/plugins/script_editor_plugin.cpp msgid "Reload Theme" @@ -7759,9 +7758,8 @@ msgid "Left Orthogonal" msgstr "좌측 직교" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Left Perspective" -msgstr "원근" +msgstr "좌측 원근" #: editor/plugins/spatial_editor_plugin.cpp msgid "Right Orthogonal" @@ -8116,25 +8114,29 @@ msgid "Right View" msgstr "우측 뷰" #: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Orbit View Down" -msgstr "" +msgstr "선회 뷰 아래로" #: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Orbit View Left" -msgstr "" +msgstr "선회 뷰 왼쪽으로" #: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Orbit View Right" -msgstr "" +msgstr "선회 뷰 오른쪽으로" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy msgid "Orbit View Up" -msgstr "정면 뷰" +msgstr "선회 뷰 위로" #: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Orbit View 180" -msgstr "" +msgstr "선회 뷰 180으로" #: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" @@ -8592,15 +8594,15 @@ msgstr "현재 선택 {num}개" #: editor/plugins/theme_editor_plugin.cpp msgid "Nothing was selected for the import." -msgstr "불러올 것이 선택되지 않았습니다." +msgstr "가져올 것이 선택되지 않았습니다." #: editor/plugins/theme_editor_plugin.cpp msgid "Importing Theme Items" -msgstr "테마 항목을 불러오는 중" +msgstr "테마 항목을 가져오는 중" #: editor/plugins/theme_editor_plugin.cpp msgid "Importing items {n}/{n}" -msgstr "항목을 불러오는 중 {n}/{n}" +msgstr "항목 {n}/{n}을 가져오는 중" #: editor/plugins/theme_editor_plugin.cpp msgid "Updating the editor" @@ -8719,7 +8721,7 @@ msgstr "모든 테마 항목을 선택 해제합니다." #: editor/plugins/theme_editor_plugin.cpp msgid "Import Selected" -msgstr "선택된 항목 불러오기" +msgstr "선택된 항목 가져오기" #: editor/plugins/theme_editor_plugin.cpp msgid "" @@ -8727,7 +8729,7 @@ msgid "" "closing this window.\n" "Close anyway?" msgstr "" -"항목 불러오기 탭에 일부 항목이 선택되어 있습니다. 이 창을 닫으면 선택을 잃게 " +"항목 가져오기 탭에 일부 항목이 선택되어 있습니다. 이 창을 닫으면 선택을 잃게 " "됩니다.\n" "무시하고 닫으시겠습니까?" @@ -8737,7 +8739,7 @@ msgid "" "You can add a custom type or import a type with its items from another theme." msgstr "" "테마의 항목을 편집하려면 목록에서 테마 타입을 선택하세요.\n" -"커스텀 타입을 추가하거나 다른 테마의 항목과 함께 타입을 불러올 수 있습니다." +"커스텀 타입을 추가하거나 다른 테마의 항목과 함께 타입을 가져올 수 있습니다." #: editor/plugins/theme_editor_plugin.cpp msgid "Remove All Color Items" @@ -8769,7 +8771,7 @@ msgid "" "Add more items to it manually or by importing from another theme." msgstr "" "이 테마 타입은 비어 있습니다.\n" -"직접 또는 다른 테마에서 불러와서 테마에 더 많은 항목을 추가하세요." +"직접 또는 다른 테마에서 가져와서 테마에 더 많은 항목을 추가하세요." #: editor/plugins/theme_editor_plugin.cpp msgid "Add Color Item" @@ -8869,7 +8871,7 @@ msgstr "이전 이름:" #: editor/plugins/theme_editor_plugin.cpp msgid "Import Items" -msgstr "항목 불러오기" +msgstr "항목 가져오기" #: editor/plugins/theme_editor_plugin.cpp msgid "Default Theme" @@ -8949,7 +8951,7 @@ msgstr "항목 관리..." #: editor/plugins/theme_editor_plugin.cpp msgid "Add, remove, organize and import Theme items." -msgstr "테마 항목을 추가, 제거, 구성 및 불러옵니다." +msgstr "테마 항목을 추가, 제거, 구성 및 가져옵니다." #: editor/plugins/theme_editor_plugin.cpp msgid "Add Preview" @@ -9020,7 +9022,6 @@ msgid "Subitem 2" msgstr "하위 항목 2" #: editor/plugins/theme_editor_preview.cpp -#, fuzzy msgid "Has" msgstr "갖춤" @@ -9053,9 +9054,8 @@ msgid "Subtree" msgstr "하위 트리" #: editor/plugins/theme_editor_preview.cpp -#, fuzzy msgid "Has,Many,Options" -msgstr "많은,옵션,갖춤" +msgstr "갖춤,많은,옵션" #: editor/plugins/theme_editor_preview.cpp msgid "Invalid path, the PackedScene resource was probably moved or removed." @@ -10665,7 +10665,7 @@ msgstr "새 게임 프로젝트" #: editor/project_manager.cpp msgid "Imported Project" -msgstr "불러온 프로젝트" +msgstr "가져온 프로젝트" #: editor/project_manager.cpp msgid "Invalid project name." @@ -10721,11 +10721,11 @@ msgstr "프로젝트 이름 바꾸기" #: editor/project_manager.cpp msgid "Import Existing Project" -msgstr "기존 프로젝트 불러오기" +msgstr "기존 프로젝트 가져오기" #: editor/project_manager.cpp msgid "Import & Edit" -msgstr "불러오기 & 편집" +msgstr "가져오기 & 편집" #: editor/project_manager.cpp msgid "Create New Project" @@ -10880,8 +10880,8 @@ msgid "" "Can't run project: Assets need to be imported.\n" "Please edit the project to trigger the initial import." msgstr "" -"프로젝트를 실행할 수 없음: 애셋을 불러와야 합니다.\n" -"프로젝트를 편집해서 최초 불러오기가 실행되도록 하세요." +"프로젝트를 실행할 수 없음: 애셋을 가져와야 합니다.\n" +"프로젝트를 편집해서 최초 가져오기가 실행되도록 하세요." #: editor/project_manager.cpp msgid "Are you sure to run %d projects at once?" @@ -10962,7 +10962,7 @@ msgstr "새 프로젝트" #: editor/project_manager.cpp msgid "Import Project" -msgstr "프로젝트 불러오기" +msgstr "프로젝트 가져오기" #: editor/project_manager.cpp msgid "Remove Project" @@ -11019,14 +11019,14 @@ msgstr "" "상 포함시켜야 합니다." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "키 " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "물리 키" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "키 " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "조이스틱 버튼" @@ -11144,7 +11144,7 @@ msgstr "이벤트 추가" #: editor/project_settings_editor.cpp msgid "Button" -msgstr "Button" +msgstr "버튼" #: editor/project_settings_editor.cpp msgid "Left Button." @@ -11348,7 +11348,7 @@ msgstr "플러그인(Plugin)" #: editor/project_settings_editor.cpp msgid "Import Defaults" -msgstr "디폴트 불러오기" +msgstr "디폴트 가져오기" #: editor/property_editor.cpp msgid "Preset..." @@ -12247,7 +12247,7 @@ msgstr "형식" #: editor/script_editor_debugger.cpp msgid "Usage" -msgstr "사용" +msgstr "사용례" #: editor/script_editor_debugger.cpp msgid "Misc" diff --git a/editor/translations/lt.po b/editor/translations/lt.po index 404f9f5096..a4d205e4b1 100644 --- a/editor/translations/lt.po +++ b/editor/translations/lt.po @@ -10989,11 +10989,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/lv.po b/editor/translations/lv.po index 68dd8370bd..91d9e7e3d2 100644 --- a/editor/translations/lv.po +++ b/editor/translations/lv.po @@ -8,13 +8,14 @@ # Anonymous <noreply@weblate.org>, 2020. # StiLins <aigars.skilins@gmail.com>, 2020. # Rihards Kubilis <oldcar@inbox.lv>, 2020. +# M E <gruffy7932@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-11-15 12:43+0000\n" -"Last-Translator: Rihards Kubilis <oldcar@inbox.lv>\n" +"PO-Revision-Date: 2021-11-03 13:53+0000\n" +"Last-Translator: M E <gruffy7932@gmail.com>\n" "Language-Team: Latvian <https://hosted.weblate.org/projects/godot-engine/" "godot/lv/>\n" "Language: lv\n" @@ -23,7 +24,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n % 10 == 0 || n % 100 >= 11 && n % 100 <= " "19) ? 0 : ((n % 10 == 1 && n % 100 != 11) ? 1 : 2);\n" -"X-Generator: Weblate 4.4-dev\n" +"X-Generator: Weblate 4.9-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -47,7 +48,7 @@ msgstr "Nederīga ievade %i (nav padota) izteikumā" #: core/math/expression.cpp msgid "self can't be used because instance is null (not passed)" -msgstr "'self' nevar izmantot, jo instance ir 'null' (nav padota)" +msgstr "'self' nevar izmantot, jo instance ir tukša (nav norādīta)" #: core/math/expression.cpp msgid "Invalid operands to operator %s, %s and %s." @@ -373,13 +374,12 @@ msgstr "Anim ievietot" #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp msgid "node '%s'" -msgstr "" +msgstr "mezgls '%s'" #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp -#, fuzzy msgid "animation" -msgstr "Funkcijas:" +msgstr "animācija" #: editor/animation_track_editor.cpp msgid "AnimationPlayer can't animate itself, only other players." @@ -388,7 +388,7 @@ msgstr "AnimationPlayer nevar animēt pats sevi, tikai citus spēlētājus." #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp msgid "property '%s'" -msgstr "" +msgstr "vērtība '%s'" #: editor/animation_track_editor.cpp msgid "Anim Create & Insert" @@ -477,7 +477,7 @@ msgstr "Anim Pārvietot Atslēgas" #: editor/animation_track_editor.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Clipboard is empty!" -msgstr "" +msgstr "Starpliktuve ir tukša!" #: editor/animation_track_editor.cpp msgid "Paste Tracks" @@ -595,12 +595,11 @@ msgstr "Doties uz Nākamo Soli" #: editor/animation_track_editor.cpp msgid "Go to Previous Step" -msgstr "Doties uz Iepriekšējo Soli" +msgstr "Doties uz iepriekšejo soli" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Apply Reset" -msgstr "Atiestatīt tālummaiņu" +msgstr "Pielietot atiestatīšanu" #: editor/animation_track_editor.cpp msgid "Optimize Animation" @@ -619,9 +618,8 @@ msgid "Use Bezier Curves" msgstr "Izmanto Bezjē Līknes" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Create RESET Track(s)" -msgstr "Ielīmēt celiņus" +msgstr "Izveidot atiestatīšanas celiņu(s)" #: editor/animation_track_editor.cpp msgid "Anim. Optimizer" @@ -788,9 +786,8 @@ msgid "Method in target node must be specified." msgstr "Metodi mērķa mezglā nepieciešams specificēt." #: editor/connections_dialog.cpp -#, fuzzy msgid "Method name must be a valid identifier." -msgstr "Metodi mērķa mezglā nepieciešams specificēt." +msgstr "Metodes nosaukumam jābūt korektam identifikātoram." #: editor/connections_dialog.cpp msgid "" @@ -910,7 +907,7 @@ msgstr "Savieno..." #: editor/connections_dialog.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Disconnect" -msgstr "Atvieno" +msgstr "Atvienot" #: editor/connections_dialog.cpp msgid "Connect a Signal to a Method" @@ -930,9 +927,8 @@ msgid "Signals" msgstr "Signāli" #: editor/connections_dialog.cpp -#, fuzzy msgid "Filter signals" -msgstr "No Signāla:" +msgstr "Filtrēt signālus" #: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" @@ -941,16 +937,15 @@ msgstr "" #: editor/connections_dialog.cpp msgid "Disconnect All" -msgstr "Atvienot Visu" +msgstr "Atvienot visu" #: editor/connections_dialog.cpp msgid "Edit..." msgstr "Rediģēt..." #: editor/connections_dialog.cpp -#, fuzzy msgid "Go to Method" -msgstr "Doties Uz Metodi" +msgstr "Doties uz Metodi" #: editor/create_dialog.cpp msgid "Change %s Type" @@ -966,11 +961,11 @@ msgstr "Izveidot Jaunu %s" #: editor/create_dialog.cpp editor/plugins/asset_library_editor_plugin.cpp msgid "No results for \"%s\"." -msgstr "" +msgstr "Nav rezultātu \"%s\"." #: editor/create_dialog.cpp editor/property_selector.cpp msgid "No description available for %s." -msgstr "" +msgstr "Apraksts nav pieejams priekš %s." #: editor/create_dialog.cpp editor/editor_file_dialog.cpp #: editor/filesystem_dock.cpp @@ -1070,15 +1065,16 @@ msgid "Owners Of:" msgstr "Īpašnieki:" #: editor/dependency_editor.cpp -#, fuzzy msgid "" "Remove the selected files from the project? (Cannot be undone.)\n" "Depending on your filesystem configuration, the files will either be moved " "to the system trash or deleted permanently." -msgstr "Vai noņemt izvēlētos failus no projekta? (Netiks atjaunoti)" +msgstr "" +"Vai noņemt izvēlētos failus no projekta? (Netiks atjaunoti)\n" +"Atšķirībā no failu sistēmas konfigurācijas, faili tiks aizvākti uz sistēmas " +"atkritni vai dzēsti pilnībā." #: editor/dependency_editor.cpp -#, fuzzy msgid "" "The files being removed are required by other resources in order for them to " "work.\n" @@ -1086,9 +1082,11 @@ msgid "" "Depending on your filesystem configuration, the files will either be moved " "to the system trash or deleted permanently." msgstr "" -"Faili, kurus Jūs vēlaties noņemt ir nepieciešami citiem resursiem lai tie " +"Faili, kurus Jūs vēlaties noņemt ir nepieciešami citiem resursiem, lai tie " "varētu strādāt.\n" -"Tik un tā noņemt tos? (Nevar atsaukt)" +"Tik un tā noņemt tos? (Nevar atsaukt)\n" +"Atšķirībā no jūsu failu sistēmas konfigurācijas, faili tiks aizvākti uz " +"sistēmas atkritni vai dzēsti pilnībā." #: editor/dependency_editor.cpp msgid "Cannot remove:" @@ -1160,7 +1158,7 @@ msgstr "Paldies no Godot sabiedrības!" #: editor/editor_about.cpp editor/editor_node.cpp editor/project_manager.cpp msgid "Click to copy." -msgstr "" +msgstr "Klikšķini, lai kopētu." #: editor/editor_about.cpp msgid "Godot Engine contributors" @@ -1198,14 +1196,12 @@ msgid "Gold Sponsors" msgstr "Zelta Sponsori" #: editor/editor_about.cpp -#, fuzzy msgid "Silver Sponsors" -msgstr "Sudraba Donors" +msgstr "Sudraba Sponsors" #: editor/editor_about.cpp -#, fuzzy msgid "Bronze Sponsors" -msgstr "Bronzas Donors" +msgstr "Bronzas Sponsors" #: editor/editor_about.cpp msgid "Mini Sponsors" @@ -1260,41 +1256,36 @@ msgid "Licenses" msgstr "Licences" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Error opening asset file for \"%s\" (not in ZIP format)." -msgstr "Kļūme atverot arhīvu failu, nav ZIP formātā." +msgstr "Kļūme atverot pakotnes failu \"%s\" (nav ZIP formātā)." #: editor/editor_asset_installer.cpp -#, fuzzy msgid "%s (already exists)" -msgstr "%s (Jau Eksistē)" +msgstr "%s (jau eksistē)" #: editor/editor_asset_installer.cpp msgid "Contents of asset \"%s\" - %d file(s) conflict with your project:" -msgstr "" +msgstr "Pakotnes \"%s\" saturs - %d fails(-i) konfliktē ar tavu projektu:" #: editor/editor_asset_installer.cpp msgid "Contents of asset \"%s\" - No files conflict with your project:" -msgstr "" +msgstr "Pakotnes \"%s\" saturs - Neviens fails nekonfliktē ar tavu projektu:" #: editor/editor_asset_installer.cpp msgid "Uncompressing Assets" msgstr "Nekompresēti Līdzekļi" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "The following files failed extraction from asset \"%s\":" -msgstr "Sekojošie faili netika izvilkti no paketes:" +msgstr "Sekojošie faili netika izvilkti no paketes \"%s\":" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "(and %s more files)" -msgstr "Un %s vēl faili." +msgstr "(un vēl %s faili)" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Asset \"%s\" installed successfully!" -msgstr "Pakete instalēta sekmīgi!" +msgstr "Pakete \"%s\" instalēta sekmīgi!" #: editor/editor_asset_installer.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -1306,7 +1297,6 @@ msgid "Install" msgstr "Ieinstalēt" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Asset Installer" msgstr "Paketes Instalētājs" @@ -1360,7 +1350,7 @@ msgstr "Velc un atlaid, lai pārkārtotu." #: editor/editor_audio_buses.cpp msgid "Solo" -msgstr "Solo" +msgstr "Individuāli" #: editor/editor_audio_buses.cpp msgid "Mute" @@ -1371,9 +1361,8 @@ msgid "Bypass" msgstr "Šunts" #: editor/editor_audio_buses.cpp -#, fuzzy msgid "Bus Options" -msgstr "Kopnes iestatījumi" +msgstr "Kopnes Iestatījumi" #: editor/editor_audio_buses.cpp editor/filesystem_dock.cpp #: editor/plugins/animation_player_editor_plugin.cpp editor/scene_tree_dock.cpp @@ -1382,7 +1371,7 @@ msgstr "Izveidot Dublikātu" #: editor/editor_audio_buses.cpp msgid "Reset Volume" -msgstr "" +msgstr "Atiestatīt Skaļumu" #: editor/editor_audio_buses.cpp msgid "Delete Effect" @@ -1398,47 +1387,47 @@ msgstr "Pievienot Audio Kopni" #: editor/editor_audio_buses.cpp msgid "Master bus can't be deleted!" -msgstr "" +msgstr "Master kopni nevar idzēst!" #: editor/editor_audio_buses.cpp msgid "Delete Audio Bus" -msgstr "" +msgstr "Izdzēst Audio Kopni" #: editor/editor_audio_buses.cpp msgid "Duplicate Audio Bus" -msgstr "" +msgstr "Dubultot Audio Kopni" #: editor/editor_audio_buses.cpp msgid "Reset Bus Volume" -msgstr "" +msgstr "Atiestatīt Kopnes Skaļumu" #: editor/editor_audio_buses.cpp msgid "Move Audio Bus" -msgstr "" +msgstr "Pārvietot Audio Kopni" #: editor/editor_audio_buses.cpp msgid "Save Audio Bus Layout As..." -msgstr "" +msgstr "Saglabāt Audio Kopņu Izkārtojumu Kā...." #: editor/editor_audio_buses.cpp msgid "Location for New Layout..." -msgstr "" +msgstr "Jaunā izkārtojuma lokācija..." #: editor/editor_audio_buses.cpp msgid "Open Audio Bus Layout" -msgstr "" +msgstr "Atvērt audio kopnes izkārtojumu" #: editor/editor_audio_buses.cpp msgid "There is no '%s' file." -msgstr "" +msgstr "Fails '%s' neeksistē." #: editor/editor_audio_buses.cpp editor/plugins/canvas_item_editor_plugin.cpp msgid "Layout" -msgstr "" +msgstr "Izkārtojums" #: editor/editor_audio_buses.cpp msgid "Invalid file, not an audio bus layout." -msgstr "" +msgstr "Nepareizs fails, nav audio kopnes izkārtojuma." #: editor/editor_audio_buses.cpp msgid "Error saving file: %s" @@ -1450,7 +1439,7 @@ msgstr "Pievienot Kopni" #: editor/editor_audio_buses.cpp msgid "Add a new Audio Bus to this layout." -msgstr "" +msgstr "Pievienot jaunu Audio Kopni šim izkārtojumam." #: editor/editor_audio_buses.cpp editor/editor_resource_picker.cpp #: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp @@ -1480,7 +1469,7 @@ msgstr "Ielādēt Kopnes Izkārtojuma noklusējumu." #: editor/editor_audio_buses.cpp msgid "Create a new Bus Layout." -msgstr "" +msgstr "Izveidot jaunu Kopnes izkārtojumu." #: editor/editor_autoload_settings.cpp msgid "Invalid name." @@ -1506,27 +1495,27 @@ msgstr "" #: editor/editor_autoload_settings.cpp msgid "Keyword cannot be used as an autoload name." -msgstr "" +msgstr "Atslēgvārdu nedrīkst lietot kā auto-ielādes vārdu." #: editor/editor_autoload_settings.cpp msgid "Autoload '%s' already exists!" -msgstr "" +msgstr "Auto-ielāde '%s' jau eksistē!" #: editor/editor_autoload_settings.cpp msgid "Rename Autoload" -msgstr "" +msgstr "Pārsaukt Auto-ielādi" #: editor/editor_autoload_settings.cpp msgid "Toggle AutoLoad Globals" -msgstr "" +msgstr "Pārslēgt Auto-ielādes Globālās vērtības" #: editor/editor_autoload_settings.cpp msgid "Move Autoload" -msgstr "" +msgstr "Pārvietot Auto-ielādi" #: editor/editor_autoload_settings.cpp msgid "Remove Autoload" -msgstr "" +msgstr "Izdzēst Auto-ielādi" #: editor/editor_autoload_settings.cpp editor/editor_plugin_settings.cpp msgid "Enable" @@ -1534,34 +1523,34 @@ msgstr "Iespējot" #: editor/editor_autoload_settings.cpp msgid "Rearrange Autoloads" -msgstr "" +msgstr "Pārkārtot Auto-ielādes" #: editor/editor_autoload_settings.cpp msgid "Can't add autoload:" -msgstr "" +msgstr "Nevar pievienot Auto-ielādi:" #: editor/editor_autoload_settings.cpp msgid "%s is an invalid path. File does not exist." -msgstr "" +msgstr "%s ir nederīgs ceļš. Fails neeksistē." #: editor/editor_autoload_settings.cpp msgid "%s is an invalid path. Not in resource path (res://)." -msgstr "" +msgstr "%s ir nederīgs ceļš. Nav resursu ceļā (res://)." #: editor/editor_autoload_settings.cpp msgid "Add AutoLoad" -msgstr "" +msgstr "Pievienot Auto-ielādi" #: editor/editor_autoload_settings.cpp editor/editor_file_dialog.cpp #: editor/editor_plugin_settings.cpp #: editor/plugins/animation_tree_editor_plugin.cpp #: editor/script_create_dialog.cpp scene/gui/file_dialog.cpp msgid "Path:" -msgstr "" +msgstr "Ceļš:" #: editor/editor_autoload_settings.cpp msgid "Node Name:" -msgstr "" +msgstr "Mezgla Vārds:" #: editor/editor_autoload_settings.cpp editor/editor_help_search.cpp #: editor/editor_plugin_settings.cpp editor/editor_profiler.cpp @@ -1571,11 +1560,11 @@ msgstr "Nosaukums" #: editor/editor_autoload_settings.cpp msgid "Global Variable" -msgstr "" +msgstr "Globāls mainīgais" #: editor/editor_data.cpp msgid "Paste Params" -msgstr "" +msgstr "Ielīmēt Parametrus" #: editor/editor_data.cpp msgid "Updating Scene" @@ -1583,11 +1572,11 @@ msgstr "Atjaunina Ainu" #: editor/editor_data.cpp msgid "Storing local changes..." -msgstr "" +msgstr "Saglabā lokālās izmaiņas..." #: editor/editor_data.cpp msgid "Updating scene..." -msgstr "" +msgstr "Atjauno ainu...." #: editor/editor_data.cpp editor/editor_resource_picker.cpp msgid "[empty]" @@ -1599,57 +1588,61 @@ msgstr "[nesaglabāts]" #: editor/editor_dir_dialog.cpp msgid "Please select a base directory first." -msgstr "" +msgstr "Lūdzu vispirms izvēlaties bāzes mapi." #: editor/editor_dir_dialog.cpp msgid "Choose a Directory" -msgstr "" +msgstr "Izvēlēties Direktoriju" #: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp #: editor/filesystem_dock.cpp editor/project_manager.cpp #: scene/gui/file_dialog.cpp msgid "Create Folder" -msgstr "" +msgstr "Izveidot mapi" #: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp #: editor/editor_plugin_settings.cpp editor/filesystem_dock.cpp #: editor/plugins/theme_editor_plugin.cpp editor/project_export.cpp #: modules/visual_script/visual_script_editor.cpp scene/gui/file_dialog.cpp msgid "Name:" -msgstr "" +msgstr "Nosaukums:" #: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp #: editor/filesystem_dock.cpp scene/gui/file_dialog.cpp msgid "Could not create folder." -msgstr "" +msgstr "Neizdevās izveidot mapi." #: editor/editor_dir_dialog.cpp msgid "Choose" -msgstr "" +msgstr "Izvēlaties" #: editor/editor_export.cpp msgid "Storing File:" -msgstr "" +msgstr "Faila saglabāšana:" #: editor/editor_export.cpp msgid "No export template found at the expected path:" -msgstr "" +msgstr "Norādītajā ceļā nav atrasta eksporta veidne:" #: editor/editor_export.cpp msgid "Packing" -msgstr "" +msgstr "Pako" #: editor/editor_export.cpp msgid "" "Target platform requires 'ETC' texture compression for GLES2. Enable 'Import " "Etc' in Project Settings." msgstr "" +"Mērķa platforma pieprasa 'ETC' tekstūru saspiešanu priekš GLES2. Iespējo " +"'Importēt Etc' projekta iestatījumos." #: editor/editor_export.cpp msgid "" "Target platform requires 'ETC2' texture compression for GLES3. Enable " "'Import Etc 2' in Project Settings." msgstr "" +"Mērķa platforma pieprasa 'ETC2' tekstūru saspiešanu priekš GLES3. Iespējo " +"'Importēt Etc 2' projekta iestatījumos." #: editor/editor_export.cpp msgid "" @@ -1658,18 +1651,26 @@ msgid "" "Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback " "Enabled'." msgstr "" +"Mērķa platforma pieprasa 'ETC' tekstūru saspiešanu priekš draivera atkāpes " +"uz GLES2.\n" +"Iespējo 'Importēt Etc' projekta iestatījumos vai atslēdz 'Draivera atkāpe " +"ieslēgta'." #: editor/editor_export.cpp msgid "" "Target platform requires 'PVRTC' texture compression for GLES2. Enable " "'Import Pvrtc' in Project Settings." msgstr "" +"Mērķa platforma pieprasa 'PVRTV' tekstūru saspiešanu priekš GLES2. Iespējo " +"'Importēt Pvrtc' projekta iestatījumos." #: editor/editor_export.cpp msgid "" "Target platform requires 'ETC2' or 'PVRTC' texture compression for GLES3. " "Enable 'Import Etc 2' or 'Import Pvrtc' in Project Settings." msgstr "" +"Mērķa platforma pieprasa 'ETC2' vai 'PVRTC' tekstūru saspiešanu priekš " +"GLES3. Iespējo 'Importēt Etc 2' vai 'Importēt Pvrtc' projekta iestatījumos." #: editor/editor_export.cpp msgid "" @@ -1678,26 +1679,30 @@ msgid "" "Enable 'Import Pvrtc' in Project Settings, or disable 'Driver Fallback " "Enabled'." msgstr "" +"Mērķa platforma pieprasa 'PVRTC' tekstūru saspiešanu priekš draivera atkāpes " +"uz GLES2.\n" +"Iespējo 'Importēt Pvrtc' projekta iestatījumos vai atslēdz 'Draivera atkāpe " +"ieslēgta'." #: editor/editor_export.cpp platform/android/export/export_plugin.cpp #: platform/iphone/export/export.cpp platform/javascript/export/export.cpp #: platform/osx/export/export.cpp platform/uwp/export/export.cpp msgid "Custom debug template not found." -msgstr "" +msgstr "Pielāgots atkļūdošanas šablons nav atrasts." #: editor/editor_export.cpp platform/android/export/export_plugin.cpp #: platform/iphone/export/export.cpp platform/javascript/export/export.cpp #: platform/osx/export/export.cpp platform/uwp/export/export.cpp msgid "Custom release template not found." -msgstr "" +msgstr "Pielāgots relīzes sablons nav atrasts." #: editor/editor_export.cpp platform/javascript/export/export.cpp msgid "Template file not found:" -msgstr "" +msgstr "Šablona fails nav atrasts:" #: editor/editor_export.cpp msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB." -msgstr "" +msgstr "Pie 32-bitu eksportēšanas, iepakotais PCK nevar būt lielāks par 4GB." #: editor/editor_feature_profile.cpp msgid "3D Editor" @@ -1705,87 +1710,90 @@ msgstr "3D Redaktors" #: editor/editor_feature_profile.cpp msgid "Script Editor" -msgstr "" +msgstr "Skripta redaktors" #: editor/editor_feature_profile.cpp msgid "Asset Library" -msgstr "" +msgstr "Līdzekļu bibliotēka" #: editor/editor_feature_profile.cpp msgid "Scene Tree Editing" -msgstr "" +msgstr "Ainas koka rediģēšana" #: editor/editor_feature_profile.cpp msgid "Node Dock" -msgstr "" +msgstr "Mezgla doks" #: editor/editor_feature_profile.cpp msgid "FileSystem Dock" -msgstr "" +msgstr "Failu sistēmas doks" #: editor/editor_feature_profile.cpp msgid "Import Dock" -msgstr "" +msgstr "Importēt doku" #: editor/editor_feature_profile.cpp msgid "Allows to view and edit 3D scenes." -msgstr "" +msgstr "Atļauj skatīt un rediģēt visas 3D ainas." #: editor/editor_feature_profile.cpp msgid "Allows to edit scripts using the integrated script editor." -msgstr "" +msgstr "Atļauj rediģēt skriptus izmantojot iebūvēto skriptu redaktoru." #: editor/editor_feature_profile.cpp msgid "Provides built-in access to the Asset Library." -msgstr "" +msgstr "Nodrošina iebūvēto piekļuvi līdzekļu bibliotēkai." #: editor/editor_feature_profile.cpp msgid "Allows editing the node hierarchy in the Scene dock." -msgstr "" +msgstr "Atļauj mezgla hierarhijas rediģēšanu ainu dokā." #: editor/editor_feature_profile.cpp msgid "" "Allows to work with signals and groups of the node selected in the Scene " "dock." -msgstr "" +msgstr "Atļauj strādāt ar signāliem un grupām izvēlētā mezgla ainu dokā." #: editor/editor_feature_profile.cpp msgid "Allows to browse the local file system via a dedicated dock." -msgstr "" +msgstr "Atļauj pārlūkot lokālo failu sistēmu atvēlētajā dokā." #: editor/editor_feature_profile.cpp msgid "" "Allows to configure import settings for individual assets. Requires the " "FileSystem dock to function." msgstr "" +"Atļauj konfigurēt importēšanas iestatījumus individuāliem līdzekļiem. " +"Pieprasa failu sistēmas doku, lai funkcionētu." #: editor/editor_feature_profile.cpp msgid "(current)" -msgstr "" +msgstr "(current) / pašreizējs" #: editor/editor_feature_profile.cpp msgid "(none)" -msgstr "" +msgstr "(neviens)" #: editor/editor_feature_profile.cpp msgid "Remove currently selected profile, '%s'? Cannot be undone." -msgstr "" +msgstr "Noņemt pašreiz izvēlēto profilu '%s' ? Nevar atsaukt." #: editor/editor_feature_profile.cpp msgid "Profile must be a valid filename and must not contain '.'" msgstr "" +"Profila nosaukumam jābūt derīgam faila nosaukumam un tas nedrīkst iekļaut '.'" #: editor/editor_feature_profile.cpp msgid "Profile with this name already exists." -msgstr "" +msgstr "Profils ar šādu nosaukumu jau eksistē." #: editor/editor_feature_profile.cpp msgid "(Editor Disabled, Properties Disabled)" -msgstr "" +msgstr "(Redaktors atslēgts, iestatījumi atslēgti)" #: editor/editor_feature_profile.cpp msgid "(Properties Disabled)" -msgstr "" +msgstr "(Iestatījumi atslēgti)" #: editor/editor_feature_profile.cpp msgid "(Editor Disabled)" @@ -1797,53 +1805,51 @@ msgstr "Klases Iespējas:" #: editor/editor_feature_profile.cpp msgid "Enable Contextual Editor" -msgstr "" +msgstr "Iespējot kontekstuālo redaktoru" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Class Properties:" -msgstr "Ieslēgtie Mainīgie:" +msgstr "Klases iestatījumi:" #: editor/editor_feature_profile.cpp msgid "Main Features:" -msgstr "" +msgstr "Galvenās iespējas:" #: editor/editor_feature_profile.cpp msgid "Nodes and Classes:" -msgstr "" +msgstr "Mezgli un klases:" #: editor/editor_feature_profile.cpp msgid "File '%s' format is invalid, import aborted." -msgstr "" +msgstr "Faila '%s' formāts ir nepareizs, importēšana atcelta." #: editor/editor_feature_profile.cpp msgid "" "Profile '%s' already exists. Remove it first before importing, import " "aborted." msgstr "" +"Profils '%s' jau eksistē. Vispirms to noņem pirms importēšanas. Importēšana " +"atcelta." #: editor/editor_feature_profile.cpp msgid "Error saving profile to path: '%s'." msgstr "Kļūda saglabājot profilu uz ceļu: '%s'." #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Reset to Default" -msgstr "Ielādēt Noklusējumu" +msgstr "Atiestatīt uz noklusējumu" #: editor/editor_feature_profile.cpp msgid "Current Profile:" -msgstr "" +msgstr "Pašreizējais profils:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Create Profile" -msgstr "Izveidot" +msgstr "Izveidot profilu" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Remove Profile" -msgstr "Noņemt" +msgstr "Noņemt profilu" #: editor/editor_feature_profile.cpp msgid "Available Profiles:" @@ -1856,52 +1862,52 @@ msgstr "Aktualizēt" #: editor/editor_feature_profile.cpp editor/editor_node.cpp #: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp msgid "Import" -msgstr "" +msgstr "Importēt" #: editor/editor_feature_profile.cpp editor/project_export.cpp msgid "Export" -msgstr "" +msgstr "Eksportēt" #: editor/editor_feature_profile.cpp msgid "Configure Selected Profile:" -msgstr "" +msgstr "Konfigurēt izvēlēto profilu:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Extra Options:" -msgstr "Klases Iespējas:" +msgstr "Papildus iespējas:" #: editor/editor_feature_profile.cpp msgid "Create or import a profile to edit available classes and properties." msgstr "" +"Izveidot vai importēt profilu, lai rediģētu pieejamās klases un iestatījumus." #: editor/editor_feature_profile.cpp msgid "New profile name:" -msgstr "" +msgstr "Jaunais profila nosaukums:" #: editor/editor_feature_profile.cpp msgid "Godot Feature Profile" -msgstr "" +msgstr "Godot iespēju profils" #: editor/editor_feature_profile.cpp msgid "Import Profile(s)" -msgstr "" +msgstr "Importēt profilu(s)" #: editor/editor_feature_profile.cpp msgid "Export Profile" -msgstr "" +msgstr "Eksportēt profilu" #: editor/editor_feature_profile.cpp msgid "Manage Editor Feature Profiles" -msgstr "" +msgstr "Pārvaldīt redaktora iespēju profilus" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Select Current Folder" -msgstr "" +msgstr "Izvēlēties pašreizējo mapi" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "File exists, overwrite?" -msgstr "" +msgstr "Fails eksistē. Pārrakstīt ?" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Select This Folder" @@ -1909,7 +1915,7 @@ msgstr "Izvēlēties Šo Mapi" #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "Copy Path" -msgstr "" +msgstr "Kopēt celiņu" #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "Open in File Manager" @@ -1918,40 +1924,40 @@ msgstr "Atvērt Failu Pārlūkā" #: editor/editor_file_dialog.cpp editor/editor_node.cpp #: editor/filesystem_dock.cpp editor/project_manager.cpp msgid "Show in File Manager" -msgstr "" +msgstr "Parādīt failu menedžerī" #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "New Folder..." -msgstr "" +msgstr "Jauna mape..." #: editor/editor_file_dialog.cpp editor/find_in_files.cpp #: editor/plugins/version_control_editor_plugin.cpp msgid "Refresh" -msgstr "" +msgstr "Atsvaidzināt" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "All Recognized" -msgstr "" +msgstr "Viss atpazīts" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "All Files (*)" -msgstr "" +msgstr "Visi faili (*)" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Open a File" -msgstr "" +msgstr "Atvērt failu" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Open File(s)" -msgstr "" +msgstr "Atvērt failu(s)" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Open a Directory" -msgstr "" +msgstr "Atvērt mapi" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Open a File or Directory" -msgstr "" +msgstr "Atvērt failu vai mapi" #: editor/editor_file_dialog.cpp editor/editor_node.cpp #: editor/editor_resource_picker.cpp editor/import_defaults_editor.cpp @@ -1959,47 +1965,47 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/file_dialog.cpp msgid "Save" -msgstr "" +msgstr "Saglabāt" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Save a File" -msgstr "" +msgstr "Saglabāt failu" #: editor/editor_file_dialog.cpp msgid "Go Back" -msgstr "" +msgstr "Doties atpakaļ" #: editor/editor_file_dialog.cpp msgid "Go Forward" -msgstr "" +msgstr "Doties tālāk" #: editor/editor_file_dialog.cpp msgid "Go Up" -msgstr "" +msgstr "Doties augšup" #: editor/editor_file_dialog.cpp msgid "Toggle Hidden Files" -msgstr "" +msgstr "Pārslēgt slēptos failus" #: editor/editor_file_dialog.cpp msgid "Toggle Favorite" -msgstr "" +msgstr "Pārslēgt favorītu" #: editor/editor_file_dialog.cpp msgid "Toggle Mode" -msgstr "" +msgstr "Pārslēgt režīmu" #: editor/editor_file_dialog.cpp msgid "Focus Path" -msgstr "" +msgstr "Fokusa ceļš" #: editor/editor_file_dialog.cpp msgid "Move Favorite Up" -msgstr "" +msgstr "Pārvietot favorītu augšup" #: editor/editor_file_dialog.cpp msgid "Move Favorite Down" -msgstr "" +msgstr "Pārvietot favorītu lejup" #: editor/editor_file_dialog.cpp msgid "Go to previous folder." @@ -2011,7 +2017,7 @@ msgstr "Doties uz nākamo mapi." #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Go to parent folder." -msgstr "" +msgstr "Atvērt mātes mapi." #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Refresh files." @@ -2019,63 +2025,65 @@ msgstr "Atjaunot failus." #: editor/editor_file_dialog.cpp msgid "(Un)favorite current folder." -msgstr "" +msgstr "Pievienot/noņemt pašreizējo mapi pie/no favorītiem." #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Toggle the visibility of hidden files." -msgstr "" +msgstr "Pārslēgt slēpto failu redzamību." #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "View items as a grid of thumbnails." -msgstr "" +msgstr "Skatīt vienumus kā režģi ar sīktēliem." #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "View items as a list." -msgstr "" +msgstr "Skatīt lietas kā sarakstu." #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Directories & Files:" -msgstr "" +msgstr "Mapes & Faili:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" -msgstr "" +msgstr "Priekškatījums:" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "File:" -msgstr "" +msgstr "Fails:" #: editor/editor_file_system.cpp msgid "ScanSources" -msgstr "" +msgstr "ScanSources / Skenēšanas Avoti" #: editor/editor_file_system.cpp msgid "" "There are multiple importers for different types pointing to file %s, import " "aborted" msgstr "" +"Ir vairāki importētāji dažādiem tipiem, kas norāda uz failu %s, importēšana " +"atcelta" #: editor/editor_file_system.cpp msgid "(Re)Importing Assets" -msgstr "" +msgstr "(Re)Importē līdzekļus" #: editor/editor_help.cpp msgid "Top" -msgstr "" +msgstr "Virsotne" #: editor/editor_help.cpp msgid "Class:" -msgstr "" +msgstr "Klase:" #: editor/editor_help.cpp editor/scene_tree_editor.cpp #: editor/script_create_dialog.cpp msgid "Inherits:" -msgstr "" +msgstr "Manto:" #: editor/editor_help.cpp msgid "Inherited by:" -msgstr "" +msgstr "Manto uz:" #: editor/editor_help.cpp msgid "Description" @@ -2083,15 +2091,15 @@ msgstr "Apraksts" #: editor/editor_help.cpp msgid "Online Tutorials" -msgstr "" +msgstr "Online Pamācības" #: editor/editor_help.cpp msgid "Properties" -msgstr "" +msgstr "Iestatījumi" #: editor/editor_help.cpp msgid "override:" -msgstr "" +msgstr "pārrakstīšana:" #: editor/editor_help.cpp msgid "default:" @@ -2099,15 +2107,15 @@ msgstr "pēc noklusējuma:" #: editor/editor_help.cpp msgid "Methods" -msgstr "" +msgstr "Metodes" #: editor/editor_help.cpp msgid "Theme Properties" -msgstr "" +msgstr "Motīva iestatījumi" #: editor/editor_help.cpp msgid "Enumerations" -msgstr "" +msgstr "Uzskaitījumi" #: editor/editor_help.cpp editor/plugins/theme_editor_plugin.cpp msgid "Constants" @@ -2115,17 +2123,19 @@ msgstr "Konstantes" #: editor/editor_help.cpp msgid "Property Descriptions" -msgstr "Mainīgo Apraksts" +msgstr "Iestatījumu apraksti" #: editor/editor_help.cpp msgid "(value)" -msgstr "" +msgstr "(vērtība)" #: editor/editor_help.cpp msgid "" "There is currently no description for this property. Please help us by " "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +"Pašreiz šim mainīgajam nav apraksta. Lūdzu, palīdzi mums [color=$color][url=" +"$url]izveidot to[/url][/color]!" #: editor/editor_help.cpp msgid "Method Descriptions" @@ -2136,31 +2146,33 @@ msgid "" "There is currently no description for this method. Please help us by [color=" "$color][url=$url]contributing one[/url][/color]!" msgstr "" +"Pašreiz šai metodei nav apraksta. Lūdzu, palīdzi mums [color=$color][url=" +"$url]pievienojot vienu[/url][/color]!" #: editor/editor_help_search.cpp editor/editor_node.cpp #: editor/plugins/script_editor_plugin.cpp msgid "Search Help" -msgstr "" +msgstr "Meklēt Palīdzību" #: editor/editor_help_search.cpp msgid "Case Sensitive" -msgstr "" +msgstr "Reģistrjūtīgs" #: editor/editor_help_search.cpp msgid "Show Hierarchy" -msgstr "" +msgstr "Rādīt Hierarhiju" #: editor/editor_help_search.cpp msgid "Display All" -msgstr "" +msgstr "Parādīt Visu" #: editor/editor_help_search.cpp msgid "Classes Only" -msgstr "" +msgstr "Tikai Klases" #: editor/editor_help_search.cpp msgid "Methods Only" -msgstr "" +msgstr "Tikai Metodes" #: editor/editor_help_search.cpp msgid "Signals Only" @@ -2168,27 +2180,27 @@ msgstr "Tikai Signāli" #: editor/editor_help_search.cpp msgid "Constants Only" -msgstr "" +msgstr "Tikai Konstantes" #: editor/editor_help_search.cpp msgid "Properties Only" -msgstr "" +msgstr "Tikai Iestatījumus" #: editor/editor_help_search.cpp msgid "Theme Properties Only" -msgstr "" +msgstr "Tikai Motīva Iestatījumus" #: editor/editor_help_search.cpp msgid "Member Type" -msgstr "" +msgstr "Dalībnieka veids" #: editor/editor_help_search.cpp msgid "Class" -msgstr "" +msgstr "Klase" #: editor/editor_help_search.cpp msgid "Method" -msgstr "" +msgstr "Metode" #: editor/editor_help_search.cpp editor/plugins/script_text_editor.cpp msgid "Signal" @@ -2196,32 +2208,32 @@ msgstr "Signāls" #: editor/editor_help_search.cpp msgid "Constant" -msgstr "" +msgstr "Konstante" #: editor/editor_help_search.cpp msgid "Property" -msgstr "" +msgstr "Mainīgais" #: editor/editor_help_search.cpp msgid "Theme Property" -msgstr "" +msgstr "Motīva Mainīgais" #: editor/editor_inspector.cpp editor/project_settings_editor.cpp msgid "Property:" -msgstr "" +msgstr "Parametrs:" #: editor/editor_inspector.cpp editor/scene_tree_dock.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Set %s" -msgstr "" +msgstr "Likt %s" #: editor/editor_inspector.cpp msgid "Set Multiple:" -msgstr "" +msgstr "Uzlikt vairākus:" #: editor/editor_log.cpp msgid "Output:" -msgstr "" +msgstr "Izeja:" #: editor/editor_log.cpp editor/plugins/tile_map_editor_plugin.cpp msgid "Copy Selection" @@ -2235,57 +2247,57 @@ msgstr "Kopēt Izvēlēto" #: modules/gdnative/gdnative_library_editor_plugin.cpp scene/gui/line_edit.cpp #: scene/gui/text_edit.cpp msgid "Clear" -msgstr "" +msgstr "Notītīt" #: editor/editor_log.cpp msgid "Clear Output" -msgstr "" +msgstr "Notīrīt Izeju" #: editor/editor_network_profiler.cpp editor/editor_node.cpp #: editor/editor_profiler.cpp msgid "Stop" -msgstr "" +msgstr "Pārtraukt" #: editor/editor_network_profiler.cpp editor/editor_profiler.cpp #: editor/plugins/animation_state_machine_editor.cpp editor/rename_dialog.cpp msgid "Start" -msgstr "" +msgstr "Sākt" #: editor/editor_network_profiler.cpp msgid "%s/s" -msgstr "" +msgstr "%s/s" #: editor/editor_network_profiler.cpp msgid "Down" -msgstr "" +msgstr "Lejup" #: editor/editor_network_profiler.cpp msgid "Up" -msgstr "" +msgstr "Augšup" #: editor/editor_network_profiler.cpp editor/editor_node.cpp msgid "Node" -msgstr "" +msgstr "Mezgls" #: editor/editor_network_profiler.cpp msgid "Incoming RPC" -msgstr "" +msgstr "Ienākošs RPC" #: editor/editor_network_profiler.cpp msgid "Incoming RSET" -msgstr "" +msgstr "Ienākošs RSET" #: editor/editor_network_profiler.cpp msgid "Outgoing RPC" -msgstr "" +msgstr "Izejošs RPC" #: editor/editor_network_profiler.cpp msgid "Outgoing RSET" -msgstr "" +msgstr "Izejošs RSET" #: editor/editor_node.cpp editor/project_manager.cpp msgid "New Window" -msgstr "" +msgstr "Jauns logs" #: editor/editor_node.cpp msgid "" @@ -2293,98 +2305,107 @@ msgid "" "Update Continuously is enabled, which can increase power usage. Click to " "disable it." msgstr "" +"Griežas, kad redaktora logs atjauninas.\n" +"Atjaunināt konstanti ir iespējots, kas var palielināt jaudas izmantošanu. " +"Klikšķini, lai atslēgtu." #: editor/editor_node.cpp msgid "Spins when the editor window redraws." -msgstr "" +msgstr "Griežas, kad redaktora logs atjauninas." #: editor/editor_node.cpp msgid "Imported resources can't be saved." -msgstr "" +msgstr "Importētie resursi nevar tikt saglabāti." #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: editor/plugins/theme_editor_plugin.cpp #: modules/gltf/editor_scene_exporter_gltf_plugin.cpp scene/gui/dialogs.cpp msgid "OK" -msgstr "" +msgstr "Labi" #: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp msgid "Error saving resource!" -msgstr "" +msgstr "Kļūda saglabājot resursu!" #: editor/editor_node.cpp msgid "" "This resource can't be saved because it does not belong to the edited scene. " "Make it unique first." msgstr "" +"Šo resursu nevar saglabāt, jo tas nepieder rediģētajai ainai. Vispirms " +"uztaisi to unikālu." #: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp msgid "Save Resource As..." -msgstr "" +msgstr "Saglabāt Resursu Kā..." #: editor/editor_node.cpp msgid "Can't open file for writing:" -msgstr "" +msgstr "Nevar atvērt failu rakstīšanai:" #: editor/editor_node.cpp msgid "Requested file format unknown:" -msgstr "" +msgstr "Pieprasītais faila formāts ir nezināms:" #: editor/editor_node.cpp msgid "Error while saving." -msgstr "" +msgstr "Kļūda saglabājot." #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp msgid "Can't open '%s'. The file could have been moved or deleted." -msgstr "" +msgstr "Nevar atvērt '%s'. Fails ir pārvietots vai dzēsts." #: editor/editor_node.cpp msgid "Error while parsing '%s'." -msgstr "" +msgstr "Kļūda pārsienot '%s'." #: editor/editor_node.cpp msgid "Unexpected end of file '%s'." -msgstr "" +msgstr "Negaidītas faila beigas '%s'." #: editor/editor_node.cpp msgid "Missing '%s' or its dependencies." -msgstr "" +msgstr "Iztrūkst '%s' vai tā atkarības." #: editor/editor_node.cpp msgid "Error while loading '%s'." -msgstr "" +msgstr "Kļūda ielādējot '%s'." #: editor/editor_node.cpp msgid "Saving Scene" -msgstr "" +msgstr "Saglabā Ainu" #: editor/editor_node.cpp msgid "Analyzing" -msgstr "" +msgstr "Analizē" #: editor/editor_node.cpp msgid "Creating Thumbnail" -msgstr "" +msgstr "Izveido sīktēlu" #: editor/editor_node.cpp msgid "This operation can't be done without a tree root." -msgstr "" +msgstr "Nevar veikt šo darbību bez koka cilmes." #: editor/editor_node.cpp msgid "" "This scene can't be saved because there is a cyclic instancing inclusion.\n" "Please resolve it and then attempt to save again." msgstr "" +"Šo ainu nevar saglabāt, jo ir konstatēta cikliska instancēšanas cilpa.\n" +"Lūdzu, atrisini to un tad mēgini saglabāt ainu vēlreiz." #: editor/editor_node.cpp msgid "" "Couldn't save scene. Likely dependencies (instances or inheritance) couldn't " "be satisfied." msgstr "" +"Nevar saglabāt ainu. Drošivien atkarības (instances vai mantojumi) ir " +"kļūdainas." #: editor/editor_node.cpp msgid "Could not save one or more scenes!" -msgstr "" +msgstr "Nevar saglabāt vienu vai vairākas ainas!" #: editor/editor_node.cpp msgid "Save All Scenes" @@ -2392,29 +2413,31 @@ msgstr "Saglabāt Visas Ainas" #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" -msgstr "" +msgstr "Nevar pārrakstīt ainu, kas joprojām ir atvērta!" #: editor/editor_node.cpp msgid "Can't load MeshLibrary for merging!" -msgstr "" +msgstr "Nevarēja ielādēt tīklu bibliotēku sapludināšanai!" #: editor/editor_node.cpp msgid "Error saving MeshLibrary!" -msgstr "" +msgstr "Kļūda saglabājot tīkla bibliotēku!" #: editor/editor_node.cpp msgid "Can't load TileSet for merging!" -msgstr "" +msgstr "Nevar ielādēt flīžu karti sapludināšanai!" #: editor/editor_node.cpp msgid "Error saving TileSet!" -msgstr "" +msgstr "Kļūda saglabājot flīžu komplektu!" #: editor/editor_node.cpp msgid "" "An error occurred while trying to save the editor layout.\n" "Make sure the editor's user data path is writable." msgstr "" +"Notika gļūda saglabājot redaktora izkārtojumu.\n" +"Pārliecinies, ka redaktora lietotāja datu mape ir rakstāma." #: editor/editor_node.cpp msgid "" @@ -2425,11 +2448,11 @@ msgstr "" #: editor/editor_node.cpp msgid "Layout name not found!" -msgstr "" +msgstr "Izkārtojuma nosaukums nav atrasts!" #: editor/editor_node.cpp msgid "Restored the Default layout to its base settings." -msgstr "" +msgstr "Noklusējuma izkārtojums atjaunots uz bāzes iestatījumiem." #: editor/editor_node.cpp msgid "" @@ -2467,23 +2490,23 @@ msgstr "" #: editor/editor_node.cpp msgid "There is no defined scene to run." -msgstr "" +msgstr "Nav definēta aina, kuru palaist." #: editor/editor_node.cpp msgid "Save scene before running..." -msgstr "" +msgstr "Saglabā ainu pirms palaišanas..." #: editor/editor_node.cpp msgid "Could not start subprocess!" -msgstr "" +msgstr "Nevar palaist sub-procesu!" #: editor/editor_node.cpp editor/filesystem_dock.cpp msgid "Open Scene" -msgstr "" +msgstr "Atvērt ainu" #: editor/editor_node.cpp msgid "Open Base Scene" -msgstr "" +msgstr "Atvērt bāzes ainu" #: editor/editor_node.cpp msgid "Quick Open..." @@ -2491,23 +2514,23 @@ msgstr "Ātri Atvērt..." #: editor/editor_node.cpp msgid "Quick Open Scene..." -msgstr "" +msgstr "Ātri atvērt ainu..." #: editor/editor_node.cpp msgid "Quick Open Script..." -msgstr "" +msgstr "ātri atvērt skriptu..." #: editor/editor_node.cpp msgid "Save & Close" -msgstr "" +msgstr "Saglabāt & aizvērt" #: editor/editor_node.cpp msgid "Save changes to '%s' before closing?" -msgstr "" +msgstr "Saglabāt izmaiņas '%s' pirms aizvēršanas ?" #: editor/editor_node.cpp msgid "%s no longer exists! Please specify a new save location." -msgstr "" +msgstr "%s vairs neeksistē! Lūdzu norādi jaunu saglabāšanas lokāciju." #: editor/editor_node.cpp msgid "" @@ -2523,43 +2546,43 @@ msgstr "" #: editor/editor_node.cpp msgid "Save Scene As..." -msgstr "" +msgstr "Saglabāt ainu kā..." #: editor/editor_node.cpp modules/gltf/editor_scene_exporter_gltf_plugin.cpp msgid "This operation can't be done without a scene." -msgstr "" +msgstr "Šo operāciju nevar veikt bez ainas." #: editor/editor_node.cpp msgid "Export Mesh Library" -msgstr "" +msgstr "Ekportēt tīkla bibliotēku" #: editor/editor_node.cpp msgid "This operation can't be done without a root node." -msgstr "" +msgstr "Šī darbība nevar tikt veikta bez cilmes mezgla." #: editor/editor_node.cpp msgid "Export Tile Set" -msgstr "" +msgstr "Eksportēt flīžu kopumu" #: editor/editor_node.cpp msgid "This operation can't be done without a selected node." -msgstr "" +msgstr "Šo darbību nevar veikt bez izvēlēta mezgla." #: editor/editor_node.cpp msgid "Current scene not saved. Open anyway?" -msgstr "" +msgstr "Pašreizējā aina nav saglabāta. Vienalga atvērt ?" #: editor/editor_node.cpp msgid "Can't undo while mouse buttons are pressed." -msgstr "" +msgstr "Nevar atgriezt, kad peles pogas ir nospiestas." #: editor/editor_node.cpp msgid "Nothing to undo." -msgstr "" +msgstr "Nav ko atgriezt." #: editor/editor_node.cpp msgid "Undo: %s" -msgstr "" +msgstr "Atgriezts: %s" #: editor/editor_node.cpp msgid "Can't redo while mouse buttons are pressed." @@ -2575,12 +2598,11 @@ msgstr "" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." -msgstr "" +msgstr "Nevar pārlādēt ainu, kas nav bijusi saglabāta." #: editor/editor_node.cpp -#, fuzzy msgid "Reload Saved Scene" -msgstr "Atvērt Aizvērto Ainu" +msgstr "Pārlādēt saglabāto ainu" #: editor/editor_node.cpp msgid "" @@ -2590,49 +2612,52 @@ msgstr "" #: editor/editor_node.cpp msgid "Quick Run Scene..." -msgstr "" +msgstr "Ātri palaist ainu..." #: editor/editor_node.cpp msgid "Quit" -msgstr "" +msgstr "Iziet" #: editor/editor_node.cpp msgid "Yes" -msgstr "" +msgstr "Jā" #: editor/editor_node.cpp msgid "Exit the editor?" -msgstr "" +msgstr "Iziet no redaktora?" #: editor/editor_node.cpp msgid "Open Project Manager?" -msgstr "" +msgstr "Atvērt projektu menedžeri ?" #: editor/editor_node.cpp msgid "Save & Quit" -msgstr "" +msgstr "Saglabāt & iziet" #: editor/editor_node.cpp msgid "Save changes to the following scene(s) before quitting?" -msgstr "" +msgstr "Saglabāt izmaiņas sekojošai ainai(-ām) pirms iziešanas ?" #: editor/editor_node.cpp msgid "Save changes to the following scene(s) before opening Project Manager?" msgstr "" +"Saglabāt izmaiņas sekojošai ainai(-ām) pirms projektu menedžera atvēršanas ?" #: editor/editor_node.cpp msgid "" "This option is deprecated. Situations where refresh must be forced are now " "considered a bug. Please report." msgstr "" +"Šī iespēja in novecojusi. Situācijas, kad atsvaidzināšana ir jāveic " +"piespiedu kārtā, ir uzskatāma par kļūdu, lūdzu ziņojiet." #: editor/editor_node.cpp msgid "Pick a Main Scene" -msgstr "" +msgstr "Izvēlēties galveno ainu" #: editor/editor_node.cpp msgid "Close Scene" -msgstr "" +msgstr "Aizvērt ainu" #: editor/editor_node.cpp msgid "Reopen Closed Scene" @@ -2644,11 +2669,11 @@ msgstr "" #: editor/editor_node.cpp msgid "Unable to find script field for addon plugin at: '%s'." -msgstr "" +msgstr "Nevarēja atrast skripta lauku spraudnim: '%s'." #: editor/editor_node.cpp msgid "Unable to load addon script from path: '%s'." -msgstr "" +msgstr "Nevarēja ielādēt spraudņa skriptu no: '%s'." #: editor/editor_node.cpp msgid "" @@ -2665,6 +2690,7 @@ msgstr "" #: editor/editor_node.cpp msgid "Unable to load addon script from path: '%s' Script is not in tool mode." msgstr "" +"Nevarēja ielādēt spraudņā skriptu no mapes: '%s' Skripts nav rīka režīmā." #: editor/editor_node.cpp msgid "" @@ -2680,11 +2706,11 @@ msgstr "" #: editor/editor_node.cpp msgid "Scene '%s' has broken dependencies:" -msgstr "" +msgstr "Ainai '%s' ir bojātas atkarības:" #: editor/editor_node.cpp msgid "Clear Recent Scenes" -msgstr "" +msgstr "Notīrīt nesenās ainas" #: editor/editor_node.cpp msgid "" @@ -2709,25 +2735,25 @@ msgstr "" #: editor/editor_node.cpp msgid "Save Layout" -msgstr "" +msgstr "Saglabāt izkārtojumu" #: editor/editor_node.cpp msgid "Delete Layout" -msgstr "" +msgstr "Dzēst izkārtojumu" #: editor/editor_node.cpp editor/import_dock.cpp #: editor/script_create_dialog.cpp msgid "Default" -msgstr "" +msgstr "Noklusējuma" #: editor/editor_node.cpp editor/editor_resource_picker.cpp #: editor/plugins/script_editor_plugin.cpp editor/property_editor.cpp msgid "Show in FileSystem" -msgstr "" +msgstr "Parādīt failu sistēmā" #: editor/editor_node.cpp msgid "Play This Scene" -msgstr "" +msgstr "Spēlēt šo ainu" #: editor/editor_node.cpp msgid "Close Tab" @@ -2739,11 +2765,11 @@ msgstr "Atcelt Cilnes Aizvēršanu" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp msgid "Close Other Tabs" -msgstr "" +msgstr "Aizvērt pārējās cilnes" #: editor/editor_node.cpp msgid "Close Tabs to the Right" -msgstr "" +msgstr "Aizvērt cilnes pa labi" #: editor/editor_node.cpp msgid "Close All Tabs" @@ -2751,23 +2777,23 @@ msgstr "Aizvērt Visas Cilnes" #: editor/editor_node.cpp msgid "Switch Scene Tab" -msgstr "" +msgstr "Pārslēgt ainas cilni" #: editor/editor_node.cpp msgid "%d more files or folders" -msgstr "" +msgstr "%d vēl faili vai mapes" #: editor/editor_node.cpp msgid "%d more folders" -msgstr "" +msgstr "%s vēl mapes" #: editor/editor_node.cpp msgid "%d more files" -msgstr "" +msgstr "%d vēl faili" #: editor/editor_node.cpp msgid "Dock Position" -msgstr "" +msgstr "Doka pozīcija" #: editor/editor_node.cpp msgid "Distraction Free Mode" @@ -2779,15 +2805,15 @@ msgstr "" #: editor/editor_node.cpp msgid "Add a new scene." -msgstr "" +msgstr "Pievienot jaunu ainu." #: editor/editor_node.cpp msgid "Scene" -msgstr "" +msgstr "Aina" #: editor/editor_node.cpp msgid "Go to previously opened scene." -msgstr "" +msgstr "Iet uz iepriekš atvērto ainu." #: editor/editor_node.cpp msgid "Copy Text" @@ -2795,15 +2821,15 @@ msgstr "Kopēt Tekstu" #: editor/editor_node.cpp msgid "Next tab" -msgstr "" +msgstr "Nākamā cilne" #: editor/editor_node.cpp msgid "Previous tab" -msgstr "" +msgstr "Iepriekšējā cilne" #: editor/editor_node.cpp msgid "Filter Files..." -msgstr "" +msgstr "Filtrēt failus..." #: editor/editor_node.cpp msgid "Operations with scene files." @@ -2823,15 +2849,15 @@ msgstr "" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp msgid "Open Recent" -msgstr "" +msgstr "Atvērt nesenu" #: editor/editor_node.cpp msgid "Save Scene" -msgstr "" +msgstr "Saglabāt ainu" #: editor/editor_node.cpp msgid "Convert To..." -msgstr "" +msgstr "Konvertēt Uz..." #: editor/editor_node.cpp msgid "MeshLibrary..." @@ -2844,12 +2870,12 @@ msgstr "" #: editor/editor_node.cpp editor/plugins/script_text_editor.cpp #: scene/gui/line_edit.cpp scene/gui/text_edit.cpp msgid "Undo" -msgstr "" +msgstr "Atsaukt" #: editor/editor_node.cpp editor/plugins/script_text_editor.cpp #: scene/gui/line_edit.cpp scene/gui/text_edit.cpp msgid "Redo" -msgstr "" +msgstr "Pārtaisīt" #: editor/editor_node.cpp msgid "Miscellaneous project or scene-wide tools." @@ -2858,31 +2884,31 @@ msgstr "" #: editor/editor_node.cpp editor/project_manager.cpp #: editor/script_create_dialog.cpp msgid "Project" -msgstr "" +msgstr "Projekts" #: editor/editor_node.cpp msgid "Project Settings..." -msgstr "" +msgstr "Projekta iestatjumi..." #: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp msgid "Version Control" -msgstr "" +msgstr "Versiju Kontrole" #: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp msgid "Set Up Version Control" -msgstr "" +msgstr "Uzstādīt Versiju Kontroli" #: editor/editor_node.cpp msgid "Shut Down Version Control" -msgstr "" +msgstr "Izbeigt Versiju Kontroli" #: editor/editor_node.cpp msgid "Export..." -msgstr "" +msgstr "Eksportēt..." #: editor/editor_node.cpp msgid "Install Android Build Template..." -msgstr "" +msgstr "Instalēt Android būves šablonu..." #: editor/editor_node.cpp msgid "Open Project Data Folder" @@ -2890,28 +2916,28 @@ msgstr "Atvērt Projekta Datu Mapi" #: editor/editor_node.cpp editor/plugins/tile_set_editor_plugin.cpp msgid "Tools" -msgstr "" +msgstr "Rīki" #: editor/editor_node.cpp msgid "Orphan Resource Explorer..." -msgstr "" +msgstr "Bāreņu resursu pārlūks..." #: editor/editor_node.cpp msgid "Reload Current Project" -msgstr "" +msgstr "Pārlādēt pašreizējo projektu" #: editor/editor_node.cpp msgid "Quit to Project List" -msgstr "" +msgstr "Iziet uz projektu sarakstu" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: editor/project_export.cpp msgid "Debug" -msgstr "" +msgstr "Atkļūdot" #: editor/editor_node.cpp msgid "Deploy with Remote Debug" -msgstr "" +msgstr "Palaist ar tālvadības atkļūdošanu" #: editor/editor_node.cpp msgid "" @@ -2922,10 +2948,16 @@ msgid "" "mobile device).\n" "You don't need to enable it to use the GDScript debugger locally." msgstr "" +"Kad šī opcija ir ieslēgta, izmantojot viena klikšķa palaišanu, tā liks " +"spēlei savienoties ar šī datora IP adresi, lai pašreizējais projekts varētu " +"tik atkļūdots attālināti.\n" +"Šī opcija ir paredzēta izmantošanai tālvadības atkļūdošanai (parasti ar " +"mobilu ierīci).\n" +"Jums tā nav jāieslēdz, lai izmantotu GDScript atkļūdotāju lokāli." #: editor/editor_node.cpp msgid "Small Deploy with Network Filesystem" -msgstr "" +msgstr "Mazā palaišana ar tīkla failu sistēmu" #: editor/editor_node.cpp msgid "" @@ -2936,10 +2968,15 @@ msgid "" "On Android, deploying will use the USB cable for faster performance. This " "option speeds up testing for projects with large assets." msgstr "" +"Kad šī opcija ir ieslēgta, izmantojot viena klikšķa palaišanu uz Android, tā " +"eksportēs tikai spēles palaišanas failu bez projekta datiem.\n" +"Projekta failu sistēma tiks nodrošināta attālināti, caur internetu.\n" +"Uz Android, palaišana izmantos USB kabeli, lai nodrošinātu ātrāku " +"izpildījumu. Šī opcija paātrina projektu testēšanu ar milzīgiem resursiem." #: editor/editor_node.cpp msgid "Visible Collision Shapes" -msgstr "" +msgstr "Redzamas sadursmes formas" #: editor/editor_node.cpp msgid "" @@ -2949,7 +2986,7 @@ msgstr "" #: editor/editor_node.cpp msgid "Visible Navigation" -msgstr "" +msgstr "Redzama navigācija" #: editor/editor_node.cpp msgid "" @@ -2959,7 +2996,7 @@ msgstr "" #: editor/editor_node.cpp msgid "Synchronize Scene Changes" -msgstr "" +msgstr "Sinhronizēt ainas izmaiņas" #: editor/editor_node.cpp msgid "" @@ -2971,7 +3008,7 @@ msgstr "" #: editor/editor_node.cpp msgid "Synchronize Script Changes" -msgstr "" +msgstr "Sinhronizēt skripta izmaiņas" #: editor/editor_node.cpp msgid "" @@ -2983,108 +3020,107 @@ msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp msgid "Editor" -msgstr "" +msgstr "Redaktors" #: editor/editor_node.cpp msgid "Editor Settings..." -msgstr "" +msgstr "Redaktora iestatījumi..." #: editor/editor_node.cpp msgid "Editor Layout" -msgstr "" +msgstr "Redaktora izkārtojums" #: editor/editor_node.cpp msgid "Take Screenshot" -msgstr "" +msgstr "Uzņemt Ekrānšāviņu" #: editor/editor_node.cpp msgid "Screenshots are stored in the Editor Data/Settings Folder." -msgstr "" +msgstr "Ekrānšāviņi tiek saglabāti redaktora datu / iestatījumu mapē." #: editor/editor_node.cpp msgid "Toggle Fullscreen" -msgstr "" +msgstr "Pārslēgt Pilnekrānu" #: editor/editor_node.cpp msgid "Toggle System Console" -msgstr "" +msgstr "Pārslēgt sistēmas konsoli" #: editor/editor_node.cpp msgid "Open Editor Data/Settings Folder" -msgstr "" +msgstr "Atvērt redaktora datu / iestatījumu mapi" #: editor/editor_node.cpp msgid "Open Editor Data Folder" -msgstr "" +msgstr "Atvērt redaktora datu mapi" #: editor/editor_node.cpp msgid "Open Editor Settings Folder" -msgstr "" +msgstr "Atvērt redaktora iestatījumu mapi" #: editor/editor_node.cpp msgid "Manage Editor Features..." -msgstr "" +msgstr "Pārcaldīt redaktora iespējas..." #: editor/editor_node.cpp msgid "Manage Export Templates..." -msgstr "" +msgstr "Pārvaldīt eksporta šablonus..." #: editor/editor_node.cpp editor/plugins/shader_editor_plugin.cpp msgid "Help" -msgstr "" +msgstr "Palīdzība" #: editor/editor_node.cpp msgid "Online Documentation" -msgstr "" +msgstr "Tiešsaistes Dokumentācija" #: editor/editor_node.cpp msgid "Questions & Answers" -msgstr "" +msgstr "Jautājumi & Atbildes" #: editor/editor_node.cpp msgid "Report a Bug" -msgstr "" +msgstr "Ziņot par kļūmi" #: editor/editor_node.cpp msgid "Suggest a Feature" -msgstr "" +msgstr "Ieteikt Iespēju" #: editor/editor_node.cpp msgid "Send Docs Feedback" -msgstr "" +msgstr "Sūtīt dokumentu atsauksmi" #: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp msgid "Community" -msgstr "Sabiedrība" +msgstr "Komūns" #: editor/editor_node.cpp -#, fuzzy msgid "About Godot" -msgstr "Par" +msgstr "Par Godot" #: editor/editor_node.cpp msgid "Support Godot Development" -msgstr "" +msgstr "Atbalstīt Godot izstrādi" #: editor/editor_node.cpp msgid "Play the project." -msgstr "" +msgstr "Atskaņot projektu." #: editor/editor_node.cpp msgid "Play" -msgstr "" +msgstr "Atskaņot" #: editor/editor_node.cpp msgid "Pause the scene execution for debugging." -msgstr "" +msgstr "Pauzēt ainas izpildi priekš atkļūdošanas." #: editor/editor_node.cpp msgid "Pause Scene" -msgstr "" +msgstr "Pauzēt ainu" #: editor/editor_node.cpp msgid "Stop the scene." -msgstr "" +msgstr "Apstādināt ainu." #: editor/editor_node.cpp msgid "Play the edited scene." @@ -3092,7 +3128,7 @@ msgstr "" #: editor/editor_node.cpp msgid "Play Scene" -msgstr "" +msgstr "Spēlēt Ainu" #: editor/editor_node.cpp msgid "Play custom scene" @@ -3109,7 +3145,7 @@ msgstr "" #: editor/editor_node.cpp editor/project_settings_editor.cpp #: editor/settings_config_dialog.cpp msgid "Save & Restart" -msgstr "" +msgstr "Saglabāt & pārstartēt" #: editor/editor_node.cpp msgid "Update Continuously" @@ -3117,7 +3153,7 @@ msgstr "Nepārtraukti Atjaunot" #: editor/editor_node.cpp msgid "Update When Changed" -msgstr "" +msgstr "Atjaunot Kad Mainīts" #: editor/editor_node.cpp msgid "Hide Update Spinner" @@ -3125,11 +3161,11 @@ msgstr "" #: editor/editor_node.cpp msgid "FileSystem" -msgstr "" +msgstr "Failu sistēma" #: editor/editor_node.cpp msgid "Inspector" -msgstr "" +msgstr "Inspektors" #: editor/editor_node.cpp msgid "Expand Bottom Panel" @@ -3137,11 +3173,11 @@ msgstr "" #: editor/editor_node.cpp msgid "Output" -msgstr "" +msgstr "Izeja" #: editor/editor_node.cpp msgid "Don't Save" -msgstr "" +msgstr "Nesaglabāt" #: editor/editor_node.cpp msgid "Android build template is missing, please install relevant templates." @@ -3169,6 +3205,12 @@ msgid "" "the \"Use Custom Build\" option should be enabled in the Android export " "preset." msgstr "" +"Šis iestatīs jūsu projektu priekš pielāgotām Android būvēm, ieinstalējot " +"avota šablonu uz \"res://android/build\".\n" +"Jūs varat veikt izmaiņas un uzbūvēt paši savu pielāgoto APK pie " +"eksportēšanas (pievienot moduļus, mainīt AndroidManifest.xml, utt.).\n" +"Piezīme - lai veiktu pielāgotās būves jau iebūvēto APK vietā, opcijai " +"\"Izmantot Pielāgotu būvi\" jābūt ieslēgtai pie Android eksporta šablona." #: editor/editor_node.cpp msgid "" @@ -3195,30 +3237,30 @@ msgid "Merge With Existing" msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "Apply MeshInstance Transforms" -msgstr "Anim Izmainīt Transformāciju" +msgstr "Pielietot MeshInstances Transformācijas" #: editor/editor_node.cpp msgid "Open & Run a Script" msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "" "The following files are newer on disk.\n" "What action should be taken?" -msgstr "Sekojošie faili netika izvilkti no paketes:" +msgstr "" +"Sekojošie faili ir jaunāki uz diska.\n" +"Kādu darbību veikt ?" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Reload" -msgstr "" +msgstr "Pārlādēt" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Resave" -msgstr "" +msgstr "Pārglabāt" #: editor/editor_node.cpp msgid "New Inherited" @@ -3226,28 +3268,27 @@ msgstr "" #: editor/editor_node.cpp msgid "Load Errors" -msgstr "" +msgstr "Ielādēt kļūdas" #: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp msgid "Select" -msgstr "" +msgstr "Izvēlēties" #: editor/editor_node.cpp -#, fuzzy msgid "Select Current" -msgstr "Aktualizēt" +msgstr "Izvēlēties pašreizējo" #: editor/editor_node.cpp msgid "Open 2D Editor" -msgstr "" +msgstr "Atvērt 2D redaktoru" #: editor/editor_node.cpp msgid "Open 3D Editor" -msgstr "" +msgstr "Atvērt 3D redaktoru" #: editor/editor_node.cpp msgid "Open Script Editor" -msgstr "" +msgstr "Atvērt skriptu redaktoru" #: editor/editor_node.cpp editor/project_manager.cpp msgid "Open Asset Library" @@ -3255,23 +3296,23 @@ msgstr "" #: editor/editor_node.cpp msgid "Open the next Editor" -msgstr "" +msgstr "Atvērt nākamo redaktoru" #: editor/editor_node.cpp msgid "Open the previous Editor" -msgstr "" +msgstr "Atvērt iepriekšējo redaktoru" #: editor/editor_node.h msgid "Warning!" -msgstr "" +msgstr "Brīdinājums!" #: editor/editor_path.cpp msgid "No sub-resources found." -msgstr "" +msgstr "Sub-resursi nav atrasti." #: editor/editor_path.cpp msgid "Open a list of sub-resources." -msgstr "" +msgstr "Atvērt sarakstu ar sub-resursiem." #: editor/editor_plugin.cpp msgid "Creating Mesh Previews" @@ -3279,7 +3320,7 @@ msgstr "" #: editor/editor_plugin.cpp msgid "Thumbnail..." -msgstr "" +msgstr "Sīktēls..." #: editor/editor_plugin_settings.cpp msgid "Main Script:" @@ -3287,59 +3328,57 @@ msgstr "Galvenais Skripts:" #: editor/editor_plugin_settings.cpp msgid "Edit Plugin" -msgstr "" +msgstr "Rediģēt spraudni" #: editor/editor_plugin_settings.cpp msgid "Installed Plugins:" -msgstr "" +msgstr "Instalētie spraudņi:" #: editor/editor_plugin_settings.cpp editor/plugin_config_dialog.cpp msgid "Update" -msgstr "" +msgstr "Atjaunināt" #: editor/editor_plugin_settings.cpp msgid "Version" -msgstr "" +msgstr "Versija" #: editor/editor_plugin_settings.cpp -#, fuzzy msgid "Author" -msgstr "Autori" +msgstr "Autors" #: editor/editor_plugin_settings.cpp #: editor/plugins/version_control_editor_plugin.cpp #: modules/gdnative/gdnative_library_singleton_editor.cpp msgid "Status" -msgstr "" +msgstr "Statuss" #: editor/editor_profiler.cpp msgid "Measure:" -msgstr "" +msgstr "Mērogs:" #: editor/editor_profiler.cpp -#, fuzzy msgid "Frame Time (ms)" -msgstr "Laiks (s): " +msgstr "Kadra Laiks (ms)" #: editor/editor_profiler.cpp msgid "Average Time (ms)" -msgstr "" +msgstr "Vidējais laiks (ms)" #: editor/editor_profiler.cpp msgid "Frame %" -msgstr "" +msgstr "Kadrs %" #: editor/editor_profiler.cpp msgid "Physics Frame %" -msgstr "" +msgstr "Fizikas kadrs %" #: editor/editor_profiler.cpp msgid "Inclusive" -msgstr "" +msgstr "Iekļaujošs" #: editor/editor_profiler.cpp msgid "Self" -msgstr "" +msgstr "Sevi" #: editor/editor_profiler.cpp msgid "" @@ -3353,15 +3392,15 @@ msgstr "" #: editor/editor_profiler.cpp msgid "Frame #:" -msgstr "" +msgstr "Kadrs #:" #: editor/editor_profiler.cpp msgid "Time" -msgstr "" +msgstr "Laiks" #: editor/editor_profiler.cpp msgid "Calls" -msgstr "" +msgstr "Izsaukumi" #: editor/editor_properties.cpp msgid "Edit Text:" @@ -3373,19 +3412,19 @@ msgstr "" #: editor/editor_properties.cpp msgid "Layer" -msgstr "" +msgstr "Kārta" #: editor/editor_properties.cpp msgid "Bit %d, value %d" -msgstr "" +msgstr "Bits %d, vērtība %d" #: editor/editor_properties.cpp msgid "[Empty]" -msgstr "" +msgstr "[Tukšs]" #: editor/editor_properties.cpp editor/plugins/root_motion_editor_plugin.cpp msgid "Assign..." -msgstr "" +msgstr "Pievienot..." #: editor/editor_properties.cpp msgid "Invalid RID" @@ -3415,24 +3454,24 @@ msgstr "" #: editor/editor_properties_array_dict.cpp msgid "Size: " -msgstr "" +msgstr "Izmērs: " #: editor/editor_properties_array_dict.cpp msgid "Page: " -msgstr "" +msgstr "Lapa: " #: editor/editor_properties_array_dict.cpp #: editor/plugins/theme_editor_plugin.cpp msgid "Remove Item" -msgstr "" +msgstr "Noņemt vienumu" #: editor/editor_properties_array_dict.cpp msgid "New Key:" -msgstr "" +msgstr "Jauna atslēga:" #: editor/editor_properties_array_dict.cpp msgid "New Value:" -msgstr "" +msgstr "Jauna vērtība:" #: editor/editor_properties_array_dict.cpp msgid "Add Key/Value Pair" @@ -3464,12 +3503,11 @@ msgstr "" #: editor/plugins/tile_map_editor_plugin.cpp editor/property_editor.cpp #: editor/scene_tree_dock.cpp scene/gui/line_edit.cpp scene/gui/text_edit.cpp msgid "Paste" -msgstr "" +msgstr "Ielīmēt" #: editor/editor_resource_picker.cpp editor/property_editor.cpp -#, fuzzy msgid "Convert to %s" -msgstr "Izveidot" +msgstr "Konvertēt uz %s" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "New %s" @@ -3477,7 +3515,7 @@ msgstr "" #: editor/editor_resource_picker.cpp editor/property_editor.cpp msgid "New Script" -msgstr "" +msgstr "Jauns skripts" #: editor/editor_resource_picker.cpp editor/scene_tree_dock.cpp msgid "Extend Script" @@ -3524,7 +3562,7 @@ msgstr "" #: editor/editor_sub_scene.cpp editor/project_manager.cpp msgid "Browse" -msgstr "" +msgstr "Pālūkot" #: editor/editor_sub_scene.cpp msgid "Scene Path:" @@ -3552,7 +3590,7 @@ msgstr "" #: editor/export_template_manager.cpp msgid "Starting the download..." -msgstr "" +msgstr "Sāk lejuplādi..." #: editor/export_template_manager.cpp msgid "Error requesting URL:" @@ -3621,11 +3659,11 @@ msgstr "" #: editor/export_template_manager.cpp msgid "Disconnected" -msgstr "" +msgstr "Atvienots" #: editor/export_template_manager.cpp msgid "Resolving" -msgstr "" +msgstr "Atrisina" #: editor/export_template_manager.cpp msgid "Can't Resolve" @@ -3634,24 +3672,24 @@ msgstr "" #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp msgid "Connecting..." -msgstr "" +msgstr "Savienojas..." #: editor/export_template_manager.cpp msgid "Can't Connect" -msgstr "" +msgstr "Nevar Savieoties" #: editor/export_template_manager.cpp msgid "Connected" -msgstr "" +msgstr "Savienots" #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp msgid "Requesting..." -msgstr "" +msgstr "Pieprasa..." #: editor/export_template_manager.cpp msgid "Downloading" -msgstr "" +msgstr "Lejuplādē" #: editor/export_template_manager.cpp msgid "Connection Error" @@ -3683,23 +3721,23 @@ msgstr "" #: editor/export_template_manager.cpp msgid "Importing:" -msgstr "" +msgstr "Importē:" #: editor/export_template_manager.cpp msgid "Remove templates for the version '%s'?" -msgstr "" +msgstr "Noņemt šablonus versijai '%s'?" #: editor/export_template_manager.cpp msgid "Uncompressing Android Build Sources" -msgstr "" +msgstr "Atspiež Android būves avotus" #: editor/export_template_manager.cpp msgid "Export Template Manager" -msgstr "" +msgstr "Eksporta šablonu menedžeris" #: editor/export_template_manager.cpp msgid "Current Version:" -msgstr "" +msgstr "Pašreizējā Versija:" #: editor/export_template_manager.cpp msgid "Export templates are missing. Download them or install from a file." @@ -3710,9 +3748,8 @@ msgid "Export templates are installed and ready to be used." msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Open Folder" -msgstr "Atvērt" +msgstr "Atvērt mapi" #: editor/export_template_manager.cpp msgid "Open the folder containing installed templates for the current version." @@ -3720,7 +3757,7 @@ msgstr "" #: editor/export_template_manager.cpp msgid "Uninstall" -msgstr "" +msgstr "Atinstalēt" #: editor/export_template_manager.cpp msgid "Uninstall templates for the current version." @@ -3731,9 +3768,8 @@ msgid "Download from:" msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Open in Web Browser" -msgstr "Atvērt Failu Pārlūkā" +msgstr "Atvērt interneta pārlūkā" #: editor/export_template_manager.cpp msgid "Copy Mirror URL" @@ -3755,7 +3791,7 @@ msgstr "" #: editor/export_template_manager.cpp msgid "Install from File" -msgstr "" +msgstr "Instalēt no Faila" #: editor/export_template_manager.cpp msgid "Install templates from a local file." @@ -3791,6 +3827,8 @@ msgid "" "The templates will continue to download.\n" "You may experience a short editor freeze when they finish." msgstr "" +"Šablonu lejuplādes turpināsies.\n" +"Jūs varat pieredzēt īslaicīgu redaktora sastingšanu, kad tās tiks pabeigtas." #: editor/filesystem_dock.cpp msgid "Favorites" @@ -3815,7 +3853,7 @@ msgstr "" #: editor/filesystem_dock.cpp msgid "Error moving:" -msgstr "" +msgstr "Kļūda parvietojot:" #: editor/filesystem_dock.cpp msgid "Error duplicating:" @@ -3853,7 +3891,7 @@ msgstr "" #: editor/filesystem_dock.cpp msgid "Renaming file:" -msgstr "" +msgstr "Pārsauc failu:" #: editor/filesystem_dock.cpp msgid "Renaming folder:" @@ -3881,7 +3919,7 @@ msgstr "Atvērt Ainas" #: editor/filesystem_dock.cpp msgid "Instance" -msgstr "" +msgstr "Šablons" #: editor/filesystem_dock.cpp msgid "Add to Favorites" @@ -3909,7 +3947,7 @@ msgstr "Jauna Aina..." #: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp msgid "New Script..." -msgstr "" +msgstr "Jauns Skripts..." #: editor/filesystem_dock.cpp msgid "New Resource..." @@ -3928,9 +3966,8 @@ msgid "Collapse All" msgstr "" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Sort files" -msgstr "Meklēt failus" +msgstr "Šķirot failus" #: editor/filesystem_dock.cpp msgid "Sort by Name (Ascending)" @@ -3958,11 +3995,11 @@ msgstr "" #: editor/filesystem_dock.cpp msgid "Duplicate..." -msgstr "" +msgstr "Dublicēt..." #: editor/filesystem_dock.cpp editor/plugins/animation_player_editor_plugin.cpp msgid "Rename..." -msgstr "" +msgstr "Pārsaukt..." #: editor/filesystem_dock.cpp msgid "Focus the search box" @@ -3996,14 +4033,14 @@ msgstr "" #: editor/filesystem_dock.cpp msgid "Move" -msgstr "" +msgstr "Kustināt" #: editor/filesystem_dock.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp #: editor/project_manager.cpp editor/rename_dialog.cpp #: editor/scene_tree_dock.cpp msgid "Rename" -msgstr "" +msgstr "Pārsaukt" #: editor/filesystem_dock.cpp msgid "Overwrite" @@ -4042,11 +4079,11 @@ msgstr "" #: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find..." -msgstr "" +msgstr "Meklēt..." #: editor/find_in_files.cpp editor/plugins/script_text_editor.cpp msgid "Replace..." -msgstr "" +msgstr "Aizvietot..." #: editor/find_in_files.cpp msgid "Find: " @@ -4065,19 +4102,16 @@ msgid "Searching..." msgstr "Meklē..." #: editor/find_in_files.cpp -#, fuzzy msgid "%d match in %d file." -msgstr "%d sakritības." +msgstr "%d sakritības %d failā." #: editor/find_in_files.cpp -#, fuzzy msgid "%d matches in %d file." -msgstr "%d sakritības." +msgstr "%d sakritības %d failā." #: editor/find_in_files.cpp -#, fuzzy msgid "%d matches in %d files." -msgstr "%d sakritības." +msgstr "%d sakritības %d failos." #: editor/groups_editor.cpp msgid "Add to Group" @@ -4105,7 +4139,7 @@ msgstr "Izdzēst Grupu" #: editor/groups_editor.cpp editor/node_dock.cpp msgid "Groups" -msgstr "" +msgstr "Grupas" #: editor/groups_editor.cpp msgid "Nodes Not in Group" @@ -4122,7 +4156,7 @@ msgstr "" #: editor/groups_editor.cpp msgid "Empty groups will be automatically removed." -msgstr "" +msgstr "Tukšās grupas tiks automātiski noņemtas." #: editor/groups_editor.cpp msgid "Group Editor" @@ -4130,7 +4164,7 @@ msgstr "Grupas Redaktors" #: editor/groups_editor.cpp msgid "Manage Groups" -msgstr "" +msgstr "Pārvaldīt grupas" #: editor/import/resource_importer_scene.cpp msgid "Import as Single Scene" @@ -4211,21 +4245,19 @@ msgstr "" #: editor/import/resource_importer_scene.cpp msgid "Saving..." -msgstr "" +msgstr "Saglabā..." #: editor/import_defaults_editor.cpp -#, fuzzy msgid "Select Importer" -msgstr "Izvēlēties Šablona Failu" +msgstr "Izvēlēties importētāju" #: editor/import_defaults_editor.cpp msgid "Importer:" msgstr "" #: editor/import_defaults_editor.cpp -#, fuzzy msgid "Reset to Defaults" -msgstr "Ielādēt Noklusējumu" +msgstr "Atiestatīt uz noklusējumiem" #: editor/import_dock.cpp msgid "Keep File (No Import)" @@ -4245,7 +4277,7 @@ msgstr "" #: editor/import_dock.cpp msgid "Reimport" -msgstr "" +msgstr "Reimportēt" #: editor/import_dock.cpp msgid "" @@ -4281,14 +4313,12 @@ msgid "Failed to load resource." msgstr "" #: editor/inspector_dock.cpp -#, fuzzy msgid "Copy Properties" -msgstr "Ieslēgtie Mainīgie:" +msgstr "Kopēt iestatījumus" #: editor/inspector_dock.cpp -#, fuzzy msgid "Paste Properties" -msgstr "Ieslēgtie Mainīgie:" +msgstr "Ielīmēt iestatījumus" #: editor/inspector_dock.cpp msgid "Make Sub-Resources Unique" @@ -4310,7 +4340,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/theme_editor_plugin.cpp msgid "Save As..." -msgstr "" +msgstr "Saglabāt kā..." #: editor/inspector_dock.cpp msgid "Extra resource options." @@ -4353,9 +4383,8 @@ msgid "Filter properties" msgstr "" #: editor/inspector_dock.cpp -#, fuzzy msgid "Manage object properties." -msgstr "Animācijas īpašības." +msgstr "Pārvaldīt objekta rekvizītus." #: editor/inspector_dock.cpp msgid "Changes may be lost!" @@ -4367,7 +4396,7 @@ msgstr "" #: editor/node_dock.cpp msgid "Select a single node to edit its signals and groups." -msgstr "" +msgstr "Izvēlies kādu mezglu, lai rediģētu tā signālus un grupas." #: editor/plugin_config_dialog.cpp msgid "Edit a Plugin" @@ -4387,12 +4416,12 @@ msgstr "" #: editor/plugin_config_dialog.cpp msgid "Author:" -msgstr "" +msgstr "Autors:" #: editor/plugin_config_dialog.cpp #: editor/plugins/asset_library_editor_plugin.cpp msgid "Version:" -msgstr "" +msgstr "Versija:" #: editor/plugin_config_dialog.cpp editor/script_create_dialog.cpp msgid "Language:" @@ -4590,7 +4619,7 @@ msgstr "" #: editor/plugins/animation_blend_space_2d_editor.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Blend:" -msgstr "" +msgstr "Sapludināt:" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Parameter Changed:" @@ -4804,12 +4833,12 @@ msgstr "" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Animation" -msgstr "" +msgstr "Animācija" #: editor/plugins/animation_player_editor_plugin.cpp #: editor/plugins/version_control_editor_plugin.cpp msgid "New" -msgstr "" +msgstr "Jauns" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Edit Transitions..." @@ -4837,23 +4866,23 @@ msgstr "" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Directions" -msgstr "" +msgstr "Virzieni" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Past" -msgstr "" +msgstr "Pagātne" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Future" -msgstr "" +msgstr "Nākotne" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Depth" -msgstr "" +msgstr "Dziļums" #: editor/plugins/animation_player_editor_plugin.cpp msgid "1 step" -msgstr "" +msgstr "1 solis" #: editor/plugins/animation_player_editor_plugin.cpp msgid "2 steps" @@ -4892,7 +4921,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp msgid "Error!" -msgstr "" +msgstr "Kļūda!" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Blend Times:" @@ -4933,7 +4962,7 @@ msgstr "" #: editor/plugins/animation_state_machine_editor.cpp msgid "Sync" -msgstr "" +msgstr "Sinhronizācija" #: editor/plugins/animation_state_machine_editor.cpp msgid "At End" @@ -5010,7 +5039,7 @@ msgstr "" #: editor/plugins/animation_tree_player_editor_plugin.cpp #: editor/plugins/multimesh_editor_plugin.cpp msgid "Scale:" -msgstr "" +msgstr "Mērogs:" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Fade In (s):" @@ -5022,11 +5051,11 @@ msgstr "" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Blend" -msgstr "" +msgstr "Pludināt" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Mix" -msgstr "" +msgstr "Miksēt" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Auto Restart:" @@ -5042,12 +5071,12 @@ msgstr "" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Start!" -msgstr "" +msgstr "Sākt!" #: editor/plugins/animation_tree_player_editor_plugin.cpp #: editor/plugins/multimesh_editor_plugin.cpp msgid "Amount:" -msgstr "" +msgstr "Daudzums:" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Blend 0:" @@ -5063,7 +5092,7 @@ msgstr "" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Current:" -msgstr "" +msgstr "Pašreizējs:" #: editor/plugins/animation_tree_player_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp @@ -5137,11 +5166,11 @@ msgstr "" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Filters..." -msgstr "" +msgstr "Filtri..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Contents:" -msgstr "" +msgstr "Saturs:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "View Files" @@ -5149,7 +5178,7 @@ msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Download" -msgstr "" +msgstr "Lejuplādēt" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Connection error, please try again." @@ -5209,7 +5238,7 @@ msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Failed:" -msgstr "" +msgstr "Neizdevās:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Bad download hash, assuming file has been tampered with." @@ -5217,11 +5246,11 @@ msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Expected:" -msgstr "" +msgstr "Sagaidāms:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Got:" -msgstr "" +msgstr "Saņemts:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Failed SHA-256 hash check" @@ -5241,7 +5270,7 @@ msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Resolving..." -msgstr "" +msgstr "Atrisina.." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Error making request" @@ -5249,7 +5278,7 @@ msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Idle" -msgstr "" +msgstr "Dīkstāve" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Install..." @@ -5257,7 +5286,7 @@ msgstr "Instalēt..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Retry" -msgstr "" +msgstr "Mēģināt vēlreiz" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Download Error" @@ -5293,23 +5322,23 @@ msgstr "Licence (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp msgid "First" -msgstr "" +msgstr "Pirmais" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Previous" -msgstr "" +msgstr "Iepriekšējais" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Next" -msgstr "" +msgstr "Nākamais" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Last" -msgstr "" +msgstr "Pēdējais" #: editor/plugins/asset_library_editor_plugin.cpp msgid "All" -msgstr "" +msgstr "Visi" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Search templates, projects, and demos" @@ -5329,15 +5358,15 @@ msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp editor/project_manager.cpp msgid "Sort:" -msgstr "" +msgstr "Kārtot:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Category:" -msgstr "" +msgstr "Kategorija:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Site:" -msgstr "" +msgstr "Lapa:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Support" @@ -5345,11 +5374,11 @@ msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Official" -msgstr "" +msgstr "Oficiāls" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Testing" -msgstr "" +msgstr "Testē" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Loading..." @@ -5399,14 +5428,13 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/baked_lightmap_editor_plugin.cpp -#, fuzzy msgid "Select lightmap bake file:" -msgstr "Izvēlēties Šablona Failu" +msgstr "Izvēlēties gaismas kartes cepšanas failu:" #: editor/plugins/camera_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" -msgstr "" +msgstr "Priekšskats" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Configure Snap" @@ -5515,9 +5543,8 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Grouped" -msgstr "Grupa Izvēlēta" +msgstr "Grupēts" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -5694,19 +5721,16 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Drag: Rotate selected node around pivot." -msgstr "Noņemt izvēlēto mezglu vai pāreju." +msgstr "Bīdīt: Rotē izvēlēto mezglu apkārt asij." #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Alt+Drag: Move selected node." -msgstr "Izdzēst izvēlēto Taisnstūri." +msgstr "Alt+Bīdīt: Pārvietot izvēlēto mezglu." #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "V: Set selected node's pivot position." -msgstr "Noņemt izvēlēto mezglu vai pāreju." +msgstr "V: Uzlikt izvēlētā mezgla centra pozīciju." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5859,7 +5883,7 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "View" -msgstr "" +msgstr "Skatīt" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Always Show Grid" @@ -5946,14 +5970,12 @@ msgid "Clear Pose" msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Add Node Here" -msgstr "Pievienot Mezgla Punktu" +msgstr "Pievienot mezglu šeit" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Instance Scene Here" -msgstr "Ievadiet Atslēgu Šeit" +msgstr "Izveidot ainas instanci šeit" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Multiply grid step by 2" @@ -5980,34 +6002,28 @@ msgid "Zoom to 12.5%" msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 25%" -msgstr "Attālināt" +msgstr "Tuvināt uz 25%" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 50%" -msgstr "Attālināt" +msgstr "Tuvināt uz 50%" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 100%" -msgstr "Attālināt" +msgstr "Tuvināt uz 100%" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 200%" -msgstr "Attālināt" +msgstr "Tuvināt uz 200%" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 400%" -msgstr "Attālināt" +msgstr "Tuvināt uz 400%" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Zoom to 800%" -msgstr "Attālināt" +msgstr "Tuvināt uz 800%" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Zoom to 1600%" @@ -6082,7 +6098,7 @@ msgstr "" #: editor/plugins/particles_2d_editor_plugin.cpp #: editor/plugins/particles_editor_plugin.cpp msgid "Particles" -msgstr "" +msgstr "Daļiņas" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp @@ -6139,7 +6155,7 @@ msgstr "" #: editor/plugins/curve_editor_plugin.cpp msgid "Flat 1" -msgstr "" +msgstr "Plakans 1" #: editor/plugins/curve_editor_plugin.cpp editor/property_editor.cpp msgid "Ease In" @@ -6254,9 +6270,8 @@ msgid "Couldn't create a single convex collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Simplified Convex Shape" -msgstr "Izveidot Vienu Izliektu Formu" +msgstr "Izveidot vienkāršotu izliektu formu" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Single Convex Shape" @@ -6350,9 +6365,8 @@ msgid "" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Simplified Convex Collision Sibling" -msgstr "Izveidot Vienu Izliektu Sadursmes Uzmavu" +msgstr "Izveidot vienkāršotu izliektu sadursmes radinieku" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "" @@ -6504,15 +6518,15 @@ msgstr "" #: editor/plugins/multimesh_editor_plugin.cpp msgid "X-Axis" -msgstr "" +msgstr "X ass" #: editor/plugins/multimesh_editor_plugin.cpp msgid "Y-Axis" -msgstr "" +msgstr "Y ass" #: editor/plugins/multimesh_editor_plugin.cpp msgid "Z-Axis" -msgstr "" +msgstr "Z ass" #: editor/plugins/multimesh_editor_plugin.cpp msgid "Mesh Up Axis:" @@ -6532,7 +6546,7 @@ msgstr "" #: editor/plugins/multimesh_editor_plugin.cpp msgid "Populate" -msgstr "" +msgstr "Apdzīvot" #: editor/plugins/navigation_polygon_editor_plugin.cpp #: editor/plugins/tile_set_editor_plugin.cpp @@ -6557,9 +6571,8 @@ msgid "Can only set point into a ParticlesMaterial process material" msgstr "" #: editor/plugins/particles_2d_editor_plugin.cpp -#, fuzzy msgid "Convert to CPUParticles2D" -msgstr "Izveidot" +msgstr "Konvertēt uz CPUParticles2D" #: editor/plugins/particles_2d_editor_plugin.cpp #: editor/plugins/particles_editor_plugin.cpp @@ -6604,7 +6617,7 @@ msgstr "" #: editor/plugins/particles_editor_plugin.cpp msgid "Volume" -msgstr "" +msgstr "Tilpums" #: editor/plugins/particles_editor_plugin.cpp msgid "Emission Source: " @@ -6703,7 +6716,7 @@ msgstr "" #: editor/plugins/theme_editor_preview.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_export.cpp msgid "Options" -msgstr "" +msgstr "Opcijas" #: editor/plugins/path_2d_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp @@ -6797,23 +6810,20 @@ msgid "Invalid Polygon (need 3 different vertices)" msgstr "" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Add Custom Polygon" -msgstr "Izveidot" +msgstr "Pievienot pielāgotu daudzstūri" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Remove Custom Polygon" -msgstr "Izveidot" +msgstr "Noņemt pielāgotu daudzstūri" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Transform UV Map" msgstr "" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Transform Polygon" -msgstr "Izveidot" +msgstr "Transformēt daudzstūri" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Paint Bone Weights" @@ -6836,9 +6846,8 @@ msgid "Points" msgstr "" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Polygons" -msgstr "Izveidot" +msgstr "Daudzstūri" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Bones" @@ -6907,9 +6916,8 @@ msgid "Copy Polygon to UV" msgstr "" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Copy UV to Polygon" -msgstr "Izveidot" +msgstr "Kopēt UV uz daudzstūra" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Clear UV" @@ -6929,7 +6937,7 @@ msgstr "" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Grid" -msgstr "" +msgstr "Režģis" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Show Grid" @@ -6994,7 +7002,7 @@ msgstr "" #: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Type:" -msgstr "" +msgstr "Tips:" #: editor/plugins/resource_preloader_editor_plugin.cpp #: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp @@ -7014,14 +7022,12 @@ msgid "Flip Portals" msgstr "" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Room Generate Points" -msgstr "Pārvietot Bezjē Punktus" +msgstr "Telpas punktu ģenerācija" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Generate Points" -msgstr "Izveidot punktus." +msgstr "Ģenerēt Punktus" #: editor/plugins/room_manager_editor_plugin.cpp msgid "Flip Portal" @@ -7032,9 +7038,8 @@ msgid "Occluder Set Transform" msgstr "" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Center Node" -msgstr "Izdzēst" +msgstr "Centrēt mezglu" #: editor/plugins/root_motion_editor_plugin.cpp msgid "AnimationTree has no path set to an AnimationPlayer" @@ -7050,7 +7055,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp msgid "Close and save changes?" -msgstr "" +msgstr "Aizvērt un saglabāt izmaiņas?" #: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" @@ -7061,9 +7066,8 @@ msgid "Could not load file at:" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Error saving file!" -msgstr "Kļūmes lādējot!" +msgstr "Kļūda saglabājot failu!" #: editor/plugins/script_editor_plugin.cpp msgid "Error while saving theme." @@ -7074,9 +7078,8 @@ msgid "Error Saving" msgstr "Kļūda Saglabājot" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Error importing theme." -msgstr "Kļūda lādējot fontu." +msgstr "Kļūda importējot motīvu." #: editor/plugins/script_editor_plugin.cpp msgid "Error Importing" @@ -7084,12 +7087,11 @@ msgstr "Kļūda Importējot" #: editor/plugins/script_editor_plugin.cpp msgid "New Text File..." -msgstr "" +msgstr "Jauns teksta fails..." #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Open File" -msgstr "Atvērt" +msgstr "Atvērt failu" #: editor/plugins/script_editor_plugin.cpp msgid "Save File As..." @@ -7126,7 +7128,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp msgid "Save Theme As..." -msgstr "" +msgstr "Saglabāt motīvu kā..." #: editor/plugins/script_editor_plugin.cpp msgid "%s Class Reference" @@ -7135,7 +7137,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" -msgstr "" +msgstr "Atrast Nākamo" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp @@ -7156,13 +7158,13 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp msgid "Sort" -msgstr "" +msgstr "Šķirot" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp #: modules/gdnative/gdnative_library_editor_plugin.cpp msgid "Move Up" -msgstr "" +msgstr "Bīdīt augšup" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp @@ -7171,18 +7173,16 @@ msgid "Move Down" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Next Script" -msgstr "Galvenais Skripts:" +msgstr "Nākamais skripts" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Previous Script" -msgstr "Izvēlēties šo Mapi" +msgstr "Iepriekšējais skripts" #: editor/plugins/script_editor_plugin.cpp msgid "File" -msgstr "" +msgstr "Fails" #: editor/plugins/script_editor_plugin.cpp msgid "Open..." @@ -7190,11 +7190,11 @@ msgstr "Atvērt..." #: editor/plugins/script_editor_plugin.cpp msgid "Reopen Closed Script" -msgstr "" +msgstr "Atvērt aizvērto skriptu" #: editor/plugins/script_editor_plugin.cpp msgid "Save All" -msgstr "" +msgstr "Saglabāt visu" #: editor/plugins/script_editor_plugin.cpp msgid "Soft Reload Script" @@ -7227,11 +7227,11 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp msgid "Save Theme" -msgstr "" +msgstr "Saglabāt motīvu" #: editor/plugins/script_editor_plugin.cpp msgid "Close All" -msgstr "" +msgstr "Aizvērt Visu" #: editor/plugins/script_editor_plugin.cpp msgid "Close Docs" @@ -7239,7 +7239,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp msgid "Run" -msgstr "" +msgstr "Palaist" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp @@ -7247,7 +7247,7 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp #: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" -msgstr "" +msgstr "Meklēt" #: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp msgid "Step Into" @@ -7259,16 +7259,16 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp msgid "Break" -msgstr "" +msgstr "Pārtraukt" #: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp #: editor/script_editor_debugger.cpp msgid "Continue" -msgstr "" +msgstr "turpināt" #: editor/plugins/script_editor_plugin.cpp msgid "Keep Debugger Open" -msgstr "" +msgstr "Atstāt atkļūdotāju atvērtu" #: editor/plugins/script_editor_plugin.cpp msgid "Debug with External Editor" @@ -7277,7 +7277,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Online Docs" -msgstr "" +msgstr "Tiešsaistes Dokumenti" #: editor/plugins/script_editor_plugin.cpp msgid "Open Godot online documentation." @@ -7297,7 +7297,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp msgid "Discard" -msgstr "" +msgstr "Atmest" #: editor/plugins/script_editor_plugin.cpp msgid "" @@ -7307,7 +7307,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp msgid "Debugger" -msgstr "" +msgstr "Atkļūdotājs" #: editor/plugins/script_editor_plugin.cpp msgid "Search Results" @@ -7322,9 +7322,8 @@ msgid "Connections to method:" msgstr "" #: editor/plugins/script_text_editor.cpp editor/script_editor_debugger.cpp -#, fuzzy msgid "Source" -msgstr "Resurs" +msgstr "Avots" #: editor/plugins/script_text_editor.cpp msgid "Target" @@ -7338,16 +7337,15 @@ msgstr "" #: editor/plugins/script_text_editor.cpp msgid "[Ignore]" -msgstr "" +msgstr "[Ignorēt]" #: editor/plugins/script_text_editor.cpp msgid "Line" msgstr "Rinda" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Go to Function" -msgstr "Izveidot Funkciju" +msgstr "Iet uz funkciju" #: editor/plugins/script_text_editor.cpp msgid "Only resources from filesystem can be dropped." @@ -7392,9 +7390,8 @@ msgid "Bookmarks" msgstr "" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Breakpoints" -msgstr "Izveidot" +msgstr "Pārrāvumpunkts" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp @@ -7404,7 +7401,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp #: scene/gui/line_edit.cpp scene/gui/text_edit.cpp msgid "Cut" -msgstr "" +msgstr "Izgriezt" #: editor/plugins/script_text_editor.cpp editor/plugins/theme_editor_plugin.cpp #: scene/gui/line_edit.cpp scene/gui/text_edit.cpp @@ -7444,9 +7441,8 @@ msgid "Complete Symbol" msgstr "" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Evaluate Selection" -msgstr "Mēroga Izvēle" +msgstr "Novērtēt izvēli" #: editor/plugins/script_text_editor.cpp msgid "Trim Trailing Whitespace" @@ -7477,14 +7473,12 @@ msgid "Toggle Bookmark" msgstr "" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Go to Next Bookmark" -msgstr "Doties uz nākamo soli" +msgstr "Doties uz nākamo grāmatzīmi" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Go to Previous Bookmark" -msgstr "Doties uz iepriekšējo soli" +msgstr "Doties uz iepriekšējo grāmatzīmi" #: editor/plugins/script_text_editor.cpp msgid "Remove All Bookmarks" @@ -7508,14 +7502,12 @@ msgid "Remove All Breakpoints" msgstr "" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Go to Next Breakpoint" -msgstr "Doties uz nākamo soli" +msgstr "Doties uz nākamo pārrāvumpunktu" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Go to Previous Breakpoint" -msgstr "Doties uz iepriekšējo soli" +msgstr "Doties uz iepriekšējo pārrāvumpunktu" #: editor/plugins/shader_editor_plugin.cpp msgid "" @@ -7525,7 +7517,7 @@ msgstr "" #: editor/plugins/shader_editor_plugin.cpp msgid "Shader" -msgstr "" +msgstr "Ēnotājs" #: editor/plugins/skeleton_2d_editor_plugin.cpp msgid "This skeleton has no bones, create some children Bone2D nodes." @@ -7544,9 +7536,8 @@ msgid "Skeleton2D" msgstr "" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Reset to Rest Pose" -msgstr "Ielādēt Noklusējumu" +msgstr "Atiestatīt uz atpūtas pozu" #: editor/plugins/skeleton_2d_editor_plugin.cpp msgid "Overwrite Rest Pose" @@ -7574,7 +7565,7 @@ msgstr "" #: editor/plugins/spatial_editor_plugin.cpp msgid "Perspective" -msgstr "" +msgstr "Perspektīva" #: editor/plugins/spatial_editor_plugin.cpp msgid "Top Orthogonal" @@ -7670,13 +7661,12 @@ msgid "Translate" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Scale" -msgstr "Mēroga Režīms" +msgstr "Mērogs" #: editor/plugins/spatial_editor_plugin.cpp msgid "Scaling: " -msgstr "" +msgstr "Mērogs: " #: editor/plugins/spatial_editor_plugin.cpp msgid "Translating: " @@ -7715,14 +7705,12 @@ msgid "Material Changes:" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Shader Changes:" -msgstr "Nomainīt" +msgstr "Ēnotāja izmaiņas:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Surface Changes:" -msgstr "Nomainīt" +msgstr "Virsmas izmaiņas:" #: editor/plugins/spatial_editor_plugin.cpp msgid "Draw Calls:" @@ -7825,9 +7813,8 @@ msgid "Audio Listener" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Enable Doppler" -msgstr "Nomainīt" +msgstr "Iespējot doppler" #: editor/plugins/spatial_editor_plugin.cpp msgid "Cinematic Preview" @@ -7889,9 +7876,8 @@ msgid "" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Convert Rooms" -msgstr "Izveidot" +msgstr "Konvertēt telpas" #: editor/plugins/spatial_editor_plugin.cpp msgid "XForm Dialog" @@ -8044,9 +8030,8 @@ msgid "View Portal Culling" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "View Occlusion Culling" -msgstr "Izveidot" +msgstr "Skatīt sķēršļu izkaušanu" #: editor/plugins/spatial_editor_plugin.cpp #: modules/gridmap/grid_map_editor_plugin.cpp @@ -8107,7 +8092,7 @@ msgstr "" #: editor/plugins/spatial_editor_plugin.cpp msgid "Pre" -msgstr "" +msgstr "iepriekš" #: editor/plugins/spatial_editor_plugin.cpp msgid "Post" @@ -8118,42 +8103,36 @@ msgid "Unnamed Gizmo" msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Create Mesh2D" -msgstr "Izveidot Jaunu %s" +msgstr "Izveidot Mesh2D" #: editor/plugins/sprite_editor_plugin.cpp msgid "Mesh2D Preview" msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Create Polygon2D" -msgstr "Izveidot" +msgstr "Izveidot Polygon2D" #: editor/plugins/sprite_editor_plugin.cpp msgid "Polygon2D Preview" msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Create CollisionPolygon2D" -msgstr "Izveidot" +msgstr "Izveidot CollisionPolygon2D" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "CollisionPolygon2D Preview" -msgstr "Izveidot" +msgstr "CollisionPolygon2D priekšskatījums" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Create LightOccluder2D" -msgstr "Izveidot" +msgstr "Izveidot LightOccluder2D" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "LightOccluder2D Preview" -msgstr "Izveidot" +msgstr "LightOccluder2D priekšskatījums" #: editor/plugins/sprite_editor_plugin.cpp msgid "Sprite is empty!" @@ -8176,18 +8155,16 @@ msgid "Invalid geometry, can't create polygon." msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Convert to Polygon2D" -msgstr "Izveidot" +msgstr "Konvertēt uz Polygon2D" #: editor/plugins/sprite_editor_plugin.cpp msgid "Invalid geometry, can't create collision polygon." msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Create CollisionPolygon2D Sibling" -msgstr "Izveidot" +msgstr "Izveidot CollisionPolygon2D radinieku" #: editor/plugins/sprite_editor_plugin.cpp msgid "Invalid geometry, can't create light occluder." @@ -8222,9 +8199,8 @@ msgid "Settings:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "No Frames Selected" -msgstr "Savienot" +msgstr "Nav izvēlēti kadri" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Add %d Frame(s)" @@ -8267,14 +8243,12 @@ msgid "Move Frame" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Animations:" -msgstr "Funkcijas:" +msgstr "Animācijas:" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "New Animation" -msgstr "Optimizēt animāciju" +msgstr "Jauna animācija" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Speed:" @@ -8282,16 +8256,15 @@ msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Loop" -msgstr "" +msgstr "Cilpa" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Animation Frames:" msgstr "Animācijas Kadri:" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Add a Texture from File" -msgstr "Noņemt Izvēlēto" +msgstr "Pievienot tekstūru no faila" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Add Frames from a Sprite Sheet" @@ -8370,9 +8343,8 @@ msgid "Step:" msgstr "" #: editor/plugins/texture_region_editor_plugin.cpp -#, fuzzy msgid "Separation:" -msgstr "Sēpija funkcija." +msgstr "Atdalījums:" #: editor/plugins/texture_region_editor_plugin.cpp msgid "TextureRegion" @@ -8403,9 +8375,8 @@ msgid "No colors found." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "{num} constant(s)" -msgstr "Konstantes" +msgstr "{num} konstante(s)" #: editor/plugins/theme_editor_plugin.cpp msgid "No constants found." @@ -8444,27 +8415,24 @@ msgid "Nothing was selected for the import." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Importing Theme Items" -msgstr "Kļūda lādējot fontu." +msgstr "Tēmas elementu importēšana" #: editor/plugins/theme_editor_plugin.cpp msgid "Importing items {n}/{n}" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Updating the editor" -msgstr "Atjaunina Ainu" +msgstr "Atjaunina redaktoru" #: editor/plugins/theme_editor_plugin.cpp msgid "Finalizing" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Filter:" -msgstr "Nomainīt Filtru" +msgstr "Filtrs:" #: editor/plugins/theme_editor_plugin.cpp msgid "With Data" @@ -8549,9 +8517,8 @@ msgid "Expand types." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all Theme items." -msgstr "Izvēlēties Šablona Failu" +msgstr "Atlasiet visus motīvu vienumus." #: editor/plugins/theme_editor_plugin.cpp msgid "Select With Data" @@ -8562,18 +8529,16 @@ msgid "Select all Theme items with item data." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Deselect All" -msgstr "Atvienot Visu" +msgstr "Atcelt visu atlasi" #: editor/plugins/theme_editor_plugin.cpp msgid "Deselect all Theme items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Import Selected" -msgstr "Grupa Izvēlēta" +msgstr "Importēt izvēlēto" #: editor/plugins/theme_editor_plugin.cpp msgid "" @@ -8589,28 +8554,24 @@ msgid "" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove All Color Items" -msgstr "Noņemt no Favorītiem" +msgstr "Noņemt visas krāsas vienības" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Rename Item" -msgstr "Pārsaukt Audio Kopni" +msgstr "Noņemt vienību" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove All Constant Items" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove All Font Items" -msgstr "Noņemt no Favorītiem" +msgstr "Noņemt visus fontu vienumus" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove All Icon Items" -msgstr "Saglabāt Visas Ainas" +msgstr "Noņemt visus ikonu vienumus" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove All StyleBox Items" @@ -8623,24 +8584,20 @@ msgid "" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Color Item" -msgstr "Pievienot Favorītiem" +msgstr "Pievienot krāsas vienumu" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Constant Item" -msgstr "Konstantes" +msgstr "Pievienot konstantes vienumu" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Font Item" -msgstr "Pievienot Punktu" +msgstr "Pievienot fonta vienumu" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Icon Item" -msgstr "Pievienot Punktu" +msgstr "Pievienot ikonas vienumu" #: editor/plugins/theme_editor_plugin.cpp msgid "Add Stylebox Item" @@ -8679,9 +8636,8 @@ msgid "Manage Theme Items" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Edit Items" -msgstr "Rediģēt Tekstu:" +msgstr "Rediģēt vienumus" #: editor/plugins/theme_editor_plugin.cpp msgid "Types:" @@ -8700,18 +8656,16 @@ msgid "Add StyleBox Item" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Items:" -msgstr "Noņemt Izvēlēto" +msgstr "Noņemt vienumus:" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove Class Items" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Custom Items" -msgstr "Izveidot" +msgstr "Noņemt pielāgotos vienumus" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove All Items" @@ -8722,29 +8676,24 @@ msgid "Add Theme Item" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Old Name:" -msgstr "Nosaukums" +msgstr "Vecais vārds:" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Import Items" -msgstr "Ielādēt Noklusējumu" +msgstr "Importēt vienumus" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Default Theme" -msgstr "Nomainīt Noklusējuma Tipu" +msgstr "Noklusējuma motīvs" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Editor Theme" -msgstr "Rediģēt Tekstu:" +msgstr "Redaktora motīvs" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select Another Theme Resource:" -msgstr "Meklēt Aizstājēja Resursu:" +msgstr "Izvēlēties citu motīva resursu:" #: editor/plugins/theme_editor_plugin.cpp msgid "Another Theme" @@ -8773,9 +8722,8 @@ msgid "" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Type" -msgstr "Pievienot Trijstūri" +msgstr "Pievienot tipu" #: editor/plugins/theme_editor_plugin.cpp msgid "Add Item Type" @@ -8786,9 +8734,8 @@ msgid "Node Types:" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Show Default" -msgstr "Ielādēt Noklusējumu" +msgstr "Rādīt noklusējumu" #: editor/plugins/theme_editor_plugin.cpp msgid "Show default type items alongside items that have been overridden." @@ -8803,9 +8750,8 @@ msgid "Override all default type items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Theme:" -msgstr "Atvērt" +msgstr "Motīvs:" #: editor/plugins/theme_editor_plugin.cpp msgid "Manage Items..." @@ -8816,18 +8762,16 @@ msgid "Add, remove, organize and import Theme items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Preview" -msgstr "Pievienot Trijstūri" +msgstr "Pievienot priekšskatījumu" #: editor/plugins/theme_editor_plugin.cpp msgid "Default Preview" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select UI Scene:" -msgstr "Iestatīt Kā Galveno Ainu" +msgstr "Izvēlēties UI ainu:" #: editor/plugins/theme_editor_preview.cpp msgid "" @@ -8840,18 +8784,16 @@ msgid "Toggle Button" msgstr "" #: editor/plugins/theme_editor_preview.cpp -#, fuzzy msgid "Disabled Button" -msgstr "Atspējots" +msgstr "Atspējota poga" #: editor/plugins/theme_editor_preview.cpp msgid "Item" msgstr "" #: editor/plugins/theme_editor_preview.cpp -#, fuzzy msgid "Disabled Item" -msgstr "Atspējots" +msgstr "Atspējots vienums" #: editor/plugins/theme_editor_preview.cpp msgid "Check Item" @@ -8887,16 +8829,15 @@ msgstr "" #: editor/plugins/theme_editor_preview.cpp msgid "Has" -msgstr "" +msgstr "Satur" #: editor/plugins/theme_editor_preview.cpp msgid "Many" -msgstr "" +msgstr "Daudz" #: editor/plugins/theme_editor_preview.cpp -#, fuzzy msgid "Disabled LineEdit" -msgstr "Atspējots" +msgstr "Atspējota LineEdit" #: editor/plugins/theme_editor_preview.cpp msgid "Tab 1" @@ -8920,7 +8861,7 @@ msgstr "" #: editor/plugins/theme_editor_preview.cpp msgid "Has,Many,Options" -msgstr "" +msgstr "Ir,Daudz,Opcijas" #: editor/plugins/theme_editor_preview.cpp msgid "Invalid path, the PackedScene resource was probably moved or removed." @@ -8948,9 +8889,8 @@ msgstr "Salabot Nederīgās Flīzes" #: editor/plugins/tile_map_editor_plugin.cpp #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Cut Selection" -msgstr "Dzēst izvēlētos" +msgstr "Griezt izvēlēto" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Paint TileMap" @@ -9081,24 +9021,20 @@ msgid "Select the previous shape, subtile, or Tile." msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Region" -msgstr "Interpolācijas režīms" +msgstr "Reģions" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Collision" -msgstr "Interpolācijas režīms" +msgstr "Sadursme" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Occlusion" -msgstr "Izveidot" +msgstr "Šķērslis" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Navigation" -msgstr "Izveidot" +msgstr "Navigācija" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Bitmask" @@ -9110,21 +9046,19 @@ msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Icon" -msgstr "" +msgstr "Ikona" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Z Index" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Region Mode" -msgstr "Interpolācijas režīms" +msgstr "Reģiona režīms" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Collision Mode" -msgstr "Interpolācijas režīms" +msgstr "Sadursmes režīms" #: editor/plugins/tile_set_editor_plugin.cpp #, fuzzy @@ -9132,9 +9066,8 @@ msgid "Occlusion Mode" msgstr "Izveidot" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Navigation Mode" -msgstr "Izveidot" +msgstr "Navigācijas režīms" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Bitmask Mode" @@ -9169,23 +9102,20 @@ msgid "Create a new rectangle." msgstr "Izveidot jaunu taisnstūri." #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "New Rectangle" -msgstr "Izveidot jaunu taisnstūri." +msgstr "Jauns taisnstūris" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Create a new polygon." msgstr "Izveidot jaunu daudzstūri." #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "New Polygon" -msgstr "Izveidot" +msgstr "Jauns daudzstūris" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Delete Selected Shape" -msgstr "Izdzēst Izvēlēto(ās) Atslēgu(as)" +msgstr "Izdzēst izvēlēto formu" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Keep polygon inside region Rect." @@ -9222,9 +9152,8 @@ msgid "Merge from scene?" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Remove Texture" -msgstr "Noņemt Izvēlēto" +msgstr "Noņemt tekstūru" #: editor/plugins/tile_set_editor_plugin.cpp msgid "%s file(s) were not added because was already on the list." @@ -9282,9 +9211,8 @@ msgid "Set Tile Region" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Create Tile" -msgstr "Izveidot" +msgstr "Izveidot flīzi" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Set Tile Icon" @@ -9295,9 +9223,8 @@ msgid "Edit Tile Bitmask" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Edit Collision Polygon" -msgstr "Izveidot" +msgstr "Rediģēt sadursmes daudzstūri" #: editor/plugins/tile_set_editor_plugin.cpp #, fuzzy @@ -9305,14 +9232,12 @@ msgid "Edit Occlusion Polygon" msgstr "Izveidot" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Edit Navigation Polygon" -msgstr "Izveidot" +msgstr "Rediģēt navigācijas daudzstūri" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Paste Tile Bitmask" -msgstr "Ielīmēt celiņus" +msgstr "Ielīmēt flīzes bitmasku" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Clear Tile Bitmask" @@ -9323,14 +9248,12 @@ msgid "Make Polygon Concave" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Make Polygon Convex" -msgstr "Izveidot" +msgstr "Izveidot dadzstūra izliekumu" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Remove Tile" -msgstr "Noņemt" +msgstr "Noņemt flīzi" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Remove Collision Polygon" @@ -9353,19 +9276,16 @@ msgid "Edit Tile Z Index" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Make Convex" -msgstr "Izveidot" +msgstr "Izveidot izliekumu" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Make Concave" -msgstr "Izveidot" +msgstr "Izveidot ieliekumu" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Create Collision Polygon" -msgstr "Izveidot" +msgstr "Izveidot sadursmes daudzstūri" #: editor/plugins/tile_set_editor_plugin.cpp #, fuzzy @@ -9413,47 +9333,40 @@ msgid "Staging area" msgstr "" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Detect new changes" -msgstr "Izveidot Jaunu %s" +msgstr "Atrast jaunas izmaiņas" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Changes" -msgstr "Nomainīt" +msgstr "Maiņas" #: editor/plugins/version_control_editor_plugin.cpp msgid "Modified" msgstr "" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Renamed" -msgstr "Pārsaukt Audio Kopni" +msgstr "Pārsaukts" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Deleted" -msgstr "Izdzēst" +msgstr "Dzēsts" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Typechange" -msgstr "Nomainīt" +msgstr "Tipa maiņa" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Stage Selected" -msgstr "Mēroga Izvēle" +msgstr "Posma izvēle" #: editor/plugins/version_control_editor_plugin.cpp msgid "Stage All" msgstr "" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Commit Changes" -msgstr "Nomainīt" +msgstr "Pielietot izmaiņas" #: editor/plugins/version_control_editor_plugin.cpp msgid "View file diffs before committing them to the latest version" @@ -9500,9 +9413,8 @@ msgid "Add output port" msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Change input port type" -msgstr "Nomainīt %s Tipu" +msgstr "Mainīt ienākoša porta tipu" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Change output port type" @@ -9517,14 +9429,12 @@ msgid "Change output port name" msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Remove input port" -msgstr "Noņemt Izvēlēto" +msgstr "Noņemt ienākošo portu" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Remove output port" -msgstr "Noņemt Izvēlēto" +msgstr "Noņemt izejas portu" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Set expression" @@ -9547,14 +9457,12 @@ msgid "Add Node to Visual Shader" msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Node(s) Moved" -msgstr "Mezgls Noņemts" +msgstr "Mezgls(-i) pārvietots(-i)" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Duplicate Nodes" -msgstr "Dublicēt atslēgvietnes" +msgstr "Dubliēt mezglus" #: editor/plugins/visual_shader_editor_plugin.cpp #: modules/visual_script/visual_script_editor.cpp @@ -9562,9 +9470,8 @@ msgid "Paste Nodes" msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Delete Nodes" -msgstr "Izdzēst" +msgstr "Dzēst mezglus" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Visual Shader Input Type Changed" @@ -9591,9 +9498,8 @@ msgid "Show resulted shader code." msgstr "Attēlot rezultējošo ēnotāja kodu." #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Create Shader Node" -msgstr "Izveidot Jaunu %s" +msgstr "Izveidot ēnotāja mezglu" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Color function." @@ -10282,9 +10188,8 @@ msgid "VisualShader" msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Edit Visual Property:" -msgstr "Ieslēgtie Mainīgie:" +msgstr "Rediģēt vizuālo mainīgo:" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Visual Shader Mode Changed" @@ -10451,7 +10356,7 @@ msgstr "" #: editor/project_export.cpp msgid "Manage Export Templates" -msgstr "" +msgstr "Pārvaldīt Eksporta Šablonus" #: editor/project_export.cpp msgid "Export With Debug" @@ -10462,9 +10367,8 @@ msgid "The path specified doesn't exist." msgstr "" #: editor/project_manager.cpp -#, fuzzy msgid "Error opening package file (it's not in ZIP format)." -msgstr "Kļūme atverot arhīvu failu, nav ZIP formātā." +msgstr "Kļūme atverot paketes failu (tā nav ZIP formātā)." #: editor/project_manager.cpp msgid "" @@ -10485,16 +10389,15 @@ msgstr "" #: editor/project_manager.cpp msgid "New Game Project" -msgstr "" +msgstr "Jauns Spēles Projekts" #: editor/project_manager.cpp msgid "Imported Project" msgstr "" #: editor/project_manager.cpp -#, fuzzy msgid "Invalid project name." -msgstr "Nederīgs grupas nosaukums." +msgstr "Nederīgs projekta nosaukums." #: editor/project_manager.cpp msgid "Couldn't create folder." @@ -10540,7 +10443,7 @@ msgstr "Pakete instalēta sekmīgi!" #: editor/project_manager.cpp msgid "Rename Project" -msgstr "" +msgstr "Pārsaukt Projektu" #: editor/project_manager.cpp msgid "Import Existing Project" @@ -10564,7 +10467,7 @@ msgstr "" #: editor/project_manager.cpp msgid "Install & Edit" -msgstr "" +msgstr "Instalēt & Rediģēt" #: editor/project_manager.cpp msgid "Project Name:" @@ -10616,7 +10519,7 @@ msgstr "" #: editor/project_manager.cpp msgid "Unnamed Project" -msgstr "" +msgstr "Nenosaukts Projekts" #: editor/project_manager.cpp msgid "Missing Project" @@ -10714,60 +10617,52 @@ msgid "Project Manager" msgstr "" #: editor/project_manager.cpp -#, fuzzy msgid "Local Projects" -msgstr "Projekta Dibinātāji" +msgstr "Lokālie projekti" #: editor/project_manager.cpp -#, fuzzy msgid "Loading, please wait..." -msgstr "Ielādēt..." +msgstr "Ielādē, lūdzu uzgaidi..." #: editor/project_manager.cpp msgid "Last Modified" msgstr "" #: editor/project_manager.cpp -#, fuzzy msgid "Edit Project" -msgstr "Projekta Dibinātāji" +msgstr "Rediģēt Projektu" #: editor/project_manager.cpp -#, fuzzy msgid "Run Project" -msgstr "Projekta Dibinātāji" +msgstr "Palaist Projektu" #: editor/project_manager.cpp msgid "Scan" -msgstr "" +msgstr "Skenēt" #: editor/project_manager.cpp -#, fuzzy msgid "Scan Projects" -msgstr "Projekta Dibinātāji" +msgstr "Skenēt Projektu" #: editor/project_manager.cpp msgid "Select a Folder to Scan" -msgstr "" +msgstr "Norādīt mapi kuru skenēt" #: editor/project_manager.cpp msgid "New Project" -msgstr "" +msgstr "Jauns Projekts" #: editor/project_manager.cpp -#, fuzzy msgid "Import Project" -msgstr "Projekta Dibinātāji" +msgstr "Importēt Projektu" #: editor/project_manager.cpp -#, fuzzy msgid "Remove Project" -msgstr "Noņemt Punktu" +msgstr "Noņemt Projektu" #: editor/project_manager.cpp -#, fuzzy msgid "Remove Missing" -msgstr "Noņemt" +msgstr "Noņemt trūkstošo" #: editor/project_manager.cpp msgid "About" @@ -10779,7 +10674,7 @@ msgstr "" #: editor/project_manager.cpp msgid "Restart Now" -msgstr "" +msgstr "Restartēt tagad" #: editor/project_manager.cpp msgid "Remove All" @@ -10791,7 +10686,7 @@ msgstr "" #: editor/project_manager.cpp msgid "Can't run project" -msgstr "" +msgstr "Nevar palaist projektu" #: editor/project_manager.cpp msgid "" @@ -10800,9 +10695,8 @@ msgid "" msgstr "" #: editor/project_manager.cpp -#, fuzzy msgid "Filter projects" -msgstr "Projekta Dibinātāji" +msgstr "Filtrēt projektus" #: editor/project_manager.cpp msgid "" @@ -10812,12 +10706,12 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" -msgstr "" +msgid "Key " +msgstr "Atslēga " #: editor/project_settings_editor.cpp msgid "Joy Button" @@ -11004,9 +10898,8 @@ msgid "Override for Feature" msgstr "" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Add %d Translations" -msgstr "Pievienot Pāreju" +msgstr "Pievienot %d tulkojumus" #: editor/project_settings_editor.cpp msgid "Remove Translation" @@ -11065,9 +10958,8 @@ msgid "Action:" msgstr "" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Action" -msgstr "Visa Izvēle" +msgstr "Darbība" #: editor/project_settings_editor.cpp msgid "Deadzone" @@ -11135,16 +11027,15 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "Plugins" -msgstr "" +msgstr "Sparudņi" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Import Defaults" -msgstr "Ielādēt Noklusējumu" +msgstr "Importēt noklusējumus" #: editor/property_editor.cpp msgid "Preset..." -msgstr "" +msgstr "Priekš-iestatījums..." #: editor/property_editor.cpp msgid "Zero" @@ -11203,9 +11094,8 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -#, fuzzy msgid "Replace:" -msgstr "Aizvietot: " +msgstr "Aizvietot:" #: editor/rename_dialog.cpp msgid "Prefix:" @@ -11316,9 +11206,8 @@ msgid "To Uppercase" msgstr "" #: editor/rename_dialog.cpp -#, fuzzy msgid "Reset" -msgstr "Atiestatīt tālummaiņu" +msgstr "Atiestatīt" #: editor/rename_dialog.cpp msgid "Regular Expression Error:" @@ -11370,7 +11259,7 @@ msgstr "" #: editor/scene_tree_dock.cpp msgid "Error loading scene from %s" -msgstr "" +msgstr "Kļūda ielādējot ainu no %s" #: editor/scene_tree_dock.cpp msgid "" @@ -11395,14 +11284,12 @@ msgid "Can't paste root node into the same scene." msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Paste Node(s)" -msgstr "Dublicēt atslēgvietnes" +msgstr "Ielīmēt mezglu(s)" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Detach Script" -msgstr "Galvenais Skripts:" +msgstr "Atvienot skriptu" #: editor/scene_tree_dock.cpp msgid "This operation can't be done on the tree root." @@ -11437,9 +11324,8 @@ msgid "Make node as Root" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Delete %d nodes and any children?" -msgstr "Izdzēst %d mezglus?" +msgstr "Dzēst %d mezglus un to bērnus?" #: editor/scene_tree_dock.cpp msgid "Delete %d nodes?" @@ -11485,7 +11371,7 @@ msgstr "" #: editor/scene_tree_dock.cpp msgid "Save New Scene As..." -msgstr "" +msgstr "Saglabāt jaunu ainu kā..." #: editor/scene_tree_dock.cpp msgid "" @@ -11524,9 +11410,8 @@ msgid "User Interface" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Other Node" -msgstr "Izdzēst" +msgstr "Cits mezgls" #: editor/scene_tree_dock.cpp msgid "Can't operate on nodes from a foreign scene!" @@ -11545,9 +11430,8 @@ msgid "Attach Script" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Cut Node(s)" -msgstr "Dublicēt atslēgvietnes" +msgstr "Izgriezt mezglu(s)" #: editor/scene_tree_dock.cpp msgid "Remove Node(s)" @@ -11607,9 +11491,8 @@ msgid "Change Type" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Reparent to New Node" -msgstr "Izveidot Jaunu %s" +msgstr "Pakļaut zem jauna mezgla" #: editor/scene_tree_dock.cpp msgid "Make Scene Root" @@ -11621,7 +11504,7 @@ msgstr "" #: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp msgid "Save Branch as Scene" -msgstr "" +msgstr "Saglabāt zaru kā ainu" #: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp msgid "Copy Node Path" @@ -11643,7 +11526,7 @@ msgstr "" #: editor/scene_tree_dock.cpp msgid "Attach a new or existing script to the selected node." -msgstr "" +msgstr "Pievienot jaunu vai eksistējošu skriptu izvēlētajam mezglam." #: editor/scene_tree_dock.cpp msgid "Detach the script from the selected node." @@ -11705,6 +11588,8 @@ msgid "" "Node is in %s group(s).\n" "Click to show groups dock." msgstr "" +"Mezgls ir %s grupās.\n" +"Klikšķini, lai parādītu grupu doku." #: editor/scene_tree_editor.cpp msgid "Open Script:" @@ -11765,9 +11650,8 @@ msgid "Path is not local." msgstr "" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Invalid base path." -msgstr "Nederīgs nosaukums." +msgstr "Nederīgs bāzes ceļš." #: editor/script_create_dialog.cpp msgid "A directory with the same name exists." @@ -11778,9 +11662,8 @@ msgid "File does not exist." msgstr "" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Invalid extension." -msgstr "Nederīgs fonta izmērs." +msgstr "Nederīgs paplašinājums." #: editor/script_create_dialog.cpp msgid "Wrong extension chosen." @@ -11823,9 +11706,8 @@ msgid "Invalid path." msgstr "Nederīgs ceļš." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Invalid class name." -msgstr "Nederīgs nosaukums." +msgstr "Nederīgs klases nosaukums." #: editor/script_create_dialog.cpp msgid "Invalid inherited parent name or path." @@ -11848,9 +11730,8 @@ msgid "Will create a new script file." msgstr "Izveidos jaunu skripta failu." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Will load an existing script file." -msgstr "Ielādēt eksistējošu Kopnes Izkārtojumu." +msgstr "Ielādēs eksistējošu skriptu." #: editor/script_create_dialog.cpp msgid "Script file already exists." @@ -11877,9 +11758,8 @@ msgid "Template:" msgstr "" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Built-in Script:" -msgstr "Savieno Signālu:" +msgstr "Iebūvēts skripts:" #: editor/script_create_dialog.cpp msgid "Attach Node Script" @@ -11898,9 +11778,8 @@ msgid "Warning:" msgstr "" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "Error:" -msgstr "Kļūme lādējot:" +msgstr "Kļūda:" #: editor/script_editor_debugger.cpp msgid "C++ Error" @@ -11911,9 +11790,8 @@ msgid "C++ Error:" msgstr "" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "C++ Source" -msgstr "Resurs" +msgstr "C++ avots" #: editor/script_editor_debugger.cpp msgid "Source:" @@ -11948,9 +11826,8 @@ msgid "Video RAM" msgstr "" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "Skip Breakpoints" -msgstr "Izveidot" +msgstr "Izlaist pārrāvumpunktus" #: editor/script_editor_debugger.cpp msgid "Inspect Previous Instance" @@ -12281,23 +12158,20 @@ msgid "GridMap Delete Selection" msgstr "" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "GridMap Fill Selection" -msgstr "Visa Izvēle" +msgstr "Režģkartes pildīšanas izvēle" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "GridMap Paste Selection" -msgstr "Visa Izvēle" +msgstr "Režģkartes ielīmēšanas izvēle" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "GridMap Paint" msgstr "" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "GridMap Selection" -msgstr "Visa Izvēle" +msgstr "Režģkartes izvēle" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" @@ -12360,18 +12234,16 @@ msgid "Cursor Clear Rotation" msgstr "" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Paste Selects" -msgstr "Visa Izvēle" +msgstr "Ielīmēt izvēlnes" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Clear Selection" msgstr "" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Fill Selection" -msgstr "Visa Izvēle" +msgstr "Aizpildīt izvēlni" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "GridMap Settings" @@ -12422,9 +12294,8 @@ msgid "Class name can't be a reserved keyword" msgstr "" #: modules/mono/csharp_script.cpp -#, fuzzy msgid "Build Solution" -msgstr "Visa Izvēle" +msgstr "Būvēt risinājumu" #: modules/mono/mono_gd/gd_mono_utils.cpp msgid "End of inner exception stack trace" @@ -12488,7 +12359,7 @@ msgstr "" #: modules/recast/navigation_mesh_generator.cpp msgid "Done!" -msgstr "" +msgstr "Darīts!" #: modules/visual_script/visual_script.cpp msgid "" @@ -12549,21 +12420,16 @@ msgid "Add Output Port" msgstr "Pievienot Izejas Pieslēgvietu" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Change Port Type" -msgstr "Nomainīt %s Tipu" +msgstr "Mainīt porta tipu" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Change Port Name" -msgstr "Izmainīt masīva vērtību" +msgstr "Mainīt porta nosaukumu" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Override an existing built-in function." -msgstr "" -"Nederīgs nosaukums. Nedrīkst sadurties ar eksistējošu iebūvēto tipa " -"nosaukumu." +msgstr "Pārrakstīt eksistējošu iebūvēto funkciju." #: modules/visual_script/visual_script_editor.cpp msgid "Create a new function." @@ -12579,7 +12445,7 @@ msgstr "Izveidot jaunu mainīgo." #: modules/visual_script/visual_script_editor.cpp msgid "Signals:" -msgstr "" +msgstr "Signāli:" #: modules/visual_script/visual_script_editor.cpp msgid "Create a new signal." @@ -12610,9 +12476,8 @@ msgid "Add Function" msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Delete input port" -msgstr "Noņemt Izvēlēto" +msgstr "Dzēst ienākošo portu" #: modules/visual_script/visual_script_editor.cpp msgid "Add Variable" @@ -12623,14 +12488,12 @@ msgid "Add Signal" msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Remove Input Port" -msgstr "Noņemt Izvēlēto" +msgstr "Noņemt ienākošo portu" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Remove Output Port" -msgstr "Noņemt Izvēlēto" +msgstr "Noņemt izejas portu" #: modules/visual_script/visual_script_editor.cpp msgid "Change Expression" @@ -12673,9 +12536,8 @@ msgid "Add Preload Node" msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Add Node(s)" -msgstr "Pievienot Mezglus..." +msgstr "Pievienot Mezglu(s)" #: modules/visual_script/visual_script_editor.cpp msgid "Add Node(s) From Tree" @@ -12712,9 +12574,8 @@ msgid "Connect Nodes" msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Disconnect Nodes" -msgstr "Savienot" +msgstr "Atvienot mezglus" #: modules/visual_script/visual_script_editor.cpp msgid "Connect Node Data" @@ -12761,9 +12622,8 @@ msgid "Try to only have one sequence input in selection." msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Create Function" -msgstr "Izveidot Jaunu %s" +msgstr "Izveidot funkciju" #: modules/visual_script/visual_script_editor.cpp msgid "Remove Function" @@ -12940,14 +12800,12 @@ msgid "Exporting APK..." msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Uninstalling..." -msgstr "Instalēt..." +msgstr "Atinstalē..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Installing to device, please wait..." -msgstr "Ielādēt..." +msgstr "Instalē ierīcē, lūdzu uzgaidi..." #: platform/android/export/export_plugin.cpp msgid "Could not install to device: %s" @@ -13146,9 +13004,8 @@ msgid "" msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Package not found: %s" -msgstr "Animācija netika atrasta: '%s'" +msgstr "Paka nav atrasta: %s" #: platform/android/export/export_plugin.cpp msgid "Creating APK..." @@ -13169,9 +13026,8 @@ msgid "" msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Adding files..." -msgstr "Pievienot Mezglus..." +msgstr "Failu pievienošana..." #: platform/android/export/export_plugin.cpp msgid "Could not export project files" @@ -13246,9 +13102,8 @@ msgid "Error starting HTTP server:" msgstr "" #: platform/osx/export/export.cpp -#, fuzzy msgid "Invalid bundle identifier:" -msgstr "Nederīgs Identifikators:" +msgstr "Nederīgs bunduļa identifikators:" #: platform/osx/export/export.cpp msgid "Notarization: code signing required." @@ -13267,34 +13122,28 @@ msgid "Notarization: Apple ID password not specified." msgstr "" #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid package short name." -msgstr "Nederīgs nosaukums." +msgstr "Nederīgs paketes īsais nosaukums." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid package unique name." -msgstr "Nederīgs nosaukums." +msgstr "Nederīgs paketes unikālais nosaukums." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid package publisher display name." -msgstr "Nederīgs nosaukums." +msgstr "Nederīgs paketes izdevēja displeja vārds." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid product GUID." -msgstr "Nederīgs nosaukums." +msgstr "Nederīgs produkta GUID." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid publisher GUID." -msgstr "Nederīgs fonta izmērs." +msgstr "Nederīgs izdevēja GUID." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid background color." -msgstr "Nederīgs nosaukums." +msgstr "Nederīga fona krāsa." #: platform/uwp/export/export.cpp msgid "Invalid Store Logo image dimensions (should be 50x50)." @@ -13849,12 +13698,11 @@ msgstr "" #: scene/animation/animation_tree.cpp msgid "In node '%s', invalid animation: '%s'." -msgstr "" +msgstr "Mezglā '%s', nederīga animācija: '%s'." #: scene/animation/animation_tree.cpp -#, fuzzy msgid "Invalid animation: '%s'." -msgstr "Nederīgs fonta izmērs." +msgstr "Nederīga animācija: '%s'." #: scene/animation/animation_tree.cpp msgid "Nothing connected to input '%s' of node '%s'." @@ -13878,7 +13726,7 @@ msgstr "" #: scene/animation/animation_tree_player.cpp msgid "This node has been deprecated. Use AnimationTree instead." -msgstr "" +msgstr "Šis mezgls ir novecojis. Tā vietā izmanto AnimationTree." #: scene/gui/color_picker.cpp msgid "" @@ -13889,7 +13737,7 @@ msgstr "" #: scene/gui/color_picker.cpp msgid "Pick a color from the editor window." -msgstr "" +msgstr "Izvēlēties krāsu no redaktora loga." #: scene/gui/color_picker.cpp msgid "HSV" @@ -13897,7 +13745,7 @@ msgstr "" #: scene/gui/color_picker.cpp msgid "Raw" -msgstr "" +msgstr "Jēls" #: scene/gui/color_picker.cpp msgid "Switch between hexadecimal and code values." @@ -13930,11 +13778,11 @@ msgstr "Lūdzu Apstipriniet..." #: scene/gui/file_dialog.cpp msgid "Must use a valid extension." -msgstr "" +msgstr "Jābūt derīgai galotnei." #: scene/gui/graph_edit.cpp msgid "Enable grid minimap." -msgstr "" +msgstr "Iespējot režģa minikarti." #: scene/gui/nine_patch_rect.cpp msgid "" @@ -13950,6 +13798,9 @@ msgid "" "functions. Making them visible for editing is fine, but they will hide upon " "running." msgstr "" +"Uznirstošie logi ir paslēpti pēc noklusējuma, lai tos parādītu, izmanto ." +"popup() vai jebkuru no to funkcijām. Padarīt tos redzamus rediģēšanai ir " +"labi, bet tie tiks paslēpti pēc palaišanas." #: scene/gui/range.cpp msgid "If \"Exp Edit\" is enabled, \"Min Value\" must be greater than 0." @@ -13971,6 +13822,8 @@ msgid "" "Default Environment as specified in Project Settings (Rendering -> " "Environment -> Default Environment) could not be loaded." msgstr "" +"Noklusējuma vide, kas norādīta projekta iestatījumos, nevar tikt ielādēta. " +"(Projekta iestatījumi -> Renderēšana -> vide -> noklusējuma vide)." #: scene/main/timer.cpp msgid "" @@ -14005,19 +13858,16 @@ msgid "" msgstr "" #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Invalid source for preview." -msgstr "Nederīgs fonta izmērs." +msgstr "Nederīgs avots priekšskatījumam." #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Invalid source for shader." -msgstr "Nederīgs fonta izmērs." +msgstr "Nederīgs fēnotāja avots." #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Invalid comparison function for that type." -msgstr "Nederīgs fonta izmērs." +msgstr "Nederīgs funkcijas salīdzinājums tās tipam." #: servers/visual/shader_language.cpp msgid "Varying may not be assigned in the '%s' function." @@ -14049,7 +13899,7 @@ msgstr "" #: servers/visual/shader_language.cpp msgid "Constants cannot be modified." -msgstr "" +msgstr "Konstantes nevar pārveidot." #~ msgid "Package Contents:" #~ msgstr "Paketes Saturs:" diff --git a/editor/translations/mi.po b/editor/translations/mi.po index b51c143856..0ca7a85100 100644 --- a/editor/translations/mi.po +++ b/editor/translations/mi.po @@ -10584,11 +10584,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/mk.po b/editor/translations/mk.po index d9663ce943..fb20cef0b9 100644 --- a/editor/translations/mk.po +++ b/editor/translations/mk.po @@ -10599,11 +10599,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/ml.po b/editor/translations/ml.po index 21a19ba01b..8f2b461e34 100644 --- a/editor/translations/ml.po +++ b/editor/translations/ml.po @@ -10609,11 +10609,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/mr.po b/editor/translations/mr.po index 0d02f7b34a..f81040488f 100644 --- a/editor/translations/mr.po +++ b/editor/translations/mr.po @@ -10601,11 +10601,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/ms.po b/editor/translations/ms.po index cc9f6f797b..ff7488d454 100644 --- a/editor/translations/ms.po +++ b/editor/translations/ms.po @@ -10969,11 +10969,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/nb.po b/editor/translations/nb.po index 660c01fed9..8924971039 100644 --- a/editor/translations/nb.po +++ b/editor/translations/nb.po @@ -18,13 +18,15 @@ # Patrick Sletvold <patricksletvold@hotmail.com>, 2021. # Kristoffer <kskau93@gmail.com>, 2021. # Lili Zoey <sayaks1@gmail.com>, 2021. +# slasken06 <ask.skivdal@gmail.com>, 2021. +# Daniel Skogly <daniel@klungo.no>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-08-12 21:32+0000\n" -"Last-Translator: Petter Reinholdtsen <pere-weblate@hungry.com>\n" +"PO-Revision-Date: 2021-11-03 13:15+0000\n" +"Last-Translator: Daniel Skogly <daniel@klungo.no>\n" "Language-Team: Norwegian Bokmål <https://hosted.weblate.org/projects/godot-" "engine/godot/nb_NO/>\n" "Language: nb\n" @@ -32,7 +34,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.8-dev\n" +"X-Generator: Weblate 4.9-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -11532,11 +11534,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/nl.po b/editor/translations/nl.po index abbf9a02bf..80c2ab188d 100644 --- a/editor/translations/nl.po +++ b/editor/translations/nl.po @@ -55,8 +55,8 @@ msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-10-04 13:31+0000\n" -"Last-Translator: Edgar <Edgar@anotherfoxguy.com>\n" +"PO-Revision-Date: 2021-10-24 20:52+0000\n" +"Last-Translator: Stijn Hinlopen <f.a.hinlopen@gmail.com>\n" "Language-Team: Dutch <https://hosted.weblate.org/projects/godot-engine/godot/" "nl/>\n" "Language: nl\n" @@ -990,9 +990,8 @@ msgid "Edit..." msgstr "Bewerken..." #: editor/connections_dialog.cpp -#, fuzzy msgid "Go to Method" -msgstr "Naar methode springen" +msgstr "Ga naar methode" #: editor/create_dialog.cpp msgid "Change %s Type" @@ -1814,13 +1813,12 @@ msgid "" msgstr "" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "(current)" -msgstr "(Huidig)" +msgstr "(huidig)" #: editor/editor_feature_profile.cpp msgid "(none)" -msgstr "" +msgstr "(geen)" #: editor/editor_feature_profile.cpp msgid "Remove currently selected profile, '%s'? Cannot be undone." @@ -11316,14 +11314,14 @@ msgstr "" "`/` karakter bevatten." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Toets " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Toets " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Controllerknop" diff --git a/editor/translations/or.po b/editor/translations/or.po index 00e5009221..eebe304b07 100644 --- a/editor/translations/or.po +++ b/editor/translations/or.po @@ -10590,11 +10590,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/pl.po b/editor/translations/pl.po index 5c55b0c86f..f4e73cb4ba 100644 --- a/editor/translations/pl.po +++ b/editor/translations/pl.po @@ -50,12 +50,14 @@ # Suchy Talerz <kacperkubis06@gmail.com>, 2021. # Bartosz Stasiak <bs97086@amu.edu.pl>, 2021. # Marek Malaria <to.tylko.dla.kont@gmail.com>, 2021. +# Mateusz Żak <matisgramy@gmail.com>, 2021. +# voltinus <voltinusmail@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-10-06 00:12+0000\n" +"PO-Revision-Date: 2021-10-31 22:17+0000\n" "Last-Translator: Tomek <kobewi4e@gmail.com>\n" "Language-Team: Polish <https://hosted.weblate.org/projects/godot-engine/" "godot/pl/>\n" @@ -2439,9 +2441,8 @@ msgstr "" "(instancjonowanie lub dziedziczenie) nie są spełnione." #: editor/editor_node.cpp -#, fuzzy msgid "Could not save one or more scenes!" -msgstr "Nie można zapisać zkonwertowanej tekstury:" +msgstr "Nie można zapisać jednej lub więcej scen!" #: editor/editor_node.cpp msgid "Save All Scenes" @@ -2585,7 +2586,7 @@ msgstr "Zapisać zmiany w \"%s\" przed zamknięciem?" #: editor/editor_node.cpp msgid "%s no longer exists! Please specify a new save location." -msgstr "" +msgstr "%s już nie istnieje! Określ nową lokalizację zapisu." #: editor/editor_node.cpp msgid "" @@ -4425,6 +4426,10 @@ msgid "" "Selecting another resource in the FileSystem dock without clicking Reimport " "first will discard changes made in the Import dock." msgstr "" +"Masz niezapisane zmiany, które nie zostały jeszcze zastosowane. Kliknij " +"Importuj ponownie, aby zastosować zmiany dokonane w ustawieniach importu.\n" +"Wybranie innego zasobu w systemie plików bez kliknięcia wpierw Importuj " +"ponownie odrzuci zmiany dokonane w imporcie." #: editor/import_dock.cpp msgid "Import As:" @@ -7398,12 +7403,10 @@ msgid "Move Down" msgstr "Przesuń w dół" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Next Script" msgstr "Następny skrypt" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Previous Script" msgstr "Poprzedni skrypt" @@ -7821,9 +7824,8 @@ msgid "Left Orthogonal" msgstr "Lewo ortogonalnie" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Left Perspective" -msgstr "Perspektywa" +msgstr "Perspektywa z Lewej" #: editor/plugins/spatial_editor_plugin.cpp msgid "Right Orthogonal" @@ -8182,24 +8184,23 @@ msgstr "Widok z prawej" #: editor/plugins/spatial_editor_plugin.cpp msgid "Orbit View Down" -msgstr "" +msgstr "Orbituj widok w dół" #: editor/plugins/spatial_editor_plugin.cpp msgid "Orbit View Left" -msgstr "" +msgstr "Orbituj widok w lewo" #: editor/plugins/spatial_editor_plugin.cpp msgid "Orbit View Right" -msgstr "" +msgstr "Orbituj widok w prawo" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Orbit View Up" -msgstr "Widok z przodu" +msgstr "Widok Orbitalny z Góry" #: editor/plugins/spatial_editor_plugin.cpp msgid "Orbit View 180" -msgstr "" +msgstr "Orbituj widok o 180" #: editor/plugins/spatial_editor_plugin.cpp msgid "Switch Perspective/Orthogonal View" @@ -11120,14 +11121,14 @@ msgstr "" "przynajmniej jeden znak \"/\"." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Klawisz " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "Fizyczny klawisz" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Klawisz " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Przycisk joysticka" @@ -14508,6 +14509,10 @@ msgid "" "Consider using a script's process loop instead of relying on a Timer for " "very low wait times." msgstr "" +"Bardzo niskie czasy czekania (< 0,05 sekund) mogą zachowywać się znacząco " +"różnie w zależności od częstotliwości klatek renderowania lub fizyki\n" +"Rozważ użycie pętli procesowej w skrypcie zamiast polegać na Timerze dla " +"bardzo niskich czasów czekania." #: scene/main/viewport.cpp msgid "" @@ -14522,11 +14527,12 @@ msgstr "" "przyporządkuj jego teksturę dla któregoś węzła." #: scene/main/viewport.cpp -#, fuzzy msgid "" "The Viewport size must be greater than or equal to 2 pixels on both " "dimensions to render anything." -msgstr "Rozmiar węzła Viewport musi być większy niż 0, by coś wyrenderować." +msgstr "" +"Wielkość Viewportu musi być większa lub równa 2 piksele w obu wymiarach, by " +"cokolwiek renderować." #: scene/resources/occluder_shape.cpp msgid "OccluderShapeSphere Set Spheres" diff --git a/editor/translations/pr.po b/editor/translations/pr.po index 9ea671ae8f..363fb8def5 100644 --- a/editor/translations/pr.po +++ b/editor/translations/pr.po @@ -11005,11 +11005,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/pt.po b/editor/translations/pt.po index e78f560111..7b6e1eea53 100644 --- a/editor/translations/pt.po +++ b/editor/translations/pt.po @@ -11087,14 +11087,14 @@ msgstr "" "pelo menos um caráter `/`." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Tecla " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "Chave Física" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Tecla " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Botão do joystick" diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po index 9e7d53c52e..e32cf399c8 100644 --- a/editor/translations/pt_BR.po +++ b/editor/translations/pt_BR.po @@ -125,13 +125,15 @@ # Zenvasca <zenvasca@gmail.com>, 2021. # Wladimir Roberto Barbosa <wladrbarbosa@gmail.com>, 2021. # Mário Victor Ribeiro Silva <mariovictorrs@gmail.com>, 2021. +# jak3z <jose_renato06@outlook.com>, 2021. +# Henrique Darko <henridark00@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: 2016-05-30\n" -"PO-Revision-Date: 2021-10-21 10:31+0000\n" -"Last-Translator: Mário Victor Ribeiro Silva <mariovictorrs@gmail.com>\n" +"PO-Revision-Date: 2021-11-03 13:15+0000\n" +"Last-Translator: jak3z <jose_renato06@outlook.com>\n" "Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/" "godot-engine/godot/pt_BR/>\n" "Language: pt_BR\n" @@ -551,7 +553,7 @@ msgstr "Não é possível adicionar uma nova trilha sem uma raiz" #: editor/animation_track_editor.cpp msgid "Invalid track for Bezier (no suitable sub-properties)" -msgstr "Trilha inválida para Bézier (sem subpropriedades adequadas)" +msgstr "Trilha inválida para Bézier (sem sub-propriedades adequadas)" #: editor/animation_track_editor.cpp msgid "Add Bezier Track" @@ -576,7 +578,7 @@ msgstr "Adicionar Trilha Chave" #: editor/animation_track_editor.cpp msgid "Track path is invalid, so can't add a method key." msgstr "" -"Caminho da trilha é inválido,então não pode adicionar uma chave de método." +"Caminho da trilha é inválido, então não pode adicionar uma chave de método." #: editor/animation_track_editor.cpp msgid "Add Method Track Key" @@ -607,7 +609,8 @@ msgstr "Alterar Escala das Chaves na Anim" msgid "" "This option does not work for Bezier editing, as it's only a single track." msgstr "" -"Essa opção não funciona para edição por Bezier,pois é apenas uma faixa única." +"Essa opção não funciona para edição por Bézier, pois é apenas uma trilha " +"única." #: editor/animation_track_editor.cpp msgid "" @@ -3791,9 +3794,8 @@ msgid "There are no mirrors available." msgstr "Não há espelhos disponíveis." #: editor/export_template_manager.cpp -#, fuzzy msgid "Retrieving the mirror list..." -msgstr "Reconectando, por favor aguarde." +msgstr "Reconectando a lista de espelhos..." #: editor/export_template_manager.cpp msgid "Starting the download..." @@ -3853,7 +3855,6 @@ msgid "Error getting the list of mirrors." msgstr "Erro ao obter a lista de espelhos." #: editor/export_template_manager.cpp -#, fuzzy msgid "Error parsing JSON with the list of mirrors. Please report this issue!" msgstr "" "Erro ao analisar o JSON da lista de espelhos. Por favor, reporte este " @@ -3942,9 +3943,8 @@ msgid "Importing:" msgstr "Importando:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Remove templates for the version '%s'?" -msgstr "Remover versão '%s' do modelo?" +msgstr "Remover modelo para a versão '%s'?" #: editor/export_template_manager.cpp msgid "Uncompressing Android Build Sources" @@ -3982,9 +3982,8 @@ msgid "Uninstall" msgstr "Desinstalar" #: editor/export_template_manager.cpp -#, fuzzy msgid "Uninstall templates for the current version." -msgstr "Valor inicial para o contador" +msgstr "Desinstalar modelos da versão atual." #: editor/export_template_manager.cpp msgid "Download from:" @@ -3995,9 +3994,8 @@ msgid "Open in Web Browser" msgstr "Abrir no Navegador" #: editor/export_template_manager.cpp -#, fuzzy msgid "Copy Mirror URL" -msgstr "Copiar Erro" +msgstr "Copiar URL do Espelho" #: editor/export_template_manager.cpp msgid "Download and Install" @@ -4022,9 +4020,8 @@ msgid "Install from File" msgstr "Instalar a Partir do Arquivo" #: editor/export_template_manager.cpp -#, fuzzy msgid "Install templates from a local file." -msgstr "Importar Modelos de um Arquivo ZIP" +msgstr "Importar modelos de um arquivo local." #: editor/export_template_manager.cpp editor/find_in_files.cpp #: editor/progress_dialog.cpp scene/gui/dialogs.cpp @@ -4034,7 +4031,7 @@ msgstr "Cancelar" #: editor/export_template_manager.cpp #, fuzzy msgid "Cancel the download of the templates." -msgstr "Não se pôde abrir zip dos modelos de exportação." +msgstr "Cancelar download dos modelos." #: editor/export_template_manager.cpp msgid "Other Installed Versions:" @@ -4226,14 +4223,12 @@ msgid "Sort by Type (Descending)" msgstr "Ordenar por Tipo (Descendente)" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Sort by Last Modified" -msgstr "Ultima Modificação" +msgstr "Ordenar por Último Modificado" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Sort by First Modified" -msgstr "Ultima Modificação" +msgstr "Ordenar por Primeiro Modificado" #: editor/filesystem_dock.cpp msgid "Duplicate..." @@ -4532,6 +4527,11 @@ msgid "" "Selecting another resource in the FileSystem dock without clicking Reimport " "first will discard changes made in the Import dock." msgstr "" +"Você tem mudanças pendentes que não foram aplicadas ainda. Clique em " +"Reimportar para aplicar as mudanças feitas nas opções de importação.\n" +"Selecionado outro recurso no painel do Sistema de Arquivos sem ter clicado " +"em Reimportar primeiro ira descartar as mudanças feitas no painel de " +"Importar." #: editor/import_dock.cpp msgid "Import As:" @@ -4592,21 +4592,18 @@ msgid "Save As..." msgstr "Salvar Como..." #: editor/inspector_dock.cpp -#, fuzzy msgid "Extra resource options." -msgstr "Não está no caminho de recursos." +msgstr "Opções de recursos extras." #: editor/inspector_dock.cpp -#, fuzzy msgid "Edit Resource from Clipboard" -msgstr "Editar Área de Transferência de Recursos" +msgstr "Editar Recursos da Área de Transferência" #: editor/inspector_dock.cpp msgid "Copy Resource" msgstr "Copiar Recurso" #: editor/inspector_dock.cpp -#, fuzzy msgid "Make Resource Built-In" msgstr "Tornar Embutido" @@ -4635,9 +4632,8 @@ msgid "Filter properties" msgstr "Filtrar propriedades" #: editor/inspector_dock.cpp -#, fuzzy msgid "Manage object properties." -msgstr "Propriedades do objeto." +msgstr "Gerenciar propriedades do objeto." #: editor/inspector_dock.cpp msgid "Changes may be lost!" @@ -5676,13 +5672,13 @@ msgstr "" "Salve sua cena e tente novamente." #: editor/plugins/baked_lightmap_editor_plugin.cpp -#, fuzzy msgid "" "No meshes to bake. Make sure they contain an UV2 channel and that the 'Use " "In Baked Light' and 'Generate Lightmap' flags are on." msgstr "" -"Não há malhas para preparar. Certifique-se de que elas possuem um canal UV2 " -"e que a propriedade \"Preparar Luz\" está habilitada." +"Não há malhas para pré-calcular. Certifique-se de que elas possuem um canal " +"UV2 e que as propriedades \"Use In Baked Light\" e \"Generate Lightmap\" " +"está habilitada." #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "Failed creating lightmap images, make sure path is writable." @@ -5826,15 +5822,13 @@ msgstr "Mover CanvaItem \"%s\" para (%d, %d)" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Locked" msgstr "Fixar Seleção" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Grouped" -msgstr "Grupo" +msgstr "Agrupado" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -5938,13 +5932,13 @@ msgstr "Alterar Âncoras" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "" "Project Camera Override\n" "Overrides the running project's camera with the editor viewport camera." msgstr "" -"Sobrepor Câmera de Jogo\n" -"Sobrepõe a câmera de jogo com a janela de exibição da câmera." +"Sobrepor câmera do projeto.\n" +"Sobrepõe a câmera do projeto em execução com a câmera da janela de exibição " +"do editor." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5953,6 +5947,9 @@ msgid "" "No project instance running. Run the project from the editor to use this " "feature." msgstr "" +"Sobrepor câmera do projeto.\n" +"Sem instâncias do projeto em execução. Execute o projeto pelo editor para " +"usar essa funcionalidade." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -6020,25 +6017,23 @@ msgstr "Modo de Seleção" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Drag: Rotate selected node around pivot." -msgstr "Remover nó ou trilha selecionada." +msgstr "Arrastar: Gire nó em tono do pivô." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Alt+Drag: Move selected node." msgstr "Alt+Arrastar: Mover nó selecionado." #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "V: Set selected node's pivot position." -msgstr "Remover nó ou trilha selecionada." +msgstr "V: Define a posição do pivô do nó selecionado." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Alt+RMB: Show list of all nodes at position clicked, including locked." msgstr "" -"Alt+BDM: Mostra uma lista de todos os nodes na posição clicada, incluindo " -"os bloqueados." +"Alt+Botão Esquerdo do Mouse: Mostrar a lista de todos os nós na posição " +"clicada, incluindo os bloqueados." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "RMB: Add node at position clicked." @@ -6582,9 +6577,8 @@ msgid "Couldn't create a single convex collision shape." msgstr "Não foi possível criar uma forma de colisão convexa simples." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Simplified Convex Shape" -msgstr "Criar Forma(s) Convexa(s) Simples" +msgstr "Criar Forma(s) Convexa(s) Simplificadas" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Single Convex Shape" @@ -6619,9 +6613,8 @@ msgid "No mesh to debug." msgstr "Nenhuma malha para depurar." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Mesh has no UV in layer %d." -msgstr "Modelo não tem uma UV nesta camada" +msgstr "Modelo não tem UV na camada %d." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "MeshInstance lacks a Mesh!" @@ -6686,9 +6679,8 @@ msgstr "" "Esta é a opção mais rápida (mas menos precisa) para detecção de colisão." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Simplified Convex Collision Sibling" -msgstr "Criar um irmão de Colisão Convexa" +msgstr "Criar Colisão Convexa Simplificada Irmã" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "" @@ -6705,14 +6697,14 @@ msgid "Create Multiple Convex Collision Siblings" msgstr "Criar Múltipla Colisão Convexa Irmã(s)" #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "" "Creates a polygon-based collision shape.\n" "This is a performance middle-ground between a single convex collision and a " "polygon-based collision." msgstr "" -"Cria um polígono base de colisão forma.\n" -"Este é um meio-termo entre as duas opções acima." +"Cria uma forma de colisão baseada em polígonos.\n" +"Este é um meio-termo em desempenho entre uma única colisão convexa e uma " +"colisão baseada em polígono." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Outline Mesh..." @@ -6779,14 +6771,12 @@ msgid "Remove Selected Item" msgstr "Remover Item Selecionado" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Ignore Transforms)" -msgstr "Importar da Cena" +msgstr "Importar da Cena (Ignora Transforms)" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Import from Scene (Apply Transforms)" -msgstr "Importar da Cena" +msgstr "Importar da Cena (Aplica Transforms)" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Update from Scene" @@ -7365,24 +7355,20 @@ msgid "ResourcePreloader" msgstr "ResourcePreloader" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Flip Portals" msgstr "Inverter Horizontalmente" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Room Generate Points" -msgstr "Gerar Contagem de Pontos:" +msgstr "Gerar Contagem de Pontos" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Generate Points" -msgstr "Gerar Contagem de Pontos:" +msgstr "Gerar Pontos" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Flip Portal" -msgstr "Inverter Horizontalmente" +msgstr "Virar Portal" #: editor/plugins/room_manager_editor_plugin.cpp #, fuzzy @@ -7894,14 +7880,12 @@ msgid "Skeleton2D" msgstr "Esqueleto2D" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Reset to Rest Pose" -msgstr "Definir os ossos para descansar Pose" +msgstr "Redefinir para Pose de Descanso" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Overwrite Rest Pose" -msgstr "Sobrescrever Cena Existente" +msgstr "Sobrescrever Pose de Descanso" #: editor/plugins/skeleton_editor_plugin.cpp msgid "Create physical bones" @@ -7928,74 +7912,62 @@ msgid "Perspective" msgstr "Perspectiva" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Topo" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Top Perspective" -msgstr "Perspectiva" +msgstr "Perspectiva Topo" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Baixo" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Bottom Perspective" -msgstr "Perspectiva" +msgstr "Perspectiva Baixo" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Left Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Esquerda" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Left Perspective" -msgstr "Perspectiva" +msgstr "Perspectiva Esquerda" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Right Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Direita" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Right Perspective" -msgstr "Perspectiva" +msgstr "Perspectiva Direita" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Dianteira" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Front Perspective" -msgstr "Perspectiva" +msgstr "Perspectiva Dianteira" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Orthogonal" -msgstr "Ortogonal" +msgstr "Ortogonal Traseira" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Rear Perspective" -msgstr "Perspectiva" +msgstr "Perspectiva Traseira" #. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled. #: editor/plugins/spatial_editor_plugin.cpp msgid " [auto]" -msgstr "" +msgstr " [automático]" #. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled. #: editor/plugins/spatial_editor_plugin.cpp msgid " [portals active]" -msgstr "" +msgstr " [portais ativados]" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Aborted." @@ -8057,9 +8029,8 @@ msgid "Animation Key Inserted." msgstr "Chave de Animação Inserida." #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Pitch:" -msgstr "Tom" +msgstr "Tom:" #: editor/plugins/spatial_editor_plugin.cpp msgid "Yaw:" @@ -8253,9 +8224,8 @@ msgstr "" "Ele não deve ser usado como indicação confiável de desempenho do jogo." #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Convert Rooms" -msgstr "Converter Para %s" +msgstr "Converter Salas" #: editor/plugins/spatial_editor_plugin.cpp msgid "XForm Dialog" @@ -8277,9 +8247,8 @@ msgstr "" "x\")." #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Snap Nodes to Floor" -msgstr "Encaixar Nó(s) no Chão" +msgstr "Atrair Nó(s) ao Chão" #: editor/plugins/spatial_editor_plugin.cpp msgid "Couldn't find a solid floor to snap the selection to." @@ -8295,7 +8264,7 @@ msgstr "Use Encaixar" #: editor/plugins/spatial_editor_plugin.cpp msgid "Converts rooms for portal culling." -msgstr "" +msgstr "Converter salas para portal culling." #: editor/plugins/spatial_editor_plugin.cpp msgid "Bottom View" @@ -8741,19 +8710,16 @@ msgid "TextureRegion" msgstr "Região da Textura" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Colors" -msgstr "Cor" +msgstr "Cores" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Fonts" -msgstr "Fonte" +msgstr "Fontes" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Icons" -msgstr "Ícone" +msgstr "Ícones" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -8762,7 +8728,7 @@ msgstr "StyleBox" #: editor/plugins/theme_editor_plugin.cpp msgid "{num} color(s)" -msgstr "" +msgstr "{num} cor(es)" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -8770,9 +8736,8 @@ msgid "No colors found." msgstr "Nenhum sub-recurso encontrado." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "{num} constant(s)" -msgstr "Constantes" +msgstr "{num} constante(s)" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -8781,21 +8746,19 @@ msgstr "Cor constante." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} font(s)" -msgstr "" +msgstr "{num} fonte(s)" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "No fonts found." -msgstr "Não encontrado!" +msgstr "Fontes não encontradas." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} icon(s)" -msgstr "" +msgstr "{num} ícone(s)" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "No icons found." -msgstr "Não encontrado!" +msgstr "Ícones não encontrados." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} stylebox(es)" @@ -8821,36 +8784,31 @@ msgstr "Importar Tema" #: editor/plugins/theme_editor_plugin.cpp msgid "Importing items {n}/{n}" -msgstr "" +msgstr "Importando itens {n}/{n}" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Updating the editor" -msgstr "Sair do editor?" +msgstr "Atualizando o editor" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Finalizing" -msgstr "Analisando" +msgstr "Finalizando" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Filter:" -msgstr "Filtro: " +msgstr "Filtro:" #: editor/plugins/theme_editor_plugin.cpp msgid "With Data" -msgstr "" +msgstr "Com Dados" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select by data type:" -msgstr "Selecione um Nó" +msgstr "Selecione por tipo de dados:" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible color items." -msgstr "Selecione um item de configuração primeiro!" +msgstr "Selecione todos os itens de cor visíveis." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible color items and their data." @@ -8861,9 +8819,8 @@ msgid "Deselect all visible color items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible constant items." -msgstr "Selecione um item de configuração primeiro!" +msgstr "Selecione todos os itens constantes visíveis." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible constant items and their data." @@ -8874,9 +8831,8 @@ msgid "Deselect all visible constant items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible font items." -msgstr "Selecione um item de configuração primeiro!" +msgstr "Selecione todos os itens de fonte visíveis." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible font items and their data." @@ -8887,19 +8843,16 @@ msgid "Deselect all visible font items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible icon items." -msgstr "Selecione um item de configuração primeiro!" +msgstr "Selecione todos os itens de ícones visíveis." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible icon items and their data." -msgstr "Selecione um item de configuração primeiro!" +msgstr "Selecione todos os itens de ícones visíveis e seus dados." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Deselect all visible icon items." -msgstr "Selecione um item de configuração primeiro!" +msgstr "Desmarque todos os itens de ícones visíveis." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible stylebox items." @@ -8955,9 +8908,8 @@ msgid "Deselect all Theme items." msgstr "Desselecionar todos os itens do Tema." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Import Selected" -msgstr "Importar Cena" +msgstr "Importar Selecionado" #: editor/plugins/theme_editor_plugin.cpp msgid "" @@ -8981,9 +8933,8 @@ msgid "Remove All Color Items" msgstr "Remover Todos os Itens" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Rename Item" -msgstr "Remover Item" +msgstr "Renomear Item" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9093,9 +9044,8 @@ msgid "Add Type:" msgstr "Tipo:" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Item:" -msgstr "Adicionar Item" +msgstr "Adicionar Item:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9103,9 +9053,8 @@ msgid "Add StyleBox Item" msgstr "Adicionar Todos os Itens" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Items:" -msgstr "Remover Item" +msgstr "Remover Itens:" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove Class Items" @@ -9191,9 +9140,8 @@ msgid "Add Item Type" msgstr "Adicionar Item" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Node Types:" -msgstr "Tipo de nó" +msgstr "Tipos de Nó:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9214,9 +9162,8 @@ msgid "Override all default type items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Theme:" -msgstr "Tema" +msgstr "Tema:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -10744,9 +10691,8 @@ msgid "VisualShader" msgstr "VisualShader" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Edit Visual Property:" -msgstr "Editar Propriedade Visual" +msgstr "Editar Propriedade Visual:" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Visual Shader Mode Changed" @@ -11199,12 +11145,11 @@ msgstr "Tem certeza de que quer executar %d projetos ao mesmo tempo?" #: editor/project_manager.cpp #, fuzzy msgid "Remove %d projects from the list?" -msgstr "Selecione um dispositivo da lista" +msgstr "Remover projetos %d da lista?" #: editor/project_manager.cpp -#, fuzzy msgid "Remove this project from the list?" -msgstr "Selecione um dispositivo da lista" +msgstr "Remover esse projeto da lista?" #: editor/project_manager.cpp msgid "" @@ -11342,14 +11287,14 @@ msgstr "" "conter pelo menos um caractere `/`." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Tecla " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Tecla " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Botão do Joystick" @@ -13521,7 +13466,7 @@ msgstr "Carregando, por favor aguarde." #: platform/android/export/export_plugin.cpp #, fuzzy msgid "Could not install to device: %s" -msgstr "Não foi possível instanciar cena!" +msgstr "Não foi possível instalar para o dispositivo: %s" #: platform/android/export/export_plugin.cpp msgid "Running on device..." @@ -13657,7 +13602,7 @@ msgstr "Assinando lançamento %s..." #: platform/android/export/export_plugin.cpp #, fuzzy msgid "Could not find keystore, unable to export." -msgstr "Não foi possível abrir o modelo para exportar:" +msgstr "Não foi possível encontrar a keystore, incapaz de exportar." #: platform/android/export/export_plugin.cpp msgid "'apksigner' returned with error #%d" @@ -13723,9 +13668,8 @@ msgstr "" "Não foi possível exportar os arquivos do projeto ao projeto do gradle\n" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not write expansion package file!" -msgstr "Não foi possível escrever o arquivo:" +msgstr "Não foi possível escrever o arquivo do pacote de expansão!" #: platform/android/export/export_plugin.cpp msgid "Building Android Project (gradle)" @@ -13782,9 +13726,8 @@ msgid "Adding files..." msgstr "Adicionando arquivos..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not export project files" -msgstr "Não foi possível escrever o arquivo:" +msgstr "Não foi possível exportar os arquivos do projeto" #: platform/android/export/export_plugin.cpp msgid "Aligning APK..." @@ -13857,7 +13800,7 @@ msgstr "Não foi possível criar a pasta." #: platform/javascript/export/export.cpp #, fuzzy msgid "Error starting HTTP server:" -msgstr "Erro ao salvar cena." +msgstr "Erro iniciando servidor HTTP:" #: platform/osx/export/export.cpp #, fuzzy diff --git a/editor/translations/ro.po b/editor/translations/ro.po index 12102e12dc..1ffd38d5a0 100644 --- a/editor/translations/ro.po +++ b/editor/translations/ro.po @@ -11270,11 +11270,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/ru.po b/editor/translations/ru.po index df2c3c1cdf..668cfb6afa 100644 --- a/editor/translations/ru.po +++ b/editor/translations/ru.po @@ -11177,14 +11177,14 @@ msgstr "" "хотя бы один символ `/`." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Клавиша " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "Физическая клавиша" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Клавиша " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Кнопка геймпада" diff --git a/editor/translations/si.po b/editor/translations/si.po index c19727905b..698dc3040d 100644 --- a/editor/translations/si.po +++ b/editor/translations/si.po @@ -10693,11 +10693,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/sk.po b/editor/translations/sk.po index 93e2cf40ab..59ddcb9fc1 100644 --- a/editor/translations/sk.po +++ b/editor/translations/sk.po @@ -11161,11 +11161,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/sl.po b/editor/translations/sl.po index dc381b7d0a..0d0acd817d 100644 --- a/editor/translations/sl.po +++ b/editor/translations/sl.po @@ -11477,11 +11477,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/sq.po b/editor/translations/sq.po index 2cf0327ec4..d6e23ddbe6 100644 --- a/editor/translations/sq.po +++ b/editor/translations/sq.po @@ -11106,11 +11106,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/sr_Cyrl.po b/editor/translations/sr_Cyrl.po index 53a3dc6761..0301c5f380 100644 --- a/editor/translations/sr_Cyrl.po +++ b/editor/translations/sr_Cyrl.po @@ -12346,15 +12346,15 @@ msgstr "" "карактер." #: editor/project_settings_editor.cpp +msgid "Physical Key" +msgstr "" + +#: editor/project_settings_editor.cpp #, fuzzy msgid "Key " msgstr "Кључ" #: editor/project_settings_editor.cpp -msgid "Physical Key" -msgstr "" - -#: editor/project_settings_editor.cpp #, fuzzy msgid "Joy Button" msgstr "Џојс дугмиж" diff --git a/editor/translations/sr_Latn.po b/editor/translations/sr_Latn.po index 668ee7d7de..66f5d9574f 100644 --- a/editor/translations/sr_Latn.po +++ b/editor/translations/sr_Latn.po @@ -10795,11 +10795,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/sv.po b/editor/translations/sv.po index f22e9500e1..3b674ce0e3 100644 --- a/editor/translations/sv.po +++ b/editor/translations/sv.po @@ -23,13 +23,14 @@ # Marcus Toftedahl <marcus.toftedahl@his.se>, 2020. # Alex25820 <Alexander_sjogren@hotmail.se>, 2021. # Leon <joel.lundborg@gmail.com>, 2021. +# Kent Jofur <kent.jofur@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-10-21 10:31+0000\n" -"Last-Translator: Christoffer Sundbom <christoffer_karlsson@live.se>\n" +"PO-Revision-Date: 2021-11-03 13:15+0000\n" +"Last-Translator: Kent Jofur <kent.jofur@gmail.com>\n" "Language-Team: Swedish <https://hosted.weblate.org/projects/godot-engine/" "godot/sv/>\n" "Language: sv\n" @@ -385,15 +386,13 @@ msgstr "Anim Infoga" #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp -#, fuzzy msgid "node '%s'" -msgstr "Kan inte öppna '%s'." +msgstr "nod '%s'" #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp -#, fuzzy msgid "animation" -msgstr "Animation" +msgstr "animering" #: editor/animation_track_editor.cpp msgid "AnimationPlayer can't animate itself, only other players." @@ -402,9 +401,8 @@ msgstr "" #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp -#, fuzzy msgid "property '%s'" -msgstr "Egenskaper" +msgstr "egenskapen '%s'" #: editor/animation_track_editor.cpp msgid "Anim Create & Insert" @@ -874,9 +872,8 @@ msgstr "" "vilotid." #: editor/connections_dialog.cpp -#, fuzzy msgid "Oneshot" -msgstr "Oneshot" +msgstr "Ett skott" #: editor/connections_dialog.cpp msgid "Disconnects the signal after its first emission." @@ -1304,9 +1301,8 @@ msgid "(and %s more files)" msgstr "(och %s fler filer)" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Asset \"%s\" installed successfully!" -msgstr "Paketet installerades!" +msgstr "Paketet \"%s\" har installerats!" #: editor/editor_asset_installer.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -1830,9 +1826,8 @@ msgid "Enable Contextual Editor" msgstr "Aktivera kontextuell redigerare" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Class Properties:" -msgstr "Expandera alla" +msgstr "Klassegenskaper:" #: editor/editor_feature_profile.cpp #, fuzzy @@ -2176,7 +2171,7 @@ msgstr "" #: editor/editor_help.cpp msgid "Method Descriptions" -msgstr "Metodbeskrivningar" +msgstr "Metodbeskrivning" #: editor/editor_help.cpp msgid "" @@ -2606,13 +2601,15 @@ msgstr "Spara ändringar i '%s' innan stängning?" #: editor/editor_node.cpp msgid "%s no longer exists! Please specify a new save location." -msgstr "" +msgstr "%s finns inte längre! Vänligen ange en ny lagringsplats." #: editor/editor_node.cpp msgid "" "The current scene has no root node, but %d modified external resource(s) " "were saved anyway." msgstr "" +"Den aktuella scenen har ingen rotnod, men %d modifierade externa resurser " +"sparades ändå." #: editor/editor_node.cpp #, fuzzy @@ -2651,29 +2648,27 @@ msgstr "Nuvarande scen inte sparad. Öppna ändå?" #: editor/editor_node.cpp msgid "Can't undo while mouse buttons are pressed." -msgstr "" +msgstr "Det går inte att ångra medan musknapparna är nedtryckta." #: editor/editor_node.cpp msgid "Nothing to undo." -msgstr "" +msgstr "Inget att ångra." #: editor/editor_node.cpp -#, fuzzy msgid "Undo: %s" -msgstr "Ångra" +msgstr "Ångra: %s" #: editor/editor_node.cpp msgid "Can't redo while mouse buttons are pressed." -msgstr "" +msgstr "Det går inte att göra om medan musknapparna är nedtryckta." #: editor/editor_node.cpp msgid "Nothing to redo." -msgstr "" +msgstr "Inget att göra om." #: editor/editor_node.cpp -#, fuzzy msgid "Redo: %s" -msgstr "Återställ" +msgstr "Gör om: %s" #: editor/editor_node.cpp msgid "Can't reload a scene that was never saved." @@ -3278,9 +3273,8 @@ msgid "Inspector" msgstr "Inspektör" #: editor/editor_node.cpp -#, fuzzy msgid "Expand Bottom Panel" -msgstr "Expandera alla" +msgstr "Expandera Nedre Panel" #: editor/editor_node.cpp msgid "Output" @@ -3452,9 +3446,8 @@ msgid "Update" msgstr "Uppdatera" #: editor/editor_plugin_settings.cpp -#, fuzzy msgid "Version" -msgstr "Version:" +msgstr "Version" #: editor/editor_plugin_settings.cpp #, fuzzy @@ -3721,9 +3714,8 @@ msgid "Error requesting URL:" msgstr "Fel vid laddning:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Connecting to the mirror..." -msgstr "Anslut Till Node:" +msgstr "Ansluter till spegeln..." #: editor/export_template_manager.cpp msgid "Can't resolve the requested address." @@ -3749,9 +3741,8 @@ msgid "Request ended up in a redirect loop." msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Request failed:" -msgstr "Förfrågning Misslyckades." +msgstr "Förfrågning misslyckades:" #: editor/export_template_manager.cpp msgid "Download complete; extracting templates..." @@ -3902,9 +3893,8 @@ msgid "Uninstall templates for the current version." msgstr "" #: editor/export_template_manager.cpp -#, fuzzy msgid "Download from:" -msgstr "Ladda ner" +msgstr "Ladda ner från:" #: editor/export_template_manager.cpp #, fuzzy @@ -4405,19 +4395,19 @@ msgstr "Genererar Lightmaps" #: editor/import/resource_importer_scene.cpp msgid "Generating for Mesh: " -msgstr "" +msgstr "Generera för mesh: " #: editor/import/resource_importer_scene.cpp msgid "Running Custom Script..." -msgstr "" +msgstr "Kör anpassat skript..." #: editor/import/resource_importer_scene.cpp msgid "Couldn't load post-import script:" -msgstr "" +msgstr "Det gick inte att läsa in skript efter import:" #: editor/import/resource_importer_scene.cpp msgid "Invalid/broken script for post-import (check console):" -msgstr "" +msgstr "Ogiltigt/felaktigt skript för efterimport (kontrollera konsolen):" #: editor/import/resource_importer_scene.cpp msgid "Error running post-import script:" @@ -4432,22 +4422,20 @@ msgid "Saving..." msgstr "Sparar..." #: editor/import_defaults_editor.cpp -#, fuzzy msgid "Select Importer" -msgstr "Välj Node" +msgstr "Välj Importör" #: editor/import_defaults_editor.cpp msgid "Importer:" msgstr "Importör:" #: editor/import_defaults_editor.cpp -#, fuzzy msgid "Reset to Defaults" -msgstr "Ladda Standard" +msgstr "Återställ till standardvärden" #: editor/import_dock.cpp msgid "Keep File (No Import)" -msgstr "" +msgstr "Behåll fil (ingen import)" #: editor/import_dock.cpp msgid "%d Files" @@ -4472,6 +4460,10 @@ msgid "" "Selecting another resource in the FileSystem dock without clicking Reimport " "first will discard changes made in the Import dock." msgstr "" +"Du har väntande ändringar som inte har tillämpats ännu. Klicka på " +"Återimportera för att tillämpa ändringar som gjorts i importalternativen.\n" +"Om du väljer en annan resurs i FilSystem-dockan utan att först klicka på " +"Återimportera kommer ändringar som gjorts i importdockan att ignoreras." #: editor/import_dock.cpp msgid "Import As:" @@ -4484,16 +4476,18 @@ msgstr "Återställ Zoom" #: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" -msgstr "" +msgstr "Spara scener, återimportera och starta om" #: editor/import_dock.cpp msgid "Changing the type of an imported file requires editor restart." -msgstr "" +msgstr "Att ändra typen av en importerad fil kräver omstart av editorn." #: editor/import_dock.cpp msgid "" "WARNING: Assets exist that use this resource, they may stop loading properly." msgstr "" +"VARNING: Det finns tillgångar som använder den här resursen, de kan sluta " +"laddas in korrekt." #: editor/inspector_dock.cpp msgid "Failed to load resource." @@ -4519,7 +4513,7 @@ msgstr "Skapa en ny resurs i minnet och ändra den." #: editor/inspector_dock.cpp msgid "Load an existing resource from disk and edit it." -msgstr "" +msgstr "Ladda en befintlig resurs från disken och redigera den." #: editor/inspector_dock.cpp msgid "Save the currently edited resource." @@ -4835,9 +4829,8 @@ msgid "Blend:" msgstr "" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Parameter Changed:" -msgstr "Uppdatera Ändringar" +msgstr "Parameter ändrad:" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp @@ -5469,9 +5462,8 @@ msgid "Request failed, timeout" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Timeout." -msgstr "Tid:" +msgstr "Tidsgräns." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Failed:" @@ -8028,9 +8020,8 @@ msgid "Translate" msgstr "Översättningar" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Scale" -msgstr "Skala:" +msgstr "Skala" #: editor/plugins/spatial_editor_plugin.cpp msgid "Scaling: " @@ -8062,28 +8053,24 @@ msgid "Yaw:" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Size:" -msgstr "Storlek: " +msgstr "Storlek:" #: editor/plugins/spatial_editor_plugin.cpp msgid "Objects Drawn:" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Material Changes:" -msgstr "Uppdatera Ändringar" +msgstr "Materialförändringar:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Shader Changes:" -msgstr "Ändra" +msgstr "Shader Ändringar:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Surface Changes:" -msgstr "Ändra" +msgstr "Ytförändringar:" #: editor/plugins/spatial_editor_plugin.cpp msgid "Draw Calls:" @@ -8838,9 +8825,8 @@ msgid "Importing items {n}/{n}" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Updating the editor" -msgstr "Stäng redigeraren?" +msgstr "Uppdaterar editorn" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -8857,9 +8843,8 @@ msgid "With Data" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select by data type:" -msgstr "Välj en Node" +msgstr "Välj efter datatyp:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9101,9 +9086,8 @@ msgid "Add StyleBox Item" msgstr "Stil" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Items:" -msgstr "Ta Bort Mall" +msgstr "Ta bort objekt:" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove Class Items" @@ -9143,9 +9127,8 @@ msgid "Editor Theme" msgstr "Redigera Tema" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select Another Theme Resource:" -msgstr "Ta bort Resurs" +msgstr "Välj en annan temaresurs:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9201,18 +9184,16 @@ msgid "Show default type items alongside items that have been overridden." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Override All" -msgstr "skriv över:" +msgstr "Åsidosätt Alla" #: editor/plugins/theme_editor_plugin.cpp msgid "Override all default type items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Theme:" -msgstr "Tema" +msgstr "Tema:" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -9234,9 +9215,8 @@ msgid "Default Preview" msgstr "Förhandsgranska" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select UI Scene:" -msgstr "Återställ Scen" +msgstr "Välj UI-scen:" #: editor/plugins/theme_editor_preview.cpp msgid "" @@ -9386,9 +9366,8 @@ msgid "Erase TileMap" msgstr "" #: editor/plugins/tile_map_editor_plugin.cpp -#, fuzzy msgid "Find Tile" -msgstr "Hitta Nästa" +msgstr "Hitta Bricka" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Transpose" @@ -9559,9 +9538,8 @@ msgid "Navigation Mode" msgstr "Animations-Node" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Bitmask Mode" -msgstr "Raw-Läge" +msgstr "Bitmaskläge" #: editor/plugins/tile_set_editor_plugin.cpp #, fuzzy @@ -9569,9 +9547,8 @@ msgid "Priority Mode" msgstr "Exportera Projekt" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Icon Mode" -msgstr "Växla Läge" +msgstr "Icon Läge" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Z Index Mode" @@ -9857,9 +9834,8 @@ msgid "Detect new changes" msgstr "Skapa Ny" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Changes" -msgstr "Ändra" +msgstr "Ändringar" #: editor/plugins/version_control_editor_plugin.cpp msgid "Modified" @@ -10723,9 +10699,8 @@ msgid "VisualShader" msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Edit Visual Property:" -msgstr "Redigera Filter" +msgstr "Redigera Visuell Egenskap:" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Visual Shader Mode Changed" @@ -11147,14 +11122,12 @@ msgid "Are you sure to run %d projects at once?" msgstr "" #: editor/project_manager.cpp -#, fuzzy msgid "Remove %d projects from the list?" -msgstr "Välj enhet från listan" +msgstr "Ta bort %d projekt från listan?" #: editor/project_manager.cpp -#, fuzzy msgid "Remove this project from the list?" -msgstr "Välj enhet från listan" +msgstr "Vill du ta bort det här projektet från listan?" #: editor/project_manager.cpp msgid "" @@ -11279,14 +11252,14 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Nyckel " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Nyckel " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "" @@ -13584,9 +13557,8 @@ msgstr "" "Snälla Vänta..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not find keystore, unable to export." -msgstr "Kunde inte öppna mall för export:" +msgstr "Det gick inte att hitta nyckellager, det gick inte att exportera." #: platform/android/export/export_plugin.cpp msgid "'apksigner' returned with error #%d" @@ -13646,9 +13618,8 @@ msgid "Could not export project files to gradle project\n" msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not write expansion package file!" -msgstr "Kunde inte skriva till filen:" +msgstr "Kunde inte skriva expansionspaketfil!" #: platform/android/export/export_plugin.cpp msgid "Building Android Project (gradle)" @@ -13701,9 +13672,8 @@ msgid "Adding files..." msgstr "Lägger till %s..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not export project files" -msgstr "Kunde inte skriva till filen:" +msgstr "Kunde inte exportera projektfiler" #: platform/android/export/export_plugin.cpp msgid "Aligning APK..." @@ -13768,14 +13738,12 @@ msgid "Could not read HTML shell:" msgstr "Kunde inte skriva till filen:" #: platform/javascript/export/export.cpp -#, fuzzy msgid "Could not create HTTP server directory:" -msgstr "Kunde inte skapa mapp." +msgstr "Kunde inte skapa HTTP-serverkatalog:" #: platform/javascript/export/export.cpp -#, fuzzy msgid "Error starting HTTP server:" -msgstr "Fel vid sparande av scenen." +msgstr "Fel vid start av HTTP-server:" #: platform/osx/export/export.cpp #, fuzzy @@ -14574,9 +14542,8 @@ msgid "Invalid source for shader." msgstr "Ogiltig teckenstorlek." #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Invalid comparison function for that type." -msgstr "Ogiltig teckenstorlek." +msgstr "Ogiltig jämförelsefunktion för den typen." #: servers/visual/shader_language.cpp msgid "Varying may not be assigned in the '%s' function." @@ -14607,8 +14574,9 @@ msgid "Assignment to uniform." msgstr "" #: servers/visual/shader_language.cpp +#, fuzzy msgid "Constants cannot be modified." -msgstr "" +msgstr "Konstanter kan inte ändras." #~ msgid "Bottom" #~ msgstr "Botten" diff --git a/editor/translations/ta.po b/editor/translations/ta.po index d9114adc60..ac91117100 100644 --- a/editor/translations/ta.po +++ b/editor/translations/ta.po @@ -10697,11 +10697,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/te.po b/editor/translations/te.po index 39cda33625..6735d08c71 100644 --- a/editor/translations/te.po +++ b/editor/translations/te.po @@ -10595,11 +10595,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/th.po b/editor/translations/th.po index ef1bb3b2bb..602f593f13 100644 --- a/editor/translations/th.po +++ b/editor/translations/th.po @@ -11110,14 +11110,14 @@ msgstr "" "แบบสอบถามต้องมีอักขระ `/` อย่างน้อยหนึ่งตัวเพื่อกรองตามชื่อโครงการและที่อยู่แบบเต็ม" #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "ปุ่ม " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "ปุ่ม " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "ปุ่มจอย" diff --git a/editor/translations/tr.po b/editor/translations/tr.po index 5f8a365768..73896955e3 100644 --- a/editor/translations/tr.po +++ b/editor/translations/tr.po @@ -11177,14 +11177,14 @@ msgstr "" "` karakteri içermesi gereklidir." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Anahtar " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "Fiziksel Anahtar" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Anahtar " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Oyun Kolu Düğmesi" diff --git a/editor/translations/tt.po b/editor/translations/tt.po index fc5064a395..0f92208d1e 100644 --- a/editor/translations/tt.po +++ b/editor/translations/tt.po @@ -10593,11 +10593,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/tzm.po b/editor/translations/tzm.po index 1911f0fde6..1b9404a393 100644 --- a/editor/translations/tzm.po +++ b/editor/translations/tzm.po @@ -10591,11 +10591,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/uk.po b/editor/translations/uk.po index db324bbc2c..215937ed55 100644 --- a/editor/translations/uk.po +++ b/editor/translations/uk.po @@ -11131,14 +11131,14 @@ msgstr "" "бути принаймні один символ «/»." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Клавіша " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "Фізична клавіша" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Клавіша " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "Кнопка джойстика" diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po index b192d4b651..7918638d9c 100644 --- a/editor/translations/ur_PK.po +++ b/editor/translations/ur_PK.po @@ -10910,11 +10910,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/vi.po b/editor/translations/vi.po index e1aa97d317..ceb4d7948e 100644 --- a/editor/translations/vi.po +++ b/editor/translations/vi.po @@ -11117,14 +11117,14 @@ msgstr "" "một ký tự '/'." #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "Khoá " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "Khoá " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "" diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po index 82159d534e..6fef2d2f01 100644 --- a/editor/translations/zh_CN.po +++ b/editor/translations/zh_CN.po @@ -10934,14 +10934,14 @@ msgstr "" "如果要根据名称和完整路径筛选,搜索内容应至少包含一个“/”字符。" #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "按键 " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "物理按键" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "按键 " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "手柄按键" diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po index b3ac6dcf79..c04f392c13 100644 --- a/editor/translations/zh_HK.po +++ b/editor/translations/zh_HK.po @@ -11395,11 +11395,11 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -msgid "Key " +msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp -msgid "Physical Key" +msgid "Key " msgstr "" #: editor/project_settings_editor.cpp diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po index 6ec9a2671a..c699fc48fb 100644 --- a/editor/translations/zh_TW.po +++ b/editor/translations/zh_TW.po @@ -11092,14 +11092,14 @@ msgstr "" "若要以名稱與完整路徑來過濾專案,搜尋內容應至少包含一個「/」字元。" #: editor/project_settings_editor.cpp -msgid "Key " -msgstr "按鍵 " - -#: editor/project_settings_editor.cpp msgid "Physical Key" msgstr "" #: editor/project_settings_editor.cpp +msgid "Key " +msgstr "按鍵 " + +#: editor/project_settings_editor.cpp msgid "Joy Button" msgstr "控制器按鈕" |