diff options
Diffstat (limited to 'editor')
209 files changed, 3499 insertions, 3276 deletions
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp index d195561a85..cc07d589c5 100644 --- a/editor/action_map_editor.cpp +++ b/editor/action_map_editor.cpp @@ -969,9 +969,9 @@ void ActionMapEditor::_notification(int p_what) { } void ActionMapEditor::_bind_methods() { - ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &ActionMapEditor::get_drag_data_fw); - ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &ActionMapEditor::can_drop_data_fw); - ClassDB::bind_method(D_METHOD("drop_data_fw"), &ActionMapEditor::drop_data_fw); + ClassDB::bind_method(D_METHOD("_get_drag_data_fw"), &ActionMapEditor::get_drag_data_fw); + ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &ActionMapEditor::can_drop_data_fw); + ClassDB::bind_method(D_METHOD("_drop_data_fw"), &ActionMapEditor::drop_data_fw); ADD_SIGNAL(MethodInfo("action_added", PropertyInfo(Variant::STRING, "name"))); ADD_SIGNAL(MethodInfo("action_edited", PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::DICTIONARY, "new_action"))); diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 3620fda4f8..fde75e0f0c 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -165,7 +165,7 @@ public: } switch (animation->track_get_type(track)) { - case Animation::TYPE_TRANSFORM: { + case Animation::TYPE_TRANSFORM3D: { Dictionary d_old = animation->track_get_key_value(track, key); Dictionary d_new = d_old.duplicate(); d_new[p_name] = p_value; @@ -412,7 +412,7 @@ public: } switch (animation->track_get_type(track)) { - case Animation::TYPE_TRANSFORM: { + case Animation::TYPE_TRANSFORM3D: { Dictionary d = animation->track_get_key_value(track, key); ERR_FAIL_COND_V(!d.has(name), false); r_ret = d[p_name]; @@ -523,9 +523,9 @@ public: } switch (animation->track_get_type(track)) { - case Animation::TYPE_TRANSFORM: { + case Animation::TYPE_TRANSFORM3D: { p_list->push_back(PropertyInfo(Variant::VECTOR3, "location")); - p_list->push_back(PropertyInfo(Variant::QUAT, "rotation")); + p_list->push_back(PropertyInfo(Variant::QUATERNION, "rotation")); p_list->push_back(PropertyInfo(Variant::VECTOR3, "scale")); } break; @@ -781,7 +781,7 @@ public: } switch (animation->track_get_type(track)) { - case Animation::TYPE_TRANSFORM: { + case Animation::TYPE_TRANSFORM3D: { Dictionary d_old = animation->track_get_key_value(track, key); Dictionary d_new = d_old.duplicate(); d_new[p_name] = p_value; @@ -1012,7 +1012,7 @@ public: } switch (animation->track_get_type(track)) { - case Animation::TYPE_TRANSFORM: { + case Animation::TYPE_TRANSFORM3D: { Dictionary d = animation->track_get_key_value(track, key); ERR_FAIL_COND_V(!d.has(name), false); r_ret = d[p_name]; @@ -1162,9 +1162,9 @@ public: if (same_track_type) { switch (animation->track_get_type(first_track)) { - case Animation::TYPE_TRANSFORM: { + case Animation::TYPE_TRANSFORM3D: { p_list->push_back(PropertyInfo(Variant::VECTOR3, "location")); - p_list->push_back(PropertyInfo(Variant::QUAT, "rotation")); + p_list->push_back(PropertyInfo(Variant::QUATERNION, "rotation")); p_list->push_back(PropertyInfo(Variant::VECTOR3, "scale")); } break; case Animation::TYPE_VALUE: { @@ -2007,7 +2007,7 @@ void AnimationTrackEdit::_notification(int p_what) { interp_mode_rect.position.y = int(get_size().height - icon->get_height()) / 2; interp_mode_rect.size = icon->get_size(); - if (animation->track_get_type(track) == Animation::TYPE_VALUE || animation->track_get_type(track) == Animation::TYPE_TRANSFORM) { + if (animation->track_get_type(track) == Animation::TYPE_VALUE || animation->track_get_type(track) == Animation::TYPE_TRANSFORM3D) { draw_texture(icon, interp_mode_rect.position); } //make it easier to click @@ -2017,7 +2017,7 @@ void AnimationTrackEdit::_notification(int p_what) { ofs += icon->get_width() + hsep; interp_mode_rect.size.x += hsep; - if (animation->track_get_type(track) == Animation::TYPE_VALUE || animation->track_get_type(track) == Animation::TYPE_TRANSFORM) { + if (animation->track_get_type(track) == Animation::TYPE_VALUE || animation->track_get_type(track) == Animation::TYPE_TRANSFORM3D) { draw_texture(down_icon, Vector2(ofs, int(get_size().height - down_icon->get_height()) / 2)); interp_mode_rect.size.x += down_icon->get_width(); } else { @@ -2040,7 +2040,7 @@ void AnimationTrackEdit::_notification(int p_what) { loop_mode_rect.position.y = int(get_size().height - icon->get_height()) / 2; loop_mode_rect.size = icon->get_size(); - if (animation->track_get_type(track) == Animation::TYPE_VALUE || animation->track_get_type(track) == Animation::TYPE_TRANSFORM) { + if (animation->track_get_type(track) == Animation::TYPE_VALUE || animation->track_get_type(track) == Animation::TYPE_TRANSFORM3D) { draw_texture(icon, loop_mode_rect.position); } @@ -2050,7 +2050,7 @@ void AnimationTrackEdit::_notification(int p_what) { ofs += icon->get_width() + hsep; loop_mode_rect.size.x += hsep; - if (animation->track_get_type(track) == Animation::TYPE_VALUE || animation->track_get_type(track) == Animation::TYPE_TRANSFORM) { + if (animation->track_get_type(track) == Animation::TYPE_VALUE || animation->track_get_type(track) == Animation::TYPE_TRANSFORM3D) { draw_texture(down_icon, Vector2(ofs, int(get_size().height - down_icon->get_height()) / 2)); loop_mode_rect.size.x += down_icon->get_width(); } else { @@ -2441,7 +2441,7 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const { if (key_idx != -1) { String text = TTR("Time (s): ") + rtos(animation->track_get_key_time(track, key_idx)) + "\n"; switch (animation->track_get_type(track)) { - case Animation::TYPE_TRANSFORM: { + case Animation::TYPE_TRANSFORM3D: { Dictionary d = animation->track_get_key_value(track, key_idx); if (d.has("location")) { text += "Pos: " + String(d["location"]) + "\n"; @@ -3310,7 +3310,7 @@ static bool track_type_is_resettable(Animation::TrackType p_type) { [[fallthrough]]; case Animation::TYPE_BEZIER: [[fallthrough]]; - case Animation::TYPE_TRANSFORM: + case Animation::TYPE_TRANSFORM3D: return true; default: return false; @@ -3376,7 +3376,7 @@ void AnimationTrackEditor::_query_insert(const InsertData &p_id) { case Variant::FLOAT: case Variant::VECTOR2: case Variant::VECTOR3: - case Variant::QUAT: + case Variant::QUATERNION: case Variant::PLANE: case Variant::COLOR: { // Valid. @@ -3459,7 +3459,7 @@ void AnimationTrackEditor::_insert_delay(bool p_create_reset, bool p_create_bezi insert_queue = false; } -void AnimationTrackEditor::insert_transform_key(Node3D *p_node, const String &p_sub, const Transform &p_xform) { +void AnimationTrackEditor::insert_transform_key(Node3D *p_node, const String &p_sub, const Transform3D &p_xform) { if (!keying) { return; } @@ -3479,7 +3479,7 @@ void AnimationTrackEditor::insert_transform_key(Node3D *p_node, const String &p_ int track_idx = -1; for (int i = 0; i < animation->get_track_count(); i++) { - if (animation->track_get_type(i) != Animation::TYPE_TRANSFORM) { + if (animation->track_get_type(i) != Animation::TYPE_TRANSFORM3D) { continue; } if (animation->track_get_path(i) != np) { @@ -3496,7 +3496,7 @@ void AnimationTrackEditor::insert_transform_key(Node3D *p_node, const String &p_ id.path = np; id.track_idx = track_idx; id.value = p_xform; - id.type = Animation::TYPE_TRANSFORM; + id.type = Animation::TYPE_TRANSFORM3D; id.query = "node '" + p_node->get_name() + "'"; id.advance = false; @@ -3845,7 +3845,7 @@ static Vector<String> _get_bezier_subindices_for_type(Variant::Type p_type, bool subindices.push_back(":y"); subindices.push_back(":z"); } break; - case Variant::QUAT: { + case Variant::QUATERNION: { subindices.push_back(":x"); subindices.push_back(":y"); subindices.push_back(":z"); @@ -3911,11 +3911,11 @@ AnimationTrackEditor::TrackIndices AnimationTrackEditor::_confirm_insert(InsertD h.type == Variant::RECT2 || h.type == Variant::VECTOR3 || h.type == Variant::AABB || - h.type == Variant::QUAT || + h.type == Variant::QUATERNION || h.type == Variant::COLOR || h.type == Variant::PLANE || h.type == Variant::TRANSFORM2D || - h.type == Variant::TRANSFORM) { + h.type == Variant::TRANSFORM3D) { update_mode = Animation::UPDATE_CONTINUOUS; } @@ -3945,12 +3945,12 @@ AnimationTrackEditor::TrackIndices AnimationTrackEditor::_confirm_insert(InsertD value = p_id.value; } break; - case Animation::TYPE_TRANSFORM: { - Transform tr = p_id.value; + case Animation::TYPE_TRANSFORM3D: { + Transform3D tr = p_id.value; Dictionary d; d["location"] = tr.origin; d["scale"] = tr.basis.get_scale(); - d["rotation"] = Quat(tr.basis); + d["rotation"] = Quaternion(tr.basis); value = d; } break; case Animation::TYPE_BEZIER: { @@ -4368,8 +4368,8 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) { ERR_FAIL_COND(!node); NodePath path_to = root->get_path_to(node); - if (adding_track_type == Animation::TYPE_TRANSFORM && !node->is_class("Node3D")) { - EditorNode::get_singleton()->show_warning(TTR("Transform tracks only apply to 3D-based nodes.")); + if (adding_track_type == Animation::TYPE_TRANSFORM3D && !node->is_class("Node3D")) { + EditorNode::get_singleton()->show_warning(TTR("Transform3D tracks only apply to 3D-based nodes.")); return; } @@ -4379,7 +4379,7 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) { prop_selector->set_type_filter(Vector<Variant::Type>()); prop_selector->select_property_from_instance(node); } break; - case Animation::TYPE_TRANSFORM: + case Animation::TYPE_TRANSFORM3D: case Animation::TYPE_METHOD: { undo_redo->create_action(TTR("Add Track")); undo_redo->add_do_method(animation.ptr(), "add_track", adding_track_type); @@ -4394,7 +4394,7 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) { filter.push_back(Variant::FLOAT); filter.push_back(Variant::VECTOR2); filter.push_back(Variant::VECTOR3); - filter.push_back(Variant::QUAT); + filter.push_back(Variant::QUATERNION); filter.push_back(Variant::PLANE); filter.push_back(Variant::COLOR); @@ -4464,11 +4464,11 @@ void AnimationTrackEditor::_new_track_property_selected(String p_name) { h.type == Variant::RECT2 || h.type == Variant::VECTOR3 || h.type == Variant::AABB || - h.type == Variant::QUAT || + h.type == Variant::QUATERNION || h.type == Variant::COLOR || h.type == Variant::PLANE || h.type == Variant::TRANSFORM2D || - h.type == Variant::TRANSFORM) { + h.type == Variant::TRANSFORM3D) { update_mode = Animation::UPDATE_CONTINUOUS; } @@ -4548,7 +4548,7 @@ void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) { } switch (animation->track_get_type(p_track)) { - case Animation::TYPE_TRANSFORM: { + case Animation::TYPE_TRANSFORM3D: { if (!root->has_node(animation->track_get_path(p_track))) { EditorNode::get_singleton()->show_warning(TTR("Track path is invalid, so can't add a key.")); return; @@ -4560,11 +4560,11 @@ void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) { return; } - Transform xf = base->get_transform(); + Transform3D xf = base->get_transform(); Vector3 loc = xf.get_origin(); Vector3 scale = xf.basis.get_scale_local(); - Quat rot = xf.basis; + Quaternion rot = xf.basis; undo_redo->create_action(TTR("Add Transform Track Key")); undo_redo->add_do_method(animation.ptr(), "transform_track_insert_key", p_track, p_ofs, loc, rot, scale); @@ -5182,7 +5182,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { } switch (animation->track_get_type(i)) { - case Animation::TYPE_TRANSFORM: + case Animation::TYPE_TRANSFORM3D: text += " (Transform)"; break; case Animation::TYPE_METHOD: diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h index 8befc830fa..f1d8139511 100644 --- a/editor/animation_track_editor.h +++ b/editor/animation_track_editor.h @@ -236,8 +236,8 @@ public: AnimationTrackEdit(); }; -class AnimationTrackEditPlugin : public Reference { - GDCLASS(AnimationTrackEditPlugin, Reference); +class AnimationTrackEditPlugin : public RefCounted { + GDCLASS(AnimationTrackEditPlugin, RefCounted); public: virtual AnimationTrackEdit *create_value_track_edit(Object *p_object, Variant::Type p_type, const String &p_property, PropertyHint p_hint, const String &p_hint_string, int p_usage); @@ -526,7 +526,7 @@ public: void set_anim_pos(float p_pos); void insert_node_value_key(Node *p_node, const String &p_property, const Variant &p_value, bool p_only_if_exists = false); void insert_value_key(const String &p_property, const Variant &p_value, bool p_advance); - void insert_transform_key(Node3D *p_node, const String &p_sub, const Transform &p_xform); + void insert_transform_key(Node3D *p_node, const String &p_sub, const Transform3D &p_xform); void show_select_node_warning(bool p_show); diff --git a/editor/array_property_edit.h b/editor/array_property_edit.h index fa3dcbe038..d7e11936a3 100644 --- a/editor/array_property_edit.h +++ b/editor/array_property_edit.h @@ -33,8 +33,8 @@ #include "scene/main/node.h" -class ArrayPropertyEdit : public Reference { - GDCLASS(ArrayPropertyEdit, Reference); +class ArrayPropertyEdit : public RefCounted { + GDCLASS(ArrayPropertyEdit, RefCounted); int page; ObjectID obj; diff --git a/editor/audio_stream_preview.h b/editor/audio_stream_preview.h index accc7275c0..61567598ed 100644 --- a/editor/audio_stream_preview.h +++ b/editor/audio_stream_preview.h @@ -36,8 +36,8 @@ #include "scene/main/node.h" #include "servers/audio/audio_stream.h" -class AudioStreamPreview : public Reference { - GDCLASS(AudioStreamPreview, Reference); +class AudioStreamPreview : public RefCounted { + GDCLASS(AudioStreamPreview, RefCounted); friend class AudioStream; Vector<uint8_t> preview; float length; diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 97ba5d7a5f..7b96858ec7 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -583,15 +583,29 @@ void FindReplaceBar::set_error(const String &p_label) { emit_signal("error", p_label); } -void FindReplaceBar::set_text_edit(CodeEdit *p_text_edit) { +void FindReplaceBar::set_text_edit(CodeTextEditor *p_text_editor) { + if (p_text_editor == base_text_editor) { + return; + } + + if (base_text_editor) { + base_text_editor->remove_find_replace_bar(); + base_text_editor = nullptr; + text_editor->disconnect("text_changed", callable_mp(this, &FindReplaceBar::_editor_text_changed)); + text_editor = nullptr; + } + results_count = -1; - text_editor = p_text_edit; + base_text_editor = p_text_editor; + text_editor = base_text_editor->get_text_editor(); text_editor->connect("text_changed", callable_mp(this, &FindReplaceBar::_editor_text_changed)); + + _update_results_count(); + _update_matches_label(); } void FindReplaceBar::_bind_methods() { ClassDB::bind_method("_unhandled_input", &FindReplaceBar::_unhandled_input); - ClassDB::bind_method("_search_current", &FindReplaceBar::search_current); ADD_SIGNAL(MethodInfo("search")); @@ -816,12 +830,12 @@ void CodeTextEditor::_code_complete_timer_timeout() { if (!is_visible_in_tree()) { return; } - text_editor->query_code_comple(); + text_editor->request_code_completion(); } void CodeTextEditor::_complete_request() { List<ScriptCodeCompletionOption> entries; - String ctext = text_editor->get_text_for_completion(); + String ctext = text_editor->get_text_for_code_completion(); _code_complete_script(ctext, &entries); bool forced = false; if (code_complete_func) { @@ -832,16 +846,17 @@ void CodeTextEditor::_complete_request() { } for (List<ScriptCodeCompletionOption>::Element *E = entries.front(); E; E = E->next()) { - ScriptCodeCompletionOption *e = &E->get(); - e->icon = _get_completion_icon(*e); - e->font_color = completion_font_color; - if (e->insert_text.begins_with("\"") || e->insert_text.begins_with("\'")) { - e->font_color = completion_string_color; - } else if (e->insert_text.begins_with("#") || e->insert_text.begins_with("//")) { - e->font_color = completion_comment_color; + ScriptCodeCompletionOption &e = E->get(); + + Color font_color = completion_font_color; + if (e.insert_text.begins_with("\"") || e.insert_text.begins_with("\'")) { + font_color = completion_string_color; + } else if (e.insert_text.begins_with("#") || e.insert_text.begins_with("//")) { + font_color = completion_comment_color; } + text_editor->add_code_completion_option((CodeEdit::CodeCompletionKind)e.kind, e.display, e.insert_text, font_color, _get_completion_icon(e), e.default_value); } - text_editor->code_complete(entries, forced); + text_editor->update_code_completion_options(forced); } Ref<Texture2D> CodeTextEditor::_get_completion_icon(const ScriptCodeCompletionOption &p_option) { @@ -938,6 +953,25 @@ void CodeTextEditor::update_editor_settings() { text_editor->set_auto_brace_completion(EditorSettings::get_singleton()->get("text_editor/completion/auto_brace_complete")); } +void CodeTextEditor::set_find_replace_bar(FindReplaceBar *p_bar) { + if (find_replace_bar) { + return; + } + + find_replace_bar = p_bar; + find_replace_bar->set_text_edit(this); + find_replace_bar->connect("error", callable_mp(error, &Label::set_text)); +} + +void CodeTextEditor::remove_find_replace_bar() { + if (!find_replace_bar) { + return; + } + + find_replace_bar->disconnect("error", callable_mp(error, &Label::set_text)); + find_replace_bar = nullptr; +} + void CodeTextEditor::trim_trailing_whitespace() { bool trimed_whitespace = false; for (int i = 0; i < text_editor->get_line_count(); i++) { @@ -1563,9 +1597,7 @@ void CodeTextEditor::_on_settings_change() { EDITOR_GET("text_editor/completion/code_complete_delay")); // Call hint settings. - text_editor->set_callhint_settings( - EDITOR_GET("text_editor/completion/put_callhint_tooltip_below_current_line"), - EDITOR_GET("text_editor/completion/callhint_tooltip_offset")); + text_editor->set_code_hint_draw_below(EDITOR_GET("text_editor/completion/put_callhint_tooltip_below_current_line")); idle->set_wait_time(EDITOR_GET("text_editor/completion/idle_parse_delay")); } @@ -1761,14 +1793,6 @@ CodeTextEditor::CodeTextEditor() { } break; } - // Added second so it opens at the bottom, so it won't shift the entire text editor when opening. - find_replace_bar = memnew(FindReplaceBar); - add_child(find_replace_bar); - find_replace_bar->set_h_size_flags(SIZE_EXPAND_FILL); - find_replace_bar->hide(); - - find_replace_bar->set_text_edit(text_editor); - text_editor->set_draw_line_numbers(true); text_editor->set_brace_matching(true); text_editor->set_auto_indent(true); @@ -1809,7 +1833,6 @@ CodeTextEditor::CodeTextEditor() { error->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER); error->set_mouse_filter(MOUSE_FILTER_STOP); error->connect("gui_input", callable_mp(this, &CodeTextEditor::_error_pressed)); - find_replace_bar->connect("error", callable_mp(error, &Label::set_text)); // Warnings warning_button = memnew(Button); @@ -1847,15 +1870,17 @@ CodeTextEditor::CodeTextEditor() { text_editor->connect("gui_input", callable_mp(this, &CodeTextEditor::_text_editor_gui_input)); text_editor->connect("cursor_changed", callable_mp(this, &CodeTextEditor::_line_col_changed)); text_editor->connect("text_changed", callable_mp(this, &CodeTextEditor::_text_changed)); - text_editor->connect("request_completion", callable_mp(this, &CodeTextEditor::_complete_request)); - Vector<String> cs; + text_editor->connect("request_code_completion", callable_mp(this, &CodeTextEditor::_complete_request)); + TypedArray<String> cs; cs.push_back("."); cs.push_back(","); cs.push_back("("); cs.push_back("="); cs.push_back("$"); cs.push_back("@"); - text_editor->set_completion(true, cs); + cs.push_back("\""); + cs.push_back("\'"); + text_editor->set_code_completion_prefixes(cs); idle->connect("timeout", callable_mp(this, &CodeTextEditor::_text_changed_idle_timeout)); code_complete_timer->connect("timeout", callable_mp(this, &CodeTextEditor::_code_complete_timer_timeout)); diff --git a/editor/code_editor.h b/editor/code_editor.h index e6dadbd6fa..9fc659b611 100644 --- a/editor/code_editor.h +++ b/editor/code_editor.h @@ -57,6 +57,8 @@ public: GotoLineDialog(); }; +class CodeTextEditor; + class FindReplaceBar : public HBoxContainer { GDCLASS(FindReplaceBar, HBoxContainer); @@ -77,6 +79,7 @@ class FindReplaceBar : public HBoxContainer { HBoxContainer *hbc_button_replace; HBoxContainer *hbc_option_replace; + CodeTextEditor *base_text_editor = nullptr; CodeEdit *text_editor; int result_line; @@ -120,7 +123,7 @@ public: bool is_selection_only() const; void set_error(const String &p_label); - void set_text_edit(CodeEdit *p_text_edit); + void set_text_edit(CodeTextEditor *p_text_editor); void popup_search(bool p_show_only = false); void popup_replace(); @@ -138,7 +141,7 @@ class CodeTextEditor : public VBoxContainer { GDCLASS(CodeTextEditor, VBoxContainer); CodeEdit *text_editor; - FindReplaceBar *find_replace_bar; + FindReplaceBar *find_replace_bar = nullptr; HBoxContainer *status_bar; Button *toggle_scripts_button; @@ -243,6 +246,8 @@ public: void update_line_and_column() { _line_col_changed(); } CodeEdit *get_text_editor() { return text_editor; } FindReplaceBar *get_find_replace_bar() { return find_replace_bar; } + void set_find_replace_bar(FindReplaceBar *p_bar); + void remove_find_replace_bar(); virtual void apply_code() {} void goto_error(); diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index de2be710c5..3c0651f019 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -203,8 +203,8 @@ void ConnectDialog::_add_bind() { case Variant::PLANE: value = Plane(); break; - case Variant::QUAT: - value = Quat(); + case Variant::QUATERNION: + value = Quaternion(); break; case Variant::AABB: value = AABB(); @@ -212,8 +212,8 @@ void ConnectDialog::_add_bind() { case Variant::BASIS: value = Basis(); break; - case Variant::TRANSFORM: - value = Transform(); + case Variant::TRANSFORM3D: + value = Transform3D(); break; case Variant::COLOR: value = Color(); @@ -443,10 +443,10 @@ ConnectDialog::ConnectDialog() { type_list->add_item("Rect2", Variant::RECT2); type_list->add_item("Vector3", Variant::VECTOR3); type_list->add_item("Plane", Variant::PLANE); - type_list->add_item("Quat", Variant::QUAT); + type_list->add_item("Quaternion", Variant::QUATERNION); type_list->add_item("AABB", Variant::AABB); type_list->add_item("Basis", Variant::BASIS); - type_list->add_item("Transform", Variant::TRANSFORM); + type_list->add_item("Transform", Variant::TRANSFORM3D); type_list->add_item("Color", Variant::COLOR); type_list->select(0); diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index 1c0a55e4ec..968b24893c 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -643,9 +643,9 @@ void CreateDialog::_load_favorites_and_history() { void CreateDialog::_bind_methods() { ClassDB::bind_method(D_METHOD("_save_and_update_favorite_list"), &CreateDialog::_save_and_update_favorite_list); - ClassDB::bind_method("get_drag_data_fw", &CreateDialog::get_drag_data_fw); - ClassDB::bind_method("can_drop_data_fw", &CreateDialog::can_drop_data_fw); - ClassDB::bind_method("drop_data_fw", &CreateDialog::drop_data_fw); + ClassDB::bind_method("_get_drag_data_fw", &CreateDialog::get_drag_data_fw); + ClassDB::bind_method("_can_drop_data_fw", &CreateDialog::can_drop_data_fw); + ClassDB::bind_method("_drop_data_fw", &CreateDialog::drop_data_fw); ADD_SIGNAL(MethodInfo("create")); ADD_SIGNAL(MethodInfo("favorites_updated")); diff --git a/editor/debugger/editor_debugger_server.h b/editor/debugger/editor_debugger_server.h index 6458421e7a..6216d0df3d 100644 --- a/editor/debugger/editor_debugger_server.h +++ b/editor/debugger/editor_debugger_server.h @@ -32,9 +32,9 @@ #define EDITOR_DEBUGGER_CONNECTION_H #include "core/debugger/remote_debugger_peer.h" -#include "core/object/reference.h" +#include "core/object/ref_counted.h" -class EditorDebuggerServer : public Reference { +class EditorDebuggerServer : public RefCounted { public: typedef EditorDebuggerServer *(*CreateServerFunc)(const String &p_uri); diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp index c085205f63..7534b419fe 100644 --- a/editor/dependency_editor.cpp +++ b/editor/dependency_editor.cpp @@ -30,8 +30,8 @@ #include "dependency_editor.h" +#include "core/io/file_access.h" #include "core/io/resource_loader.h" -#include "core/os/file_access.h" #include "editor_node.h" #include "editor_scale.h" #include "scene/gui/margin_container.h" diff --git a/editor/dictionary_property_edit.h b/editor/dictionary_property_edit.h index e0fd945491..d1401c5e5f 100644 --- a/editor/dictionary_property_edit.h +++ b/editor/dictionary_property_edit.h @@ -33,8 +33,8 @@ #include "scene/main/node.h" -class DictionaryPropertyEdit : public Reference { - GDCLASS(DictionaryPropertyEdit, Reference); +class DictionaryPropertyEdit : public RefCounted { + GDCLASS(DictionaryPropertyEdit, RefCounted); ObjectID obj; StringName property; diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp index e29c9593c3..d3df4d91a6 100644 --- a/editor/doc_tools.cpp +++ b/editor/doc_tools.cpp @@ -34,9 +34,9 @@ #include "core/config/project_settings.h" #include "core/core_constants.h" #include "core/io/compression.h" +#include "core/io/dir_access.h" #include "core/io/marshalls.h" #include "core/object/script_language.h" -#include "core/os/dir_access.h" #include "core/version.h" #include "scene/resources/theme.h" diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp index 7527514dca..b8504ad02a 100644 --- a/editor/editor_about.cpp +++ b/editor/editor_about.cpp @@ -141,7 +141,7 @@ EditorAbout::EditorAbout() { version_btn = memnew(LinkButton); String hash = String(VERSION_HASH); if (hash.length() != 0) { - hash = "." + hash.left(9); + hash = " " + vformat("[%s]", hash.left(9)); } version_btn->set_text(VERSION_FULL_NAME + hash); // Set the text to copy in metadata as it slightly differs from the button's text. diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp index 9dcd550f5c..38f417a8ce 100644 --- a/editor/editor_asset_installer.cpp +++ b/editor/editor_asset_installer.cpp @@ -30,9 +30,9 @@ #include "editor_asset_installer.h" +#include "core/io/dir_access.h" +#include "core/io/file_access.h" #include "core/io/zip_io.h" -#include "core/os/dir_access.h" -#include "core/os/file_access.h" #include "editor_node.h" #include "progress_dialog.h" @@ -137,7 +137,7 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) { extension_guess["atlastex"] = tree->get_theme_icon("AtlasTexture", "EditorIcons"); extension_guess["scn"] = tree->get_theme_icon("PackedScene", "EditorIcons"); extension_guess["tscn"] = tree->get_theme_icon("PackedScene", "EditorIcons"); - extension_guess["shader"] = tree->get_theme_icon("Shader", "EditorIcons"); + extension_guess["gdshader"] = tree->get_theme_icon("Shader", "EditorIcons"); extension_guess["gd"] = tree->get_theme_icon("GDScript", "EditorIcons"); extension_guess["vs"] = tree->get_theme_icon("VisualScript", "EditorIcons"); } diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index 4317760379..13296e2f23 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -757,9 +757,9 @@ void EditorAudioBus::_bind_methods() { ClassDB::bind_method("update_bus", &EditorAudioBus::update_bus); ClassDB::bind_method("update_send", &EditorAudioBus::update_send); ClassDB::bind_method("_gui_input", &EditorAudioBus::_gui_input); - ClassDB::bind_method("get_drag_data_fw", &EditorAudioBus::get_drag_data_fw); - ClassDB::bind_method("can_drop_data_fw", &EditorAudioBus::can_drop_data_fw); - ClassDB::bind_method("drop_data_fw", &EditorAudioBus::drop_data_fw); + ClassDB::bind_method("_get_drag_data_fw", &EditorAudioBus::get_drag_data_fw); + ClassDB::bind_method("_can_drop_data_fw", &EditorAudioBus::can_drop_data_fw); + ClassDB::bind_method("_drop_data_fw", &EditorAudioBus::drop_data_fw); ADD_SIGNAL(MethodInfo("duplicate_request")); ADD_SIGNAL(MethodInfo("delete_request")); diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp index d46df05f6e..a39e693912 100644 --- a/editor/editor_autoload_settings.cpp +++ b/editor/editor_autoload_settings.cpp @@ -749,9 +749,9 @@ void EditorAutoloadSettings::autoload_remove(const String &p_name) { void EditorAutoloadSettings::_bind_methods() { ClassDB::bind_method("_autoload_open", &EditorAutoloadSettings::_autoload_open); - ClassDB::bind_method("get_drag_data_fw", &EditorAutoloadSettings::get_drag_data_fw); - ClassDB::bind_method("can_drop_data_fw", &EditorAutoloadSettings::can_drop_data_fw); - ClassDB::bind_method("drop_data_fw", &EditorAutoloadSettings::drop_data_fw); + ClassDB::bind_method("_get_drag_data_fw", &EditorAutoloadSettings::get_drag_data_fw); + ClassDB::bind_method("_can_drop_data_fw", &EditorAutoloadSettings::can_drop_data_fw); + ClassDB::bind_method("_drop_data_fw", &EditorAutoloadSettings::drop_data_fw); ClassDB::bind_method("update_autoload", &EditorAutoloadSettings::update_autoload); ClassDB::bind_method("autoload_add", &EditorAutoloadSettings::autoload_add); diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index 6405af3876..56c6a416af 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -31,9 +31,9 @@ #include "editor_data.h" #include "core/config/project_settings.h" +#include "core/io/dir_access.h" +#include "core/io/file_access.h" #include "core/io/resource_loader.h" -#include "core/os/dir_access.h" -#include "core/os/file_access.h" #include "editor_node.h" #include "editor_settings.h" #include "scene/resources/packed_scene.h" @@ -83,7 +83,7 @@ void EditorHistory::cleanup_history() { void EditorHistory::_add_object(ObjectID p_object, const String &p_property, int p_level_change, bool p_inspector_only) { Object *obj = ObjectDB::get_instance(p_object); ERR_FAIL_COND(!obj); - Reference *r = Object::cast_to<Reference>(obj); + RefCounted *r = Object::cast_to<RefCounted>(obj); Obj o; if (r) { o.ref = REF(r); diff --git a/editor/editor_dir_dialog.h b/editor/editor_dir_dialog.h index 05451b7bda..ef473b0779 100644 --- a/editor/editor_dir_dialog.h +++ b/editor/editor_dir_dialog.h @@ -31,7 +31,7 @@ #ifndef EDITOR_DIR_DIALOG_H #define EDITOR_DIR_DIALOG_H -#include "core/os/dir_access.h" +#include "core/io/dir_access.h" #include "editor/editor_file_system.h" #include "scene/gui/dialogs.h" #include "scene/gui/tree.h" diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index 40313fbeff..7c5a06107d 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -33,14 +33,14 @@ #include "core/config/project_settings.h" #include "core/crypto/crypto_core.h" #include "core/io/config_file.h" +#include "core/io/dir_access.h" +#include "core/io/file_access.h" #include "core/io/file_access_encrypted.h" #include "core/io/file_access_pack.h" // PACK_HEADER_MAGIC, PACK_FORMAT_VERSION #include "core/io/resource_loader.h" #include "core/io/resource_saver.h" #include "core/io/zip_io.h" #include "core/object/script_language.h" -#include "core/os/dir_access.h" -#include "core/os/file_access.h" #include "core/version.h" #include "editor/editor_file_system.h" #include "editor/plugins/script_editor_plugin.h" @@ -151,7 +151,7 @@ void EditorExportPreset::set_export_path(const String &p_path) { export_path = p_path; /* NOTE(SonerSound): if there is a need to implement a PropertyHint that specifically indicates a relative path, * this should be removed. */ - if (export_path.is_abs_path()) { + if (export_path.is_absolute_path()) { String res_path = OS::get_singleton()->get_resource_dir(); export_path = res_path.path_to_file(export_path); } diff --git a/editor/editor_export.h b/editor/editor_export.h index c96c8fdbce..c9401df9c2 100644 --- a/editor/editor_export.h +++ b/editor/editor_export.h @@ -31,8 +31,8 @@ #ifndef EDITOR_EXPORT_H #define EDITOR_EXPORT_H +#include "core/io/dir_access.h" #include "core/io/resource.h" -#include "core/os/dir_access.h" #include "scene/main/node.h" #include "scene/main/timer.h" #include "scene/resources/texture.h" @@ -42,8 +42,8 @@ class EditorExportPlatform; class EditorFileSystemDirectory; struct EditorProgress; -class EditorExportPreset : public Reference { - GDCLASS(EditorExportPreset, Reference); +class EditorExportPreset : public RefCounted { + GDCLASS(EditorExportPreset, RefCounted); public: enum ExportFilter { @@ -161,8 +161,8 @@ struct SharedObject { SharedObject() {} }; -class EditorExportPlatform : public Reference { - GDCLASS(EditorExportPlatform, Reference); +class EditorExportPlatform : public RefCounted { + GDCLASS(EditorExportPlatform, RefCounted); public: typedef Error (*EditorExportSaveFunction)(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total, const Vector<String> &p_enc_in_filters, const Vector<String> &p_enc_ex_filters, const Vector<uint8_t> &p_key); @@ -284,8 +284,8 @@ public: EditorExportPlatform(); }; -class EditorExportPlugin : public Reference { - GDCLASS(EditorExportPlugin, Reference); +class EditorExportPlugin : public RefCounted { + GDCLASS(EditorExportPlugin, RefCounted); friend class EditorExportPlatform; diff --git a/editor/editor_feature_profile.cpp b/editor/editor_feature_profile.cpp index 529bbe97eb..51c6b473ad 100644 --- a/editor/editor_feature_profile.cpp +++ b/editor/editor_feature_profile.cpp @@ -30,8 +30,8 @@ #include "editor_feature_profile.h" +#include "core/io/dir_access.h" #include "core/io/json.h" -#include "core/os/dir_access.h" #include "editor/editor_settings.h" #include "editor_node.h" #include "editor_scale.h" @@ -46,6 +46,16 @@ const char *EditorFeatureProfile::feature_names[FEATURE_MAX] = { TTRC("Import Dock"), }; +const char *EditorFeatureProfile::feature_descriptions[FEATURE_MAX] = { + TTRC("Allows to view and edit 3D scenes."), + TTRC("Allows to edit scripts using the integrated script editor."), + TTRC("Provides built-in access to the Asset Library."), + TTRC("Allows editing the node hierarchy in the Scene dock."), + TTRC("Allows to work with signals and groups of the node selected in the Scene dock."), + TTRC("Allows to browse the local file system via a dedicated dock."), + TTRC("Allows to configure import settings for individual assets. Requires the FileSystem dock to function."), +}; + const char *EditorFeatureProfile::feature_identifiers[FEATURE_MAX] = { "3d", "script", @@ -145,6 +155,11 @@ String EditorFeatureProfile::get_feature_name(Feature p_feature) { return feature_names[p_feature]; } +String EditorFeatureProfile::get_feature_description(Feature p_feature) { + ERR_FAIL_INDEX_V(p_feature, FEATURE_MAX, String()); + return feature_descriptions[p_feature]; +} + Error EditorFeatureProfile::save_to_file(const String &p_path) { Dictionary json; json["type"] = "feature_profile"; @@ -418,7 +433,7 @@ void EditorFeatureProfileManager::_profile_action(int p_action) { export_profile->set_current_file(_get_selected_profile() + ".profile"); } break; case PROFILE_NEW: { - new_profile_dialog->popup_centered(); + new_profile_dialog->popup_centered(Size2(240, 60) * EDSCALE); new_profile_name->clear(); new_profile_name->grab_focus(); } break; @@ -426,8 +441,8 @@ void EditorFeatureProfileManager::_profile_action(int p_action) { String selected = _get_selected_profile(); ERR_FAIL_COND(selected == String()); - erase_profile_dialog->set_text(vformat(TTR("Erase profile '%s'? (no undo)"), selected)); - erase_profile_dialog->popup_centered(); + erase_profile_dialog->set_text(vformat(TTR("Remove currently selected profile, '%s'? Cannot be undone."), selected)); + erase_profile_dialog->popup_centered(Size2(240, 60) * EDSCALE); } break; } } @@ -535,12 +550,28 @@ void EditorFeatureProfileManager::_class_list_item_selected() { } Variant md = item->get_metadata(0); - if (md.get_type() != Variant::STRING && md.get_type() != Variant::STRING_NAME) { + if (md.get_type() == Variant::STRING || md.get_type() == Variant::STRING_NAME) { + String class_name = md; + String class_description; + + DocTools *dd = EditorHelp::get_doc_data(); + Map<String, DocData::ClassDoc>::Element *E = dd->class_list.find(class_name); + if (E) { + class_description = DTR(E->get().brief_description); + } + + description_bit->set_text(class_description); + } else if (md.get_type() == Variant::INT) { + int feature_id = md; + String feature_description = EditorFeatureProfile::get_feature_description(EditorFeatureProfile::Feature(feature_id)); + + description_bit->set_text(feature_description); + return; + } else { return; } String class_name = md; - if (edited->is_class_disabled(class_name)) { return; } @@ -560,27 +591,28 @@ void EditorFeatureProfileManager::_class_list_item_selected() { option->set_metadata(0, CLASS_OPTION_DISABLE_EDITOR); } - TreeItem *properties = property_list->create_item(root); - properties->set_text(0, TTR("Enabled Properties:")); - List<PropertyInfo> props; - ClassDB::get_property_list(class_name, &props, true); - for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) { - String name = E->get().name; - if (!(E->get().usage & PROPERTY_USAGE_EDITOR)) { - continue; + if (props.size() > 0) { + TreeItem *properties = property_list->create_item(root); + properties->set_text(0, TTR("Class Properties:")); + + for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) { + String name = E->get().name; + if (!(E->get().usage & PROPERTY_USAGE_EDITOR)) { + continue; + } + TreeItem *property = property_list->create_item(properties); + property->set_cell_mode(0, TreeItem::CELL_MODE_CHECK); + property->set_editable(0, true); + property->set_selectable(0, true); + property->set_checked(0, !edited->is_class_property_disabled(class_name, name)); + property->set_text(0, name.capitalize()); + property->set_metadata(0, name); + String icon_type = Variant::get_type_name(E->get().type); + property->set_icon(0, EditorNode::get_singleton()->get_class_icon(icon_type)); } - TreeItem *property = property_list->create_item(properties); - property->set_cell_mode(0, TreeItem::CELL_MODE_CHECK); - property->set_editable(0, true); - property->set_selectable(0, true); - property->set_checked(0, !edited->is_class_property_disabled(class_name, name)); - property->set_text(0, name.capitalize()); - property->set_metadata(0, name); - String icon_type = Variant::get_type_name(E->get().type); - property->set_icon(0, EditorNode::get_singleton()->get_class_icon(icon_type)); } updating_features = false; @@ -710,7 +742,7 @@ void EditorFeatureProfileManager::_update_selected_profile() { TreeItem *features = class_list->create_item(root); TreeItem *last_feature; - features->set_text(0, TTR("Enabled Features:")); + features->set_text(0, TTR("Main Features") + ":"); for (int i = 0; i < EditorFeatureProfile::FEATURE_MAX; i++) { TreeItem *feature; if (i == EditorFeatureProfile::FEATURE_IMPORT_DOCK) { @@ -734,7 +766,7 @@ void EditorFeatureProfileManager::_update_selected_profile() { } TreeItem *classes = class_list->create_item(root); - classes->set_text(0, TTR("Enabled Classes:")); + classes->set_text(0, TTR("Nodes and Classes") + ":"); _fill_classes_from(classes, "Node", class_selected); _fill_classes_from(classes, "Resource", class_selected); @@ -832,47 +864,51 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() { current_profile_name->set_text(TTR("(none)")); current_profile_name->set_editable(false); current_profile_name->set_h_size_flags(Control::SIZE_EXPAND_FILL); - profile_actions[PROFILE_CLEAR] = memnew(Button(TTR("Unset"))); + profile_actions[PROFILE_CLEAR] = memnew(Button(TTR("Reset to Default"))); name_hbc->add_child(profile_actions[PROFILE_CLEAR]); profile_actions[PROFILE_CLEAR]->set_disabled(true); profile_actions[PROFILE_CLEAR]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action), varray(PROFILE_CLEAR)); main_vbc->add_margin_child(TTR("Current Profile:"), name_hbc); + main_vbc->add_child(memnew(HSeparator)); + HBoxContainer *profiles_hbc = memnew(HBoxContainer); profile_list = memnew(OptionButton); profile_list->set_h_size_flags(Control::SIZE_EXPAND_FILL); profiles_hbc->add_child(profile_list); profile_list->connect("item_selected", callable_mp(this, &EditorFeatureProfileManager::_profile_selected)); - profile_actions[PROFILE_SET] = memnew(Button(TTR("Make Current"))); - profiles_hbc->add_child(profile_actions[PROFILE_SET]); - profile_actions[PROFILE_SET]->set_disabled(true); - profile_actions[PROFILE_SET]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action), varray(PROFILE_SET)); + profile_actions[PROFILE_NEW] = memnew(Button(TTR("Create Profile"))); + profiles_hbc->add_child(profile_actions[PROFILE_NEW]); + profile_actions[PROFILE_NEW]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action), varray(PROFILE_NEW)); - profile_actions[PROFILE_ERASE] = memnew(Button(TTR("Remove"))); + profile_actions[PROFILE_ERASE] = memnew(Button(TTR("Remove Profile"))); profiles_hbc->add_child(profile_actions[PROFILE_ERASE]); profile_actions[PROFILE_ERASE]->set_disabled(true); profile_actions[PROFILE_ERASE]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action), varray(PROFILE_ERASE)); - profiles_hbc->add_child(memnew(VSeparator)); + main_vbc->add_margin_child(TTR("Available Profiles:"), profiles_hbc); - profile_actions[PROFILE_NEW] = memnew(Button(TTR("New"))); - profiles_hbc->add_child(profile_actions[PROFILE_NEW]); - profile_actions[PROFILE_NEW]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action), varray(PROFILE_NEW)); + HBoxContainer *current_profile_hbc = memnew(HBoxContainer); + + profile_actions[PROFILE_SET] = memnew(Button(TTR("Make Current"))); + current_profile_hbc->add_child(profile_actions[PROFILE_SET]); + profile_actions[PROFILE_SET]->set_disabled(true); + profile_actions[PROFILE_SET]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action), varray(PROFILE_SET)); - profiles_hbc->add_child(memnew(VSeparator)); + current_profile_hbc->add_child(memnew(VSeparator)); profile_actions[PROFILE_IMPORT] = memnew(Button(TTR("Import"))); - profiles_hbc->add_child(profile_actions[PROFILE_IMPORT]); + current_profile_hbc->add_child(profile_actions[PROFILE_IMPORT]); profile_actions[PROFILE_IMPORT]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action), varray(PROFILE_IMPORT)); profile_actions[PROFILE_EXPORT] = memnew(Button(TTR("Export"))); - profiles_hbc->add_child(profile_actions[PROFILE_EXPORT]); + current_profile_hbc->add_child(profile_actions[PROFILE_EXPORT]); profile_actions[PROFILE_EXPORT]->set_disabled(true); profile_actions[PROFILE_EXPORT]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action), varray(PROFILE_EXPORT)); - main_vbc->add_margin_child(TTR("Available Profiles:"), profiles_hbc); + main_vbc->add_child(current_profile_hbc); h_split = memnew(HSplitContainer); h_split->set_v_size_flags(Control::SIZE_EXPAND_FILL); @@ -883,7 +919,7 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() { class_list_vbc->set_h_size_flags(Control::SIZE_EXPAND_FILL); class_list = memnew(Tree); - class_list_vbc->add_margin_child(TTR("Enabled Classes:"), class_list, true); + class_list_vbc->add_margin_child(TTR("Configure Selected Profile") + ":", class_list, true); class_list->set_hide_root(true); class_list->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true); class_list->connect("cell_selected", callable_mp(this, &EditorFeatureProfileManager::_class_list_item_selected)); @@ -896,8 +932,12 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() { h_split->add_child(property_list_vbc); property_list_vbc->set_h_size_flags(Control::SIZE_EXPAND_FILL); + description_bit = memnew(EditorHelpBit); + property_list_vbc->add_margin_child(TTR("Description") + ":", description_bit, false); + description_bit->set_custom_minimum_size(Size2(0, 80) * EDSCALE); + property_list = memnew(Tree); - property_list_vbc->add_margin_child(TTR("Class Options:"), property_list, true); + property_list_vbc->add_margin_child(TTR("Extra Options") + ":", property_list, true); property_list->set_hide_root(true); property_list->set_hide_folding(true); property_list->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true); @@ -915,9 +955,14 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() { h_split->add_child(no_profile_selected_help); new_profile_dialog = memnew(ConfirmationDialog); - new_profile_dialog->set_title(TTR("New profile name:")); + new_profile_dialog->set_title(TTR("Create Profile")); + VBoxContainer *new_profile_vb = memnew(VBoxContainer); + new_profile_dialog->add_child(new_profile_vb); + Label *new_profile_label = memnew(Label); + new_profile_label->set_text(TTR("New profile name") + ":"); + new_profile_vb->add_child(new_profile_label); new_profile_name = memnew(LineEdit); - new_profile_dialog->add_child(new_profile_name); + new_profile_vb->add_child(new_profile_name); new_profile_name->set_custom_minimum_size(Size2(300 * EDSCALE, 1)); add_child(new_profile_dialog); new_profile_dialog->connect("confirmed", callable_mp(this, &EditorFeatureProfileManager::_create_new_profile)); @@ -926,7 +971,7 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() { erase_profile_dialog = memnew(ConfirmationDialog); add_child(erase_profile_dialog); - erase_profile_dialog->set_title(TTR("Erase Profile")); + erase_profile_dialog->set_title(TTR("Remove Profile")); erase_profile_dialog->connect("confirmed", callable_mp(this, &EditorFeatureProfileManager::_erase_selected_profile)); import_profiles = memnew(EditorFileDialog); diff --git a/editor/editor_feature_profile.h b/editor/editor_feature_profile.h index 9561e11c81..d31498bfc6 100644 --- a/editor/editor_feature_profile.h +++ b/editor/editor_feature_profile.h @@ -31,17 +31,18 @@ #ifndef EDITOR_FEATURE_PROFILE_H #define EDITOR_FEATURE_PROFILE_H -#include "core/object/reference.h" -#include "core/os/file_access.h" +#include "core/io/file_access.h" +#include "core/object/ref_counted.h" #include "editor/editor_file_dialog.h" +#include "editor_help.h" #include "scene/gui/dialogs.h" #include "scene/gui/option_button.h" #include "scene/gui/separator.h" #include "scene/gui/split_container.h" #include "scene/gui/tree.h" -class EditorFeatureProfile : public Reference { - GDCLASS(EditorFeatureProfile, Reference); +class EditorFeatureProfile : public RefCounted { + GDCLASS(EditorFeatureProfile, RefCounted); public: enum Feature { @@ -64,6 +65,7 @@ private: bool features_disabled[FEATURE_MAX]; static const char *feature_names[FEATURE_MAX]; + static const char *feature_descriptions[FEATURE_MAX]; static const char *feature_identifiers[FEATURE_MAX]; String _get_feature_name(Feature p_feature) { return get_feature_name(p_feature); } @@ -92,6 +94,7 @@ public: Error load_from_file(const String &p_path); static String get_feature_name(Feature p_feature); + static String get_feature_description(Feature p_feature); EditorFeatureProfile(); }; @@ -129,6 +132,7 @@ class EditorFeatureProfileManager : public AcceptDialog { Tree *class_list; VBoxContainer *property_list_vbc; Tree *property_list; + EditorHelpBit *description_bit; Label *no_profile_selected_help; EditorFileDialog *import_profiles; diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index 75815fa750..e7d536e08e 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -30,7 +30,7 @@ #include "editor_file_dialog.h" -#include "core/os/file_access.h" +#include "core/io/file_access.h" #include "core/os/keyboard.h" #include "core/os/os.h" #include "core/string/print_string.h" diff --git a/editor/editor_file_dialog.h b/editor/editor_file_dialog.h index 5a5e3a8807..f7879838d4 100644 --- a/editor/editor_file_dialog.h +++ b/editor/editor_file_dialog.h @@ -31,7 +31,7 @@ #ifndef EDITORFILEDIALOG_H #define EDITORFILEDIALOG_H -#include "core/os/dir_access.h" +#include "core/io/dir_access.h" #include "scene/gui/box_container.h" #include "scene/gui/dialogs.h" #include "scene/gui/item_list.h" diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 69663b9ed9..050e55c624 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -31,10 +31,10 @@ #include "editor_file_system.h" #include "core/config/project_settings.h" +#include "core/io/file_access.h" #include "core/io/resource_importer.h" #include "core/io/resource_loader.h" #include "core/io/resource_saver.h" -#include "core/os/file_access.h" #include "core/os/os.h" #include "core/variant/variant_parser.h" #include "editor_node.h" diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h index 855c320856..04879bad6d 100644 --- a/editor/editor_file_system.h +++ b/editor/editor_file_system.h @@ -31,7 +31,7 @@ #ifndef EDITOR_FILE_SYSTEM_H #define EDITOR_FILE_SYSTEM_H -#include "core/os/dir_access.h" +#include "core/io/dir_access.h" #include "core/os/thread.h" #include "core/os/thread_safe.h" #include "core/templates/safe_refcount.h" diff --git a/editor/editor_folding.cpp b/editor/editor_folding.cpp index 97a2c67c26..4030aecbf5 100644 --- a/editor/editor_folding.cpp +++ b/editor/editor_folding.cpp @@ -30,7 +30,7 @@ #include "editor_folding.h" -#include "core/os/file_access.h" +#include "core/io/file_access.h" #include "editor_inspector.h" #include "editor_settings.h" diff --git a/editor/editor_fonts.cpp b/editor/editor_fonts.cpp index 96869ae6fd..2f5451fba3 100644 --- a/editor/editor_fonts.cpp +++ b/editor/editor_fonts.cpp @@ -31,7 +31,7 @@ #include "editor_fonts.h" #include "builtin_fonts.gen.h" -#include "core/os/dir_access.h" +#include "core/io/dir_access.h" #include "editor_scale.h" #include "editor_settings.h" #include "scene/resources/default_theme/default_theme.h" @@ -313,9 +313,14 @@ void editor_register_fonts(Ref<Theme> p_theme) { p_theme->set_font("bold", "EditorFonts", df_bold); // Title font - p_theme->set_font_size("title_size", "EditorFonts", default_font_size + 2 * EDSCALE); + p_theme->set_font_size("title_size", "EditorFonts", default_font_size + 1 * EDSCALE); p_theme->set_font("title", "EditorFonts", df_bold); + p_theme->set_font_size("main_button_font_size", "EditorFonts", default_font_size + 1 * EDSCALE); + p_theme->set_font("main_button_font", "EditorFonts", df_bold); + + p_theme->set_font("font", "Label", df_bold); + // Documentation fonts MAKE_SOURCE_FONT(df_code); p_theme->set_font_size("doc_size", "EditorFonts", int(EDITOR_GET("text_editor/help/help_font_size")) * EDSCALE); diff --git a/editor/editor_help_search.h b/editor/editor_help_search.h index 350a02315f..75da2d5aba 100644 --- a/editor/editor_help_search.h +++ b/editor/editor_help_search.h @@ -83,7 +83,7 @@ public: EditorHelpSearch(); }; -class EditorHelpSearch::Runner : public Reference { +class EditorHelpSearch::Runner : public RefCounted { enum Phase { PHASE_MATCH_CLASSES_INIT, PHASE_MATCH_CLASSES, diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index f869031446..69709315ff 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -380,7 +380,7 @@ StringName EditorProperty::get_edited_property() { void EditorProperty::update_property() { if (get_script_instance()) { - get_script_instance()->call("update_property"); + get_script_instance()->call("_update_property"); } } @@ -753,7 +753,7 @@ void EditorProperty::_gui_input(const Ref<InputEvent> &p_event) { call_deferred("emit_changed", property, object->get(property).operator int64_t() + 1, "", false); } - call_deferred("update_property"); + call_deferred("_update_property"); } } if (delete_rect.has_point(mpos)) { @@ -965,9 +965,7 @@ void EditorProperty::_bind_methods() { 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"))); - MethodInfo vm; - vm.name = "update_property"; - BIND_VMETHOD(vm); + BIND_VMETHOD(MethodInfo("_update_property")); } EditorProperty::EditorProperty() { @@ -1023,20 +1021,20 @@ void EditorInspectorPlugin::add_property_editor_for_multiple_properties(const St bool EditorInspectorPlugin::can_handle(Object *p_object) { if (get_script_instance()) { - return get_script_instance()->call("can_handle", p_object); + return get_script_instance()->call("_can_handle", p_object); } return false; } void EditorInspectorPlugin::parse_begin(Object *p_object) { if (get_script_instance()) { - get_script_instance()->call("parse_begin", p_object); + get_script_instance()->call("_parse_begin", p_object); } } void EditorInspectorPlugin::parse_category(Object *p_object, const String &p_parse_category) { if (get_script_instance()) { - get_script_instance()->call("parse_category", p_object, p_parse_category); + get_script_instance()->call("_parse_category", p_object, p_parse_category); } } @@ -1050,14 +1048,14 @@ bool EditorInspectorPlugin::parse_property(Object *p_object, Variant::Type p_typ }; Callable::CallError err; - return get_script_instance()->call("parse_property", (const Variant **)&argptr, 6, err); + return get_script_instance()->call("_parse_property", (const Variant **)&argptr, 6, err); } return false; } void EditorInspectorPlugin::parse_end() { if (get_script_instance()) { - get_script_instance()->call("parse_end"); + get_script_instance()->call("_parse_end"); } } @@ -1066,30 +1064,11 @@ void EditorInspectorPlugin::_bind_methods() { ClassDB::bind_method(D_METHOD("add_property_editor", "property", "editor"), &EditorInspectorPlugin::add_property_editor); ClassDB::bind_method(D_METHOD("add_property_editor_for_multiple_properties", "label", "properties", "editor"), &EditorInspectorPlugin::add_property_editor_for_multiple_properties); - MethodInfo vm; - vm.name = "can_handle"; - vm.return_val.type = Variant::BOOL; - vm.arguments.push_back(PropertyInfo(Variant::OBJECT, "object")); - BIND_VMETHOD(vm); - vm.name = "parse_begin"; - vm.return_val.type = Variant::NIL; - BIND_VMETHOD(vm); - vm.name = "parse_category"; - vm.arguments.push_back(PropertyInfo(Variant::STRING, "category")); - BIND_VMETHOD(vm); - vm.arguments.pop_back(); - vm.name = "parse_property"; - vm.return_val.type = Variant::BOOL; - vm.arguments.push_back(PropertyInfo(Variant::INT, "type")); - vm.arguments.push_back(PropertyInfo(Variant::STRING, "path")); - vm.arguments.push_back(PropertyInfo(Variant::INT, "hint")); - vm.arguments.push_back(PropertyInfo(Variant::STRING, "hint_text")); - vm.arguments.push_back(PropertyInfo(Variant::INT, "usage")); - BIND_VMETHOD(vm); - vm.arguments.clear(); - vm.name = "parse_end"; - vm.return_val.type = Variant::NIL; - BIND_VMETHOD(vm); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_can_handle", PropertyInfo(Variant::OBJECT, "object"))); + BIND_VMETHOD(MethodInfo(Variant::NIL, "_parse_begin")); + BIND_VMETHOD(MethodInfo(Variant::NIL, "_parse_category", PropertyInfo(Variant::STRING, "category"))); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_parse_property", PropertyInfo(Variant::INT, "type"), PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::INT, "hint"), PropertyInfo(Variant::STRING, "hint_text"), PropertyInfo(Variant::INT, "usage"))); + BIND_VMETHOD(MethodInfo(Variant::NIL, "_parse_end")); } //////////////////////////////////////////////// @@ -1097,9 +1076,12 @@ void EditorInspectorPlugin::_bind_methods() { void EditorInspectorCategory::_notification(int p_what) { if (p_what == NOTIFICATION_DRAW) { - draw_rect(Rect2(Vector2(), get_size()), bg_color); - Ref<Font> font = get_theme_font("font", "Tree"); - int font_size = get_theme_font_size("font_size", "Tree"); + Ref<StyleBox> sb = get_theme_stylebox("prop_category_style", "Editor"); + + draw_style_box(sb, Rect2(Vector2(), get_size())); + + Ref<Font> font = get_theme_font("bold", "EditorFonts"); + int font_size = get_theme_font_size("bold_size", "EditorFonts"); int hs = get_theme_constant("hseparation", "Tree"); @@ -1181,8 +1163,9 @@ void EditorInspectorSection::_test_unfold() { void EditorInspectorSection::_notification(int p_what) { if (p_what == NOTIFICATION_SORT_CHILDREN) { - Ref<Font> font = get_theme_font("font", "Tree"); - int font_size = get_theme_font_size("font_size", "Tree"); + Ref<Font> font = get_theme_font("bold", "EditorFonts"); + int font_size = get_theme_font_size("bold_size", "EditorFonts"); + Ref<Texture2D> arrow; if (foldable) { @@ -1233,15 +1216,19 @@ void EditorInspectorSection::_notification(int p_what) { bool rtl = is_layout_rtl(); if (foldable) { - if (rtl) { - arrow = get_theme_icon("arrow_collapsed_mirrored", "Tree"); + if (object->editor_is_section_unfolded(section)) { + arrow = get_theme_icon("arrow", "Tree"); } else { - arrow = get_theme_icon("arrow_collapsed", "Tree"); + if (is_layout_rtl()) { + arrow = get_theme_icon("arrow_collapsed_mirrored", "Tree"); + } else { + arrow = get_theme_icon("arrow_collapsed", "Tree"); + } } } - Ref<Font> font = get_theme_font("font", "Tree"); - int font_size = get_theme_font_size("font_size", "Tree"); + Ref<Font> font = get_theme_font("bold", "EditorFonts"); + int font_size = get_theme_font_size("bold_size", "EditorFonts"); int h = font->get_height(font_size); if (arrow.is_valid()) { @@ -1249,12 +1236,15 @@ void EditorInspectorSection::_notification(int p_what) { } h += get_theme_constant("vseparation", "Tree"); - draw_rect(Rect2(Vector2(), Vector2(get_size().width, h)), bg_color); + Color c = bg_color; + c.a *= 0.4; + draw_rect(Rect2(Vector2(), Vector2(get_size().width, h)), c); - const int arrow_margin = 3; - Color color = get_theme_color("font_color", "Tree"); - float text_width = get_size().width - Math::round((16 + arrow_margin) * EDSCALE); - draw_string(font, Point2(rtl ? 0 : Math::round((16 + arrow_margin) * EDSCALE), font->get_ascent(font_size) + (h - font->get_height(font_size)) / 2).floor(), label, rtl ? HALIGN_RIGHT : HALIGN_LEFT, text_width, font_size, color); + const int arrow_margin = 2; + const int arrow_width = arrow.is_valid() ? arrow->get_width() : 0; + Color color = get_theme_color("font_color"); + float text_width = get_size().width - Math::round(arrow_width + arrow_margin * EDSCALE); + draw_string(font, Point2(rtl ? 0 : Math::round(arrow_width + arrow_margin * EDSCALE), font->get_ascent(font_size) + (h - font->get_height(font_size)) / 2).floor(), label, rtl ? HALIGN_RIGHT : HALIGN_LEFT, text_width, font_size, color); if (arrow.is_valid()) { if (rtl) { @@ -1279,7 +1269,7 @@ void EditorInspectorSection::_notification(int p_what) { Control *editor_property = Object::cast_to<Control>(vbox->get_child(child_idx)); // Test can_drop_data and can_drop_data_fw, since can_drop_data only works if set up with forwarding or if script attached. - if (editor_property && (editor_property->can_drop_data(Point2(), dd) || editor_property->call("can_drop_data_fw", Point2(), dd, this))) { + if (editor_property && (editor_property->can_drop_data(Point2(), dd) || editor_property->call("_can_drop_data_fw", Point2(), dd, this))) { children_can_drop = true; break; } @@ -1737,7 +1727,6 @@ void EditorInspector::update_tree() { } category->label = type; - category->bg_color = get_theme_color("prop_category", "Editor"); if (use_doc_hints) { StringName type2 = p.name; if (!class_descr_cache.has(type2)) { diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h index 18250780be..e4bcab3e3f 100644 --- a/editor/editor_inspector.h +++ b/editor/editor_inspector.h @@ -175,8 +175,8 @@ public: EditorProperty(); }; -class EditorInspectorPlugin : public Reference { - GDCLASS(EditorInspectorPlugin, Reference); +class EditorInspectorPlugin : public RefCounted { + GDCLASS(EditorInspectorPlugin, RefCounted); friend class EditorInspector; struct AddedEditor { @@ -208,7 +208,7 @@ class EditorInspectorCategory : public Control { friend class EditorInspector; Ref<Texture2D> icon; String label; - Color bg_color; + mutable String tooltip_text; protected: diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index aa632b90ad..d8c5a14d4f 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -34,15 +34,16 @@ #include "core/core_bind.h" #include "core/input/input.h" #include "core/io/config_file.h" +#include "core/io/file_access.h" #include "core/io/image_loader.h" #include "core/io/resource_loader.h" #include "core/io/resource_saver.h" #include "core/io/stream_peer_ssl.h" #include "core/object/class_db.h" #include "core/object/message_queue.h" -#include "core/os/file_access.h" #include "core/os/keyboard.h" #include "core/os/os.h" +#include "core/os/time.h" #include "core/string/print_string.h" #include "core/string/translation.h" #include "core/version.h" @@ -119,7 +120,6 @@ #include "editor/plugins/animation_tree_editor_plugin.h" #include "editor/plugins/asset_library_editor_plugin.h" #include "editor/plugins/audio_stream_editor_plugin.h" -#include "editor/plugins/baked_lightmap_editor_plugin.h" #include "editor/plugins/camera_3d_editor_plugin.h" #include "editor/plugins/canvas_item_editor_plugin.h" #include "editor/plugins/collision_polygon_2d_editor_plugin.h" @@ -132,13 +132,13 @@ #include "editor/plugins/editor_debugger_plugin.h" #include "editor/plugins/editor_preview_plugins.h" #include "editor/plugins/font_editor_plugin.h" -#include "editor/plugins/gi_probe_editor_plugin.h" #include "editor/plugins/gpu_particles_2d_editor_plugin.h" #include "editor/plugins/gpu_particles_3d_editor_plugin.h" #include "editor/plugins/gpu_particles_collision_sdf_editor_plugin.h" #include "editor/plugins/gradient_editor_plugin.h" #include "editor/plugins/item_list_editor_plugin.h" #include "editor/plugins/light_occluder_2d_editor_plugin.h" +#include "editor/plugins/lightmap_gi_editor_plugin.h" #include "editor/plugins/line_2d_editor_plugin.h" #include "editor/plugins/material_editor_plugin.h" #include "editor/plugins/mesh_editor_plugin.h" @@ -175,6 +175,7 @@ #include "editor/plugins/tiles/tiles_editor_plugin.h" #include "editor/plugins/version_control_editor_plugin.h" #include "editor/plugins/visual_shader_editor_plugin.h" +#include "editor/plugins/voxel_gi_editor_plugin.h" #include "editor/progress_dialog.h" #include "editor/project_export.h" #include "editor/project_settings_editor.h" @@ -484,8 +485,8 @@ void EditorNode::_update_from_settings() { RS::get_singleton()->environment_set_sdfgi_frames_to_converge(frames_to_converge); RS::EnvironmentSDFGIRayCount ray_count = RS::EnvironmentSDFGIRayCount(int(GLOBAL_GET("rendering/global_illumination/sdfgi/probe_ray_count"))); RS::get_singleton()->environment_set_sdfgi_ray_count(ray_count); - RS::GIProbeQuality gi_probe_quality = RS::GIProbeQuality(int(GLOBAL_GET("rendering/global_illumination/gi_probes/quality"))); - RS::get_singleton()->gi_probe_set_quality(gi_probe_quality); + RS::VoxelGIQuality voxel_gi_quality = RS::VoxelGIQuality(int(GLOBAL_GET("rendering/global_illumination/voxel_gi/quality"))); + RS::get_singleton()->voxel_gi_set_quality(voxel_gi_quality); RS::get_singleton()->environment_set_volumetric_fog_volume_size(GLOBAL_GET("rendering/environment/volumetric_fog/volume_size"), GLOBAL_GET("rendering/environment/volumetric_fog/volume_depth")); RS::get_singleton()->environment_set_volumetric_fog_filter_active(bool(GLOBAL_GET("rendering/environment/volumetric_fog/use_filter"))); RS::get_singleton()->canvas_set_shadow_texture_size(GLOBAL_GET("rendering/2d/shadow_atlas/size")); @@ -707,6 +708,11 @@ void EditorNode::_notification(int p_what) { p->set_item_icon(p->get_item_index(HELP_ABOUT), gui_base->get_theme_icon("Godot", "EditorIcons")); p->set_item_icon(p->get_item_index(HELP_SUPPORT_GODOT_DEVELOPMENT), gui_base->get_theme_icon("Heart", "EditorIcons")); + for (int i = 0; i < main_editor_buttons.size(); i++) { + main_editor_buttons.write[i]->add_theme_font_override("font", gui_base->get_theme_font("main_button_font", "EditorFonts")); + main_editor_buttons.write[i]->add_theme_font_size_override("font_size", gui_base->get_theme_font_size("main_button_font_size", "EditorFonts")); + } + _update_update_spinner(); } break; @@ -765,7 +771,7 @@ void EditorNode::_resources_changed(const Vector<String> &p_resources) { if (!res->editor_can_reload_from_file()) { continue; } - if (!res->get_path().is_resource_file() && !res->get_path().is_abs_path()) { + if (!res->get_path().is_resource_file() && !res->get_path().is_absolute_path()) { continue; } if (!FileAccess::exists(res->get_path())) { @@ -1582,6 +1588,8 @@ void EditorNode::_save_scene(String p_file, int idx) { return; } + scene->propagate_notification(NOTIFICATION_EDITOR_PRE_SAVE); + editor_data.apply_changes_in_editors(); List<Ref<AnimatedValuesBackup>> anim_backups; _reset_animation_players(scene, &anim_backups); @@ -1653,6 +1661,8 @@ void EditorNode::_save_scene(String p_file, int idx) { } else { _dialog_display_save_error(p_file, err); } + + scene->propagate_notification(NOTIFICATION_EDITOR_POST_SAVE); } void EditorNode::save_all_scenes() { @@ -2152,9 +2162,14 @@ void EditorNode::_edit_current() { if (!inspector_only) { EditorPlugin *main_plugin = editor_data.get_editor(current_obj); - for (int i = 0; i < editor_table.size(); i++) { - if (editor_table[i] == main_plugin && !main_editor_buttons[i]->is_visible()) { - main_plugin = nullptr; //if button is not visible, then no plugin active + int plugin_index = 0; + for (; plugin_index < editor_table.size(); plugin_index++) { + if (editor_table[plugin_index] == main_plugin) { + if (!main_editor_buttons[plugin_index]->is_visible()) { + main_plugin = nullptr; //if button is not visible, then no plugin active + } + + break; } } @@ -2168,26 +2183,8 @@ void EditorNode::_edit_current() { else if (main_plugin != editor_plugin_screen && (!ScriptEditor::get_singleton() || !ScriptEditor::get_singleton()->is_visible_in_tree() || ScriptEditor::get_singleton()->can_take_away_focus())) { // update screen main_plugin - - if (!changing_scene) { - if (editor_plugin_screen) { - editor_plugin_screen->make_visible(false); - } - editor_plugin_screen = main_plugin; - editor_plugin_screen->edit(current_obj); - - editor_plugin_screen->make_visible(true); - - int plugin_count = editor_data.get_editor_plugin_count(); - for (int i = 0; i < plugin_count; i++) { - editor_data.get_editor_plugin(i)->notify_main_screen_changed(editor_plugin_screen->get_name()); - } - - for (int i = 0; i < editor_table.size(); i++) { - main_editor_buttons[i]->set_pressed(editor_table[i] == main_plugin); - } - } - + _editor_select(plugin_index); + main_plugin->edit(current_obj); } else { editor_plugin_screen->edit(current_obj); } @@ -2749,7 +2746,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { OS::get_singleton()->shell_open(String("file://") + EditorPaths::get_singleton()->get_data_dir()); } break; case SETTINGS_EDITOR_CONFIG_FOLDER: { - OS::get_singleton()->shell_open(String("file://") + EditorPaths::get_singleton()->get_settings_dir()); + OS::get_singleton()->shell_open(String("file://") + EditorPaths::get_singleton()->get_config_dir()); } break; case SETTINGS_MANAGE_EXPORT_TEMPLATES: { export_template_manager->popup_manager(); @@ -2827,7 +2824,7 @@ void EditorNode::_request_screenshot() { } void EditorNode::_screenshot(bool p_use_utc) { - String name = "editor_screenshot_" + OS::get_singleton()->get_iso_date_time(p_use_utc).replace(":", "") + ".png"; + String name = "editor_screenshot_" + Time::get_singleton()->get_datetime_string_from_system(p_use_utc).replace(":", "") + ".png"; NodePath path = String("user://") + name; _save_screenshot(path); if (EditorSettings::get_singleton()->get("interface/editor/automatically_open_screenshots")) { @@ -3059,6 +3056,9 @@ void EditorNode::add_editor_plugin(EditorPlugin *p_editor, bool p_config_changed tb->set_icon(singleton->gui_base->get_theme_icon(p_editor->get_name(), "EditorIcons")); } + tb->add_theme_font_override("font", singleton->gui_base->get_theme_font("main_button_font", "EditorFonts")); + tb->add_theme_font_size_override("font_size", singleton->gui_base->get_theme_font_size("main_button_font_size", "EditorFonts")); + tb->set_name(p_editor->get_name()); singleton->main_editor_buttons.push_back(tb); singleton->main_editor_button_vb->add_child(tb); @@ -6620,7 +6620,7 @@ EditorNode::EditorNode() { version_btn->set_text(VERSION_FULL_CONFIG); String hash = String(VERSION_HASH); if (hash.length() != 0) { - hash = "." + hash.left(9); + hash = " " + vformat("[%s]", hash.left(9)); } // Set the text to copy in metadata as it slightly differs from the button's text. version_btn->set_meta(META_TEXT_TO_COPY, "v" VERSION_FULL_BUILD + hash); @@ -6810,8 +6810,8 @@ EditorNode::EditorNode() { add_editor_plugin(memnew(TilesEditorPlugin(this))); add_editor_plugin(memnew(SpriteFramesEditorPlugin(this))); add_editor_plugin(memnew(TextureRegionEditorPlugin(this))); - add_editor_plugin(memnew(GIProbeEditorPlugin(this))); - add_editor_plugin(memnew(BakedLightmapEditorPlugin(this))); + add_editor_plugin(memnew(VoxelGIEditorPlugin(this))); + add_editor_plugin(memnew(LightmapGIEditorPlugin(this))); add_editor_plugin(memnew(OccluderInstance3DEditorPlugin(this))); add_editor_plugin(memnew(Path2DEditorPlugin(this))); add_editor_plugin(memnew(Path3DEditorPlugin(this))); diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp index d1c52b4310..63281ae1aa 100644 --- a/editor/editor_path.cpp +++ b/editor/editor_path.cpp @@ -59,15 +59,40 @@ void EditorPath::_add_children_to_popup(Object *p_obj, int p_depth) { Ref<Texture2D> icon = EditorNode::get_singleton()->get_object_icon(obj); - int index = get_popup()->get_item_count(); - get_popup()->add_icon_item(icon, E->get().name.capitalize(), objects.size()); - get_popup()->set_item_h_offset(index, p_depth * 10 * EDSCALE); + String proper_name = ""; + Vector<String> name_parts = E->get().name.split("/"); + + for (int i = 0; i < name_parts.size(); i++) { + if (i > 0) { + proper_name += " > "; + } + proper_name += name_parts[i].capitalize(); + } + + int index = sub_objects_menu->get_item_count(); + sub_objects_menu->add_icon_item(icon, proper_name, objects.size()); + sub_objects_menu->set_item_h_offset(index, p_depth * 10 * EDSCALE); objects.push_back(obj->get_instance_id()); _add_children_to_popup(obj, p_depth + 1); } } +void EditorPath::_show_popup() { + sub_objects_menu->clear(); + + Size2 size = get_size(); + Point2 gp = get_screen_position(); + gp.y += size.y; + + sub_objects_menu->set_position(gp); + sub_objects_menu->set_size(Size2(size.width, 1)); + sub_objects_menu->set_parent_rect(Rect2(Point2(gp - sub_objects_menu->get_position()), size)); + + sub_objects_menu->take_mouse_focus(); + sub_objects_menu->popup(); +} + void EditorPath::_about_to_show() { Object *obj = ObjectDB::get_instance(history->get_path_object(history->get_path_size() - 1)); if (!obj) { @@ -75,13 +100,11 @@ void EditorPath::_about_to_show() { } objects.clear(); - get_popup()->clear(); - get_popup()->set_size(Size2(get_size().width, 1)); _add_children_to_popup(obj); - if (get_popup()->get_item_count() == 0) { - get_popup()->add_item(TTR("No sub-resources found.")); - get_popup()->set_item_disabled(0, true); + if (sub_objects_menu->get_item_count() == 0) { + sub_objects_menu->add_item(TTR("No sub-resources found.")); + sub_objects_menu->set_item_disabled(0, true); } } @@ -94,7 +117,7 @@ void EditorPath::update_path() { Ref<Texture2D> icon = EditorNode::get_singleton()->get_object_icon(obj); if (icon.is_valid()) { - set_icon(icon); + current_object_icon->set_texture(icon); } if (i == history->get_path_size() - 1) { @@ -120,12 +143,26 @@ void EditorPath::update_path() { name = obj->get_class(); } - set_text(" " + name); // An extra space so the text is not too close of the icon. + current_object_label->set_text(" " + name); // An extra space so the text is not too close of the icon. set_tooltip(obj->get_class()); } } } +void EditorPath::clear_path() { + set_disabled(true); + set_tooltip(""); + + current_object_label->set_text(""); + current_object_icon->set_texture(nullptr); + sub_objects_icon->set_visible(false); +} + +void EditorPath::enable_path() { + set_disabled(false); + sub_objects_icon->set_visible(true); +} + void EditorPath::_id_pressed(int p_idx) { ERR_FAIL_INDEX(p_idx, objects.size()); @@ -139,8 +176,16 @@ void EditorPath::_id_pressed(int p_idx) { void EditorPath::_notification(int p_what) { switch (p_what) { + case NOTIFICATION_ENTER_TREE: case NOTIFICATION_THEME_CHANGED: { update_path(); + + sub_objects_icon->set_texture(get_theme_icon("select_arrow", "Tree")); + current_object_label->add_theme_font_override("font", get_theme_font("main", "EditorFonts")); + } break; + + case NOTIFICATION_READY: { + connect("pressed", callable_mp(this, &EditorPath::_show_popup)); } break; } } @@ -150,8 +195,35 @@ void EditorPath::_bind_methods() { EditorPath::EditorPath(EditorHistory *p_history) { history = p_history; - set_clip_text(true); - set_text_align(ALIGN_LEFT); - get_popup()->connect("about_to_popup", callable_mp(this, &EditorPath::_about_to_show)); - get_popup()->connect("id_pressed", callable_mp(this, &EditorPath::_id_pressed)); + + MarginContainer *main_mc = memnew(MarginContainer); + main_mc->set_anchors_and_offsets_preset(PRESET_WIDE); + main_mc->add_theme_constant_override("margin_left", 4 * EDSCALE); + main_mc->add_theme_constant_override("margin_right", 6 * EDSCALE); + add_child(main_mc); + + HBoxContainer *main_hb = memnew(HBoxContainer); + main_mc->add_child(main_hb); + + current_object_icon = memnew(TextureRect); + current_object_icon->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED); + main_hb->add_child(current_object_icon); + + current_object_label = memnew(Label); + current_object_label->set_clip_text(true); + current_object_label->set_align(Label::ALIGN_LEFT); + current_object_label->set_h_size_flags(SIZE_EXPAND_FILL); + main_hb->add_child(current_object_label); + + sub_objects_icon = memnew(TextureRect); + sub_objects_icon->set_visible(false); + sub_objects_icon->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED); + main_hb->add_child(sub_objects_icon); + + sub_objects_menu = memnew(PopupMenu); + add_child(sub_objects_menu); + sub_objects_menu->connect("about_to_popup", callable_mp(this, &EditorPath::_about_to_show)); + sub_objects_menu->connect("id_pressed", callable_mp(this, &EditorPath::_id_pressed)); + + set_tooltip(TTR("Open a list of sub-resources.")); } diff --git a/editor/editor_path.h b/editor/editor_path.h index d1090947f9..cabfa931d6 100644 --- a/editor/editor_path.h +++ b/editor/editor_path.h @@ -32,16 +32,24 @@ #define EDITOR_PATH_H #include "editor_data.h" -#include "scene/gui/menu_button.h" +#include "scene/gui/box_container.h" +#include "scene/gui/button.h" +#include "scene/gui/popup_menu.h" -class EditorPath : public MenuButton { - GDCLASS(EditorPath, MenuButton); +class EditorPath : public Button { + GDCLASS(EditorPath, Button); EditorHistory *history; + TextureRect *current_object_icon; + Label *current_object_label; + TextureRect *sub_objects_icon; + PopupMenu *sub_objects_menu; + Vector<ObjectID> objects; EditorPath(); + void _show_popup(); void _id_pressed(int p_idx); void _about_to_show(); void _add_children_to_popup(Object *p_obj, int p_depth = 0); @@ -52,6 +60,8 @@ protected: public: void update_path(); + void clear_path(); + void enable_path(); EditorPath(EditorHistory *p_history); }; diff --git a/editor/editor_paths.cpp b/editor/editor_paths.cpp index 96469d3143..ddba36c187 100644 --- a/editor/editor_paths.cpp +++ b/editor/editor_paths.cpp @@ -29,7 +29,7 @@ /*************************************************************************/ #include "editor_paths.h" -#include "core/os/dir_access.h" +#include "core/io/dir_access.h" #include "core/os/os.h" EditorPaths *EditorPaths::singleton = nullptr; @@ -38,9 +38,6 @@ bool EditorPaths::are_paths_valid() const { return paths_valid; } -String EditorPaths::get_settings_dir() const { - return settings_dir; -} String EditorPaths::get_data_dir() const { return data_dir; } @@ -67,7 +64,6 @@ void EditorPaths::free() { } void EditorPaths::_bind_methods() { - ClassDB::bind_method(D_METHOD("get_settings_dir"), &EditorPaths::get_settings_dir); ClassDB::bind_method(D_METHOD("get_data_dir"), &EditorPaths::get_data_dir); ClassDB::bind_method(D_METHOD("get_config_dir"), &EditorPaths::get_config_dir); ClassDB::bind_method(D_METHOD("get_cache_dir"), &EditorPaths::get_cache_dir); diff --git a/editor/editor_paths.h b/editor/editor_paths.h index 096174943d..c1be33f5c2 100644 --- a/editor/editor_paths.h +++ b/editor/editor_paths.h @@ -37,7 +37,6 @@ class EditorPaths : public Object { GDCLASS(EditorPaths, Object) bool paths_valid = false; - String settings_dir; String data_dir; //editor data dir String config_dir; //editor config dir String cache_dir; //editor cache dir @@ -52,7 +51,6 @@ protected: public: bool are_paths_valid() const; - String get_settings_dir() const; String get_data_dir() const; String get_config_dir() const; String get_cache_dir() const; diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index c5097a17a5..63de06d5e2 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -60,7 +60,7 @@ Array EditorInterface::_make_mesh_previews(const Array &p_meshes, int p_preview_ return ret; } -Vector<Ref<Texture2D>> EditorInterface::make_mesh_previews(const Vector<Ref<Mesh>> &p_meshes, Vector<Transform> *p_transforms, int p_preview_size) { +Vector<Ref<Texture2D>> EditorInterface::make_mesh_previews(const Vector<Ref<Mesh>> &p_meshes, Vector<Transform3D> *p_transforms, int p_preview_size) { int size = p_preview_size; RID scenario = RS::get_singleton()->scenario_create(); @@ -94,7 +94,7 @@ Vector<Ref<Texture2D>> EditorInterface::make_mesh_previews(const Vector<Ref<Mesh continue; } - Transform mesh_xform; + Transform3D mesh_xform; if (p_transforms != nullptr) { mesh_xform = (*p_transforms)[i]; } @@ -105,7 +105,7 @@ Vector<Ref<Texture2D>> EditorInterface::make_mesh_previews(const Vector<Ref<Mesh AABB aabb = mesh->get_aabb(); Vector3 ofs = aabb.position + aabb.size * 0.5; aabb.position -= ofs; - Transform xform; + Transform3D xform; xform.basis = Basis().rotated(Vector3(0, 1, 0), -Math_PI / 6); xform.basis = Basis().rotated(Vector3(1, 0, 0), Math_PI / 6) * xform.basis; AABB rot_aabb = xform.xform(aabb); @@ -119,11 +119,11 @@ Vector<Ref<Texture2D>> EditorInterface::make_mesh_previews(const Vector<Ref<Mesh xform.invert(); xform = mesh_xform * xform; - RS::get_singleton()->camera_set_transform(camera, xform * Transform(Basis(), Vector3(0, 0, 3))); + RS::get_singleton()->camera_set_transform(camera, xform * Transform3D(Basis(), Vector3(0, 0, 3))); RS::get_singleton()->camera_set_orthogonal(camera, m * 2, 0.01, 1000.0); - RS::get_singleton()->instance_set_transform(light_instance, xform * Transform().looking_at(Vector3(-2, -1, -1), Vector3(0, 1, 0))); - RS::get_singleton()->instance_set_transform(light_instance2, xform * Transform().looking_at(Vector3(+1, -1, -2), Vector3(0, 1, 0))); + RS::get_singleton()->instance_set_transform(light_instance, xform * Transform3D().looking_at(Vector3(-2, -1, -1), Vector3(0, 1, 0))); + RS::get_singleton()->instance_set_transform(light_instance2, xform * Transform3D().looking_at(Vector3(+1, -1, -2), Vector3(0, 1, 0))); ep.step(TTR("Thumbnail..."), i); Main::iteration(); @@ -553,21 +553,21 @@ void EditorPlugin::notify_resource_saved(const Ref<Resource> &p_resource) { } bool EditorPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p_event) { - if (get_script_instance() && get_script_instance()->has_method("forward_canvas_gui_input")) { - return get_script_instance()->call("forward_canvas_gui_input", p_event); + if (get_script_instance() && get_script_instance()->has_method("_forward_canvas_gui_input")) { + return get_script_instance()->call("_forward_canvas_gui_input", p_event); } return false; } void EditorPlugin::forward_canvas_draw_over_viewport(Control *p_overlay) { - if (get_script_instance() && get_script_instance()->has_method("forward_canvas_draw_over_viewport")) { - get_script_instance()->call("forward_canvas_draw_over_viewport", p_overlay); + if (get_script_instance() && get_script_instance()->has_method("_forward_canvas_draw_over_viewport")) { + get_script_instance()->call("_forward_canvas_draw_over_viewport", p_overlay); } } void EditorPlugin::forward_canvas_force_draw_over_viewport(Control *p_overlay) { - if (get_script_instance() && get_script_instance()->has_method("forward_canvas_force_draw_over_viewport")) { - get_script_instance()->call("forward_canvas_force_draw_over_viewport", p_overlay); + if (get_script_instance() && get_script_instance()->has_method("_forward_canvas_force_draw_over_viewport")) { + get_script_instance()->call("_forward_canvas_force_draw_over_viewport", p_overlay); } } @@ -591,110 +591,110 @@ int EditorPlugin::update_overlays() const { } bool EditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) { - if (get_script_instance() && get_script_instance()->has_method("forward_spatial_gui_input")) { - return get_script_instance()->call("forward_spatial_gui_input", p_camera, p_event); + if (get_script_instance() && get_script_instance()->has_method("_forward_spatial_gui_input")) { + return get_script_instance()->call("_forward_spatial_gui_input", p_camera, p_event); } return false; } void EditorPlugin::forward_spatial_draw_over_viewport(Control *p_overlay) { - if (get_script_instance() && get_script_instance()->has_method("forward_spatial_draw_over_viewport")) { - get_script_instance()->call("forward_spatial_draw_over_viewport", p_overlay); + if (get_script_instance() && get_script_instance()->has_method("_forward_spatial_draw_over_viewport")) { + get_script_instance()->call("_forward_spatial_draw_over_viewport", p_overlay); } } void EditorPlugin::forward_spatial_force_draw_over_viewport(Control *p_overlay) { - if (get_script_instance() && get_script_instance()->has_method("forward_spatial_force_draw_over_viewport")) { - get_script_instance()->call("forward_spatial_force_draw_over_viewport", p_overlay); + if (get_script_instance() && get_script_instance()->has_method("_forward_spatial_force_draw_over_viewport")) { + get_script_instance()->call("_forward_spatial_force_draw_over_viewport", p_overlay); } } String EditorPlugin::get_name() const { - if (get_script_instance() && get_script_instance()->has_method("get_plugin_name")) { - return get_script_instance()->call("get_plugin_name"); + if (get_script_instance() && get_script_instance()->has_method("_get_plugin_name")) { + return get_script_instance()->call("_get_plugin_name"); } return String(); } const Ref<Texture2D> EditorPlugin::get_icon() const { - if (get_script_instance() && get_script_instance()->has_method("get_plugin_icon")) { - return get_script_instance()->call("get_plugin_icon"); + if (get_script_instance() && get_script_instance()->has_method("_get_plugin_icon")) { + return get_script_instance()->call("_get_plugin_icon"); } return Ref<Texture2D>(); } bool EditorPlugin::has_main_screen() const { - if (get_script_instance() && get_script_instance()->has_method("has_main_screen")) { - return get_script_instance()->call("has_main_screen"); + if (get_script_instance() && get_script_instance()->has_method("_has_main_screen")) { + return get_script_instance()->call("_has_main_screen"); } return false; } void EditorPlugin::make_visible(bool p_visible) { - if (get_script_instance() && get_script_instance()->has_method("make_visible")) { - get_script_instance()->call("make_visible", p_visible); + if (get_script_instance() && get_script_instance()->has_method("_make_visible")) { + get_script_instance()->call("_make_visible", p_visible); } } void EditorPlugin::edit(Object *p_object) { - if (get_script_instance() && get_script_instance()->has_method("edit")) { + if (get_script_instance() && get_script_instance()->has_method("_edit")) { if (p_object->is_class("Resource")) { - get_script_instance()->call("edit", Ref<Resource>(Object::cast_to<Resource>(p_object))); + get_script_instance()->call("_edit", Ref<Resource>(Object::cast_to<Resource>(p_object))); } else { - get_script_instance()->call("edit", p_object); + get_script_instance()->call("_edit", p_object); } } } bool EditorPlugin::handles(Object *p_object) const { - if (get_script_instance() && get_script_instance()->has_method("handles")) { - return get_script_instance()->call("handles", p_object); + if (get_script_instance() && get_script_instance()->has_method("_handles")) { + return get_script_instance()->call("_handles", p_object); } return false; } Dictionary EditorPlugin::get_state() const { - if (get_script_instance() && get_script_instance()->has_method("get_state")) { - return get_script_instance()->call("get_state"); + if (get_script_instance() && get_script_instance()->has_method("_get_state")) { + return get_script_instance()->call("_get_state"); } return Dictionary(); } void EditorPlugin::set_state(const Dictionary &p_state) { - if (get_script_instance() && get_script_instance()->has_method("set_state")) { - get_script_instance()->call("set_state", p_state); + if (get_script_instance() && get_script_instance()->has_method("_set_state")) { + get_script_instance()->call("_set_state", p_state); } } void EditorPlugin::clear() { - if (get_script_instance() && get_script_instance()->has_method("clear")) { - get_script_instance()->call("clear"); + if (get_script_instance() && get_script_instance()->has_method("_clear")) { + get_script_instance()->call("_clear"); } } // if editor references external resources/scenes, save them void EditorPlugin::save_external_data() { - if (get_script_instance() && get_script_instance()->has_method("save_external_data")) { - get_script_instance()->call("save_external_data"); + if (get_script_instance() && get_script_instance()->has_method("_save_external_data")) { + get_script_instance()->call("_save_external_data"); } } // if changes are pending in editor, apply them void EditorPlugin::apply_changes() { - if (get_script_instance() && get_script_instance()->has_method("apply_changes")) { - get_script_instance()->call("apply_changes"); + if (get_script_instance() && get_script_instance()->has_method("_apply_changes")) { + get_script_instance()->call("_apply_changes"); } } void EditorPlugin::get_breakpoints(List<String> *p_breakpoints) { - if (get_script_instance() && get_script_instance()->has_method("get_breakpoints")) { - PackedStringArray arr = get_script_instance()->call("get_breakpoints"); + if (get_script_instance() && get_script_instance()->has_method("_get_breakpoints")) { + PackedStringArray arr = get_script_instance()->call("_get_breakpoints"); for (int i = 0; i < arr.size(); i++) { p_breakpoints->push_back(arr[i]); } @@ -717,52 +717,64 @@ void EditorPlugin::remove_undo_redo_inspector_hook_callback(Callable p_callable) } void EditorPlugin::add_translation_parser_plugin(const Ref<EditorTranslationParserPlugin> &p_parser) { + ERR_FAIL_COND(!p_parser.is_valid()); EditorTranslationParser::get_singleton()->add_parser(p_parser, EditorTranslationParser::CUSTOM); } void EditorPlugin::remove_translation_parser_plugin(const Ref<EditorTranslationParserPlugin> &p_parser) { + ERR_FAIL_COND(!p_parser.is_valid()); EditorTranslationParser::get_singleton()->remove_parser(p_parser, EditorTranslationParser::CUSTOM); } void EditorPlugin::add_import_plugin(const Ref<EditorImportPlugin> &p_importer) { + ERR_FAIL_COND(!p_importer.is_valid()); ResourceFormatImporter::get_singleton()->add_importer(p_importer); EditorFileSystem::get_singleton()->call_deferred("scan"); } void EditorPlugin::remove_import_plugin(const Ref<EditorImportPlugin> &p_importer) { + ERR_FAIL_COND(!p_importer.is_valid()); ResourceFormatImporter::get_singleton()->remove_importer(p_importer); EditorFileSystem::get_singleton()->call_deferred("scan"); } void EditorPlugin::add_export_plugin(const Ref<EditorExportPlugin> &p_exporter) { + ERR_FAIL_COND(!p_exporter.is_valid()); EditorExport::get_singleton()->add_export_plugin(p_exporter); } void EditorPlugin::remove_export_plugin(const Ref<EditorExportPlugin> &p_exporter) { + ERR_FAIL_COND(!p_exporter.is_valid()); EditorExport::get_singleton()->remove_export_plugin(p_exporter); } void EditorPlugin::add_spatial_gizmo_plugin(const Ref<EditorNode3DGizmoPlugin> &p_gizmo_plugin) { + ERR_FAIL_COND(!p_gizmo_plugin.is_valid()); Node3DEditor::get_singleton()->add_gizmo_plugin(p_gizmo_plugin); } void EditorPlugin::remove_spatial_gizmo_plugin(const Ref<EditorNode3DGizmoPlugin> &p_gizmo_plugin) { + ERR_FAIL_COND(!p_gizmo_plugin.is_valid()); Node3DEditor::get_singleton()->remove_gizmo_plugin(p_gizmo_plugin); } void EditorPlugin::add_inspector_plugin(const Ref<EditorInspectorPlugin> &p_plugin) { + ERR_FAIL_COND(!p_plugin.is_valid()); EditorInspector::add_inspector_plugin(p_plugin); } void EditorPlugin::remove_inspector_plugin(const Ref<EditorInspectorPlugin> &p_plugin) { + ERR_FAIL_COND(!p_plugin.is_valid()); EditorInspector::remove_inspector_plugin(p_plugin); } void EditorPlugin::add_scene_import_plugin(const Ref<EditorSceneImporter> &p_importer) { + ERR_FAIL_COND(!p_importer.is_valid()); ResourceImporterScene::get_singleton()->add_importer(p_importer); } void EditorPlugin::remove_scene_import_plugin(const Ref<EditorSceneImporter> &p_importer) { + ERR_FAIL_COND(!p_importer.is_valid()); ResourceImporterScene::get_singleton()->remove_importer(p_importer); } @@ -779,8 +791,8 @@ int find(const PackedStringArray &a, const String &v) { void EditorPlugin::enable_plugin() { // Called when the plugin gets enabled in project settings, after it's added to the tree. // You can implement it to register autoloads. - if (get_script_instance() && get_script_instance()->has_method("enable_plugin")) { - get_script_instance()->call("enable_plugin"); + if (get_script_instance() && get_script_instance()->has_method("_enable_plugin")) { + get_script_instance()->call("_enable_plugin"); } } @@ -788,26 +800,26 @@ void EditorPlugin::disable_plugin() { // Last function called when the plugin gets disabled in project settings. // Implement it to cleanup things from the project, such as unregister autoloads. - if (get_script_instance() && get_script_instance()->has_method("disable_plugin")) { - get_script_instance()->call("disable_plugin"); + if (get_script_instance() && get_script_instance()->has_method("_disable_plugin")) { + get_script_instance()->call("_disable_plugin"); } } void EditorPlugin::set_window_layout(Ref<ConfigFile> p_layout) { - if (get_script_instance() && get_script_instance()->has_method("set_window_layout")) { - get_script_instance()->call("set_window_layout", p_layout); + if (get_script_instance() && get_script_instance()->has_method("_set_window_layout")) { + get_script_instance()->call("_set_window_layout", p_layout); } } void EditorPlugin::get_window_layout(Ref<ConfigFile> p_layout) { - if (get_script_instance() && get_script_instance()->has_method("get_window_layout")) { - get_script_instance()->call("get_window_layout", p_layout); + if (get_script_instance() && get_script_instance()->has_method("_get_window_layout")) { + get_script_instance()->call("_get_window_layout", p_layout); } } bool EditorPlugin::build() { - if (get_script_instance() && get_script_instance()->has_method("build")) { - return get_script_instance()->call("build"); + if (get_script_instance() && get_script_instance()->has_method("_build")) { + return get_script_instance()->call("_build"); } return true; @@ -898,29 +910,29 @@ void EditorPlugin::_bind_methods() { ClassDB::bind_method(D_METHOD("add_debugger_plugin", "script"), &EditorPlugin::add_debugger_plugin); ClassDB::bind_method(D_METHOD("remove_debugger_plugin", "script"), &EditorPlugin::remove_debugger_plugin); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "forward_canvas_gui_input", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo("forward_canvas_draw_over_viewport", PropertyInfo(Variant::OBJECT, "overlay", PROPERTY_HINT_RESOURCE_TYPE, "Control"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo("forward_canvas_force_draw_over_viewport", PropertyInfo(Variant::OBJECT, "overlay", PROPERTY_HINT_RESOURCE_TYPE, "Control"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "forward_spatial_gui_input", PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera3D"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo("forward_spatial_draw_over_viewport", PropertyInfo(Variant::OBJECT, "overlay", PROPERTY_HINT_RESOURCE_TYPE, "Control"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo("forward_spatial_force_draw_over_viewport", PropertyInfo(Variant::OBJECT, "overlay", PROPERTY_HINT_RESOURCE_TYPE, "Control"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_plugin_name")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(PropertyInfo(Variant::OBJECT, "icon", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "get_plugin_icon")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "has_main_screen")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo("make_visible", PropertyInfo(Variant::BOOL, "visible"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo("edit", PropertyInfo(Variant::OBJECT, "object"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "handles", PropertyInfo(Variant::OBJECT, "object"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::DICTIONARY, "get_state")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo("set_state", PropertyInfo(Variant::DICTIONARY, "state"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo("clear")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo("save_external_data")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo("apply_changes")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::PACKED_STRING_ARRAY, "get_breakpoints")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo("set_window_layout", PropertyInfo(Variant::OBJECT, "layout", PROPERTY_HINT_RESOURCE_TYPE, "ConfigFile"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo("get_window_layout", PropertyInfo(Variant::OBJECT, "layout", PROPERTY_HINT_RESOURCE_TYPE, "ConfigFile"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "build")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo("enable_plugin")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo("disable_plugin")); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_forward_canvas_gui_input", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"))); + BIND_VMETHOD(MethodInfo("_forward_canvas_draw_over_viewport", PropertyInfo(Variant::OBJECT, "overlay", PROPERTY_HINT_RESOURCE_TYPE, "Control"))); + BIND_VMETHOD(MethodInfo("_forward_canvas_force_draw_over_viewport", PropertyInfo(Variant::OBJECT, "overlay", PROPERTY_HINT_RESOURCE_TYPE, "Control"))); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_forward_spatial_gui_input", PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera3D"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"))); + BIND_VMETHOD(MethodInfo("_forward_spatial_draw_over_viewport", PropertyInfo(Variant::OBJECT, "overlay", PROPERTY_HINT_RESOURCE_TYPE, "Control"))); + BIND_VMETHOD(MethodInfo("_forward_spatial_force_draw_over_viewport", PropertyInfo(Variant::OBJECT, "overlay", PROPERTY_HINT_RESOURCE_TYPE, "Control"))); + BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_plugin_name")); + BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::OBJECT, "icon", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "_get_plugin_icon")); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_has_main_screen")); + BIND_VMETHOD(MethodInfo("_make_visible", PropertyInfo(Variant::BOOL, "visible"))); + BIND_VMETHOD(MethodInfo("_edit", PropertyInfo(Variant::OBJECT, "object"))); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_handles", PropertyInfo(Variant::OBJECT, "object"))); + BIND_VMETHOD(MethodInfo(Variant::DICTIONARY, "_get_state")); + BIND_VMETHOD(MethodInfo("_set_state", PropertyInfo(Variant::DICTIONARY, "state"))); + BIND_VMETHOD(MethodInfo("_clear")); + BIND_VMETHOD(MethodInfo("_save_external_data")); + BIND_VMETHOD(MethodInfo("_apply_changes")); + BIND_VMETHOD(MethodInfo(Variant::PACKED_STRING_ARRAY, "_get_breakpoints")); + BIND_VMETHOD(MethodInfo("_set_window_layout", PropertyInfo(Variant::OBJECT, "layout", PROPERTY_HINT_RESOURCE_TYPE, "ConfigFile"))); + BIND_VMETHOD(MethodInfo("_get_window_layout", PropertyInfo(Variant::OBJECT, "layout", PROPERTY_HINT_RESOURCE_TYPE, "ConfigFile"))); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_build")); + BIND_VMETHOD(MethodInfo("_enable_plugin")); + BIND_VMETHOD(MethodInfo("_disable_plugin")); ADD_SIGNAL(MethodInfo("scene_changed", PropertyInfo(Variant::OBJECT, "scene_root", PROPERTY_HINT_RESOURCE_TYPE, "Node"))); ADD_SIGNAL(MethodInfo("scene_closed", PropertyInfo(Variant::STRING, "filepath"))); diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h index 3f72e468b2..2e1dd0a0c1 100644 --- a/editor/editor_plugin.h +++ b/editor/editor_plugin.h @@ -113,7 +113,7 @@ public: Error save_scene(); void save_scene_as(const String &p_scene, bool p_with_preview = true); - Vector<Ref<Texture2D>> make_mesh_previews(const Vector<Ref<Mesh>> &p_meshes, Vector<Transform> *p_transforms, int p_preview_size); + Vector<Ref<Texture2D>> make_mesh_previews(const Vector<Ref<Mesh>> &p_meshes, Vector<Transform3D> *p_transforms, int p_preview_size); void set_main_screen_editor(const String &p_name); void set_distraction_free_mode(bool p_enter); diff --git a/editor/editor_plugin_settings.cpp b/editor/editor_plugin_settings.cpp index e5b62513ff..1db24bb908 100644 --- a/editor/editor_plugin_settings.cpp +++ b/editor/editor_plugin_settings.cpp @@ -32,7 +32,7 @@ #include "core/config/project_settings.h" #include "core/io/config_file.h" -#include "core/os/file_access.h" +#include "core/io/file_access.h" #include "core/os/main_loop.h" #include "editor_node.h" #include "editor_scale.h" diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 7beff4147d..0feee447a4 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -1761,14 +1761,14 @@ EditorPropertyPlane::EditorPropertyPlane(bool p_force_wide) { setting = false; } -///////////////////// QUAT ///////////////////////// +///////////////////// QUATERNION ///////////////////////// -void EditorPropertyQuat::_value_changed(double val, const String &p_name) { +void EditorPropertyQuaternion::_value_changed(double val, const String &p_name) { if (setting) { return; } - Quat p; + Quaternion p; p.x = spin[0]->get_value(); p.y = spin[1]->get_value(); p.z = spin[2]->get_value(); @@ -1776,8 +1776,8 @@ void EditorPropertyQuat::_value_changed(double val, const String &p_name) { emit_changed(get_edited_property(), p, p_name); } -void EditorPropertyQuat::update_property() { - Quat val = get_edited_object()->get(get_edited_property()); +void EditorPropertyQuaternion::update_property() { + Quaternion val = get_edited_object()->get(get_edited_property()); setting = true; spin[0]->set_value(val.x); spin[1]->set_value(val.y); @@ -1786,7 +1786,7 @@ void EditorPropertyQuat::update_property() { setting = false; } -void EditorPropertyQuat::_notification(int p_what) { +void EditorPropertyQuaternion::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) { Color base = get_theme_color("accent_color", "Editor"); for (int i = 0; i < 3; i++) { @@ -1797,10 +1797,10 @@ void EditorPropertyQuat::_notification(int p_what) { } } -void EditorPropertyQuat::_bind_methods() { +void EditorPropertyQuaternion::_bind_methods() { } -void EditorPropertyQuat::setup(double p_min, double p_max, double p_step, bool p_no_slider) { +void EditorPropertyQuaternion::setup(double p_min, double p_max, double p_step, bool p_no_slider) { for (int i = 0; i < 4; i++) { spin[i]->set_min(p_min); spin[i]->set_max(p_max); @@ -1811,7 +1811,7 @@ void EditorPropertyQuat::setup(double p_min, double p_max, double p_step, bool p } } -EditorPropertyQuat::EditorPropertyQuat() { +EditorPropertyQuaternion::EditorPropertyQuaternion() { bool horizontal = EDITOR_GET("interface/inspector/horizontal_vector_types_editing"); BoxContainer *bc; @@ -1832,7 +1832,7 @@ EditorPropertyQuat::EditorPropertyQuat() { spin[i]->set_label(desc[i]); bc->add_child(spin[i]); add_focusable(spin[i]); - spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyQuat::_value_changed), varray(desc[i])); + spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyQuaternion::_value_changed), varray(desc[i])); if (horizontal) { spin[i]->set_h_size_flags(SIZE_EXPAND_FILL); } @@ -2078,12 +2078,12 @@ EditorPropertyBasis::EditorPropertyBasis() { ///////////////////// TRANSFORM ///////////////////////// -void EditorPropertyTransform::_value_changed(double val, const String &p_name) { +void EditorPropertyTransform3D::_value_changed(double val, const String &p_name) { if (setting) { return; } - Transform p; + Transform3D p; p.basis[0][0] = spin[0]->get_value(); p.basis[1][0] = spin[1]->get_value(); p.basis[2][0] = spin[2]->get_value(); @@ -2100,11 +2100,11 @@ void EditorPropertyTransform::_value_changed(double val, const String &p_name) { emit_changed(get_edited_property(), p, p_name); } -void EditorPropertyTransform::update_property() { +void EditorPropertyTransform3D::update_property() { update_using_transform(get_edited_object()->get(get_edited_property())); } -void EditorPropertyTransform::update_using_transform(Transform p_transform) { +void EditorPropertyTransform3D::update_using_transform(Transform3D p_transform) { setting = true; spin[0]->set_value(p_transform.basis[0][0]); spin[1]->set_value(p_transform.basis[1][0]); @@ -2121,7 +2121,7 @@ void EditorPropertyTransform::update_using_transform(Transform p_transform) { setting = false; } -void EditorPropertyTransform::_notification(int p_what) { +void EditorPropertyTransform3D::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) { Color base = get_theme_color("accent_color", "Editor"); for (int i = 0; i < 12; i++) { @@ -2132,10 +2132,10 @@ void EditorPropertyTransform::_notification(int p_what) { } } -void EditorPropertyTransform::_bind_methods() { +void EditorPropertyTransform3D::_bind_methods() { } -void EditorPropertyTransform::setup(double p_min, double p_max, double p_step, bool p_no_slider) { +void EditorPropertyTransform3D::setup(double p_min, double p_max, double p_step, bool p_no_slider) { for (int i = 0; i < 12; i++) { spin[i]->set_min(p_min); spin[i]->set_max(p_max); @@ -2146,7 +2146,7 @@ void EditorPropertyTransform::setup(double p_min, double p_max, double p_step, b } } -EditorPropertyTransform::EditorPropertyTransform() { +EditorPropertyTransform3D::EditorPropertyTransform3D() { GridContainer *g = memnew(GridContainer); g->set_columns(3); add_child(g); @@ -2159,7 +2159,7 @@ EditorPropertyTransform::EditorPropertyTransform() { g->add_child(spin[i]); spin[i]->set_h_size_flags(SIZE_EXPAND_FILL); add_focusable(spin[i]); - spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyTransform::_value_changed), varray(desc[i])); + spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyTransform3D::_value_changed), varray(desc[i])); } set_bottom_editor(g); setting = false; @@ -2261,7 +2261,7 @@ void EditorPropertyNodePath::_node_selected(const NodePath &p_path) { base_node = get_edited_object()->call("get_root_path"); } - if (!base_node && Object::cast_to<Reference>(get_edited_object())) { + if (!base_node && Object::cast_to<RefCounted>(get_edited_object())) { Node *to_node = get_node(p_path); ERR_FAIL_COND(!to_node); path = get_tree()->get_edited_scene_root()->get_path_to(to_node); @@ -3056,8 +3056,8 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ editor->setup(min, max, step, hide_slider); add_property_editor(p_path, editor); } break; - case Variant::QUAT: { - EditorPropertyQuat *editor = memnew(EditorPropertyQuat); + case Variant::QUATERNION: { + EditorPropertyQuaternion *editor = memnew(EditorPropertyQuaternion); double min = -65535, max = 65535, step = default_float_step; bool hide_slider = true; @@ -3107,8 +3107,8 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ editor->setup(min, max, step, hide_slider); add_property_editor(p_path, editor); } break; - case Variant::TRANSFORM: { - EditorPropertyTransform *editor = memnew(EditorPropertyTransform); + case Variant::TRANSFORM3D: { + EditorPropertyTransform3D *editor = memnew(EditorPropertyTransform3D); double min = -65535, max = 65535, step = default_float_step; bool hide_slider = true; diff --git a/editor/editor_properties.h b/editor/editor_properties.h index 07f496f54d..121848d936 100644 --- a/editor/editor_properties.h +++ b/editor/editor_properties.h @@ -465,8 +465,8 @@ public: EditorPropertyPlane(bool p_force_wide = false); }; -class EditorPropertyQuat : public EditorProperty { - GDCLASS(EditorPropertyQuat, EditorProperty); +class EditorPropertyQuaternion : public EditorProperty { + GDCLASS(EditorPropertyQuaternion, EditorProperty); EditorSpinSlider *spin[4]; bool setting; void _value_changed(double p_val, const String &p_name); @@ -478,7 +478,7 @@ protected: public: virtual void update_property() override; void setup(double p_min, double p_max, double p_step, bool p_no_slider); - EditorPropertyQuat(); + EditorPropertyQuaternion(); }; class EditorPropertyAABB : public EditorProperty { @@ -529,8 +529,8 @@ public: EditorPropertyBasis(); }; -class EditorPropertyTransform : public EditorProperty { - GDCLASS(EditorPropertyTransform, EditorProperty); +class EditorPropertyTransform3D : public EditorProperty { + GDCLASS(EditorPropertyTransform3D, EditorProperty); EditorSpinSlider *spin[12]; bool setting; void _value_changed(double p_val, const String &p_name); @@ -541,9 +541,9 @@ protected: public: virtual void update_property() override; - virtual void update_using_transform(Transform p_transform); + virtual void update_using_transform(Transform3D p_transform); void setup(double p_min, double p_max, double p_step, bool p_no_slider); - EditorPropertyTransform(); + EditorPropertyTransform3D(); }; class EditorPropertyColor : public EditorProperty { diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp index 3bc29856f1..66fabcd940 100644 --- a/editor/editor_properties_array_dict.cpp +++ b/editor/editor_properties_array_dict.cpp @@ -567,8 +567,8 @@ void EditorPropertyArray::setup(Variant::Type p_array_type, const String &p_hint } void EditorPropertyArray::_bind_methods() { - ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &EditorPropertyArray::can_drop_data_fw); - ClassDB::bind_method(D_METHOD("drop_data_fw"), &EditorPropertyArray::drop_data_fw); + ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &EditorPropertyArray::can_drop_data_fw); + ClassDB::bind_method(D_METHOD("_drop_data_fw"), &EditorPropertyArray::drop_data_fw); } EditorPropertyArray::EditorPropertyArray() { @@ -850,8 +850,8 @@ void EditorPropertyDictionary::update_property() { prop = editor; } break; - case Variant::QUAT: { - EditorPropertyQuat *editor = memnew(EditorPropertyQuat); + case Variant::QUATERNION: { + EditorPropertyQuaternion *editor = memnew(EditorPropertyQuaternion); editor->setup(-100000, 100000, 0.001, true); prop = editor; @@ -868,8 +868,8 @@ void EditorPropertyDictionary::update_property() { prop = editor; } break; - case Variant::TRANSFORM: { - EditorPropertyTransform *editor = memnew(EditorPropertyTransform); + case Variant::TRANSFORM3D: { + EditorPropertyTransform3D *editor = memnew(EditorPropertyTransform3D); editor->setup(-100000, 100000, 0.001, true); prop = editor; diff --git a/editor/editor_properties_array_dict.h b/editor/editor_properties_array_dict.h index fa5adc788d..aa2d8744b1 100644 --- a/editor/editor_properties_array_dict.h +++ b/editor/editor_properties_array_dict.h @@ -36,8 +36,8 @@ #include "editor/filesystem_dock.h" #include "scene/gui/button.h" -class EditorPropertyArrayObject : public Reference { - GDCLASS(EditorPropertyArrayObject, Reference); +class EditorPropertyArrayObject : public RefCounted { + GDCLASS(EditorPropertyArrayObject, RefCounted); Variant array; @@ -52,8 +52,8 @@ public: EditorPropertyArrayObject(); }; -class EditorPropertyDictionaryObject : public Reference { - GDCLASS(EditorPropertyDictionaryObject, Reference); +class EditorPropertyDictionaryObject : public RefCounted { + GDCLASS(EditorPropertyDictionaryObject, RefCounted); Variant new_item_key; Variant new_item_value; diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp index d1a0bfeded..1ea8c71f85 100644 --- a/editor/editor_resource_picker.cpp +++ b/editor/editor_resource_picker.cpp @@ -361,8 +361,8 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) { void EditorResourcePicker::set_create_options(Object *p_menu_node) { // If a subclass implements this method, use it to replace all create items. - if (get_script_instance() && get_script_instance()->has_method("set_create_options")) { - get_script_instance()->call("set_create_options", p_menu_node); + if (get_script_instance() && get_script_instance()->has_method("_set_create_options")) { + get_script_instance()->call("_set_create_options", p_menu_node); return; } @@ -418,8 +418,8 @@ void EditorResourcePicker::set_create_options(Object *p_menu_node) { } bool EditorResourcePicker::handle_menu_selected(int p_which) { - if (get_script_instance() && get_script_instance()->has_method("handle_menu_selected")) { - return get_script_instance()->call("handle_menu_selected", p_which); + if (get_script_instance() && get_script_instance()->has_method("_handle_menu_selected")) { + return get_script_instance()->call("_handle_menu_selected", p_which); } return false; @@ -625,9 +625,9 @@ void EditorResourcePicker::drop_data_fw(const Point2 &p_point, const Variant &p_ void EditorResourcePicker::_bind_methods() { ClassDB::bind_method(D_METHOD("_update_resource_preview"), &EditorResourcePicker::_update_resource_preview); - ClassDB::bind_method(D_METHOD("get_drag_data_fw", "position", "from"), &EditorResourcePicker::get_drag_data_fw); - ClassDB::bind_method(D_METHOD("can_drop_data_fw", "position", "data", "from"), &EditorResourcePicker::can_drop_data_fw); - ClassDB::bind_method(D_METHOD("drop_data_fw", "position", "data", "from"), &EditorResourcePicker::drop_data_fw); + ClassDB::bind_method(D_METHOD("_get_drag_data_fw", "position", "from"), &EditorResourcePicker::get_drag_data_fw); + ClassDB::bind_method(D_METHOD("_can_drop_data_fw", "position", "data", "from"), &EditorResourcePicker::can_drop_data_fw); + ClassDB::bind_method(D_METHOD("_drop_data_fw", "position", "data", "from"), &EditorResourcePicker::drop_data_fw); ClassDB::bind_method(D_METHOD("set_base_type", "base_type"), &EditorResourcePicker::set_base_type); ClassDB::bind_method(D_METHOD("get_base_type"), &EditorResourcePicker::get_base_type); @@ -640,8 +640,8 @@ void EditorResourcePicker::_bind_methods() { ClassDB::bind_method(D_METHOD("set_editable", "enable"), &EditorResourcePicker::set_editable); ClassDB::bind_method(D_METHOD("is_editable"), &EditorResourcePicker::is_editable); - ClassDB::add_virtual_method(get_class_static(), MethodInfo("set_create_options", PropertyInfo(Variant::OBJECT, "menu_node"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo("handle_menu_selected", PropertyInfo(Variant::INT, "id"))); + ClassDB::add_virtual_method(get_class_static(), MethodInfo("_set_create_options", PropertyInfo(Variant::OBJECT, "menu_node"))); + ClassDB::add_virtual_method(get_class_static(), MethodInfo("_handle_menu_selected", PropertyInfo(Variant::INT, "id"))); ADD_PROPERTY(PropertyInfo(Variant::STRING, "base_type"), "set_base_type", "get_base_type"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "edited_resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource", 0), "set_edited_resource", "get_edited_resource"); diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp index 35cf08b4d7..0f1b70936a 100644 --- a/editor/editor_resource_preview.cpp +++ b/editor/editor_resource_preview.cpp @@ -31,31 +31,31 @@ #include "editor_resource_preview.h" #include "core/config/project_settings.h" +#include "core/io/file_access.h" #include "core/io/resource_loader.h" #include "core/io/resource_saver.h" #include "core/object/message_queue.h" -#include "core/os/file_access.h" #include "editor_node.h" #include "editor_scale.h" #include "editor_settings.h" bool EditorResourcePreviewGenerator::handles(const String &p_type) const { - if (get_script_instance() && get_script_instance()->has_method("handles")) { - return get_script_instance()->call("handles", p_type); + if (get_script_instance() && get_script_instance()->has_method("_handles")) { + return get_script_instance()->call("_handles", p_type); } - ERR_FAIL_V_MSG(false, "EditorResourcePreviewGenerator::handles needs to be overridden."); + ERR_FAIL_V_MSG(false, "EditorResourcePreviewGenerator::_handles needs to be overridden."); } Ref<Texture2D> EditorResourcePreviewGenerator::generate(const RES &p_from, const Size2 &p_size) const { - if (get_script_instance() && get_script_instance()->has_method("generate")) { - return get_script_instance()->call("generate", p_from, p_size); + if (get_script_instance() && get_script_instance()->has_method("_generate")) { + return get_script_instance()->call("_generate", p_from, p_size); } - ERR_FAIL_V_MSG(Ref<Texture2D>(), "EditorResourcePreviewGenerator::generate needs to be overridden."); + ERR_FAIL_V_MSG(Ref<Texture2D>(), "EditorResourcePreviewGenerator::_generate needs to be overridden."); } Ref<Texture2D> EditorResourcePreviewGenerator::generate_from_path(const String &p_path, const Size2 &p_size) const { - if (get_script_instance() && get_script_instance()->has_method("generate_from_path")) { - return get_script_instance()->call("generate_from_path", p_path, p_size); + if (get_script_instance() && get_script_instance()->has_method("_generate_from_path")) { + return get_script_instance()->call("_generate_from_path", p_path, p_size); } RES res = ResourceLoader::load(p_path); @@ -66,27 +66,27 @@ Ref<Texture2D> EditorResourcePreviewGenerator::generate_from_path(const String & } bool EditorResourcePreviewGenerator::generate_small_preview_automatically() const { - if (get_script_instance() && get_script_instance()->has_method("generate_small_preview_automatically")) { - return get_script_instance()->call("generate_small_preview_automatically"); + if (get_script_instance() && get_script_instance()->has_method("_generate_small_preview_automatically")) { + return get_script_instance()->call("_generate_small_preview_automatically"); } return false; } bool EditorResourcePreviewGenerator::can_generate_small_preview() const { - if (get_script_instance() && get_script_instance()->has_method("can_generate_small_preview")) { - return get_script_instance()->call("can_generate_small_preview"); + if (get_script_instance() && get_script_instance()->has_method("_can_generate_small_preview")) { + return get_script_instance()->call("_can_generate_small_preview"); } return false; } void EditorResourcePreviewGenerator::_bind_methods() { - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "handles", PropertyInfo(Variant::STRING, "type"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(CLASS_INFO(Texture2D), "generate", PropertyInfo(Variant::OBJECT, "from", PROPERTY_HINT_RESOURCE_TYPE, "Resource"), PropertyInfo(Variant::VECTOR2, "size"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(CLASS_INFO(Texture2D), "generate_from_path", PropertyInfo(Variant::STRING, "path", PROPERTY_HINT_FILE), PropertyInfo(Variant::VECTOR2, "size"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "generate_small_preview_automatically")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "can_generate_small_preview")); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_handles", PropertyInfo(Variant::STRING, "type"))); + BIND_VMETHOD(MethodInfo(CLASS_INFO(Texture2D), "_generate", PropertyInfo(Variant::OBJECT, "from", PROPERTY_HINT_RESOURCE_TYPE, "Resource"), PropertyInfo(Variant::VECTOR2, "size"))); + BIND_VMETHOD(MethodInfo(CLASS_INFO(Texture2D), "_generate_from_path", PropertyInfo(Variant::STRING, "path", PROPERTY_HINT_FILE), PropertyInfo(Variant::VECTOR2, "size"))); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_generate_small_preview_automatically")); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_can_generate_small_preview")); } EditorResourcePreviewGenerator::EditorResourcePreviewGenerator() { diff --git a/editor/editor_resource_preview.h b/editor/editor_resource_preview.h index ffeb22162e..67f83220d0 100644 --- a/editor/editor_resource_preview.h +++ b/editor/editor_resource_preview.h @@ -37,8 +37,8 @@ #include "scene/main/node.h" #include "scene/resources/texture.h" -class EditorResourcePreviewGenerator : public Reference { - GDCLASS(EditorResourcePreviewGenerator, Reference); +class EditorResourcePreviewGenerator : public RefCounted { + GDCLASS(EditorResourcePreviewGenerator, RefCounted); protected: static void _bind_methods(); diff --git a/editor/editor_run_script.h b/editor/editor_run_script.h index 83987ecba1..c8412c3c92 100644 --- a/editor/editor_run_script.h +++ b/editor/editor_run_script.h @@ -31,11 +31,11 @@ #ifndef EDITOR_RUN_SCRIPT_H #define EDITOR_RUN_SCRIPT_H -#include "core/object/reference.h" +#include "core/object/ref_counted.h" #include "editor_plugin.h" class EditorNode; -class EditorScript : public Reference { - GDCLASS(EditorScript, Reference); +class EditorScript : public RefCounted { + GDCLASS(EditorScript, RefCounted); EditorNode *editor; diff --git a/editor/editor_sectioned_inspector.cpp b/editor/editor_sectioned_inspector.cpp index 7532f1c796..6bfb17f9c2 100644 --- a/editor/editor_sectioned_inspector.cpp +++ b/editor/editor_sectioned_inspector.cpp @@ -250,7 +250,8 @@ void SectionedInspector::update_category_list() { for (int i = 0; i < sc; i++) { TreeItem *parent = section_map[metasection]; - parent->set_custom_bg_color(0, get_theme_color("prop_subsection", "Editor")); + //parent->set_custom_bg_color(0, get_theme_color("prop_subsection", "Editor")); + parent->set_custom_font(0, get_theme_font("bold", "EditorFonts")); if (i > 0) { metasection += "/" + sectionarr[i]; diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 1255526a4a..949638f0c9 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -35,13 +35,13 @@ #include "core/io/certs_compressed.gen.h" #include "core/io/compression.h" #include "core/io/config_file.h" +#include "core/io/dir_access.h" +#include "core/io/file_access.h" #include "core/io/file_access_memory.h" #include "core/io/ip.h" #include "core/io/resource_loader.h" #include "core/io/resource_saver.h" #include "core/io/translation_loader_po.h" -#include "core/os/dir_access.h" -#include "core/os/file_access.h" #include "core/os/keyboard.h" #include "core/os/os.h" #include "core/version.h" @@ -571,7 +571,6 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { _initial_set("text_editor/completion/code_complete_delay", 0.3); hints["text_editor/completion/code_complete_delay"] = PropertyInfo(Variant::FLOAT, "text_editor/completion/code_complete_delay", PROPERTY_HINT_RANGE, "0.01, 5, 0.01"); _initial_set("text_editor/completion/put_callhint_tooltip_below_current_line", true); - _initial_set("text_editor/completion/callhint_tooltip_offset", Vector2()); _initial_set("text_editor/completion/complete_file_paths", true); _initial_set("text_editor/completion/add_type_hints", false); _initial_set("text_editor/completion/use_single_quotes", false); @@ -690,11 +689,11 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { _initial_set("editors/2d/guides_color", Color(0.6, 0.0, 0.8)); _initial_set("editors/2d/smart_snapping_line_color", Color(0.9, 0.1, 0.1)); _initial_set("editors/2d/bone_width", 5); - _initial_set("editors/2d/bone_color1", Color(1.0, 1.0, 1.0, 0.9)); - _initial_set("editors/2d/bone_color2", Color(0.6, 0.6, 0.6, 0.9)); - _initial_set("editors/2d/bone_selected_color", Color(0.9, 0.45, 0.45, 0.9)); - _initial_set("editors/2d/bone_ik_color", Color(0.9, 0.9, 0.45, 0.9)); - _initial_set("editors/2d/bone_outline_color", Color(0.35, 0.35, 0.35)); + _initial_set("editors/2d/bone_color1", Color(1.0, 1.0, 1.0, 0.7)); + _initial_set("editors/2d/bone_color2", Color(0.6, 0.6, 0.6, 0.7)); + _initial_set("editors/2d/bone_selected_color", Color(0.9, 0.45, 0.45, 0.7)); + _initial_set("editors/2d/bone_ik_color", Color(0.9, 0.9, 0.45, 0.7)); + _initial_set("editors/2d/bone_outline_color", Color(0.35, 0.35, 0.35, 0.5)); _initial_set("editors/2d/bone_outline_size", 2); _initial_set("editors/2d/viewport_border_color", Color(0.4, 0.4, 1.0, 0.4)); _initial_set("editors/2d/constrain_editor_view", true); @@ -1265,11 +1264,11 @@ String EditorSettings::get_project_settings_dir() const { } String EditorSettings::get_text_editor_themes_dir() const { - return EditorPaths::get_singleton()->get_settings_dir().plus_file("text_editor_themes"); + return EditorPaths::get_singleton()->get_config_dir().plus_file("text_editor_themes"); } String EditorSettings::get_script_templates_dir() const { - return EditorPaths::get_singleton()->get_settings_dir().plus_file("script_templates"); + return EditorPaths::get_singleton()->get_config_dir().plus_file("script_templates"); } String EditorSettings::get_project_script_templates_dir() const { @@ -1279,7 +1278,7 @@ String EditorSettings::get_project_script_templates_dir() const { // Cache directory String EditorSettings::get_feature_profiles_dir() const { - return EditorPaths::get_singleton()->get_settings_dir().plus_file("feature_profiles"); + return EditorPaths::get_singleton()->get_config_dir().plus_file("feature_profiles"); } // Metadata @@ -1506,7 +1505,7 @@ Vector<String> EditorSettings::get_script_templates(const String &p_extension, c } String EditorSettings::get_editor_layouts_config() const { - return EditorPaths::get_singleton()->get_settings_dir().plus_file("editor_layouts.cfg"); + return EditorPaths::get_singleton()->get_config_dir().plus_file("editor_layouts.cfg"); } // Shortcuts diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 7971dfc313..64f7500e8c 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -217,6 +217,7 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme = exceptions.insert("EditorControlAnchor"); exceptions.insert("DefaultProjectIcon"); exceptions.insert("GuiChecked"); + exceptions.insert("GuiRadioChecked"); exceptions.insert("GuiCloseCustomizable"); exceptions.insert("GuiGraphNodePort"); exceptions.insert("GuiResizer"); @@ -464,7 +465,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { // Ensure borders are visible when using an editor scale below 100%. const int border_width = CLAMP(border_size, 0, 2) * MAX(1, EDSCALE); - const int corner_width = CLAMP(corner_radius, 0, 6) * EDSCALE; + const int corner_width = CLAMP(corner_radius, 0, 6); const int default_margin_size = 4; const int margin_size_extra = default_margin_size + CLAMP(border_size, 0, 2); @@ -785,14 +786,17 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { style_property_bg->set_bg_color(highlight_color); style_property_bg->set_border_width_all(0); - theme->set_constant("font_offset", "EditorProperty", 1 * EDSCALE); + theme->set_constant("font_offset", "EditorProperty", 8 * EDSCALE); theme->set_stylebox("bg_selected", "EditorProperty", style_property_bg); theme->set_stylebox("bg", "EditorProperty", Ref<StyleBoxEmpty>(memnew(StyleBoxEmpty))); theme->set_constant("vseparation", "EditorProperty", (extra_spacing + default_margin_size) * EDSCALE); theme->set_color("error_color", "EditorProperty", error_color); theme->set_color("property_color", "EditorProperty", property_color); - theme->set_constant("inspector_margin", "Editor", 8 * EDSCALE); + Color inspector_section_color = font_color.lerp(Color(0.5, 0.5, 0.5), 0.35); + theme->set_color("font_color", "EditorInspectorSection", inspector_section_color); + + theme->set_constant("inspector_margin", "Editor", 12 * EDSCALE); // Tree & ItemList background Ref<StyleBoxFlat> style_tree_bg = style_default->duplicate(); @@ -884,6 +888,12 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("prop_subsection", "Editor", prop_subsection_color); theme->set_color("drop_position_color", "Tree", accent_color); + Ref<StyleBoxFlat> category_bg = style_default->duplicate(); + // Make Trees easier to distinguish from other controls by using a darker background color. + category_bg->set_bg_color(prop_category_color); + category_bg->set_border_color(prop_category_color); + theme->set_stylebox("prop_category_style", "Editor", category_bg); + // ItemList Ref<StyleBoxFlat> style_itemlist_bg = style_default->duplicate(); style_itemlist_bg->set_bg_color(dark_color_1); @@ -941,7 +951,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { style_content_panel->set_border_color(dark_color_3); style_content_panel->set_border_width_all(border_width); // compensate the border - style_content_panel->set_default_margin(SIDE_TOP, margin_size_extra * EDSCALE); + style_content_panel->set_default_margin(SIDE_TOP, (2 + margin_size_extra) * EDSCALE); style_content_panel->set_default_margin(SIDE_RIGHT, margin_size_extra * EDSCALE); style_content_panel->set_default_margin(SIDE_BOTTOM, margin_size_extra * EDSCALE); style_content_panel->set_default_margin(SIDE_LEFT, margin_size_extra * EDSCALE); diff --git a/editor/editor_translation_parser.cpp b/editor/editor_translation_parser.cpp index 49d5cf1fd3..27d428e682 100644 --- a/editor/editor_translation_parser.cpp +++ b/editor/editor_translation_parser.cpp @@ -31,8 +31,8 @@ #include "editor_translation_parser.h" #include "core/error/error_macros.h" +#include "core/io/file_access.h" #include "core/object/script_language.h" -#include "core/os/file_access.h" #include "core/templates/set.h" EditorTranslationParser *EditorTranslationParser::singleton = nullptr; @@ -42,10 +42,10 @@ Error EditorTranslationParserPlugin::parse_file(const String &p_path, Vector<Str return ERR_UNAVAILABLE; } - if (get_script_instance()->has_method("parse_file")) { + if (get_script_instance()->has_method("_parse_file")) { Array ids; Array ids_ctx_plural; - get_script_instance()->call("parse_file", p_path, ids, ids_ctx_plural); + get_script_instance()->call("_parse_file", p_path, ids, ids_ctx_plural); // Add user's extracted translatable messages. for (int i = 0; i < ids.size(); i++) { @@ -75,8 +75,8 @@ void EditorTranslationParserPlugin::get_recognized_extensions(List<String> *r_ex return; } - if (get_script_instance()->has_method("get_recognized_extensions")) { - Array extensions = get_script_instance()->call("get_recognized_extensions"); + if (get_script_instance()->has_method("_get_recognized_extensions")) { + Array extensions = get_script_instance()->call("_get_recognized_extensions"); for (int i = 0; i < extensions.size(); i++) { r_extensions->push_back(extensions[i]); } @@ -86,8 +86,8 @@ void EditorTranslationParserPlugin::get_recognized_extensions(List<String> *r_ex } void EditorTranslationParserPlugin::_bind_methods() { - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::NIL, "parse_file", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::ARRAY, "msgids"), PropertyInfo(Variant::ARRAY, "msgids_context_plural"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::ARRAY, "get_recognized_extensions")); + BIND_VMETHOD(MethodInfo(Variant::NIL, "_parse_file", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::ARRAY, "msgids"), PropertyInfo(Variant::ARRAY, "msgids_context_plural"))); + BIND_VMETHOD(MethodInfo(Variant::ARRAY, "_get_recognized_extensions")); } ///////////////////////// diff --git a/editor/editor_translation_parser.h b/editor/editor_translation_parser.h index 4f8f3537f2..7013bbb8c4 100644 --- a/editor/editor_translation_parser.h +++ b/editor/editor_translation_parser.h @@ -32,10 +32,10 @@ #define EDITOR_TRANSLATION_PARSER_H #include "core/error/error_list.h" -#include "core/object/reference.h" +#include "core/object/ref_counted.h" -class EditorTranslationParserPlugin : public Reference { - GDCLASS(EditorTranslationParserPlugin, Reference); +class EditorTranslationParserPlugin : public RefCounted { + GDCLASS(EditorTranslationParserPlugin, RefCounted); protected: static void _bind_methods(); diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp index 6e0ae403a2..76c6fcc3d3 100644 --- a/editor/export_template_manager.cpp +++ b/editor/export_template_manager.cpp @@ -31,9 +31,9 @@ #include "export_template_manager.h" #include "core/input/input.h" +#include "core/io/dir_access.h" #include "core/io/json.h" #include "core/io/zip_io.h" -#include "core/os/dir_access.h" #include "core/os/keyboard.h" #include "core/version.h" #include "editor_node.h" @@ -41,141 +41,336 @@ #include "progress_dialog.h" #include "scene/gui/link_button.h" -void ExportTemplateManager::_update_template_list() { - while (current_hb->get_child_count()) { - memdelete(current_hb->get_child(0)); - } - - while (installed_vb->get_child_count()) { - memdelete(installed_vb->get_child(0)); - } +void ExportTemplateManager::_update_template_status() { + // Fetch installed templates from the file system. + DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); + const String &templates_dir = EditorSettings::get_singleton()->get_templates_dir(); - DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); - Error err = d->change_dir(EditorSettings::get_singleton()->get_templates_dir()); + Error err = da->change_dir(templates_dir); + ERR_FAIL_COND_MSG(err != OK, "Could not access templates directory at '" + templates_dir + "'."); Set<String> templates; - d->list_dir_begin(); + da->list_dir_begin(); if (err == OK) { - String c = d->get_next(); + String c = da->get_next(); while (c != String()) { - if (d->current_is_dir() && !c.begins_with(".")) { + if (da->current_is_dir() && !c.begins_with(".")) { templates.insert(c); } - c = d->get_next(); + c = da->get_next(); } } - d->list_dir_end(); - - memdelete(d); + da->list_dir_end(); + memdelete(da); + // Update the state of the current version. String current_version = VERSION_FULL_CONFIG; - // Downloadable export templates are only available for stable and official alpha/beta/RC builds - // (which always have a number following their status, e.g. "alpha1"). - // Therefore, don't display download-related features when using a development version - // (whose builds aren't numbered). - const bool downloads_available = - String(VERSION_STATUS) != String("dev") && - String(VERSION_STATUS) != String("alpha") && - String(VERSION_STATUS) != String("beta") && - String(VERSION_STATUS) != String("rc"); - - Label *current = memnew(Label); - current->set_h_size_flags(Control::SIZE_EXPAND_FILL); - current_hb->add_child(current); + current_value->set_text(current_version); if (templates.has(current_version)) { - current->add_theme_color_override("font_color", current->get_theme_color("success_color", "Editor")); - - // Only display a redownload button if it can be downloaded in the first place - if (downloads_available) { - Button *redownload = memnew(Button); - redownload->set_text(TTR("Redownload")); - current_hb->add_child(redownload); - redownload->connect("pressed", callable_mp(this, &ExportTemplateManager::_download_template), varray(current_version)); - } + current_missing_label->hide(); + current_installed_label->show(); + + current_installed_hb->show(); + current_version_exists = true; + } else { + current_installed_label->hide(); + current_missing_label->show(); - Button *uninstall = memnew(Button); - uninstall->set_text(TTR("Uninstall")); - current_hb->add_child(uninstall); - current->set_text(current_version + " " + TTR("(Installed)")); - uninstall->connect("pressed", callable_mp(this, &ExportTemplateManager::_uninstall_template), varray(current_version)); + current_installed_hb->hide(); + current_version_exists = false; + } + if (is_downloading_templates) { + install_options_vb->hide(); + download_progress_hb->show(); } else { - current->add_theme_color_override("font_color", current->get_theme_color("error_color", "Editor")); - Button *redownload = memnew(Button); - redownload->set_text(TTR("Download")); + download_progress_hb->hide(); + install_options_vb->show(); - if (!downloads_available) { - redownload->set_disabled(true); - redownload->set_tooltip(TTR("Official export templates aren't available for development builds.")); + if (templates.has(current_version)) { + current_installed_path->set_text(templates_dir.plus_file(current_version)); } - - redownload->connect("pressed", callable_mp(this, &ExportTemplateManager::_download_template), varray(current_version)); - current_hb->add_child(redownload); - current->set_text(current_version + " " + TTR("(Missing)")); } + // Update the list of other installed versions. + installed_table->clear(); + TreeItem *installed_root = installed_table->create_item(); + for (Set<String>::Element *E = templates.back(); E; E = E->prev()) { - String text = E->get(); - if (text == current_version) { + String version_string = E->get(); + if (version_string == current_version) { continue; } - HBoxContainer *hbc = memnew(HBoxContainer); - Label *version = memnew(Label); - version->set_modulate(current->get_theme_color("disabled_font_color", "Editor")); - version->set_text(text); - version->set_h_size_flags(Control::SIZE_EXPAND_FILL); - hbc->add_child(version); + TreeItem *ti = installed_table->create_item(installed_root); + ti->set_text(0, version_string); + + ti->add_button(0, get_theme_icon("Folder", "EditorIcons"), OPEN_TEMPLATE_FOLDER, false, TTR("Open the folder containing these templates.")); + ti->add_button(0, get_theme_icon("Remove", "EditorIcons"), UNINSTALL_TEMPLATE, false, TTR("Uninstall these templates.")); + } +} + +void ExportTemplateManager::_download_current() { + if (is_downloading_templates) { + return; + } + is_downloading_templates = true; - Button *uninstall = memnew(Button); + install_options_vb->hide(); + download_progress_hb->show(); - uninstall->set_text(TTR("Uninstall")); - hbc->add_child(uninstall); - uninstall->connect("pressed", callable_mp(this, &ExportTemplateManager::_uninstall_template), varray(E->get())); + if (mirrors_available) { + String mirror_url = _get_selected_mirror(); + if (mirror_url.is_empty()) { + _set_current_progress_status(TTR("There are no mirrors available."), true); + return; + } - installed_vb->add_child(hbc); + _download_template(mirror_url, true); + } else if (!mirrors_available && !is_refreshing_mirrors) { + _set_current_progress_status(TTR("Retrieving the mirror list...")); + _refresh_mirrors(); } } -void ExportTemplateManager::_download_template(const String &p_version) { - while (template_list->get_child_count()) { - memdelete(template_list->get_child(0)); - } - template_downloader->popup_centered(); - template_list_state->set_text(TTR("Retrieving mirrors, please wait...")); - template_download_progress->set_max(100); - template_download_progress->set_value(0); - request_mirror->request("https://godotengine.org/mirrorlist/" + p_version + ".json"); - template_list_state->show(); - template_download_progress->show(); +void ExportTemplateManager::_download_template(const String &p_url, bool p_skip_check) { + if (!p_skip_check && is_downloading_templates) { + return; + } + is_downloading_templates = true; + + install_options_vb->hide(); + download_progress_hb->show(); + _set_current_progress_status(TTR("Starting the download...")); + + download_templates->set_download_file(EditorPaths::get_singleton()->get_cache_dir().plus_file("tmp_templates.tpz")); + download_templates->set_use_threads(true); + + Error err = download_templates->request(p_url); + if (err != OK) { + _set_current_progress_status(TTR("Error requesting URL:") + " " + p_url, true); + return; + } + + set_process(true); + _set_current_progress_status(TTR("Connecting to the mirror...")); } -void ExportTemplateManager::_uninstall_template(const String &p_version) { - remove_confirm->set_text(vformat(TTR("Remove template version '%s'?"), p_version)); - remove_confirm->popup_centered(); - to_remove = p_version; +void ExportTemplateManager::_download_template_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) { + switch (p_status) { + case HTTPRequest::RESULT_CANT_RESOLVE: { + _set_current_progress_status(TTR("Can't resolve the requested address."), true); + } break; + case HTTPRequest::RESULT_BODY_SIZE_LIMIT_EXCEEDED: + case HTTPRequest::RESULT_CONNECTION_ERROR: + case HTTPRequest::RESULT_CHUNKED_BODY_SIZE_MISMATCH: + case HTTPRequest::RESULT_SSL_HANDSHAKE_ERROR: + case HTTPRequest::RESULT_CANT_CONNECT: { + _set_current_progress_status(TTR("Can't connect to the mirror."), true); + } break; + case HTTPRequest::RESULT_NO_RESPONSE: { + _set_current_progress_status(TTR("No response from the mirror."), true); + } break; + case HTTPRequest::RESULT_REQUEST_FAILED: { + _set_current_progress_status(TTR("Request failed."), true); + } break; + case HTTPRequest::RESULT_REDIRECT_LIMIT_REACHED: { + _set_current_progress_status(TTR("Request ended up in a redirect loop."), true); + } break; + default: { + if (p_code != 200) { + _set_current_progress_status(TTR("Request failed:") + " " + itos(p_code), true); + } else { + _set_current_progress_status(TTR("Download complete; extracting templates...")); + String path = download_templates->get_download_file(); + + is_downloading_templates = false; + bool ret = _install_file_selected(path, true); + if (ret) { + // Clean up downloaded file. + DirAccessRef da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); + Error err = da->remove(path); + if (err != OK) { + EditorNode::get_singleton()->add_io_error(TTR("Cannot remove temporary file:") + "\n" + path + "\n"); + } + } else { + EditorNode::get_singleton()->add_io_error(vformat(TTR("Templates installation failed.\nThe problematic templates archives can be found at '%s'."), path)); + } + } + } break; + } + + set_process(false); } -void ExportTemplateManager::_uninstall_template_confirm() { - DirAccessRef da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); - const String &templates_dir = EditorSettings::get_singleton()->get_templates_dir(); - Error err = da->change_dir(templates_dir); - ERR_FAIL_COND_MSG(err != OK, "Could not access templates directory at '" + templates_dir + "'."); - err = da->change_dir(to_remove); - ERR_FAIL_COND_MSG(err != OK, "Could not access templates directory at '" + templates_dir.plus_file(to_remove) + "'."); +void ExportTemplateManager::_cancel_template_download() { + if (!is_downloading_templates) { + return; + } - err = da->erase_contents_recursive(); - ERR_FAIL_COND_MSG(err != OK, "Could not remove all templates in '" + templates_dir.plus_file(to_remove) + "'."); + download_templates->cancel_request(); + download_progress_hb->hide(); + install_options_vb->show(); + is_downloading_templates = false; +} - da->change_dir(".."); - err = da->remove(to_remove); - ERR_FAIL_COND_MSG(err != OK, "Could not remove templates directory at '" + templates_dir.plus_file(to_remove) + "'."); +void ExportTemplateManager::_refresh_mirrors() { + if (is_refreshing_mirrors) { + return; + } + is_refreshing_mirrors = true; + + String current_version = VERSION_FULL_CONFIG; + const String mirrors_metadata_url = "https://godotengine.org/mirrorlist/" + current_version + ".json"; + request_mirrors->request(mirrors_metadata_url); +} + +void ExportTemplateManager::_refresh_mirrors_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) { + if (p_status != HTTPRequest::RESULT_SUCCESS || p_code != 200) { + EditorNode::get_singleton()->show_warning(TTR("Error getting the list of mirrors.")); + is_refreshing_mirrors = false; + if (is_downloading_templates) { + _cancel_template_download(); + } + return; + } + + String response_json; + { + const uint8_t *r = p_data.ptr(); + response_json.parse_utf8((const char *)r, p_data.size()); + } + + Variant response; + String errs; + int errline; + Error err = JSON::parse(response_json, response, errs, errline); + if (err != OK) { + EditorNode::get_singleton()->show_warning(TTR("Error parsing JSON with the list of mirrors. Please report this issue!")); + is_refreshing_mirrors = false; + if (is_downloading_templates) { + _cancel_template_download(); + } + return; + } + + mirrors_list->clear(); + mirrors_list->add_item(TTR("Best available mirror"), 0); + + mirrors_available = false; + + Dictionary data = response; + if (data.has("mirrors")) { + Array mirrors = data["mirrors"]; + + for (int i = 0; i < mirrors.size(); i++) { + Dictionary m = mirrors[i]; + ERR_CONTINUE(!m.has("url") || !m.has("name")); + + mirrors_list->add_item(m["name"]); + mirrors_list->set_item_metadata(i + 1, m["url"]); + + mirrors_available = true; + } + } + if (!mirrors_available) { + EditorNode::get_singleton()->show_warning(TTR("No download links found for this version. Direct download is only available for official releases.")); + if (is_downloading_templates) { + _cancel_template_download(); + } + } + + is_refreshing_mirrors = false; + + if (is_downloading_templates) { + String mirror_url = _get_selected_mirror(); + if (mirror_url.is_empty()) { + _set_current_progress_status(TTR("There are no mirrors available."), true); + return; + } + + _download_template(mirror_url, true); + } +} + +bool ExportTemplateManager::_humanize_http_status(HTTPRequest *p_request, String *r_status, int *r_downloaded_bytes, int *r_total_bytes) { + *r_status = ""; + *r_downloaded_bytes = -1; + *r_total_bytes = -1; + bool success = true; + + switch (p_request->get_http_client_status()) { + case HTTPClient::STATUS_DISCONNECTED: + *r_status = TTR("Disconnected"); + success = false; + break; + case HTTPClient::STATUS_RESOLVING: + *r_status = TTR("Resolving"); + break; + case HTTPClient::STATUS_CANT_RESOLVE: + *r_status = TTR("Can't Resolve"); + success = false; + break; + case HTTPClient::STATUS_CONNECTING: + *r_status = TTR("Connecting..."); + break; + case HTTPClient::STATUS_CANT_CONNECT: + *r_status = TTR("Can't Connect"); + success = false; + break; + case HTTPClient::STATUS_CONNECTED: + *r_status = TTR("Connected"); + break; + case HTTPClient::STATUS_REQUESTING: + *r_status = TTR("Requesting..."); + break; + case HTTPClient::STATUS_BODY: + *r_status = TTR("Downloading"); + *r_downloaded_bytes = p_request->get_downloaded_bytes(); + *r_total_bytes = p_request->get_body_size(); + + if (p_request->get_body_size() > 0) { + *r_status += " " + String::humanize_size(p_request->get_downloaded_bytes()) + "/" + String::humanize_size(p_request->get_body_size()); + } else { + *r_status += " " + String::humanize_size(p_request->get_downloaded_bytes()); + } + break; + case HTTPClient::STATUS_CONNECTION_ERROR: + *r_status = TTR("Connection Error"); + success = false; + break; + case HTTPClient::STATUS_SSL_HANDSHAKE_ERROR: + *r_status = TTR("SSL Handshake Error"); + success = false; + break; + } + + return success; +} + +void ExportTemplateManager::_set_current_progress_status(const String &p_status, bool p_error) { + download_progress_bar->hide(); + download_progress_label->set_text(p_status); + + if (p_error) { + download_progress_label->add_theme_color_override("font_color", get_theme_color("error_color", "Editor")); + } else { + download_progress_label->add_theme_color_override("font_color", get_theme_color("font_color", "Label")); + } +} + +void ExportTemplateManager::_set_current_progress_value(float p_value, const String &p_status) { + download_progress_bar->show(); + download_progress_bar->set_value(p_value); + download_progress_label->set_text(p_status); +} - _update_template_list(); +void ExportTemplateManager::_install_file() { + install_file_dialog->popup_file_dialog(); } -bool ExportTemplateManager::_install_from_file(const String &p_file, bool p_use_progress) { +bool ExportTemplateManager::_install_file_selected(const String &p_file, bool p_skip_progress) { // unzClose() will take care of closing the file stored in the unzFile, // so we don't need to `memdelete(fa)` in this method. FileAccess *fa = nullptr; @@ -183,12 +378,13 @@ bool ExportTemplateManager::_install_from_file(const String &p_file, bool p_use_ unzFile pkg = unzOpen2(p_file.utf8().get_data(), &io); if (!pkg) { - EditorNode::get_singleton()->show_warning(TTR("Can't open export templates zip.")); + EditorNode::get_singleton()->show_warning(TTR("Can't open the export templates file.")); return false; } int ret = unzGoToFirstFile(pkg); - int fc = 0; //count them and find version + // Count them and find version. + int fc = 0; String version; String contents_dir; @@ -198,12 +394,11 @@ bool ExportTemplateManager::_install_from_file(const String &p_file, bool p_use_ ret = unzGetCurrentFileInfo(pkg, &info, fname, 16384, nullptr, 0, nullptr, 0); String file = fname; - if (file.ends_with("version.txt")) { Vector<uint8_t> data; data.resize(info.uncompressed_size); - //read + // Read. unzOpenCurrentFile(pkg); ret = unzReadCurrentFile(pkg, data.ptrw(), data.size()); unzCloseCurrentFile(pkg); @@ -215,7 +410,7 @@ bool ExportTemplateManager::_install_from_file(const String &p_file, bool p_use_ // Version number should be of the form major.minor[.patch].status[.module_config] // so it can in theory have 3 or more slices. if (data_str.get_slice_count(".") < 3) { - EditorNode::get_singleton()->show_warning(vformat(TTR("Invalid version.txt format inside templates: %s."), data_str)); + EditorNode::get_singleton()->show_warning(vformat(TTR("Invalid version.txt format inside the export templates file: %s."), data_str)); unzClose(pkg); return false; } @@ -232,32 +427,29 @@ bool ExportTemplateManager::_install_from_file(const String &p_file, bool p_use_ } if (version == String()) { - EditorNode::get_singleton()->show_warning(TTR("No version.txt found inside templates.")); + EditorNode::get_singleton()->show_warning(TTR("No version.txt found inside the export templates file.")); unzClose(pkg); return false; } - String template_path = EditorSettings::get_singleton()->get_templates_dir().plus_file(version); - DirAccessRef d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); + String template_path = EditorSettings::get_singleton()->get_templates_dir().plus_file(version); Error err = d->make_dir_recursive(template_path); if (err != OK) { - EditorNode::get_singleton()->show_warning(TTR("Error creating path for templates:") + "\n" + template_path); + EditorNode::get_singleton()->show_warning(TTR("Error creating path for extracting templates:") + "\n" + template_path); unzClose(pkg); return false; } - ret = unzGoToFirstFile(pkg); - EditorProgress *p = nullptr; - if (p_use_progress) { + if (!p_skip_progress) { p = memnew(EditorProgress("ltask", TTR("Extracting Export Templates"), fc)); } fc = 0; - + ret = unzGoToFirstFile(pkg); while (ret == UNZ_OK) { - //get filename + // Get filename. unz_file_info info; char fname[16384]; unzGetCurrentFileInfo(pkg, &info, fname, 16384, nullptr, 0, nullptr, 0); @@ -274,7 +466,7 @@ bool ExportTemplateManager::_install_from_file(const String &p_file, bool p_use_ Vector<uint8_t> data; data.resize(info.uncompressed_size); - //read + // Read unzOpenCurrentFile(pkg); unzReadCurrentFile(pkg, data.ptrw(), data.size()); unzCloseCurrentFile(pkg); @@ -322,216 +514,116 @@ bool ExportTemplateManager::_install_from_file(const String &p_file, bool p_use_ if (p) { memdelete(p); } - unzClose(pkg); - _update_template_list(); + _update_template_status(); return true; } -void ExportTemplateManager::popup_manager() { - _update_template_list(); - popup_centered(Size2(400, 400) * EDSCALE); -} - -void ExportTemplateManager::ok_pressed() { - template_open->popup_file_dialog(); +void ExportTemplateManager::_uninstall_template(const String &p_version) { + uninstall_confirm->set_text(vformat(TTR("Remove templates for the version '%s'?"), p_version)); + uninstall_confirm->popup_centered(); + uninstall_version = p_version; } -void ExportTemplateManager::_http_download_mirror_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) { - if (p_status != HTTPRequest::RESULT_SUCCESS || p_code != 200) { - EditorNode::get_singleton()->show_warning(TTR("Error getting the list of mirrors.")); - return; - } +void ExportTemplateManager::_uninstall_template_confirmed() { + DirAccessRef da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); + const String &templates_dir = EditorSettings::get_singleton()->get_templates_dir(); - String mirror_str; - { - const uint8_t *r = p_data.ptr(); - mirror_str.parse_utf8((const char *)r, p_data.size()); - } + Error err = da->change_dir(templates_dir); + ERR_FAIL_COND_MSG(err != OK, "Could not access templates directory at '" + templates_dir + "'."); + err = da->change_dir(uninstall_version); + ERR_FAIL_COND_MSG(err != OK, "Could not access templates directory at '" + templates_dir.plus_file(uninstall_version) + "'."); - template_list_state->hide(); - template_download_progress->hide(); + err = da->erase_contents_recursive(); + ERR_FAIL_COND_MSG(err != OK, "Could not remove all templates in '" + templates_dir.plus_file(uninstall_version) + "'."); - Variant r; - String errs; - int errline; - Error err = JSON::parse(mirror_str, r, errs, errline); - if (err != OK) { - EditorNode::get_singleton()->show_warning(TTR("Error parsing JSON of mirror list. Please report this issue!")); - return; - } + da->change_dir(".."); + err = da->remove(uninstall_version); + ERR_FAIL_COND_MSG(err != OK, "Could not remove templates directory at '" + templates_dir.plus_file(uninstall_version) + "'."); - bool mirrors_found = false; + _update_template_status(); +} - Dictionary d = r; - if (d.has("mirrors")) { - Array mirrors = d["mirrors"]; - for (int i = 0; i < mirrors.size(); i++) { - Dictionary m = mirrors[i]; - ERR_CONTINUE(!m.has("url") || !m.has("name")); - LinkButton *lb = memnew(LinkButton); - lb->set_text(m["name"]); - lb->connect("pressed", callable_mp(this, &ExportTemplateManager::_begin_template_download), varray(m["url"])); - template_list->add_child(lb); - mirrors_found = true; - } +String ExportTemplateManager::_get_selected_mirror() const { + if (mirrors_list->get_item_count() == 1) { + return ""; } - if (!mirrors_found) { - EditorNode::get_singleton()->show_warning(TTR("No download links found for this version. Direct download is only available for official releases.")); - return; + int selected = mirrors_list->get_selected_id(); + if (selected == 0) { + // This is a special "best available" value; so pick the first available mirror from the rest of the list. + selected = 1; } + + return mirrors_list->get_item_metadata(selected); } -void ExportTemplateManager::_http_download_templates_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) { - switch (p_status) { - case HTTPRequest::RESULT_CANT_RESOLVE: { - template_list_state->set_text(TTR("Can't resolve.")); - } break; - case HTTPRequest::RESULT_BODY_SIZE_LIMIT_EXCEEDED: - case HTTPRequest::RESULT_CONNECTION_ERROR: - case HTTPRequest::RESULT_CHUNKED_BODY_SIZE_MISMATCH: - case HTTPRequest::RESULT_SSL_HANDSHAKE_ERROR: - case HTTPRequest::RESULT_CANT_CONNECT: { - template_list_state->set_text(TTR("Can't connect.")); - } break; - case HTTPRequest::RESULT_NO_RESPONSE: { - template_list_state->set_text(TTR("No response.")); - } break; - case HTTPRequest::RESULT_REQUEST_FAILED: { - template_list_state->set_text(TTR("Request Failed.")); - } break; - case HTTPRequest::RESULT_REDIRECT_LIMIT_REACHED: { - template_list_state->set_text(TTR("Redirect Loop.")); +void ExportTemplateManager::_mirror_options_button_cbk(int p_id) { + switch (p_id) { + case VISIT_WEB_MIRROR: { + String mirror_url = _get_selected_mirror(); + if (mirror_url.is_empty()) { + EditorNode::get_singleton()->show_warning(TTR("There are no mirrors available.")); + return; + } + + OS::get_singleton()->shell_open(mirror_url); } break; - default: { - if (p_code != 200) { - template_list_state->set_text(TTR("Failed:") + " " + itos(p_code)); - } else { - String path = download_templates->get_download_file(); - template_list_state->set_text(TTR("Download Complete.")); - template_downloader->hide(); - bool ret = _install_from_file(path, false); - if (ret) { - // Clean up downloaded file. - DirAccessRef da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); - Error err = da->remove(path); - if (err != OK) { - EditorNode::get_singleton()->add_io_error(TTR("Cannot remove temporary file:") + "\n" + path + "\n"); - } - } else { - EditorNode::get_singleton()->add_io_error(vformat(TTR("Templates installation failed.\nThe problematic templates archives can be found at '%s'."), path)); - } + + case COPY_MIRROR_URL: { + String mirror_url = _get_selected_mirror(); + if (mirror_url.is_empty()) { + EditorNode::get_singleton()->show_warning(TTR("There are no mirrors available.")); + return; } + + DisplayServer::get_singleton()->clipboard_set(mirror_url); } break; } - - set_process(false); } -void ExportTemplateManager::_begin_template_download(const String &p_url) { - if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { - OS::get_singleton()->shell_open(p_url); +void ExportTemplateManager::_installed_table_button_cbk(Object *p_item, int p_column, int p_id) { + TreeItem *ti = Object::cast_to<TreeItem>(p_item); + if (!ti) { return; } - for (int i = 0; i < template_list->get_child_count(); i++) { - BaseButton *b = Object::cast_to<BaseButton>(template_list->get_child(0)); - if (b) { - b->set_disabled(true); - } - } - - download_data.clear(); - download_templates->set_download_file(EditorPaths::get_singleton()->get_cache_dir().plus_file("tmp_templates.tpz")); - download_templates->set_use_threads(true); + switch (p_id) { + case OPEN_TEMPLATE_FOLDER: { + String version_string = ti->get_text(0); + _open_template_folder(version_string); + } break; - Error err = download_templates->request(p_url); - if (err != OK) { - EditorNode::get_singleton()->show_warning(TTR("Error requesting URL:") + " " + p_url); - return; + case UNINSTALL_TEMPLATE: { + String version_string = ti->get_text(0); + _uninstall_template(version_string); + } break; } +} - set_process(true); - - template_list_state->show(); - template_download_progress->set_max(100); - template_download_progress->set_value(0); - template_download_progress->show(); - template_list_state->set_text(TTR("Connecting to Mirror...")); +void ExportTemplateManager::_open_template_folder(const String &p_version) { + const String &templates_dir = EditorSettings::get_singleton()->get_templates_dir(); + OS::get_singleton()->shell_open("file://" + templates_dir.plus_file(p_version)); } -void ExportTemplateManager::_window_template_downloader_closed() { - download_templates->cancel_request(); +void ExportTemplateManager::popup_manager() { + _update_template_status(); + _refresh_mirrors(); + popup_centered(Size2(720, 280) * EDSCALE); } -void ExportTemplateManager::_notification(int p_what) { - if (p_what == NOTIFICATION_VISIBILITY_CHANGED) { - if (!is_visible()) { - set_process(false); - } +void ExportTemplateManager::ok_pressed() { + if (!is_downloading_templates) { + hide(); + return; } - if (p_what == NOTIFICATION_PROCESS) { - update_countdown -= get_process_delta_time(); - if (update_countdown > 0) { - return; - } - update_countdown = 0.5; - String status; - bool errored = false; - - switch (download_templates->get_http_client_status()) { - case HTTPClient::STATUS_DISCONNECTED: - status = TTR("Disconnected"); - errored = true; - break; - case HTTPClient::STATUS_RESOLVING: - status = TTR("Resolving"); - break; - case HTTPClient::STATUS_CANT_RESOLVE: - status = TTR("Can't Resolve"); - errored = true; - break; - case HTTPClient::STATUS_CONNECTING: - status = TTR("Connecting..."); - break; - case HTTPClient::STATUS_CANT_CONNECT: - status = TTR("Can't Connect"); - errored = true; - break; - case HTTPClient::STATUS_CONNECTED: - status = TTR("Connected"); - break; - case HTTPClient::STATUS_REQUESTING: - status = TTR("Requesting..."); - break; - case HTTPClient::STATUS_BODY: - status = TTR("Downloading"); - if (download_templates->get_body_size() > 0) { - status += " " + String::humanize_size(download_templates->get_downloaded_bytes()) + "/" + String::humanize_size(download_templates->get_body_size()); - template_download_progress->set_max(download_templates->get_body_size()); - template_download_progress->set_value(download_templates->get_downloaded_bytes()); - } else { - status += " " + String::humanize_size(download_templates->get_downloaded_bytes()); - } - break; - case HTTPClient::STATUS_CONNECTION_ERROR: - status = TTR("Connection Error"); - errored = true; - break; - case HTTPClient::STATUS_SSL_HANDSHAKE_ERROR: - status = TTR("SSL Handshake Error"); - errored = true; - break; - } + hide_dialog_accept->popup_centered(); +} - template_list_state->set_text(status); - if (errored) { - set_process(false); - } - } +void ExportTemplateManager::_hide_dialog() { + hide(); } bool ExportTemplateManager::can_install_android_template() { @@ -643,72 +735,246 @@ Error ExportTemplateManager::install_android_template() { return OK; } -void ExportTemplateManager::_bind_methods() { -} +void ExportTemplateManager::_notification(int p_what) { + switch (p_what) { + case NOTIFICATION_ENTER_TREE: + case NOTIFICATION_THEME_CHANGED: { + current_value->add_theme_font_override("font", get_theme_font("main", "EditorFonts")); + current_missing_label->add_theme_color_override("font_color", get_theme_color("error_color", "Editor")); + current_installed_label->add_theme_color_override("font_color", get_theme_color("disabled_font_color", "Editor")); + + mirror_options_button->set_icon(get_theme_icon("GuiTabMenu", "EditorIcons")); + } break; -ExportTemplateManager::ExportTemplateManager() { - VBoxContainer *main_vb = memnew(VBoxContainer); - add_child(main_vb); + case NOTIFICATION_VISIBILITY_CHANGED: { + if (!is_visible()) { + set_process(false); + } else if (is_visible() && is_downloading_templates) { + set_process(true); + } + } break; - current_hb = memnew(HBoxContainer); - main_vb->add_margin_child(TTR("Current Version:"), current_hb, false); + case NOTIFICATION_PROCESS: { + update_countdown -= get_process_delta_time(); + if (update_countdown > 0) { + return; + } + update_countdown = 0.5; - installed_scroll = memnew(ScrollContainer); - main_vb->add_margin_child(TTR("Other Installed Versions:"), installed_scroll, true); + String status; + int downloaded_bytes; + int total_bytes; + bool success = _humanize_http_status(download_templates, &status, &downloaded_bytes, &total_bytes); - installed_vb = memnew(VBoxContainer); - installed_scroll->add_child(installed_vb); - installed_scroll->set_enable_v_scroll(true); - installed_scroll->set_enable_h_scroll(false); - installed_vb->set_h_size_flags(Control::SIZE_EXPAND_FILL); + if (downloaded_bytes >= 0) { + if (total_bytes > 0) { + _set_current_progress_value(float(downloaded_bytes) / total_bytes, status); + } else { + _set_current_progress_value(0, status); + } + } else { + _set_current_progress_status(status); + } - get_cancel_button()->set_text(TTR("Close")); - get_ok_button()->set_text(TTR("Install From File")); + if (!success) { + set_process(false); + } + } break; - remove_confirm = memnew(ConfirmationDialog); - remove_confirm->set_title(TTR("Remove Template")); - add_child(remove_confirm); - remove_confirm->connect("confirmed", callable_mp(this, &ExportTemplateManager::_uninstall_template_confirm)); + case NOTIFICATION_WM_CLOSE_REQUEST: { + // This won't stop the window from closing, but will show the alert if the download is active. + ok_pressed(); + } break; + } +} - template_open = memnew(FileDialog); - template_open->set_title(TTR("Select Template File")); - template_open->add_filter("*.tpz ; " + TTR("Godot Export Templates")); - template_open->set_access(FileDialog::ACCESS_FILESYSTEM); - template_open->set_file_mode(FileDialog::FILE_MODE_OPEN_FILE); - template_open->connect("file_selected", callable_mp(this, &ExportTemplateManager::_install_from_file), varray(true)); - add_child(template_open); +void ExportTemplateManager::_bind_methods() { +} +ExportTemplateManager::ExportTemplateManager() { set_title(TTR("Export Template Manager")); set_hide_on_ok(false); + get_ok_button()->set_text(TTR("Close")); + + // Downloadable export templates are only available for stable and official alpha/beta/RC builds + // (which always have a number following their status, e.g. "alpha1"). + // Therefore, don't display download-related features when using a development version + // (whose builds aren't numbered). + downloads_available = + String(VERSION_STATUS) != String("dev") && + String(VERSION_STATUS) != String("alpha") && + String(VERSION_STATUS) != String("beta") && + String(VERSION_STATUS) != String("rc"); + + VBoxContainer *main_vb = memnew(VBoxContainer); + add_child(main_vb); + + // Current version controls. + HBoxContainer *current_hb = memnew(HBoxContainer); + main_vb->add_child(current_hb); + + Label *current_label = memnew(Label); + current_label->set_text(TTR("Current Version:")); + current_hb->add_child(current_label); + + current_value = memnew(Label); + current_hb->add_child(current_value); + + // Current version statuses. + // Status: Current version is missing. + current_missing_label = memnew(Label); + current_missing_label->set_h_size_flags(Control::SIZE_EXPAND_FILL); + current_missing_label->set_align(Label::ALIGN_RIGHT); + current_missing_label->set_text(TTR("Export templates are missing. Download them or install from a file.")); + current_hb->add_child(current_missing_label); + + // Status: Current version is installed. + current_installed_label = memnew(Label); + current_installed_label->set_h_size_flags(Control::SIZE_EXPAND_FILL); + current_installed_label->set_align(Label::ALIGN_RIGHT); + current_installed_label->set_text(TTR("Export templates are installed and ready to be used.")); + current_hb->add_child(current_installed_label); + current_installed_label->hide(); + + // Currently installed template. + current_installed_hb = memnew(HBoxContainer); + main_vb->add_child(current_installed_hb); + + current_installed_path = memnew(LineEdit); + current_installed_path->set_editable(false); + current_installed_path->set_h_size_flags(Control::SIZE_EXPAND_FILL); + current_installed_hb->add_child(current_installed_path); + + current_open_button = memnew(Button); + current_open_button->set_text(TTR("Open Folder")); + current_open_button->set_tooltip(TTR("Open the folder containing installed templates for the current version.")); + current_installed_hb->add_child(current_open_button); + current_open_button->connect("pressed", callable_mp(this, &ExportTemplateManager::_open_template_folder), varray(VERSION_FULL_CONFIG)); + + current_uninstall_button = memnew(Button); + current_uninstall_button->set_text(TTR("Uninstall")); + current_uninstall_button->set_tooltip(TTR("Uninstall templates for the current version.")); + current_installed_hb->add_child(current_uninstall_button); + current_uninstall_button->connect("pressed", callable_mp(this, &ExportTemplateManager::_uninstall_template), varray(VERSION_FULL_CONFIG)); + + main_vb->add_child(memnew(HSeparator)); + + // Download and install section. + HBoxContainer *install_templates_hb = memnew(HBoxContainer); + main_vb->add_child(install_templates_hb); + + // Download and install buttons are available. + install_options_vb = memnew(VBoxContainer); + install_options_vb->set_h_size_flags(Control::SIZE_EXPAND_FILL); + install_templates_hb->add_child(install_options_vb); + + HBoxContainer *download_install_hb = memnew(HBoxContainer); + install_options_vb->add_child(download_install_hb); + + Label *mirrors_label = memnew(Label); + mirrors_label->set_text(TTR("Download from:")); + download_install_hb->add_child(mirrors_label); + + mirrors_list = memnew(OptionButton); + mirrors_list->set_custom_minimum_size(Size2(280, 0) * EDSCALE); + download_install_hb->add_child(mirrors_list); + mirrors_list->add_item(TTR("Best available mirror"), 0); + + request_mirrors = memnew(HTTPRequest); + mirrors_list->add_child(request_mirrors); + request_mirrors->connect("request_completed", callable_mp(this, &ExportTemplateManager::_refresh_mirrors_completed)); + + mirror_options_button = memnew(MenuButton); + mirror_options_button->get_popup()->add_item("Open in Web Browser", VISIT_WEB_MIRROR); + mirror_options_button->get_popup()->add_item("Copy Mirror URL", COPY_MIRROR_URL); + download_install_hb->add_child(mirror_options_button); + mirror_options_button->get_popup()->connect("id_pressed", callable_mp(this, &ExportTemplateManager::_mirror_options_button_cbk)); + + download_install_hb->add_spacer(); + + Button *download_current_button = memnew(Button); + download_current_button->set_text(TTR("Download and Install")); + download_current_button->set_tooltip(TTR("Download and install templates for the current version from the best possible mirror.")); + download_install_hb->add_child(download_current_button); + download_current_button->connect("pressed", callable_mp(this, &ExportTemplateManager::_download_current)); + + // Update downloads buttons to prevent unsupported downloads. + if (!downloads_available) { + download_current_button->set_disabled(true); + download_current_button->set_tooltip(TTR("Official export templates aren't available for development builds.")); + } - request_mirror = memnew(HTTPRequest); - add_child(request_mirror); - request_mirror->connect("request_completed", callable_mp(this, &ExportTemplateManager::_http_download_mirror_completed)); + HBoxContainer *install_file_hb = memnew(HBoxContainer); + install_file_hb->set_alignment(BoxContainer::ALIGN_END); + install_options_vb->add_child(install_file_hb); + + install_file_button = memnew(Button); + install_file_button->set_text(TTR("Install from File")); + install_file_button->set_tooltip(TTR("Install templates from a local file.")); + install_file_hb->add_child(install_file_button); + install_file_button->connect("pressed", callable_mp(this, &ExportTemplateManager::_install_file)); + + // Templates are being downloaded; buttons unavailable. + download_progress_hb = memnew(HBoxContainer); + download_progress_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL); + install_templates_hb->add_child(download_progress_hb); + download_progress_hb->hide(); + + download_progress_bar = memnew(ProgressBar); + download_progress_bar->set_h_size_flags(Control::SIZE_EXPAND_FILL); + download_progress_bar->set_v_size_flags(Control::SIZE_SHRINK_CENTER); + download_progress_bar->set_min(0); + download_progress_bar->set_max(1); + download_progress_bar->set_value(0); + download_progress_bar->set_step(0.01); + download_progress_hb->add_child(download_progress_bar); + + download_progress_label = memnew(Label); + download_progress_label->set_h_size_flags(Control::SIZE_EXPAND_FILL); + download_progress_hb->add_child(download_progress_label); + + Button *download_cancel_button = memnew(Button); + download_cancel_button->set_text(TTR("Cancel")); + download_cancel_button->set_tooltip(TTR("Cancel the download of the templates.")); + download_progress_hb->add_child(download_cancel_button); + download_cancel_button->connect("pressed", callable_mp(this, &ExportTemplateManager::_cancel_template_download)); download_templates = memnew(HTTPRequest); - add_child(download_templates); - download_templates->connect("request_completed", callable_mp(this, &ExportTemplateManager::_http_download_templates_completed)); - - template_downloader = memnew(AcceptDialog); - template_downloader->set_title(TTR("Download Templates")); - template_downloader->get_ok_button()->set_text(TTR("Close")); - template_downloader->set_exclusive(true); - add_child(template_downloader); - template_downloader->connect("cancelled", callable_mp(this, &ExportTemplateManager::_window_template_downloader_closed)); - - VBoxContainer *vbc = memnew(VBoxContainer); - template_downloader->add_child(vbc); - ScrollContainer *sc = memnew(ScrollContainer); - sc->set_custom_minimum_size(Size2(400, 200) * EDSCALE); - vbc->add_margin_child(TTR("Select mirror from list: (Shift+Click: Open in Browser)"), sc); - template_list = memnew(VBoxContainer); - sc->add_child(template_list); - sc->set_enable_v_scroll(true); - sc->set_enable_h_scroll(false); - template_list_state = memnew(Label); - vbc->add_child(template_list_state); - template_download_progress = memnew(ProgressBar); - vbc->add_child(template_download_progress); - - update_countdown = 0; + install_templates_hb->add_child(download_templates); + download_templates->connect("request_completed", callable_mp(this, &ExportTemplateManager::_download_template_completed)); + + main_vb->add_child(memnew(HSeparator)); + + // Other installed templates table. + HBoxContainer *installed_versions_hb = memnew(HBoxContainer); + main_vb->add_child(installed_versions_hb); + Label *installed_label = memnew(Label); + installed_label->set_text(TTR("Other Installed Versions:")); + installed_versions_hb->add_child(installed_label); + + installed_table = memnew(Tree); + installed_table->set_hide_root(true); + installed_table->set_custom_minimum_size(Size2(0, 100) * EDSCALE); + installed_table->set_v_size_flags(Control::SIZE_EXPAND_FILL); + main_vb->add_child(installed_table); + installed_table->connect("button_pressed", callable_mp(this, &ExportTemplateManager::_installed_table_button_cbk)); + + // Dialogs. + uninstall_confirm = memnew(ConfirmationDialog); + uninstall_confirm->set_title(TTR("Uninstall Template")); + add_child(uninstall_confirm); + uninstall_confirm->connect("confirmed", callable_mp(this, &ExportTemplateManager::_uninstall_template_confirmed)); + + install_file_dialog = memnew(FileDialog); + install_file_dialog->set_title(TTR("Select Template File")); + install_file_dialog->set_access(FileDialog::ACCESS_FILESYSTEM); + install_file_dialog->set_file_mode(FileDialog::FILE_MODE_OPEN_FILE); + install_file_dialog->add_filter("*.tpz ; " + TTR("Godot Export Templates")); + install_file_dialog->connect("file_selected", callable_mp(this, &ExportTemplateManager::_install_file_selected), varray(false)); + add_child(install_file_dialog); + + hide_dialog_accept = memnew(AcceptDialog); + hide_dialog_accept->set_text(TTR("The templates will continue to download.\nYou may experience a short editor freeze when they finish.")); + add_child(hide_dialog_accept); + hide_dialog_accept->connect("confirmed", callable_mp(this, &ExportTemplateManager::_hide_dialog)); } diff --git a/editor/export_template_manager.h b/editor/export_template_manager.h index 3de74e17d8..f145c6c0f5 100644 --- a/editor/export_template_manager.h +++ b/editor/export_template_manager.h @@ -34,50 +34,87 @@ #include "editor/editor_settings.h" #include "scene/gui/dialogs.h" #include "scene/gui/file_dialog.h" +#include "scene/gui/menu_button.h" #include "scene/gui/progress_bar.h" #include "scene/gui/scroll_container.h" #include "scene/main/http_request.h" class ExportTemplateVersion; -class ExportTemplateManager : public ConfirmationDialog { - GDCLASS(ExportTemplateManager, ConfirmationDialog); +class ExportTemplateManager : public AcceptDialog { + GDCLASS(ExportTemplateManager, AcceptDialog); + + bool current_version_exists = false; + bool downloads_available = true; + bool mirrors_available = false; + bool is_refreshing_mirrors = false; + bool is_downloading_templates = false; + float update_countdown = 0; + + Label *current_value; + Label *current_missing_label; + Label *current_installed_label; + + HBoxContainer *current_installed_hb; + LineEdit *current_installed_path; + Button *current_open_button; + Button *current_uninstall_button; + + VBoxContainer *install_options_vb; + OptionButton *mirrors_list; + + enum MirrorAction { + VISIT_WEB_MIRROR, + COPY_MIRROR_URL, + }; + + MenuButton *mirror_options_button; + HBoxContainer *download_progress_hb; + ProgressBar *download_progress_bar; + Label *download_progress_label; + HTTPRequest *download_templates; + Button *install_file_button; + HTTPRequest *request_mirrors; - AcceptDialog *template_downloader; - VBoxContainer *template_list; - Label *template_list_state; - ProgressBar *template_download_progress; + enum TemplatesAction { + OPEN_TEMPLATE_FOLDER, + UNINSTALL_TEMPLATE, + }; - ScrollContainer *installed_scroll; - VBoxContainer *installed_vb; - HBoxContainer *current_hb; - FileDialog *template_open; + Tree *installed_table; - ConfirmationDialog *remove_confirm; - String to_remove; + ConfirmationDialog *uninstall_confirm; + String uninstall_version; + FileDialog *install_file_dialog; + AcceptDialog *hide_dialog_accept; - HTTPRequest *request_mirror; - HTTPRequest *download_templates; + void _update_template_status(); - Vector<uint8_t> download_data; + void _download_current(); + void _download_template(const String &p_url, bool p_skip_check = false); + void _download_template_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data); + void _cancel_template_download(); + void _refresh_mirrors(); + void _refresh_mirrors_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data); - float update_countdown; + bool _humanize_http_status(HTTPRequest *p_request, String *r_status, int *r_downloaded_bytes, int *r_total_bytes); + void _set_current_progress_status(const String &p_status, bool p_error = false); + void _set_current_progress_value(float p_value, const String &p_status); - void _update_template_list(); + void _install_file(); + bool _install_file_selected(const String &p_file, bool p_skip_progress = false); - void _download_template(const String &p_version); void _uninstall_template(const String &p_version); - void _uninstall_template_confirm(); + void _uninstall_template_confirmed(); - virtual void ok_pressed() override; - bool _install_from_file(const String &p_file, bool p_use_progress = true); + String _get_selected_mirror() const; + void _mirror_options_button_cbk(int p_id); + void _installed_table_button_cbk(Object *p_item, int p_column, int p_id); - void _http_download_mirror_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data); - void _http_download_templates_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data); + void _open_template_folder(const String &p_version); - void _begin_template_download(const String &p_url); - - void _window_template_downloader_closed(); + virtual void ok_pressed() override; + void _hide_dialog(); protected: void _notification(int p_what); diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index a21a33a44a..46bb6a1632 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -31,9 +31,9 @@ #include "filesystem_dock.h" #include "core/config/project_settings.h" +#include "core/io/dir_access.h" +#include "core/io/file_access.h" #include "core/io/resource_loader.h" -#include "core/os/dir_access.h" -#include "core/os/file_access.h" #include "core/os/keyboard.h" #include "core/os/os.h" #include "core/templates/list.h" @@ -2751,9 +2751,9 @@ void FileSystemDock::_bind_methods() { ClassDB::bind_method(D_METHOD("_tree_thumbnail_done"), &FileSystemDock::_tree_thumbnail_done); ClassDB::bind_method(D_METHOD("_select_file"), &FileSystemDock::_select_file); - ClassDB::bind_method(D_METHOD("get_drag_data_fw", "position", "from"), &FileSystemDock::get_drag_data_fw); - ClassDB::bind_method(D_METHOD("can_drop_data_fw", "position", "data", "from"), &FileSystemDock::can_drop_data_fw); - ClassDB::bind_method(D_METHOD("drop_data_fw", "position", "data", "from"), &FileSystemDock::drop_data_fw); + ClassDB::bind_method(D_METHOD("_get_drag_data_fw", "position", "from"), &FileSystemDock::get_drag_data_fw); + ClassDB::bind_method(D_METHOD("_can_drop_data_fw", "position", "data", "from"), &FileSystemDock::can_drop_data_fw); + ClassDB::bind_method(D_METHOD("_drop_data_fw", "position", "data", "from"), &FileSystemDock::drop_data_fw); ClassDB::bind_method(D_METHOD("navigate_to_path", "path"), &FileSystemDock::navigate_to_path); ClassDB::bind_method(D_METHOD("_update_import_dock"), &FileSystemDock::_update_import_dock); @@ -2777,22 +2777,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { // `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); - -#if defined(WINDOWS_ENABLED) - // TRANSLATORS: This string is only used on Windows, as it refers to the system trash - // as "Recycle Bin" instead of "Trash". Make sure to use the translation of "Recycle Bin" - // recommended by Microsoft for the target language. - ED_SHORTCUT("filesystem_dock/delete", TTR("Move to Recycle Bin"), KEY_DELETE); -#elif defined(OSX_ENABLED) - // TRANSLATORS: This string is only used on macOS, as it refers to the system trash - // as "Bin" instead of "Trash". Make sure to use the translation of "Bin" - // recommended by Apple for the target language. - ED_SHORTCUT("filesystem_dock/delete", TTR("Move to Bin"), KEY_DELETE); -#else - // TRANSLATORS: This string is only used on platforms other than Windows and macOS. - ED_SHORTCUT("filesystem_dock/delete", TTR("Move to Trash"), KEY_DELETE); -#endif - + ED_SHORTCUT("filesystem_dock/delete", TTR("Delete"), KEY_DELETE); ED_SHORTCUT("filesystem_dock/rename", TTR("Rename..."), KEY_F2); VBoxContainer *top_vbc = memnew(VBoxContainer); @@ -2834,6 +2819,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { button_toggle_display_mode->connect("toggled", callable_mp(this, &FileSystemDock::_toggle_split_mode)); button_toggle_display_mode->set_focus_mode(FOCUS_NONE); button_toggle_display_mode->set_tooltip(TTR("Toggle Split Mode")); + button_toggle_display_mode->set_flat(true); toolbar_hbc->add_child(button_toggle_display_mode); toolbar2_hbc = memnew(HBoxContainer); diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h index 8783c402cd..12c567fb69 100644 --- a/editor/filesystem_dock.h +++ b/editor/filesystem_dock.h @@ -43,7 +43,7 @@ #include "scene/gui/tree.h" #include "scene/main/timer.h" -#include "core/os/dir_access.h" +#include "core/io/dir_access.h" #include "core/os/thread.h" #include "create_dialog.h" diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp index d9b956ed08..17d24a295c 100644 --- a/editor/find_in_files.cpp +++ b/editor/find_in_files.cpp @@ -30,7 +30,7 @@ #include "find_in_files.h" -#include "core/os/dir_access.h" +#include "core/io/dir_access.h" #include "core/os/os.h" #include "editor_node.h" #include "editor_scale.h" diff --git a/editor/icons/2D.svg b/editor/icons/2D.svg index afb9f4b45f..fdd2e473e3 100644 --- a/editor/icons/2D.svg +++ b/editor/icons/2D.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3.9844 1.002a1.0001 1.0001 0 0 0 -.69141.29102l-2 2a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l.29297-.29297v8.5859h8.5859l-.29297.29297a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l2-2a1.0001 1.0001 0 0 0 0-1.4141l-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-6.5859v-6.5859l.29297.29297a1 1 0 0 0 1.4141 0 1 1 0 0 0 0-1.4141l-2-2a1.0001 1.0001 0 0 0 -.72266-.29102z" fill="#e0e0e0"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3.984375 15a1 1 0 0 1 -.6914062-.291316l-2-2a1 1 0 0 1 0-1.414062 1 1 0 0 1 1.4140624 0l.2929688.292968v-8.5859371h8.585938l-.292969-.292969a1 1 0 0 1 0-1.414062 1 1 0 0 1 1.414062 0l2 2a1 1 0 0 1 0 1.414062l-2 2.0000002a1 1 0 0 1 -.720703.2910157 1 1 0 0 1 -.693359-.2910157 1 1 0 0 1 0-1.4140622l.292969-.292969h-6.585938v6.5859371l.2929688-.292968a1 1 0 0 1 1.4140624 0 1 1 0 0 1 0 1.414062l-2 2a1 1 0 0 1 -.7226562.291316z" fill="#e0e0e0"/></svg> diff --git a/editor/icons/KinematicBody2D.svg b/editor/icons/CharacterBody2D.svg index b71fda9650..b71fda9650 100644 --- a/editor/icons/KinematicBody2D.svg +++ b/editor/icons/CharacterBody2D.svg diff --git a/editor/icons/KinematicBody3D.svg b/editor/icons/CharacterBody3D.svg index d0def4f14a..d0def4f14a 100644 --- a/editor/icons/KinematicBody3D.svg +++ b/editor/icons/CharacterBody3D.svg diff --git a/editor/icons/Gradient.svg b/editor/icons/Gradient.svg index 47dde294fc..99d3a871a6 100644 --- a/editor/icons/Gradient.svg +++ b/editor/icons/Gradient.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="10" x2="10" y1="1" y2="15"><stop offset="0" stop-color="#e0e0e0"/><stop offset="1" stop-color="#e0e0e0" stop-opacity="0"/></linearGradient><path d="m2 1c-.55228 0-1 .44772-1 1v12c0 .55228.44772 1 1 1h12c.55228 0 1-.44772 1-1v-12c0-.55228-.44772-1-1-1z" fill="url(#a)"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0"><path d="m3 1c-1.1046 0-2 .8954299-2 1.9999999v10.0000001c0 1.1046.89543 2 2 2h10c1.1046 0 2-.89543 2-2v-10.0000001c0-1.1046-.89543-1.9999999-2-1.9999999zm0 1.9999999h10v10.0000001h-10z"/><path d="m7.5 5.500001h1v1h-1z" stroke-width=".787342"/><path d="m3.5 3.5v9h3v-1h1v-1h-1v-1h1v-1h-1v-1h1v-1h-1v-1h1v-1h-1v-1z" stroke-width="4.09116"/><g stroke-width=".787342"><path d="m7.5 3.5h1v1h-1z"/><path d="m7.5 9.500001h1v1h-1z"/><path d="m7.5 7.500001h1v1h-1z"/><path d="m7.5 11.5h1v1h-1z"/><path d="m8.5 4.500001h1v1h-1z"/><path d="m8.5 6.500001h1v1h-1z"/><path d="m8.5 8.500002h1v1h-1z"/><path d="m8.5 10.500002h1v1h-1z"/></g></g></svg> diff --git a/editor/icons/GradientTexture.svg b/editor/icons/GradientTexture.svg index ec4c4546e1..fa03e69805 100644 --- a/editor/icons/GradientTexture.svg +++ b/editor/icons/GradientTexture.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="10" x2="10" y1="1" y2="15"><stop offset="0" stop-color="#e0e0e0"/><stop offset="1" stop-color="#e0e0e0" stop-opacity="0"/></linearGradient><g transform="translate(0 -1036.4)"><path d="m2 1a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-12a1 1 0 0 0 -1-1zm1 2h10v8h-10z" fill="url(#a)" transform="translate(0 1036.4)"/><g fill="#e0e0e0"><path d="m6 1043.4h2v1h-2z"/><path d="m6 1044.4h2v2h-2z"/><path d="m4 1045.4h2v1h-2z"/><path d="m8 1044.4h2v2h-2z"/><path d="m10 1044.4h2v2h-2z"/><path d="m8 1042.4h3v2h-3z"/><path d="m9 1041.4h1v1h-1z"/><path d="m5 1044.4h1v1h-1z"/></g></g></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0"><path d="m12.5 10.5v-7h-3v1h-1v1h1v1h-1v1h1v1h-1v1h1v1zm-4-1h-1v1h1zm-1 0v-1h-1v1zm0-1h1v-1h-1zm0-1v-1h-1v1zm0-1h1v-1h-1zm0-1v-1h-1v1zm0-1h1v-1h-1z" stroke-width=".787342"/><path d="m2 1c-.552285 0-1 .4477153-1 1v12.000001c0 .552285.447715 1 1 1h11.999999c.552285 0 1-.447715 1-1v-12.000001c0-.5522847-.447715-1-1-1zm1 2.0000001h9.999999v8.0000009h-9.999999z" fill-opacity=".99608"/></g></svg> diff --git a/editor/icons/GuiRadioChecked.svg b/editor/icons/GuiRadioChecked.svg index 771337116d..65ef086c9a 100644 --- a/editor/icons/GuiRadioChecked.svg +++ b/editor/icons/GuiRadioChecked.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 15.999999" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0"><path d="m15 8a7 7 0 0 1 -7 7 7 7 0 0 1 -7-7 7 7 0 0 1 7-7 7 7 0 0 1 7 7" fill-opacity=".188235" stroke-width="2.333333"/><path d="m12 8a4 4 0 0 1 -4 4 4 4 0 0 1 -4-4 4 4 0 0 1 4-4 4 4 0 0 1 4 4" stroke-width="1.333333"/></g></svg> +<svg height="16" viewBox="0 0 16 15.999999" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m15 8a7 7 0 0 1 -7 7 7 7 0 0 1 -7-7 7 7 0 0 1 7-7 7 7 0 0 1 7 7" fill="#699ce8" stroke-width="2.33333"/><path d="m12 8a4 4 0 0 1 -4 4 4 4 0 0 1 -4-4 4 4 0 0 1 4-4 4 4 0 0 1 4 4" fill="#fff" stroke-width="1.33333"/></svg> diff --git a/editor/icons/BakedLightmap.svg b/editor/icons/LightmapGI.svg index 78f0a64a7b..78f0a64a7b 100644 --- a/editor/icons/BakedLightmap.svg +++ b/editor/icons/LightmapGI.svg diff --git a/editor/icons/BakedLightmapData.svg b/editor/icons/LightmapGIData.svg index f5dcfb618b..f5dcfb618b 100644 --- a/editor/icons/BakedLightmapData.svg +++ b/editor/icons/LightmapGIData.svg diff --git a/editor/icons/Occluder3D.svg b/editor/icons/Occluder3D.svg new file mode 100644 index 0000000000..850e2651af --- /dev/null +++ b/editor/icons/Occluder3D.svg @@ -0,0 +1 @@ +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7.90625 1a7 7 0 0 0 -1.2988281.1386719 4.5 4.5 0 0 1 3.3925781 4.3613281 4.5 4.5 0 0 1 -4.5 4.5 4.5 4.5 0 0 1 -4.359375-3.3886719 7 7 0 0 0 -.140625 1.3886719 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0 -7-7 7 7 0 0 0 -.09375 0z" fill="#ffca5f" stroke-width=".365215"/></svg> diff --git a/editor/icons/OccluderInstance3D.svg b/editor/icons/OccluderInstance3D.svg new file mode 100644 index 0000000000..cc7ccc410f --- /dev/null +++ b/editor/icons/OccluderInstance3D.svg @@ -0,0 +1 @@ +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7.90625 1a7 7 0 0 0 -1.2988281.1386719 4.5 4.5 0 0 1 3.3925781 4.3613281 4.5 4.5 0 0 1 -4.5 4.5 4.5 4.5 0 0 1 -4.359375-3.3886719 7 7 0 0 0 -.140625 1.3886719 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0 -7-7 7 7 0 0 0 -.09375 0z" fill="#fc7f7f" fill-opacity=".996078" stroke-width=".365215"/></svg> diff --git a/editor/icons/Quat.svg b/editor/icons/Quaternion.svg index cf29160ff4..cf29160ff4 100644 --- a/editor/icons/Quat.svg +++ b/editor/icons/Quaternion.svg diff --git a/editor/icons/GIProbe.svg b/editor/icons/VoxelGI.svg index f5e1025260..f5e1025260 100644 --- a/editor/icons/GIProbe.svg +++ b/editor/icons/VoxelGI.svg diff --git a/editor/icons/GIProbeData.svg b/editor/icons/VoxelGIData.svg index 5975115f4c..5975115f4c 100644 --- a/editor/icons/GIProbeData.svg +++ b/editor/icons/VoxelGIData.svg diff --git a/editor/import/collada.cpp b/editor/import/collada.cpp index e38034dd8c..aa9700716d 100644 --- a/editor/import/collada.cpp +++ b/editor/import/collada.cpp @@ -50,8 +50,8 @@ String Collada::Effect::get_texture_path(const String &p_source, Collada &state) return state.state.image_map[image].path; } -Transform Collada::get_root_transform() const { - Transform unit_scale_transform; +Transform3D Collada::get_root_transform() const { + Transform3D unit_scale_transform; #ifndef COLLADA_IMPORT_SCALE_SCENE unit_scale_transform.scale(Vector3(state.unit_scale, state.unit_scale, state.unit_scale)); #endif @@ -74,8 +74,8 @@ static String _uri_to_id(const String &p_uri) { /** HELPER FUNCTIONS **/ -Transform Collada::fix_transform(const Transform &p_transform) { - Transform tr = p_transform; +Transform3D Collada::fix_transform(const Transform3D &p_transform) { + Transform3D tr = p_transform; #ifndef NO_UP_AXIS_SWAP @@ -102,8 +102,8 @@ Transform Collada::fix_transform(const Transform &p_transform) { //return state.matrix_fix * p_transform; } -static Transform _read_transform_from_array(const Vector<float> &array, int ofs = 0) { - Transform tr; +static Transform3D _read_transform_from_array(const Vector<float> &array, int ofs = 0) { + Transform3D tr; // i wonder why collada matrices are transposed, given that's opposed to opengl.. tr.basis.elements[0][0] = array[0 + ofs]; tr.basis.elements[0][1] = array[1 + ofs]; @@ -122,11 +122,11 @@ static Transform _read_transform_from_array(const Vector<float> &array, int ofs /* STRUCTURES */ -Transform Collada::Node::compute_transform(Collada &state) const { - Transform xform; +Transform3D Collada::Node::compute_transform(Collada &state) const { + Transform3D xform; for (int i = 0; i < xform_list.size(); i++) { - Transform xform_step; + Transform3D xform_step; const XForm &xf = xform_list[i]; switch (xf.op) { case XForm::OP_ROTATE: { @@ -165,11 +165,11 @@ Transform Collada::Node::compute_transform(Collada &state) const { return xform; } -Transform Collada::Node::get_transform() const { +Transform3D Collada::Node::get_transform() const { return default_transform; } -Transform Collada::Node::get_global_transform() const { +Transform3D Collada::Node::get_global_transform() const { if (parent) { return parent->get_global_transform() * default_transform; } else { @@ -201,14 +201,14 @@ Vector<float> Collada::AnimationTrack::get_value_at_time(float p_time) const { if (keys[i].data.size() == 16) { //interpolate a matrix - Transform src = _read_transform_from_array(keys[i - 1].data); - Transform dst = _read_transform_from_array(keys[i].data); + Transform3D src = _read_transform_from_array(keys[i - 1].data); + Transform3D dst = _read_transform_from_array(keys[i].data); - Transform interp = c < 0.001 ? src : src.interpolate_with(dst, c); + Transform3D interp = c < 0.001 ? src : src.interpolate_with(dst, c); Vector<float> ret; ret.resize(16); - Transform tr; + Transform3D tr; // i wonder why collada matrices are transposed, given that's opposed to opengl.. ret.write[0] = interp.basis.elements[0][0]; ret.write[1] = interp.basis.elements[0][1]; @@ -410,10 +410,9 @@ Vector<String> Collada::_read_string_array(XMLParser &parser) { return array; } -Transform Collada::_read_transform(XMLParser &parser) { - if (parser.is_empty()) { - return Transform(); - } +Transform3D Collada::_read_transform(XMLParser &parser) { + if (parser.is_empty()) + return Transform3D(); Vector<String> array; while (parser.read() == OK) { @@ -429,7 +428,7 @@ Transform Collada::_read_transform(XMLParser &parser) { } } - ERR_FAIL_COND_V(array.size() != 16, Transform()); + ERR_FAIL_COND_V(array.size() != 16, Transform3D()); Vector<float> farr; farr.resize(16); for (int i = 0; i < 16; i++) { @@ -1197,7 +1196,7 @@ void Collada::_parse_skin_controller(XMLParser &parser, String p_id) { /* STORE REST MATRICES */ - Vector<Transform> rests; + Vector<Transform3D> rests; ERR_FAIL_COND(!skindata.joints.sources.has("JOINT")); ERR_FAIL_COND(!skindata.joints.sources.has("INV_BIND_MATRIX")); @@ -1214,7 +1213,7 @@ void Collada::_parse_skin_controller(XMLParser &parser, String p_id) { for (int i = 0; i < joint_source.sarray.size(); i++) { String name = joint_source.sarray[i]; - Transform xform = _read_transform_from_array(ibm_source.array, i * 16); //<- this is a mistake, it must be applied to vertices + Transform3D xform = _read_transform_from_array(ibm_source.array, i * 16); //<- this is a mistake, it must be applied to vertices xform.affine_invert(); // inverse for rest, because it's an inverse #ifdef COLLADA_IMPORT_SCALE_SCENE xform.origin *= state.unit_scale; @@ -2096,7 +2095,7 @@ void Collada::_merge_skeletons2(VisualScene *p_vscene) { NodeSkeleton *skeleton = nullptr; - for (Map<String, Transform>::Element *F = cd.bone_rest_map.front(); F; F = F->next()) { + for (Map<String, Transform3D>::Element *F = cd.bone_rest_map.front(); F; F = F->next()) { String name; if (!state.sid_to_node_map.has(F->key())) { @@ -2240,11 +2239,11 @@ bool Collada::_move_geometry_to_skeletons(VisualScene *p_vscene, Node *p_node, L //this should be correct ERR_FAIL_COND_V(!state.skin_controller_data_map.has(ng->source), false); SkinControllerData &skin = state.skin_controller_data_map[ng->source]; - Transform skel_inv = sk->get_global_transform().affine_inverse(); + Transform3D skel_inv = sk->get_global_transform().affine_inverse(); p_node->default_transform = skel_inv * (skin.bind_shape /* p_node->get_global_transform()*/); // i honestly have no idea what to do with a previous model xform.. most exporters ignore it //make rests relative to the skeleton (they seem to be always relative to world) - for (Map<String, Transform>::Element *E = skin.bone_rest_map.front(); E; E = E->next()) { + for (Map<String, Transform3D>::Element *E = skin.bone_rest_map.front(); E; E = E->next()) { E->get() = skel_inv * E->get(); //make the bone rest local to the skeleton state.bone_rest_map[E->key()] = E->get(); // make it remember where the bone is globally, now that it's relative } @@ -2252,7 +2251,7 @@ bool Collada::_move_geometry_to_skeletons(VisualScene *p_vscene, Node *p_node, L //but most exporters seem to work only if i do this.. //p_node->default_transform = p_node->get_global_transform(); - //p_node->default_transform=Transform(); //this seems to be correct, because bind shape makes the object local to the skeleton + //p_node->default_transform=Transform3D(); //this seems to be correct, because bind shape makes the object local to the skeleton p_node->ignore_anim = true; // collada may animate this later, if it does, then this is not supported (redo your original asset and don't animate the base mesh) p_node->parent = sk; //sk->children.push_back(0,p_node); //avoid INFINITE loop diff --git a/editor/import/collada.h b/editor/import/collada.h index 2c3f0a3006..5e38637504 100644 --- a/editor/import/collada.h +++ b/editor/import/collada.h @@ -182,7 +182,7 @@ public: String base; bool use_idrefs = false; - Transform bind_shape; + Transform3D bind_shape; struct Source { Vector<String> sarray; //maybe for names @@ -210,7 +210,7 @@ public: int count = 0; } weights; - Map<String, Transform> bone_rest_map; + Map<String, Transform3D> bone_rest_map; SkinControllerData() {} }; @@ -342,15 +342,15 @@ public: String empty_draw_type; bool noname = false; Vector<XForm> xform_list; - Transform default_transform; - Transform post_transform; + Transform3D default_transform; + Transform3D post_transform; Vector<Node *> children; Node *parent = nullptr; - Transform compute_transform(Collada &state) const; - Transform get_global_transform() const; - Transform get_transform() const; + Transform3D compute_transform(Collada &state) const; + Transform3D get_global_transform() const; + Transform3D get_transform() const; bool ignore_anim = false; @@ -497,7 +497,7 @@ public: Map<String, String> sid_to_node_map; //Map<String,NodeJoint*> bone_map; - Map<String, Transform> bone_rest_map; + Map<String, Transform3D> bone_rest_map; String local_path; String root_visual_scene; @@ -517,9 +517,9 @@ public: Collada(); - Transform fix_transform(const Transform &p_transform); + Transform3D fix_transform(const Transform3D &p_transform); - Transform get_root_transform() const; + Transform3D get_root_transform() const; int get_uv_channel(String p_name); @@ -557,7 +557,7 @@ private: // private stuff Variant _parse_param(XMLParser &parser); Vector<float> _read_float_array(XMLParser &parser); Vector<String> _read_string_array(XMLParser &parser); - Transform _read_transform(XMLParser &parser); + Transform3D _read_transform(XMLParser &parser); String _read_empty_draw_type(XMLParser &parser); void _joint_set_owner(Collada::Node *p_node, NodeSkeleton *p_owner); diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index d3183e5a8d..dc1bd38a99 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -87,7 +87,7 @@ struct ColladaImport { Error _create_scene(Collada::Node *p_node, Node3D *p_parent); Error _create_resources(Collada::Node *p_node, bool p_use_compression); Error _create_material(const String &p_target); - Error _create_mesh_surfaces(bool p_optimize, Ref<EditorSceneImporterMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<EditorSceneImporterMesh>> p_morph_meshes = Vector<Ref<EditorSceneImporterMesh>>(), bool p_use_compression = false, bool p_use_mesh_material = false); + Error _create_mesh_surfaces(bool p_optimize, Ref<EditorSceneImporterMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform3D &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<EditorSceneImporterMesh>> p_morph_meshes = Vector<Ref<EditorSceneImporterMesh>>(), bool p_use_compression = false, bool p_use_mesh_material = false); Error load(const String &p_path, int p_flags, bool p_force_make_tangents = false, bool p_use_compression = false); void _fix_param_animation_tracks(); void create_animation(int p_clip, bool p_make_tracks_in_all_bones, bool p_import_value_tracks); @@ -300,7 +300,7 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Node3D *p_parent) { nm.node = node; node_map[p_node->id] = nm; node_name_map[node->get_name()] = p_node->id; - Transform xf = p_node->default_transform; + Transform3D xf = p_node->default_transform; xf = collada.fix_transform(xf) * p_node->post_transform; node->set_transform(xf); @@ -457,7 +457,7 @@ Error ColladaImport::_create_material(const String &p_target) { return OK; } -Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<EditorSceneImporterMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<EditorSceneImporterMesh>> p_morph_meshes, bool p_use_compression, bool p_use_mesh_material) { +Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<EditorSceneImporterMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform3D &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<EditorSceneImporterMesh>> p_morph_meshes, bool p_use_compression, bool p_use_mesh_material) { bool local_xform_mirror = p_local_xform.basis.determinant() < 0; if (p_morph_data) { @@ -811,7 +811,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<EditorSceneImpor if (has_weights) { //if skeleton, localize - Transform local_xform = p_local_xform; + Transform3D local_xform = p_local_xform; for (int i = 0; i < vertex_array.size(); i++) { vertex_array.write[i].vertex = local_xform.xform(vertex_array[i].vertex); vertex_array.write[i].normal = local_xform.basis.xform(vertex_array[i].normal).normalized(); @@ -1037,7 +1037,7 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres Collada::SkinControllerData *skin = nullptr; Collada::MorphControllerData *morph = nullptr; String meshid; - Transform apply_xform; + Transform3D apply_xform; Vector<int> bone_remap; Vector<Ref<EditorSceneImporterMesh>> morphs; @@ -1073,9 +1073,9 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres if (apply_mesh_xform_to_vertices) { apply_xform = collada.fix_transform(p_node->default_transform); - node->set_transform(Transform()); + node->set_transform(Transform3D()); } else { - apply_xform = Transform(); + apply_xform = Transform3D(); } ERR_FAIL_COND_V(!skin->weights.sources.has("JOINT"), ERR_INVALID_DATA); @@ -1461,7 +1461,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones continue; } - animation->add_track(Animation::TYPE_TRANSFORM); + animation->add_track(Animation::TYPE_TRANSFORM3D); int track = animation->get_track_count() - 1; animation->track_set_path(track, path); animation->track_set_imported(track, true); //helps merging later @@ -1530,7 +1530,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones } } - Transform xform = cn->compute_transform(collada); + Transform3D xform = cn->compute_transform(collada); xform = collada.fix_transform(xform) * cn->post_transform; if (nm.bone >= 0) { @@ -1545,7 +1545,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones Vector3 s = xform.basis.get_scale(); bool singular_matrix = Math::is_equal_approx(s.x, 0.0f) || Math::is_equal_approx(s.y, 0.0f) || Math::is_equal_approx(s.z, 0.0f); - Quat q = singular_matrix ? Quat() : xform.basis.get_rotation_quat(); + Quaternion q = singular_matrix ? Quaternion() : xform.basis.get_rotation_quaternion(); Vector3 l = xform.origin; animation->transform_track_insert_key(track, snapshots[i], l, q, s); @@ -1584,19 +1584,19 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones continue; } - animation->add_track(Animation::TYPE_TRANSFORM); + animation->add_track(Animation::TYPE_TRANSFORM3D); int track = animation->get_track_count() - 1; animation->track_set_path(track, path); animation->track_set_imported(track, true); //helps merging later - Transform xform = cn->compute_transform(collada); + Transform3D xform = cn->compute_transform(collada); xform = collada.fix_transform(xform) * cn->post_transform; xform = sk->get_bone_rest(nm.bone).affine_inverse() * xform; Vector3 s = xform.basis.get_scale(); bool singular_matrix = Math::is_equal_approx(s.x, 0.0f) || Math::is_equal_approx(s.y, 0.0f) || Math::is_equal_approx(s.z, 0.0f); - Quat q = singular_matrix ? Quat() : xform.basis.get_rotation_quat(); + Quaternion q = singular_matrix ? Quaternion() : xform.basis.get_rotation_quaternion(); Vector3 l = xform.origin; animation->transform_track_insert_key(track, 0, l, q, s); diff --git a/editor/import/editor_import_plugin.cpp b/editor/import/editor_import_plugin.cpp index 44aff874eb..8660289c40 100644 --- a/editor/import/editor_import_plugin.cpp +++ b/editor/import/editor_import_plugin.cpp @@ -35,63 +35,63 @@ EditorImportPlugin::EditorImportPlugin() { } String EditorImportPlugin::get_importer_name() const { - ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("get_importer_name")), ""); - return get_script_instance()->call("get_importer_name"); + ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("_get_importer_name")), ""); + return get_script_instance()->call("_get_importer_name"); } String EditorImportPlugin::get_visible_name() const { - ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("get_visible_name")), ""); - return get_script_instance()->call("get_visible_name"); + ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("_get_visible_name")), ""); + return get_script_instance()->call("_get_visible_name"); } void EditorImportPlugin::get_recognized_extensions(List<String> *p_extensions) const { - ERR_FAIL_COND(!(get_script_instance() && get_script_instance()->has_method("get_recognized_extensions"))); - Array extensions = get_script_instance()->call("get_recognized_extensions"); + ERR_FAIL_COND(!(get_script_instance() && get_script_instance()->has_method("_get_recognized_extensions"))); + Array extensions = get_script_instance()->call("_get_recognized_extensions"); for (int i = 0; i < extensions.size(); i++) { p_extensions->push_back(extensions[i]); } } String EditorImportPlugin::get_preset_name(int p_idx) const { - ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("get_preset_name")), ""); - return get_script_instance()->call("get_preset_name", p_idx); + ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("_get_preset_name")), ""); + return get_script_instance()->call("_get_preset_name", p_idx); } int EditorImportPlugin::get_preset_count() const { - ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("get_preset_count")), 0); - return get_script_instance()->call("get_preset_count"); + ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("_get_preset_count")), 0); + return get_script_instance()->call("_get_preset_count"); } String EditorImportPlugin::get_save_extension() const { - ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("get_save_extension")), ""); - return get_script_instance()->call("get_save_extension"); + ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("_get_save_extension")), ""); + return get_script_instance()->call("_get_save_extension"); } String EditorImportPlugin::get_resource_type() const { - ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("get_resource_type")), ""); - return get_script_instance()->call("get_resource_type"); + ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("_get_resource_type")), ""); + return get_script_instance()->call("_get_resource_type"); } float EditorImportPlugin::get_priority() const { - if (!(get_script_instance() && get_script_instance()->has_method("get_priority"))) { + if (!(get_script_instance() && get_script_instance()->has_method("_get_priority"))) { return ResourceImporter::get_priority(); } - return get_script_instance()->call("get_priority"); + return get_script_instance()->call("_get_priority"); } int EditorImportPlugin::get_import_order() const { - if (!(get_script_instance() && get_script_instance()->has_method("get_import_order"))) { + if (!(get_script_instance() && get_script_instance()->has_method("_get_import_order"))) { return ResourceImporter::get_import_order(); } - return get_script_instance()->call("get_import_order"); + return get_script_instance()->call("_get_import_order"); } void EditorImportPlugin::get_import_options(List<ResourceImporter::ImportOption> *r_options, int p_preset) const { - ERR_FAIL_COND(!(get_script_instance() && get_script_instance()->has_method("get_import_options"))); + ERR_FAIL_COND(!(get_script_instance() && get_script_instance()->has_method("_get_import_options"))); Array needed; needed.push_back("name"); needed.push_back("default_value"); - Array options = get_script_instance()->call("get_import_options", p_preset); + Array options = get_script_instance()->call("_get_import_options", p_preset); for (int i = 0; i < options.size(); i++) { Dictionary d = options[i]; ERR_FAIL_COND(!d.has_all(needed)); @@ -119,18 +119,18 @@ void EditorImportPlugin::get_import_options(List<ResourceImporter::ImportOption> } bool EditorImportPlugin::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { - ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("get_option_visibility")), true); + ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("_get_option_visibility")), true); Dictionary d; Map<StringName, Variant>::Element *E = p_options.front(); while (E) { d[E->key()] = E->get(); E = E->next(); } - return get_script_instance()->call("get_option_visibility", p_option, d); + return get_script_instance()->call("_get_option_visibility", p_option, d); } Error EditorImportPlugin::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) { - ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("import")), ERR_UNAVAILABLE); + ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("_import")), ERR_UNAVAILABLE); Dictionary options; Array platform_variants, gen_files; @@ -139,7 +139,7 @@ Error EditorImportPlugin::import(const String &p_source_file, const String &p_sa options[E->key()] = E->get(); E = E->next(); } - Error err = (Error)get_script_instance()->call("import", p_source_file, p_save_path, options, platform_variants, gen_files).operator int64_t(); + Error err = (Error)get_script_instance()->call("_import", p_source_file, p_save_path, options, platform_variants, gen_files).operator int64_t(); for (int i = 0; i < platform_variants.size(); i++) { r_platform_variants->push_back(platform_variants[i]); @@ -151,16 +151,16 @@ Error EditorImportPlugin::import(const String &p_source_file, const String &p_sa } void EditorImportPlugin::_bind_methods() { - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_importer_name")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_visible_name")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "get_preset_count")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_preset_name", PropertyInfo(Variant::INT, "preset"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::ARRAY, "get_recognized_extensions")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::ARRAY, "get_import_options", PropertyInfo(Variant::INT, "preset"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_save_extension")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_resource_type")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::FLOAT, "get_priority")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "get_import_order")); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "get_option_visibility", PropertyInfo(Variant::STRING, "option"), PropertyInfo(Variant::DICTIONARY, "options"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "import", PropertyInfo(Variant::STRING, "source_file"), PropertyInfo(Variant::STRING, "save_path"), PropertyInfo(Variant::DICTIONARY, "options"), PropertyInfo(Variant::ARRAY, "platform_variants"), PropertyInfo(Variant::ARRAY, "gen_files"))); + BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_importer_name")); + BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_visible_name")); + BIND_VMETHOD(MethodInfo(Variant::INT, "_get_preset_count")); + BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_preset_name", PropertyInfo(Variant::INT, "preset"))); + BIND_VMETHOD(MethodInfo(Variant::ARRAY, "_get_recognized_extensions")); + BIND_VMETHOD(MethodInfo(Variant::ARRAY, "_get_import_options", PropertyInfo(Variant::INT, "preset"))); + BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_save_extension")); + BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_resource_type")); + BIND_VMETHOD(MethodInfo(Variant::FLOAT, "_get_priority")); + BIND_VMETHOD(MethodInfo(Variant::INT, "_get_import_order")); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_get_option_visibility", PropertyInfo(Variant::STRING, "option"), PropertyInfo(Variant::DICTIONARY, "options"))); + BIND_VMETHOD(MethodInfo(Variant::INT, "_import", PropertyInfo(Variant::STRING, "source_file"), PropertyInfo(Variant::STRING, "save_path"), PropertyInfo(Variant::DICTIONARY, "options"), PropertyInfo(Variant::ARRAY, "platform_variants"), PropertyInfo(Variant::ARRAY, "gen_files"))); } diff --git a/editor/import/resource_importer_csv_translation.cpp b/editor/import/resource_importer_csv_translation.cpp index 4a4d9d8f06..c9e446a1a2 100644 --- a/editor/import/resource_importer_csv_translation.cpp +++ b/editor/import/resource_importer_csv_translation.cpp @@ -30,8 +30,8 @@ #include "resource_importer_csv_translation.h" +#include "core/io/file_access.h" #include "core/io/resource_saver.h" -#include "core/os/file_access.h" #include "core/string/optimized_translation.h" #include "core/string/translation.h" diff --git a/editor/import/resource_importer_image.cpp b/editor/import/resource_importer_image.cpp index c5b2a8dc3a..2dea359188 100644 --- a/editor/import/resource_importer_image.cpp +++ b/editor/import/resource_importer_image.cpp @@ -30,9 +30,9 @@ #include "resource_importer_image.h" +#include "core/io/file_access.h" #include "core/io/image_loader.h" #include "core/io/resource_saver.h" -#include "core/os/file_access.h" #include "scene/resources/texture.h" String ResourceImporterImage::get_importer_name() const { diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp index dd62c72d8a..3aa17ee581 100644 --- a/editor/import/resource_importer_obj.cpp +++ b/editor/import/resource_importer_obj.cpp @@ -30,8 +30,8 @@ #include "resource_importer_obj.h" +#include "core/io/file_access.h" #include "core/io/resource_saver.h" -#include "core/os/file_access.h" #include "editor/import/scene_importer_mesh.h" #include "editor/import/scene_importer_mesh_node_3d.h" #include "scene/3d/mesh_instance_3d.h" @@ -126,7 +126,7 @@ static Error _parse_material_library(const String &p_path, Map<String, Ref<Stand String p = l.replace("map_Kd", "").replace("\\", "/").strip_edges(); String path; - if (p.is_abs_path()) { + if (p.is_absolute_path()) { path = p; } else { path = base_path.plus_file(p); @@ -146,7 +146,7 @@ static Error _parse_material_library(const String &p_path, Map<String, Ref<Stand String p = l.replace("map_Ks", "").replace("\\", "/").strip_edges(); String path; - if (p.is_abs_path()) { + if (p.is_absolute_path()) { path = p; } else { path = base_path.plus_file(p); @@ -166,7 +166,7 @@ static Error _parse_material_library(const String &p_path, Map<String, Ref<Stand String p = l.replace("map_Ns", "").replace("\\", "/").strip_edges(); String path; - if (p.is_abs_path()) { + if (p.is_absolute_path()) { path = p; } else { path = base_path.plus_file(p); diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index 96002400f3..e4d88850ea 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -120,13 +120,13 @@ void EditorSceneImporter::_bind_methods() { ///////////////////////////////// void EditorScenePostImport::_bind_methods() { - BIND_VMETHOD(MethodInfo(Variant::OBJECT, "post_import", PropertyInfo(Variant::OBJECT, "scene"))); + BIND_VMETHOD(MethodInfo(Variant::OBJECT, "_post_import", PropertyInfo(Variant::OBJECT, "scene"))); ClassDB::bind_method(D_METHOD("get_source_file"), &EditorScenePostImport::get_source_file); } Node *EditorScenePostImport::post_import(Node *p_scene) { if (get_script_instance()) { - return get_script_instance()->call("post_import", p_scene); + return get_script_instance()->call("_post_import", p_scene); } return p_scene; @@ -433,7 +433,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<E p_node->replace_by(rigid_body); rigid_body->set_transform(mi->get_transform()); p_node = rigid_body; - mi->set_transform(Transform()); + mi->set_transform(Transform3D()); rigid_body->add_child(mi); mi->set_owner(rigid_body->get_owner()); @@ -632,7 +632,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< p_node->replace_by(rigid_body); rigid_body->set_transform(mi->get_transform()); p_node = rigid_body; - mi->set_transform(Transform()); + mi->set_transform(Transform3D()); rigid_body->add_child(mi); mi->set_owner(rigid_body->get_owner()); base = rigid_body; @@ -856,8 +856,8 @@ void ResourceImporterScene::_create_clips(AnimationPlayer *anim, const Array &p_ new_anim->track_set_path(dtrack, default_anim->track_get_path(j)); if (kt > (from + 0.01) && k > 0) { - if (default_anim->track_get_type(j) == Animation::TYPE_TRANSFORM) { - Quat q; + if (default_anim->track_get_type(j) == Animation::TYPE_TRANSFORM3D) { + Quaternion q; Vector3 p; Vector3 s; default_anim->transform_track_interpolate(j, from, &p, &q, &s); @@ -870,8 +870,8 @@ void ResourceImporterScene::_create_clips(AnimationPlayer *anim, const Array &p_ } } - if (default_anim->track_get_type(j) == Animation::TYPE_TRANSFORM) { - Quat q; + if (default_anim->track_get_type(j) == Animation::TYPE_TRANSFORM3D) { + Quaternion q; Vector3 p; Vector3 s; default_anim->transform_track_get_key(j, k, &p, &q, &s); @@ -884,8 +884,8 @@ void ResourceImporterScene::_create_clips(AnimationPlayer *anim, const Array &p_ } if (dtrack != -1 && kt >= to) { - if (default_anim->track_get_type(j) == Animation::TYPE_TRANSFORM) { - Quat q; + if (default_anim->track_get_type(j) == Animation::TYPE_TRANSFORM3D) { + Quaternion q; Vector3 p; Vector3 s; default_anim->transform_track_interpolate(j, to, &p, &q, &s); @@ -902,8 +902,8 @@ void ResourceImporterScene::_create_clips(AnimationPlayer *anim, const Array &p_ new_anim->add_track(default_anim->track_get_type(j)); dtrack = new_anim->get_track_count() - 1; new_anim->track_set_path(dtrack, default_anim->track_get_path(j)); - if (default_anim->track_get_type(j) == Animation::TYPE_TRANSFORM) { - Quat q; + if (default_anim->track_get_type(j) == Animation::TYPE_TRANSFORM3D) { + Quaternion q; Vector3 p; Vector3 s; default_anim->transform_track_interpolate(j, from, &p, &q, &s); @@ -1209,7 +1209,7 @@ void ResourceImporterScene::_generate_meshes(Node *p_node, const Dictionary &p_m } if (bake_lightmaps) { - Transform xf; + Transform3D xf; Node3D *n = src_mesh_node; while (n) { xf = n->get_transform() * xf; @@ -1508,7 +1508,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p if (!scene) { EditorNode::add_io_error( TTR("Error running post-import script:") + " " + post_import_script_path + "\n" + - TTR("Did you return a Node-derived object in the `post_import()` method?")); + TTR("Did you return a Node-derived object in the `_post_import()` method?")); return err; } } diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h index 8cb84abce2..c6e5836a23 100644 --- a/editor/import/resource_importer_scene.h +++ b/editor/import/resource_importer_scene.h @@ -42,8 +42,8 @@ class Material; class AnimationPlayer; class EditorSceneImporterMesh; -class EditorSceneImporter : public Reference { - GDCLASS(EditorSceneImporter, Reference); +class EditorSceneImporter : public RefCounted { + GDCLASS(EditorSceneImporter, RefCounted); protected: static void _bind_methods(); @@ -69,8 +69,8 @@ public: EditorSceneImporter() {} }; -class EditorScenePostImport : public Reference { - GDCLASS(EditorScenePostImport, Reference); +class EditorScenePostImport : public RefCounted { + GDCLASS(EditorScenePostImport, RefCounted); String source_file; diff --git a/editor/import/resource_importer_shader_file.cpp b/editor/import/resource_importer_shader_file.cpp index f4d20a6296..70119bfd1c 100644 --- a/editor/import/resource_importer_shader_file.cpp +++ b/editor/import/resource_importer_shader_file.cpp @@ -30,9 +30,9 @@ #include "resource_importer_shader_file.h" +#include "core/io/file_access.h" #include "core/io/marshalls.h" #include "core/io/resource_saver.h" -#include "core/os/file_access.h" #include "editor/editor_node.h" #include "editor/plugins/shader_file_editor_plugin.h" #include "servers/rendering/rendering_device_binds.h" diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp index de8031af35..809f47bad9 100644 --- a/editor/import/resource_importer_texture.cpp +++ b/editor/import/resource_importer_texture.cpp @@ -208,7 +208,7 @@ void ResourceImporterTexture::get_import_options(List<ImportOption> *r_options, r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "roughness/src_normal", PROPERTY_HINT_FILE, "*.bmp,*.dds,*.exr,*.jpeg,*.jpg,*.hdr,*.png,*.svg,*.svgz,*.tga,*.webp"), "")); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "process/fix_alpha_border"), p_preset != PRESET_3D)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "process/premult_alpha"), false)); - r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "process/invert_color"), false)); + r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "process/normal_map_invert_y"), false)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "process/HDR_as_SRGB"), false)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "process/size_limit", PROPERTY_HINT_RANGE, "0,4096,1"), 0)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "detect_3d/compress_to", PROPERTY_HINT_ENUM, "Disabled,VRAM Compressed,Basis Universal"), (p_preset == PRESET_DETECT) ? 1 : 0)); @@ -218,14 +218,21 @@ 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: { - f->store_32(StreamTexture2D::DATA_FORMAT_LOSSLESS); + bool lossless_force_png = ProjectSettings::get_singleton()->get("rendering/textures/lossless_compression/force_png"); + 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()); f->store_16(p_image->get_height()); f->store_32(p_image->get_mipmap_count()); f->store_32(p_image->get_format()); for (int i = 0; i < p_image->get_mipmap_count() + 1; i++) { - Vector<uint8_t> data = Image::lossless_packer(p_image->get_image_from_mipmap(i)); + Vector<uint8_t> data; + if (use_webp) { + data = Image::webp_lossless_packer(p_image->get_image_from_mipmap(i)); + } else { + data = Image::png_packer(p_image->get_image_from_mipmap(i)); + } int data_len = data.size(); f->store_32(data_len); @@ -235,14 +242,14 @@ void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image } break; case COMPRESS_LOSSY: { - f->store_32(StreamTexture2D::DATA_FORMAT_LOSSY); + f->store_32(StreamTexture2D::DATA_FORMAT_WEBP); f->store_16(p_image->get_width()); f->store_16(p_image->get_height()); f->store_32(p_image->get_mipmap_count()); f->store_32(p_image->get_format()); for (int i = 0; i < p_image->get_mipmap_count() + 1; i++) { - Vector<uint8_t> data = Image::lossy_packer(p_image->get_image_from_mipmap(i), p_lossy_quality); + Vector<uint8_t> data = Image::webp_lossy_packer(p_image->get_image_from_mipmap(i), p_lossy_quality); int data_len = data.size(); f->store_32(data_len); @@ -388,7 +395,7 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String uint32_t mipmap_limit = int(mipmaps ? int(p_options["mipmaps/limit"]) : int(-1)); bool fix_alpha_border = p_options["process/fix_alpha_border"]; bool premult_alpha = p_options["process/premult_alpha"]; - bool invert_color = p_options["process/invert_color"]; + bool normal_map_invert_y = p_options["process/normal_map_invert_y"]; bool stream = p_options["compress/streamed"]; int size_limit = p_options["process/size_limit"]; bool hdr_as_srgb = p_options["process/HDR_as_SRGB"]; @@ -444,13 +451,18 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String image->premultiply_alpha(); } - if (invert_color) { - int height = image->get_height(); - int width = image->get_width(); + if (normal_map_invert_y) { + // Inverting the green channel can be used to flip a normal map's direction. + // There's no standard when it comes to normal map Y direction, so this is + // sometimes needed when using a normal map exported from another program. + // See <http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates>. + const int height = image->get_height(); + const int width = image->get_width(); for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { - image->set_pixel(i, j, image->get_pixel(i, j).inverted()); + const Color color = image->get_pixel(i, j); + image->set_pixel(i, j, Color(color.r, 1 - color.g, color.b)); } } } diff --git a/editor/import/resource_importer_texture.h b/editor/import/resource_importer_texture.h index 0d551a965c..41220009cd 100644 --- a/editor/import/resource_importer_texture.h +++ b/editor/import/resource_importer_texture.h @@ -31,9 +31,9 @@ #ifndef RESOURCEIMPORTTEXTURE_H #define RESOURCEIMPORTTEXTURE_H +#include "core/io/file_access.h" #include "core/io/image.h" #include "core/io/resource_importer.h" -#include "core/os/file_access.h" #include "scene/resources/texture.h" #include "servers/rendering_server.h" diff --git a/editor/import/resource_importer_texture_atlas.cpp b/editor/import/resource_importer_texture_atlas.cpp index 4c3ae59951..d5d1a14be3 100644 --- a/editor/import/resource_importer_texture_atlas.cpp +++ b/editor/import/resource_importer_texture_atlas.cpp @@ -31,10 +31,10 @@ #include "resource_importer_texture_atlas.h" #include "atlas_import_failed.xpm" +#include "core/io/file_access.h" #include "core/io/image_loader.h" #include "core/io/resource_saver.h" #include "core/math/geometry_2d.h" -#include "core/os/file_access.h" #include "editor/editor_atlas_packer.h" #include "scene/resources/mesh.h" #include "scene/resources/texture.h" diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp index bcc55b330b..e615212569 100644 --- a/editor/import/resource_importer_wav.cpp +++ b/editor/import/resource_importer_wav.cpp @@ -30,9 +30,9 @@ #include "resource_importer_wav.h" +#include "core/io/file_access.h" #include "core/io/marshalls.h" #include "core/io/resource_saver.h" -#include "core/os/file_access.h" #include "scene/resources/audio_stream_sample.h" const float TRIM_DB_LIMIT = -50; diff --git a/editor/import/scene_import_settings.cpp b/editor/import/scene_import_settings.cpp index 488c124c28..600f3fe2f0 100644 --- a/editor/import/scene_import_settings.cpp +++ b/editor/import/scene_import_settings.cpp @@ -317,7 +317,7 @@ void SceneImportSettings::_fill_scene(Node *p_node, TreeItem *p_parent_item) { if (mesh_node && mesh_node->get_mesh().is_valid()) { _fill_mesh(scene_tree, mesh_node->get_mesh(), item); - Transform accum_xform; + Transform3D accum_xform; Node3D *base = mesh_node; while (base) { accum_xform = base->get_transform() * accum_xform; @@ -379,7 +379,7 @@ void SceneImportSettings::_update_camera() { camera->set_orthogonal(camera_size * zoom, 0.0001, camera_size * 2); - Transform xf; + Transform3D xf; xf.basis = Basis(Vector3(0, 1, 0), rot_y) * Basis(Vector3(1, 0, 0), rot_x); xf.origin = center; xf.translate(0, 0, camera_size); @@ -493,7 +493,7 @@ void SceneImportSettings::_select(Tree *p_from, String p_type, String p_id) { Ref<Mesh> base_mesh = mi->get_mesh(); if (base_mesh.is_valid()) { AABB aabb = base_mesh->get_aabb(); - Transform aabb_xf; + Transform3D aabb_xf; aabb_xf.basis.scale(aabb.size); aabb_xf.origin = aabb.position; @@ -1099,7 +1099,7 @@ SceneImportSettings::SceneImportSettings() { camera->make_current(); light = memnew(DirectionalLight3D); - light->set_transform(Transform().looking_at(Vector3(-1, -2, -0.6), Vector3(0, 1, 0))); + light->set_transform(Transform3D().looking_at(Vector3(-1, -2, -0.6), Vector3(0, 1, 0))); base_viewport->add_child(light); light->set_shadow(true); diff --git a/editor/import/scene_importer_mesh.cpp b/editor/import/scene_importer_mesh.cpp index fa1a027a8d..bf17ea7bca 100644 --- a/editor/import/scene_importer_mesh.cpp +++ b/editor/import/scene_importer_mesh.cpp @@ -612,7 +612,7 @@ struct EditorSceneImporterMeshLightmapSurface { String name; }; -Error EditorSceneImporterMesh::lightmap_unwrap_cached(const Transform &p_base_transform, float p_texel_size, const Vector<uint8_t> &p_src_cache, Vector<uint8_t> &r_dst_cache) { +Error EditorSceneImporterMesh::lightmap_unwrap_cached(const Transform3D &p_base_transform, float p_texel_size, const Vector<uint8_t> &p_src_cache, Vector<uint8_t> &r_dst_cache) { ERR_FAIL_COND_V(!array_mesh_lightmap_unwrap_callback, ERR_UNCONFIGURED); ERR_FAIL_COND_V_MSG(blend_shapes.size() != 0, ERR_UNAVAILABLE, "Can't unwrap mesh with blend shapes."); @@ -628,7 +628,7 @@ Error EditorSceneImporterMesh::lightmap_unwrap_cached(const Transform &p_base_tr Basis basis = p_base_transform.get_basis(); Vector3 scale = Vector3(basis.get_axis(0).length(), basis.get_axis(1).length(), basis.get_axis(2).length()); - Transform transform; + Transform3D transform; transform.scale(scale); Basis normal_basis = transform.basis.inverse().transposed(); diff --git a/editor/import/scene_importer_mesh.h b/editor/import/scene_importer_mesh.h index c00339a620..2488de7ed0 100644 --- a/editor/import/scene_importer_mesh.h +++ b/editor/import/scene_importer_mesh.h @@ -106,7 +106,7 @@ public: Vector<Ref<Shape3D>> convex_decompose() const; Ref<Shape3D> create_trimesh_shape() const; Ref<NavigationMesh> create_navigation_mesh(); - Error lightmap_unwrap_cached(const Transform &p_base_transform, float p_texel_size, const Vector<uint8_t> &p_src_cache, Vector<uint8_t> &r_dst_cache); + Error lightmap_unwrap_cached(const Transform3D &p_base_transform, float p_texel_size, const Vector<uint8_t> &p_src_cache, Vector<uint8_t> &r_dst_cache); void set_lightmap_size_hint(const Size2i &p_size); Size2i get_lightmap_size_hint() const; diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp index 6265dfc2e4..e8c01d0e0c 100644 --- a/editor/inspector_dock.cpp +++ b/editor/inspector_dock.cpp @@ -42,6 +42,14 @@ void InspectorDock::_menu_option(int p_option) { case COLLAPSE_ALL: { _menu_collapseall(); } break; + + case RESOURCE_SAVE: { + _save_resource(false); + } break; + case RESOURCE_SAVE_AS: { + _save_resource(true); + } break; + case RESOURCE_MAKE_BUILT_IN: { _unref_resource(); } break; @@ -52,13 +60,6 @@ void InspectorDock::_menu_option(int p_option) { _paste_resource(); } break; - case RESOURCE_SAVE: { - _save_resource(false); - } break; - case RESOURCE_SAVE_AS: { - _save_resource(true); - } break; - case OBJECT_REQUEST_HELP: { if (current) { editor->set_visible_editor(EditorNode::EDITOR_SCRIPT); @@ -313,7 +314,7 @@ void InspectorDock::_property_keyed(const String &p_keyed, const Variant &p_valu AnimationPlayerEditor::singleton->get_track_editor()->insert_value_key(p_keyed, p_value, p_advance); } -void InspectorDock::_transform_keyed(Object *sp, const String &p_sub, const Transform &p_key) { +void InspectorDock::_transform_keyed(Object *sp, const String &p_sub, const Transform3D &p_key) { Node3D *s = Object::cast_to<Node3D>(sp); if (!s) { return; @@ -335,9 +336,16 @@ void InspectorDock::_notification(int p_what) { case NOTIFICATION_LAYOUT_DIRECTION_CHANGED: case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { set_theme(editor->get_gui_base()->get_theme()); + resource_new_button->set_icon(get_theme_icon("New", "EditorIcons")); resource_load_button->set_icon(get_theme_icon("Load", "EditorIcons")); resource_save_button->set_icon(get_theme_icon("Save", "EditorIcons")); + resource_extra_button->set_icon(get_theme_icon("GuiTabMenu", "EditorIcons")); + + PopupMenu *resource_extra_popup = resource_extra_button->get_popup(); + resource_extra_popup->set_item_icon(resource_extra_popup->get_item_index(RESOURCE_EDIT_CLIPBOARD), get_theme_icon("ActionPaste", "EditorIcons")); + resource_extra_popup->set_item_icon(resource_extra_popup->get_item_index(RESOURCE_COPY), get_theme_icon("ActionCopy", "EditorIcons")); + if (is_layout_rtl()) { backward_button->set_icon(get_theme_icon("Forward", "EditorIcons")); forward_button->set_icon(get_theme_icon("Back", "EditorIcons")); @@ -345,6 +353,7 @@ void InspectorDock::_notification(int p_what) { backward_button->set_icon(get_theme_icon("Back", "EditorIcons")); forward_button->set_icon(get_theme_icon("Forward", "EditorIcons")); } + history_menu->set_icon(get_theme_icon("History", "EditorIcons")); object_menu->set_icon(get_theme_icon("Tools", "EditorIcons")); warning->set_icon(get_theme_icon("NodeWarning", "EditorIcons")); @@ -403,12 +412,7 @@ void InspectorDock::update(Object *p_object) { object_menu->set_disabled(true); warning->hide(); search->set_editable(false); - - editor_path->set_disabled(true); - editor_path->set_text(""); - editor_path->set_tooltip(""); - editor_path->set_icon(nullptr); - + editor_path->clear_path(); return; } @@ -417,35 +421,28 @@ void InspectorDock::update(Object *p_object) { object_menu->set_disabled(false); search->set_editable(true); - editor_path->set_disabled(false); + editor_path->enable_path(); + resource_save_button->set_disabled(!is_resource); + open_docs_button->set_visible(is_resource || is_node); + + PopupMenu *resource_extra_popup = resource_extra_button->get_popup(); + resource_extra_popup->set_item_disabled(resource_extra_popup->get_item_index(RESOURCE_COPY), !is_resource); + resource_extra_popup->set_item_disabled(resource_extra_popup->get_item_index(RESOURCE_MAKE_BUILT_IN), !is_resource); PopupMenu *p = object_menu->get_popup(); p->clear(); - p->add_shortcut(ED_SHORTCUT("property_editor/expand_all", TTR("Expand All Properties")), EXPAND_ALL); - p->add_shortcut(ED_SHORTCUT("property_editor/collapse_all", TTR("Collapse All Properties")), COLLAPSE_ALL); - p->add_separator(); - if (is_resource) { - p->add_item(TTR("Save"), RESOURCE_SAVE); - p->add_item(TTR("Save As..."), RESOURCE_SAVE_AS); - p->add_separator(); - } - p->add_shortcut(ED_SHORTCUT("property_editor/copy_params", TTR("Copy Params")), OBJECT_COPY_PARAMS); - p->add_shortcut(ED_SHORTCUT("property_editor/paste_params", TTR("Paste Params")), OBJECT_PASTE_PARAMS); + p->add_icon_shortcut(get_theme_icon("GuiTreeArrowDown", "EditorIcons"), ED_SHORTCUT("property_editor/expand_all", TTR("Expand All")), EXPAND_ALL); + p->add_icon_shortcut(get_theme_icon("GuiTreeArrowRight", "EditorIcons"), ED_SHORTCUT("property_editor/collapse_all", TTR("Collapse All")), COLLAPSE_ALL); p->add_separator(); - p->add_shortcut(ED_SHORTCUT("property_editor/paste_resource", TTR("Edit Resource Clipboard")), RESOURCE_EDIT_CLIPBOARD); - if (is_resource) { - p->add_shortcut(ED_SHORTCUT("property_editor/copy_resource", TTR("Copy Resource")), RESOURCE_COPY); - p->add_shortcut(ED_SHORTCUT("property_editor/unref_resource", TTR("Make Built-In")), RESOURCE_MAKE_BUILT_IN); - } + p->add_shortcut(ED_SHORTCUT("property_editor/copy_params", TTR("Copy Properties")), OBJECT_COPY_PARAMS); + p->add_shortcut(ED_SHORTCUT("property_editor/paste_params", TTR("Paste Properties")), OBJECT_PASTE_PARAMS); if (is_resource || is_node) { p->add_separator(); p->add_shortcut(ED_SHORTCUT("property_editor/make_subresources_unique", TTR("Make Sub-Resources Unique")), OBJECT_UNIQUE_RESOURCES); - p->add_separator(); - p->add_icon_shortcut(get_theme_icon("HelpSearch", "EditorIcons"), ED_SHORTCUT("property_editor/open_help", TTR("Open in Help")), OBJECT_REQUEST_HELP); } List<MethodInfo> methods; @@ -525,6 +522,17 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) { resource_save_button->set_focus_mode(Control::FOCUS_NONE); resource_save_button->set_disabled(true); + resource_extra_button = memnew(MenuButton); + resource_extra_button->set_icon(get_theme_icon("GuiTabMenu", "EditorIcons")); + general_options_hb->add_child(resource_extra_button); + resource_extra_button->get_popup()->add_icon_shortcut(get_theme_icon("ActionPaste", "EditorIcons"), ED_SHORTCUT("property_editor/paste_resource", TTR("Edit Resource from Clipboard")), RESOURCE_EDIT_CLIPBOARD); + resource_extra_button->get_popup()->add_icon_shortcut(get_theme_icon("ActionCopy", "EditorIcons"), ED_SHORTCUT("property_editor/copy_resource", TTR("Copy Resource")), RESOURCE_COPY); + resource_extra_button->get_popup()->set_item_disabled(1, true); + resource_extra_button->get_popup()->add_separator(); + resource_extra_button->get_popup()->add_shortcut(ED_SHORTCUT("property_editor/unref_resource", TTR("Make Resource Built-In")), RESOURCE_MAKE_BUILT_IN); + resource_extra_button->get_popup()->set_item_disabled(3, true); + resource_extra_button->get_popup()->connect("id_pressed", callable_mp(this, &InspectorDock::_menu_option)); + general_options_hb->add_spacer(); backward_button = memnew(Button); @@ -558,31 +566,42 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) { history_menu->connect("about_to_popup", callable_mp(this, &InspectorDock::_prepare_history)); history_menu->get_popup()->connect("id_pressed", callable_mp(this, &InspectorDock::_select_history)); - HBoxContainer *node_info_hb = memnew(HBoxContainer); - add_child(node_info_hb); - + HBoxContainer *subresource_hb = memnew(HBoxContainer); + add_child(subresource_hb); editor_path = memnew(EditorPath(editor->get_editor_history())); editor_path->set_h_size_flags(Control::SIZE_EXPAND_FILL); - node_info_hb->add_child(editor_path); + subresource_hb->add_child(editor_path); - object_menu = memnew(MenuButton); - object_menu->set_shortcut_context(this); - object_menu->set_icon(get_theme_icon("Tools", "EditorIcons")); - node_info_hb->add_child(object_menu); - object_menu->set_tooltip(TTR("Object properties.")); - object_menu->get_popup()->connect("id_pressed", callable_mp(this, &InspectorDock::_menu_option)); + open_docs_button = memnew(Button); + open_docs_button->set_flat(true); + open_docs_button->set_visible(false); + open_docs_button->set_tooltip(TTR("Open documentation for this object.")); + open_docs_button->set_icon(get_theme_icon("HelpSearch", "EditorIcons")); + open_docs_button->set_shortcut(ED_SHORTCUT("property_editor/open_help", TTR("Open Documentation"))); + subresource_hb->add_child(open_docs_button); + open_docs_button->connect("pressed", callable_mp(this, &InspectorDock::_menu_option), varray(OBJECT_REQUEST_HELP)); new_resource_dialog = memnew(CreateDialog); editor->get_gui_base()->add_child(new_resource_dialog); new_resource_dialog->set_base_type("Resource"); new_resource_dialog->connect("create", callable_mp(this, &InspectorDock::_resource_created)); + HBoxContainer *property_tools_hb = memnew(HBoxContainer); + add_child(property_tools_hb); + search = memnew(LineEdit); search->set_h_size_flags(Control::SIZE_EXPAND_FILL); search->set_placeholder(TTR("Filter properties")); search->set_right_icon(get_theme_icon("Search", "EditorIcons")); search->set_clear_button_enabled(true); - add_child(search); + property_tools_hb->add_child(search); + + object_menu = memnew(MenuButton); + object_menu->set_shortcut_context(this); + object_menu->set_icon(get_theme_icon("Tools", "EditorIcons")); + property_tools_hb->add_child(object_menu); + object_menu->set_tooltip(TTR("Manage object properties.")); + object_menu->get_popup()->connect("id_pressed", callable_mp(this, &InspectorDock::_menu_option)); warning = memnew(Button); add_child(warning); diff --git a/editor/inspector_dock.h b/editor/inspector_dock.h index 6a3f8c679c..d50785d95c 100644 --- a/editor/inspector_dock.h +++ b/editor/inspector_dock.h @@ -81,9 +81,11 @@ class InspectorDock : public VBoxContainer { Button *resource_new_button; Button *resource_load_button; MenuButton *resource_save_button; + MenuButton *resource_extra_button; MenuButton *history_menu; LineEdit *search; + Button *open_docs_button; MenuButton *object_menu; EditorPath *editor_path; @@ -112,7 +114,7 @@ class InspectorDock : public VBoxContainer { void _prepare_history(); void _property_keyed(const String &p_keyed, const Variant &p_value, bool p_advance); - void _transform_keyed(Object *sp, const String &p_sub, const Transform &p_key); + void _transform_keyed(Object *sp, const String &p_sub, const Transform3D &p_key); protected: static void _bind_methods(); diff --git a/editor/multi_node_edit.h b/editor/multi_node_edit.h index 0544eb2d50..2efecb9f65 100644 --- a/editor/multi_node_edit.h +++ b/editor/multi_node_edit.h @@ -33,8 +33,8 @@ #include "scene/main/node.h" -class MultiNodeEdit : public Reference { - GDCLASS(MultiNodeEdit, Reference); +class MultiNodeEdit : public RefCounted { + GDCLASS(MultiNodeEdit, RefCounted); List<NodePath> nodes; struct PLData { diff --git a/editor/node_3d_editor_gizmos.cpp b/editor/node_3d_editor_gizmos.cpp index cc261ea868..5c69a1e975 100644 --- a/editor/node_3d_editor_gizmos.cpp +++ b/editor/node_3d_editor_gizmos.cpp @@ -34,15 +34,14 @@ #include "core/math/geometry_2d.h" #include "core/math/geometry_3d.h" #include "scene/3d/audio_stream_player_3d.h" -#include "scene/3d/baked_lightmap.h" #include "scene/3d/collision_polygon_3d.h" #include "scene/3d/collision_shape_3d.h" #include "scene/3d/cpu_particles_3d.h" #include "scene/3d/decal.h" -#include "scene/3d/gi_probe.h" #include "scene/3d/gpu_particles_3d.h" #include "scene/3d/gpu_particles_collision_3d.h" #include "scene/3d/light_3d.h" +#include "scene/3d/lightmap_gi.h" #include "scene/3d/lightmap_probe.h" #include "scene/3d/listener_3d.h" #include "scene/3d/mesh_instance_3d.h" @@ -57,6 +56,7 @@ #include "scene/3d/sprite_3d.h" #include "scene/3d/vehicle_body_3d.h" #include "scene/3d/visibility_notifier_3d.h" +#include "scene/3d/voxel_gi.h" #include "scene/resources/box_shape_3d.h" #include "scene/resources/capsule_shape_3d.h" #include "scene/resources/concave_polygon_shape_3d.h" @@ -104,8 +104,8 @@ void EditorNode3DGizmo::clear() { } void EditorNode3DGizmo::redraw() { - if (get_script_instance() && get_script_instance()->has_method("redraw")) { - get_script_instance()->call("redraw"); + if (get_script_instance() && get_script_instance()->has_method("_redraw")) { + get_script_instance()->call("_redraw"); return; } @@ -114,8 +114,8 @@ void EditorNode3DGizmo::redraw() { } String EditorNode3DGizmo::get_handle_name(int p_idx) const { - if (get_script_instance() && get_script_instance()->has_method("get_handle_name")) { - return get_script_instance()->call("get_handle_name", p_idx); + if (get_script_instance() && get_script_instance()->has_method("_get_handle_name")) { + return get_script_instance()->call("_get_handle_name", p_idx); } ERR_FAIL_COND_V(!gizmo_plugin, ""); @@ -123,8 +123,8 @@ String EditorNode3DGizmo::get_handle_name(int p_idx) const { } bool EditorNode3DGizmo::is_handle_highlighted(int p_idx) const { - if (get_script_instance() && get_script_instance()->has_method("is_handle_highlighted")) { - return get_script_instance()->call("is_handle_highlighted", p_idx); + if (get_script_instance() && get_script_instance()->has_method("_is_handle_highlighted")) { + return get_script_instance()->call("_is_handle_highlighted", p_idx); } ERR_FAIL_COND_V(!gizmo_plugin, false); @@ -132,8 +132,8 @@ bool EditorNode3DGizmo::is_handle_highlighted(int p_idx) const { } Variant EditorNode3DGizmo::get_handle_value(int p_idx) { - if (get_script_instance() && get_script_instance()->has_method("get_handle_value")) { - return get_script_instance()->call("get_handle_value", p_idx); + if (get_script_instance() && get_script_instance()->has_method("_get_handle_value")) { + return get_script_instance()->call("_get_handle_value", p_idx); } ERR_FAIL_COND_V(!gizmo_plugin, Variant()); @@ -141,8 +141,8 @@ Variant EditorNode3DGizmo::get_handle_value(int p_idx) { } void EditorNode3DGizmo::set_handle(int p_idx, Camera3D *p_camera, const Point2 &p_point) { - if (get_script_instance() && get_script_instance()->has_method("set_handle")) { - get_script_instance()->call("set_handle", p_idx, p_camera, p_point); + if (get_script_instance() && get_script_instance()->has_method("_set_handle")) { + get_script_instance()->call("_set_handle", p_idx, p_camera, p_point); return; } @@ -151,8 +151,8 @@ void EditorNode3DGizmo::set_handle(int p_idx, Camera3D *p_camera, const Point2 & } void EditorNode3DGizmo::commit_handle(int p_idx, const Variant &p_restore, bool p_cancel) { - if (get_script_instance() && get_script_instance()->has_method("commit_handle")) { - get_script_instance()->call("commit_handle", p_idx, p_restore, p_cancel); + if (get_script_instance() && get_script_instance()->has_method("_commit_handle")) { + get_script_instance()->call("_commit_handle", p_idx, p_restore, p_cancel); return; } @@ -455,7 +455,7 @@ bool EditorNode3DGizmo::intersect_frustum(const Camera3D *p_camera, const Vector int vc = collision_segments.size(); const Vector3 *vptr = collision_segments.ptr(); - Transform t = spatial_node->get_global_transform(); + Transform3D t = spatial_node->get_global_transform(); bool any_out = false; for (int j = 0; j < fc; j++) { @@ -477,12 +477,12 @@ bool EditorNode3DGizmo::intersect_frustum(const Camera3D *p_camera, const Vector } if (collision_mesh.is_valid()) { - Transform t = spatial_node->get_global_transform(); + Transform3D t = spatial_node->get_global_transform(); Vector3 mesh_scale = t.get_basis().get_scale(); t.orthonormalize(); - Transform it = t.affine_inverse(); + Transform3D it = t.affine_inverse(); Vector<Plane> transformed_frustum; @@ -508,7 +508,7 @@ bool EditorNode3DGizmo::intersect_ray(Camera3D *p_camera, const Point2 &p_point, } if (r_gizmo_handle && !hidden) { - Transform t = spatial_node->get_global_transform(); + Transform3D t = spatial_node->get_global_transform(); if (billboard_handle) { t.set_look_at(t.origin, t.origin - p_camera->get_transform().basis.get_axis(2), p_camera->get_transform().basis.get_axis(1)); } @@ -560,7 +560,7 @@ bool EditorNode3DGizmo::intersect_ray(Camera3D *p_camera, const Point2 &p_point, } if (selectable_icon_size > 0.0f) { - Transform t = spatial_node->get_global_transform(); + Transform3D t = spatial_node->get_global_transform(); Vector3 camera_position = p_camera->get_camera_transform().origin; if (camera_position.distance_squared_to(t.origin) > 0.01) { t.set_look_at(t.origin, camera_position); @@ -576,7 +576,7 @@ bool EditorNode3DGizmo::intersect_ray(Camera3D *p_camera, const Point2 &p_point, Point2 center = p_camera->unproject_position(t.origin); - Transform orig_camera_transform = p_camera->get_camera_transform(); + Transform3D orig_camera_transform = p_camera->get_camera_transform(); if (orig_camera_transform.origin.distance_squared_to(t.origin) > 0.01 && ABS(orig_camera_transform.basis.get_axis(Vector3::AXIS_Z).dot(Vector3(0, 1, 0))) < 0.99) { @@ -609,7 +609,7 @@ bool EditorNode3DGizmo::intersect_ray(Camera3D *p_camera, const Point2 &p_point, int vc = collision_segments.size(); const Vector3 *vptr = collision_segments.ptr(); - Transform t = spatial_node->get_global_transform(); + Transform3D t = spatial_node->get_global_transform(); if (billboard_handle) { t.set_look_at(t.origin, t.origin - p_camera->get_transform().basis.get_axis(2), p_camera->get_transform().basis.get_axis(1)); } @@ -657,13 +657,13 @@ bool EditorNode3DGizmo::intersect_ray(Camera3D *p_camera, const Point2 &p_point, } if (collision_mesh.is_valid()) { - Transform gt = spatial_node->get_global_transform(); + Transform3D gt = spatial_node->get_global_transform(); if (billboard_handle) { gt.set_look_at(gt.origin, gt.origin - p_camera->get_transform().basis.get_axis(2), p_camera->get_transform().basis.get_axis(1)); } - Transform ai = gt.affine_inverse(); + Transform3D ai = gt.affine_inverse(); Vector3 ray_from = ai.xform(p_camera->project_ray_origin(p_point)); Vector3 ray_dir = ai.basis.xform(p_camera->project_ray_normal(p_point)).normalized(); Vector3 rpos, rnorm; @@ -739,16 +739,16 @@ void EditorNode3DGizmo::_bind_methods() { ClassDB::bind_method(D_METHOD("clear"), &EditorNode3DGizmo::clear); ClassDB::bind_method(D_METHOD("set_hidden", "hidden"), &EditorNode3DGizmo::set_hidden); - BIND_VMETHOD(MethodInfo("redraw")); - BIND_VMETHOD(MethodInfo(Variant::STRING, "get_handle_name", PropertyInfo(Variant::INT, "index"))); - BIND_VMETHOD(MethodInfo(Variant::BOOL, "is_handle_highlighted", PropertyInfo(Variant::INT, "index"))); + BIND_VMETHOD(MethodInfo("_redraw")); + BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_handle_name", PropertyInfo(Variant::INT, "index"))); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_is_handle_highlighted", PropertyInfo(Variant::INT, "index"))); - MethodInfo hvget(Variant::NIL, "get_handle_value", PropertyInfo(Variant::INT, "index")); + MethodInfo hvget(Variant::NIL, "_get_handle_value", PropertyInfo(Variant::INT, "index")); hvget.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT; BIND_VMETHOD(hvget); - BIND_VMETHOD(MethodInfo("set_handle", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera3D"), PropertyInfo(Variant::VECTOR2, "point"))); - MethodInfo cm = MethodInfo("commit_handle", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::NIL, "restore"), PropertyInfo(Variant::BOOL, "cancel")); + BIND_VMETHOD(MethodInfo("_set_handle", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera3D"), PropertyInfo(Variant::VECTOR2, "point"))); + MethodInfo cm = MethodInfo("_commit_handle", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::NIL, "restore"), PropertyInfo(Variant::BOOL, "cancel")); cm.default_arguments.push_back(false); BIND_VMETHOD(cm); } @@ -826,7 +826,7 @@ Variant Light3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_i return Variant(); } -static float _find_closest_angle_to_half_pi_arc(const Vector3 &p_from, const Vector3 &p_to, float p_arc_radius, const Transform &p_arc_xform) { +static float _find_closest_angle_to_half_pi_arc(const Vector3 &p_from, const Vector3 &p_to, float p_arc_radius, const Transform3D &p_arc_xform) { //bleh, discrete is simpler static const int arc_test_points = 64; float min_d = 1e20; @@ -855,8 +855,8 @@ static float _find_closest_angle_to_half_pi_arc(const Vector3 &p_from, const Vec void Light3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { Light3D *light = Object::cast_to<Light3D>(p_gizmo->get_spatial_node()); - Transform gt = light->get_global_transform(); - Transform gi = gt.affine_inverse(); + Transform3D gt = light->get_global_transform(); + Transform3D gi = gt.affine_inverse(); Vector3 ray_from = p_camera->project_ray_origin(p_point); Vector3 ray_dir = p_camera->project_ray_normal(p_point); @@ -1084,8 +1084,8 @@ Variant AudioStreamPlayer3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gi void AudioStreamPlayer3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { AudioStreamPlayer3D *player = Object::cast_to<AudioStreamPlayer3D>(p_gizmo->get_spatial_node()); - Transform gt = player->get_global_transform(); - Transform gi = gt.affine_inverse(); + Transform3D gt = player->get_global_transform(); + Transform3D gi = gt.affine_inverse(); Vector3 ray_from = p_camera->project_ray_origin(p_point); Vector3 ray_dir = p_camera->project_ray_normal(p_point); @@ -1230,8 +1230,8 @@ Variant Camera3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_ void Camera3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { Camera3D *camera = Object::cast_to<Camera3D>(p_gizmo->get_spatial_node()); - Transform gt = camera->get_global_transform(); - Transform gi = gt.affine_inverse(); + Transform3D gt = camera->get_global_transform(); + Transform3D gi = gt.affine_inverse(); Vector3 ray_from = p_camera->project_ray_origin(p_point); Vector3 ray_dir = p_camera->project_ray_normal(p_point); @@ -1239,7 +1239,7 @@ void Camera3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Came Vector3 s[2] = { gi.xform(ray_from), gi.xform(ray_from + ray_dir * 4096) }; if (camera->get_projection() == Camera3D::PROJECTION_PERSPECTIVE) { - Transform gt2 = camera->get_global_transform(); + Transform3D gt2 = camera->get_global_transform(); float a = _find_closest_angle_to_half_pi_arc(s[0], s[1], 1.0, gt2); camera->set("fov", CLAMP(a * 2.0, 1, 179)); } else { @@ -1418,7 +1418,7 @@ void Camera3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { lines.push_back(cam_pos); } - Transform local = camera->get_global_transform().affine_inverse(); + Transform3D local = camera->get_global_transform().affine_inverse(); for (int i = 0; i < lines.size(); i++) { lines.write[i] = local.xform(lines[i]); } @@ -1541,19 +1541,46 @@ Position3DGizmoPlugin::Position3DGizmoPlugin() { cursor_points = Vector<Vector3>(); Vector<Color> cursor_colors; - float cs = 0.25; + const float cs = 0.25; + // Add more points to create a "hard stop" in the color gradient. cursor_points.push_back(Vector3(+cs, 0, 0)); + cursor_points.push_back(Vector3()); + cursor_points.push_back(Vector3()); cursor_points.push_back(Vector3(-cs, 0, 0)); + cursor_points.push_back(Vector3(0, +cs, 0)); + cursor_points.push_back(Vector3()); + cursor_points.push_back(Vector3()); cursor_points.push_back(Vector3(0, -cs, 0)); + cursor_points.push_back(Vector3(0, 0, +cs)); + cursor_points.push_back(Vector3()); + cursor_points.push_back(Vector3()); cursor_points.push_back(Vector3(0, 0, -cs)); - cursor_colors.push_back(EditorNode::get_singleton()->get_gui_base()->get_theme_color("axis_x_color", "Editor")); - cursor_colors.push_back(EditorNode::get_singleton()->get_gui_base()->get_theme_color("axis_x_color", "Editor")); - cursor_colors.push_back(EditorNode::get_singleton()->get_gui_base()->get_theme_color("axis_y_color", "Editor")); - cursor_colors.push_back(EditorNode::get_singleton()->get_gui_base()->get_theme_color("axis_y_color", "Editor")); - cursor_colors.push_back(EditorNode::get_singleton()->get_gui_base()->get_theme_color("axis_z_color", "Editor")); - cursor_colors.push_back(EditorNode::get_singleton()->get_gui_base()->get_theme_color("axis_z_color", "Editor")); + + // Use the axis color which is brighter for the positive axis. + // Use a darkened axis color for the negative axis. + // This makes it possible to see in which direction the Position3D node is rotated + // (which can be important depending on how it's used). + const Color color_x = EditorNode::get_singleton()->get_gui_base()->get_theme_color("axis_x_color", "Editor"); + cursor_colors.push_back(color_x); + cursor_colors.push_back(color_x); + // FIXME: Use less strong darkening factor once GH-48573 is fixed. + // The current darkening factor compensates for lines being too bright in the 3D editor. + cursor_colors.push_back(color_x.lerp(Color(0, 0, 0), 0.75)); + cursor_colors.push_back(color_x.lerp(Color(0, 0, 0), 0.75)); + + const Color color_y = EditorNode::get_singleton()->get_gui_base()->get_theme_color("axis_y_color", "Editor"); + cursor_colors.push_back(color_y); + cursor_colors.push_back(color_y); + cursor_colors.push_back(color_y.lerp(Color(0, 0, 0), 0.75)); + cursor_colors.push_back(color_y.lerp(Color(0, 0, 0), 0.75)); + + const Color color_z = EditorNode::get_singleton()->get_gui_base()->get_theme_color("axis_z_color", "Editor"); + cursor_colors.push_back(color_z); + cursor_colors.push_back(color_z); + cursor_colors.push_back(color_z.lerp(Color(0, 0, 0), 0.75)); + cursor_colors.push_back(color_z.lerp(Color(0, 0, 0), 0.75)); Ref<StandardMaterial3D> mat = memnew(StandardMaterial3D); mat->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED); @@ -1617,7 +1644,7 @@ void Skeleton3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { surface_tool->begin(Mesh::PRIMITIVE_LINES); surface_tool->set_material(material); - Vector<Transform> grests; + Vector<Transform3D> grests; grests.resize(skel->get_bone_count()); Vector<int> bones; @@ -1731,59 +1758,10 @@ void Skeleton3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { surface_tool->set_color(bonecolor); surface_tool->add_vertex(points[(j + 1) % 4]); } - - /* - bones[0]=parent; - surface_tool->add_bones(bones); - surface_tool->add_weights(weights); - surface_tool->add_color(Color(0.4,1,0.4,0.4)); - surface_tool->add_vertex(v0); - bones[0]=i; - surface_tool->add_bones(bones); - surface_tool->add_weights(weights); - surface_tool->add_color(Color(0.4,1,0.4,0.4)); - surface_tool->add_vertex(v1); -*/ } else { grests.write[i] = skel->get_bone_rest(i); bones.write[0] = i; } - /* - Transform t = grests[i]; - t.orthonormalize(); - - for (int i=0;i<6;i++) { - - - Vector3 face_points[4]; - - for (int j=0;j<4;j++) { - float v[3]; - v[0]=1.0; - v[1]=1-2*((j>>1)&1); - v[2]=v[1]*(1-2*(j&1)); - - for (int k=0;k<3;k++) { - if (i<3) - face_points[j][(i+k)%3]=v[k]*(i>=3?-1:1); - else - face_points[3-j][(i+k)%3]=v[k]*(i>=3?-1:1); - } - } - - for(int j=0;j<4;j++) { - surface_tool->add_bones(bones); - surface_tool->add_weights(weights); - surface_tool->add_color(Color(1.0,0.4,0.4,0.4)); - surface_tool->add_vertex(t.xform(face_points[j]*0.04)); - surface_tool->add_bones(bones); - surface_tool->add_weights(weights); - surface_tool->add_color(Color(1.0,0.4,0.4,0.4)); - surface_tool->add_vertex(t.xform(face_points[(j+1)%4]*0.04)); - } - - } - */ } Ref<ArrayMesh> m = surface_tool->commit(); @@ -2196,9 +2174,9 @@ Variant VisibilityNotifier3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_g void VisibilityNotifier3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { VisibilityNotifier3D *notifier = Object::cast_to<VisibilityNotifier3D>(p_gizmo->get_spatial_node()); - Transform gt = notifier->get_global_transform(); + Transform3D gt = notifier->get_global_transform(); - Transform gi = gt.affine_inverse(); + Transform3D gi = gt.affine_inverse(); bool move = p_idx >= 3; p_idx = p_idx % 3; @@ -2388,8 +2366,8 @@ Variant GPUParticles3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, void GPUParticles3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { GPUParticles3D *particles = Object::cast_to<GPUParticles3D>(p_gizmo->get_spatial_node()); - Transform gt = particles->get_global_transform(); - Transform gi = gt.affine_inverse(); + Transform3D gt = particles->get_global_transform(); + Transform3D gi = gt.affine_inverse(); bool move = p_idx >= 3; p_idx = p_idx % 3; @@ -2555,8 +2533,8 @@ Variant GPUParticlesCollision3DGizmoPlugin::get_handle_value(EditorNode3DGizmo * void GPUParticlesCollision3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { Node3D *sn = p_gizmo->get_spatial_node(); - Transform gt = sn->get_global_transform(); - Transform gi = gt.affine_inverse(); + Transform3D gt = sn->get_global_transform(); + Transform3D gi = gt.affine_inverse(); Vector3 ray_from = p_camera->project_ray_origin(p_point); Vector3 ray_dir = p_camera->project_ray_normal(p_point); @@ -2814,9 +2792,9 @@ Variant ReflectionProbeGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, void ReflectionProbeGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { ReflectionProbe *probe = Object::cast_to<ReflectionProbe>(p_gizmo->get_spatial_node()); - Transform gt = probe->get_global_transform(); + Transform3D gt = probe->get_global_transform(); - Transform gi = gt.affine_inverse(); + Transform3D gi = gt.affine_inverse(); if (p_idx < 3) { Vector3 extents = probe->get_extents(); @@ -2993,9 +2971,9 @@ Variant DecalGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx void DecalGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { Decal *decal = Object::cast_to<Decal>(p_gizmo->get_spatial_node()); - Transform gt = decal->get_global_transform(); + Transform3D gt = decal->get_global_transform(); - Transform gi = gt.affine_inverse(); + Transform3D gi = gt.affine_inverse(); Vector3 extents = decal->get_extents(); @@ -3086,35 +3064,35 @@ void DecalGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { } /////////////////////////////// -GIProbeGizmoPlugin::GIProbeGizmoPlugin() { - Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/gi_probe", Color(0.5, 1, 0.6)); +VoxelGIGizmoPlugin::VoxelGIGizmoPlugin() { + Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/voxel_gi", Color(0.5, 1, 0.6)); - create_material("gi_probe_material", gizmo_color); + create_material("voxel_gi_material", gizmo_color); // This gizmo draws a lot of lines. Use a low opacity to make it not too intrusive. gizmo_color.a = 0.1; - create_material("gi_probe_internal_material", gizmo_color); + create_material("voxel_gi_internal_material", gizmo_color); gizmo_color.a = 0.05; - create_material("gi_probe_solid_material", gizmo_color); + create_material("voxel_gi_solid_material", gizmo_color); - create_icon_material("gi_probe_icon", Node3DEditor::get_singleton()->get_theme_icon("GizmoGIProbe", "EditorIcons")); + create_icon_material("voxel_gi_icon", Node3DEditor::get_singleton()->get_theme_icon("GizmoVoxelGI", "EditorIcons")); create_handle_material("handles"); } -bool GIProbeGizmoPlugin::has_gizmo(Node3D *p_spatial) { - return Object::cast_to<GIProbe>(p_spatial) != nullptr; +bool VoxelGIGizmoPlugin::has_gizmo(Node3D *p_spatial) { + return Object::cast_to<VoxelGI>(p_spatial) != nullptr; } -String GIProbeGizmoPlugin::get_gizmo_name() const { - return "GIProbe"; +String VoxelGIGizmoPlugin::get_gizmo_name() const { + return "VoxelGI"; } -int GIProbeGizmoPlugin::get_priority() const { +int VoxelGIGizmoPlugin::get_priority() const { return -1; } -String GIProbeGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const { +String VoxelGIGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const { switch (p_idx) { case 0: return "Extents X"; @@ -3127,16 +3105,16 @@ String GIProbeGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int return ""; } -Variant GIProbeGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const { - GIProbe *probe = Object::cast_to<GIProbe>(p_gizmo->get_spatial_node()); +Variant VoxelGIGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const { + VoxelGI *probe = Object::cast_to<VoxelGI>(p_gizmo->get_spatial_node()); return probe->get_extents(); } -void GIProbeGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { - GIProbe *probe = Object::cast_to<GIProbe>(p_gizmo->get_spatial_node()); +void VoxelGIGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { + VoxelGI *probe = Object::cast_to<VoxelGI>(p_gizmo->get_spatial_node()); - Transform gt = probe->get_global_transform(); - Transform gi = gt.affine_inverse(); + Transform3D gt = probe->get_global_transform(); + Transform3D gi = gt.affine_inverse(); Vector3 extents = probe->get_extents(); @@ -3163,8 +3141,8 @@ void GIProbeGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camer probe->set_extents(extents); } -void GIProbeGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) { - GIProbe *probe = Object::cast_to<GIProbe>(p_gizmo->get_spatial_node()); +void VoxelGIGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) { + VoxelGI *probe = Object::cast_to<VoxelGI>(p_gizmo->get_spatial_node()); Vector3 restore = p_restore; @@ -3180,19 +3158,19 @@ void GIProbeGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, co ur->commit_action(); } -void GIProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { - GIProbe *probe = Object::cast_to<GIProbe>(p_gizmo->get_spatial_node()); +void VoxelGIGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { + VoxelGI *probe = Object::cast_to<VoxelGI>(p_gizmo->get_spatial_node()); - Ref<Material> material = get_material("gi_probe_material", p_gizmo); - Ref<Material> icon = get_material("gi_probe_icon", p_gizmo); - Ref<Material> material_internal = get_material("gi_probe_internal_material", p_gizmo); + Ref<Material> material = get_material("voxel_gi_material", p_gizmo); + Ref<Material> icon = get_material("voxel_gi_icon", p_gizmo); + Ref<Material> material_internal = get_material("voxel_gi_internal_material", p_gizmo); p_gizmo->clear(); Vector<Vector3> lines; Vector3 extents = probe->get_extents(); - static const int subdivs[GIProbe::SUBDIV_MAX] = { 64, 128, 256, 512 }; + static const int subdivs[VoxelGI::SUBDIV_MAX] = { 64, 128, 256, 512 }; AABB aabb = AABB(-extents, extents * 2); int subdiv = subdivs[probe->get_subdiv()]; @@ -3256,7 +3234,7 @@ void GIProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { } if (p_gizmo->is_selected()) { - Ref<Material> solid_material = get_material("gi_probe_solid_material", p_gizmo); + Ref<Material> solid_material = get_material("voxel_gi_solid_material", p_gizmo); p_gizmo->add_solid_box(solid_material, aabb.get_size()); } @@ -3266,7 +3244,7 @@ void GIProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { //// -BakedLightmapGizmoPlugin::BakedLightmapGizmoPlugin() { +LightmapGIGizmoPlugin::LightmapGIGizmoPlugin() { Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/lightmap_lines", Color(0.5, 0.6, 1)); gizmo_color.a = 0.1; @@ -3280,39 +3258,39 @@ BakedLightmapGizmoPlugin::BakedLightmapGizmoPlugin() { add_material("lightmap_probe_material", mat); - create_icon_material("baked_indirect_light_icon", Node3DEditor::get_singleton()->get_theme_icon("GizmoBakedLightmap", "EditorIcons")); + create_icon_material("baked_indirect_light_icon", Node3DEditor::get_singleton()->get_theme_icon("GizmoLightmapGI", "EditorIcons")); } -String BakedLightmapGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const { +String LightmapGIGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const { return ""; } -Variant BakedLightmapGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const { +Variant LightmapGIGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const { return Variant(); } -void BakedLightmapGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { +void LightmapGIGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { } -void BakedLightmapGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) { +void LightmapGIGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) { } -bool BakedLightmapGizmoPlugin::has_gizmo(Node3D *p_spatial) { - return Object::cast_to<BakedLightmap>(p_spatial) != nullptr; +bool LightmapGIGizmoPlugin::has_gizmo(Node3D *p_spatial) { + return Object::cast_to<LightmapGI>(p_spatial) != nullptr; } -String BakedLightmapGizmoPlugin::get_gizmo_name() const { - return "BakedLightmap"; +String LightmapGIGizmoPlugin::get_gizmo_name() const { + return "LightmapGI"; } -int BakedLightmapGizmoPlugin::get_priority() const { +int LightmapGIGizmoPlugin::get_priority() const { return -1; } -void BakedLightmapGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { +void LightmapGIGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { Ref<Material> icon = get_material("baked_indirect_light_icon", p_gizmo); - BakedLightmap *baker = Object::cast_to<BakedLightmap>(p_gizmo->get_spatial_node()); - Ref<BakedLightmapData> data = baker->get_light_data(); + LightmapGI *baker = Object::cast_to<LightmapGI>(p_gizmo->get_spatial_node()); + Ref<LightmapGIData> data = baker->get_light_data(); p_gizmo->add_unscaled_billboard(icon, 0.05); @@ -3583,7 +3561,7 @@ void CollisionObject3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { co->get_shape_owners(&owners); for (List<uint32_t>::Element *E = owners.front(); E; E = E->next()) { uint32_t owner_id = E->get(); - Transform xform = co->shape_owner_get_transform(owner_id); + Transform3D xform = co->shape_owner_get_transform(owner_id); Object *owner = co->shape_owner_get_owner(owner_id); // Exclude CollisionShape3D and CollisionPolygon3D as they have their gizmo. if (!Object::cast_to<CollisionShape3D>(owner) && !Object::cast_to<CollisionPolygon3D>(owner)) { @@ -3701,8 +3679,8 @@ void CollisionShape3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_i return; } - Transform gt = cs->get_global_transform(); - Transform gi = gt.affine_inverse(); + Transform3D gt = cs->get_global_transform(); + Transform3D gi = gt.affine_inverse(); Vector3 ray_from = p_camera->project_ray_origin(p_point); Vector3 ray_dir = p_camera->project_ray_normal(p_point); @@ -4369,7 +4347,7 @@ void NavigationRegion3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { #define BODY_A_RADIUS 0.25 #define BODY_B_RADIUS 0.27 -Basis JointGizmosDrawer::look_body(const Transform &p_joint_transform, const Transform &p_body_transform) { +Basis JointGizmosDrawer::look_body(const Transform3D &p_joint_transform, const Transform3D &p_body_transform) { const Vector3 &p_eye(p_joint_transform.origin); const Vector3 &p_target(p_body_transform.origin); @@ -4394,7 +4372,7 @@ Basis JointGizmosDrawer::look_body(const Transform &p_joint_transform, const Tra return base; } -Basis JointGizmosDrawer::look_body_toward(Vector3::Axis p_axis, const Transform &joint_transform, const Transform &body_transform) { +Basis JointGizmosDrawer::look_body_toward(Vector3::Axis p_axis, const Transform3D &joint_transform, const Transform3D &body_transform) { switch (p_axis) { case Vector3::AXIS_X: return look_body_toward_x(joint_transform, body_transform); @@ -4407,7 +4385,7 @@ Basis JointGizmosDrawer::look_body_toward(Vector3::Axis p_axis, const Transform } } -Basis JointGizmosDrawer::look_body_toward_x(const Transform &p_joint_transform, const Transform &p_body_transform) { +Basis JointGizmosDrawer::look_body_toward_x(const Transform3D &p_joint_transform, const Transform3D &p_body_transform) { const Vector3 &p_eye(p_joint_transform.origin); const Vector3 &p_target(p_body_transform.origin); @@ -4438,7 +4416,7 @@ Basis JointGizmosDrawer::look_body_toward_x(const Transform &p_joint_transform, return base; } -Basis JointGizmosDrawer::look_body_toward_y(const Transform &p_joint_transform, const Transform &p_body_transform) { +Basis JointGizmosDrawer::look_body_toward_y(const Transform3D &p_joint_transform, const Transform3D &p_body_transform) { const Vector3 &p_eye(p_joint_transform.origin); const Vector3 &p_target(p_body_transform.origin); @@ -4469,7 +4447,7 @@ Basis JointGizmosDrawer::look_body_toward_y(const Transform &p_joint_transform, return base; } -Basis JointGizmosDrawer::look_body_toward_z(const Transform &p_joint_transform, const Transform &p_body_transform) { +Basis JointGizmosDrawer::look_body_toward_z(const Transform3D &p_joint_transform, const Transform3D &p_body_transform) { const Vector3 &p_eye(p_joint_transform.origin); const Vector3 &p_target(p_body_transform.origin); @@ -4500,7 +4478,7 @@ Basis JointGizmosDrawer::look_body_toward_z(const Transform &p_joint_transform, return base; } -void JointGizmosDrawer::draw_circle(Vector3::Axis p_axis, real_t p_radius, const Transform &p_offset, const Basis &p_base, real_t p_limit_lower, real_t p_limit_upper, Vector<Vector3> &r_points, bool p_inverse) { +void JointGizmosDrawer::draw_circle(Vector3::Axis p_axis, real_t p_radius, const Transform3D &p_offset, const Basis &p_base, real_t p_limit_lower, real_t p_limit_upper, Vector<Vector3> &r_points, bool p_inverse) { if (p_limit_lower == p_limit_upper) { r_points.push_back(p_offset.translated(Vector3()).origin); r_points.push_back(p_offset.translated(p_base.xform(Vector3(0.5, 0, 0))).origin); @@ -4562,7 +4540,7 @@ void JointGizmosDrawer::draw_circle(Vector3::Axis p_axis, real_t p_radius, const } } -void JointGizmosDrawer::draw_cone(const Transform &p_offset, const Basis &p_base, real_t p_swing, real_t p_twist, Vector<Vector3> &r_points) { +void JointGizmosDrawer::draw_cone(const Transform3D &p_offset, const Basis &p_base, real_t p_swing, real_t p_twist, Vector<Vector3> &r_points) { float r = 1.0; float w = r * Math::sin(p_swing); float d = r * Math::cos(p_swing); @@ -4666,7 +4644,7 @@ void Joint3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { Vector<Vector3> body_b_points; if (Object::cast_to<PinJoint3D>(joint)) { - CreatePinJointGizmo(Transform(), points); + CreatePinJointGizmo(Transform3D(), points); p_gizmo->add_collision_segments(points); p_gizmo->add_lines(points, common_material); } @@ -4674,10 +4652,10 @@ void Joint3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { HingeJoint3D *hinge = Object::cast_to<HingeJoint3D>(joint); if (hinge) { CreateHingeJointGizmo( - Transform(), + Transform3D(), hinge->get_global_transform(), - node_body_a ? node_body_a->get_global_transform() : Transform(), - node_body_b ? node_body_b->get_global_transform() : Transform(), + node_body_a ? node_body_a->get_global_transform() : Transform3D(), + node_body_b ? node_body_b->get_global_transform() : Transform3D(), hinge->get_param(HingeJoint3D::PARAM_LIMIT_LOWER), hinge->get_param(HingeJoint3D::PARAM_LIMIT_UPPER), hinge->get_flag(HingeJoint3D::FLAG_USE_LIMIT), @@ -4697,10 +4675,10 @@ void Joint3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { SliderJoint3D *slider = Object::cast_to<SliderJoint3D>(joint); if (slider) { CreateSliderJointGizmo( - Transform(), + Transform3D(), slider->get_global_transform(), - node_body_a ? node_body_a->get_global_transform() : Transform(), - node_body_b ? node_body_b->get_global_transform() : Transform(), + node_body_a ? node_body_a->get_global_transform() : Transform3D(), + node_body_b ? node_body_b->get_global_transform() : Transform3D(), slider->get_param(SliderJoint3D::PARAM_ANGULAR_LIMIT_LOWER), slider->get_param(SliderJoint3D::PARAM_ANGULAR_LIMIT_UPPER), slider->get_param(SliderJoint3D::PARAM_LINEAR_LIMIT_LOWER), @@ -4721,10 +4699,10 @@ void Joint3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { ConeTwistJoint3D *cone = Object::cast_to<ConeTwistJoint3D>(joint); if (cone) { CreateConeTwistJointGizmo( - Transform(), + Transform3D(), cone->get_global_transform(), - node_body_a ? node_body_a->get_global_transform() : Transform(), - node_body_b ? node_body_b->get_global_transform() : Transform(), + node_body_a ? node_body_a->get_global_transform() : Transform3D(), + node_body_b ? node_body_b->get_global_transform() : Transform3D(), cone->get_param(ConeTwistJoint3D::PARAM_SWING_SPAN), cone->get_param(ConeTwistJoint3D::PARAM_TWIST_SPAN), node_body_a ? &body_a_points : nullptr, @@ -4740,10 +4718,10 @@ void Joint3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { Generic6DOFJoint3D *gen = Object::cast_to<Generic6DOFJoint3D>(joint); if (gen) { CreateGeneric6DOFJointGizmo( - Transform(), + Transform3D(), gen->get_global_transform(), - node_body_a ? node_body_a->get_global_transform() : Transform(), - node_body_b ? node_body_b->get_global_transform() : Transform(), + node_body_a ? node_body_a->get_global_transform() : Transform3D(), + node_body_b ? node_body_b->get_global_transform() : Transform3D(), gen->get_param_x(Generic6DOFJoint3D::PARAM_ANGULAR_LOWER_LIMIT), gen->get_param_x(Generic6DOFJoint3D::PARAM_ANGULAR_UPPER_LIMIT), @@ -4780,7 +4758,7 @@ void Joint3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { } } -void Joint3DGizmoPlugin::CreatePinJointGizmo(const Transform &p_offset, Vector<Vector3> &r_cursor_points) { +void Joint3DGizmoPlugin::CreatePinJointGizmo(const Transform3D &p_offset, Vector<Vector3> &r_cursor_points) { float cs = 0.25; r_cursor_points.push_back(p_offset.translated(Vector3(+cs, 0, 0)).origin); @@ -4791,7 +4769,7 @@ void Joint3DGizmoPlugin::CreatePinJointGizmo(const Transform &p_offset, Vector<V r_cursor_points.push_back(p_offset.translated(Vector3(0, 0, -cs)).origin); } -void Joint3DGizmoPlugin::CreateHingeJointGizmo(const Transform &p_offset, const Transform &p_trs_joint, const Transform &p_trs_body_a, const Transform &p_trs_body_b, real_t p_limit_lower, real_t p_limit_upper, bool p_use_limit, Vector<Vector3> &r_common_points, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points) { +void Joint3DGizmoPlugin::CreateHingeJointGizmo(const Transform3D &p_offset, const Transform3D &p_trs_joint, const Transform3D &p_trs_body_a, const Transform3D &p_trs_body_b, real_t p_limit_lower, real_t p_limit_upper, bool p_use_limit, Vector<Vector3> &r_common_points, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points) { r_common_points.push_back(p_offset.translated(Vector3(0, 0, 0.5)).origin); r_common_points.push_back(p_offset.translated(Vector3(0, 0, -0.5)).origin); @@ -4821,7 +4799,7 @@ void Joint3DGizmoPlugin::CreateHingeJointGizmo(const Transform &p_offset, const } } -void Joint3DGizmoPlugin::CreateSliderJointGizmo(const Transform &p_offset, const Transform &p_trs_joint, const Transform &p_trs_body_a, const Transform &p_trs_body_b, real_t p_angular_limit_lower, real_t p_angular_limit_upper, real_t p_linear_limit_lower, real_t p_linear_limit_upper, Vector<Vector3> &r_points, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points) { +void Joint3DGizmoPlugin::CreateSliderJointGizmo(const Transform3D &p_offset, const Transform3D &p_trs_joint, const Transform3D &p_trs_body_a, const Transform3D &p_trs_body_b, real_t p_angular_limit_lower, real_t p_angular_limit_upper, real_t p_linear_limit_lower, real_t p_linear_limit_upper, Vector<Vector3> &r_points, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points) { p_linear_limit_lower = -p_linear_limit_lower; p_linear_limit_upper = -p_linear_limit_upper; @@ -4880,7 +4858,7 @@ void Joint3DGizmoPlugin::CreateSliderJointGizmo(const Transform &p_offset, const } } -void Joint3DGizmoPlugin::CreateConeTwistJointGizmo(const Transform &p_offset, const Transform &p_trs_joint, const Transform &p_trs_body_a, const Transform &p_trs_body_b, real_t p_swing, real_t p_twist, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points) { +void Joint3DGizmoPlugin::CreateConeTwistJointGizmo(const Transform3D &p_offset, const Transform3D &p_trs_joint, const Transform3D &p_trs_body_a, const Transform3D &p_trs_body_b, real_t p_swing, real_t p_twist, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points) { if (r_body_a_points) { JointGizmosDrawer::draw_cone( p_offset, @@ -4901,10 +4879,10 @@ void Joint3DGizmoPlugin::CreateConeTwistJointGizmo(const Transform &p_offset, co } void Joint3DGizmoPlugin::CreateGeneric6DOFJointGizmo( - const Transform &p_offset, - const Transform &p_trs_joint, - const Transform &p_trs_body_a, - const Transform &p_trs_body_b, + const Transform3D &p_offset, + const Transform3D &p_trs_joint, + const Transform3D &p_trs_body_a, + const Transform3D &p_trs_body_b, real_t p_angular_limit_lower_x, real_t p_angular_limit_upper_x, real_t p_linear_limit_lower_x, diff --git a/editor/node_3d_editor_gizmos.h b/editor/node_3d_editor_gizmos.h index 95344176ad..8a0e10241a 100644 --- a/editor/node_3d_editor_gizmos.h +++ b/editor/node_3d_editor_gizmos.h @@ -316,8 +316,8 @@ public: DecalGizmoPlugin(); }; -class GIProbeGizmoPlugin : public EditorNode3DGizmoPlugin { - GDCLASS(GIProbeGizmoPlugin, EditorNode3DGizmoPlugin); +class VoxelGIGizmoPlugin : public EditorNode3DGizmoPlugin { + GDCLASS(VoxelGIGizmoPlugin, EditorNode3DGizmoPlugin); public: bool has_gizmo(Node3D *p_spatial) override; @@ -330,11 +330,11 @@ public: void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) override; void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false) override; - GIProbeGizmoPlugin(); + VoxelGIGizmoPlugin(); }; -class BakedLightmapGizmoPlugin : public EditorNode3DGizmoPlugin { - GDCLASS(BakedLightmapGizmoPlugin, EditorNode3DGizmoPlugin); +class LightmapGIGizmoPlugin : public EditorNode3DGizmoPlugin { + GDCLASS(LightmapGIGizmoPlugin, EditorNode3DGizmoPlugin); public: bool has_gizmo(Node3D *p_spatial) override; @@ -347,7 +347,7 @@ public: void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) override; void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false) override; - BakedLightmapGizmoPlugin(); + LightmapGIGizmoPlugin(); }; class LightmapProbeGizmoPlugin : public EditorNode3DGizmoPlugin { @@ -428,17 +428,17 @@ public: class JointGizmosDrawer { public: - static Basis look_body(const Transform &p_joint_transform, const Transform &p_body_transform); - static Basis look_body_toward(Vector3::Axis p_axis, const Transform &joint_transform, const Transform &body_transform); - static Basis look_body_toward_x(const Transform &p_joint_transform, const Transform &p_body_transform); - static Basis look_body_toward_y(const Transform &p_joint_transform, const Transform &p_body_transform); + static Basis look_body(const Transform3D &p_joint_transform, const Transform3D &p_body_transform); + static Basis look_body_toward(Vector3::Axis p_axis, const Transform3D &joint_transform, const Transform3D &body_transform); + static Basis look_body_toward_x(const Transform3D &p_joint_transform, const Transform3D &p_body_transform); + static Basis look_body_toward_y(const Transform3D &p_joint_transform, const Transform3D &p_body_transform); /// Special function just used for physics joints, it returns a basis constrained toward Joint Z axis /// with axis X and Y that are looking toward the body and oriented toward up - static Basis look_body_toward_z(const Transform &p_joint_transform, const Transform &p_body_transform); + static Basis look_body_toward_z(const Transform3D &p_joint_transform, const Transform3D &p_body_transform); // Draw circle around p_axis - static void draw_circle(Vector3::Axis p_axis, real_t p_radius, const Transform &p_offset, const Basis &p_base, real_t p_limit_lower, real_t p_limit_upper, Vector<Vector3> &r_points, bool p_inverse = false); - static void draw_cone(const Transform &p_offset, const Basis &p_base, real_t p_swing, real_t p_twist, Vector<Vector3> &r_points); + static void draw_circle(Vector3::Axis p_axis, real_t p_radius, const Transform3D &p_offset, const Basis &p_base, real_t p_limit_lower, real_t p_limit_upper, Vector<Vector3> &r_points, bool p_inverse = false); + static void draw_cone(const Transform3D &p_offset, const Basis &p_base, real_t p_swing, real_t p_twist, Vector<Vector3> &r_points); }; class Joint3DGizmoPlugin : public EditorNode3DGizmoPlugin { @@ -455,15 +455,15 @@ public: int get_priority() const override; void redraw(EditorNode3DGizmo *p_gizmo) override; - static void CreatePinJointGizmo(const Transform &p_offset, Vector<Vector3> &r_cursor_points); - static void CreateHingeJointGizmo(const Transform &p_offset, const Transform &p_trs_joint, const Transform &p_trs_body_a, const Transform &p_trs_body_b, real_t p_limit_lower, real_t p_limit_upper, bool p_use_limit, Vector<Vector3> &r_common_points, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points); - static void CreateSliderJointGizmo(const Transform &p_offset, const Transform &p_trs_joint, const Transform &p_trs_body_a, const Transform &p_trs_body_b, real_t p_angular_limit_lower, real_t p_angular_limit_upper, real_t p_linear_limit_lower, real_t p_linear_limit_upper, Vector<Vector3> &r_points, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points); - static void CreateConeTwistJointGizmo(const Transform &p_offset, const Transform &p_trs_joint, const Transform &p_trs_body_a, const Transform &p_trs_body_b, real_t p_swing, real_t p_twist, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points); + static void CreatePinJointGizmo(const Transform3D &p_offset, Vector<Vector3> &r_cursor_points); + static void CreateHingeJointGizmo(const Transform3D &p_offset, const Transform3D &p_trs_joint, const Transform3D &p_trs_body_a, const Transform3D &p_trs_body_b, real_t p_limit_lower, real_t p_limit_upper, bool p_use_limit, Vector<Vector3> &r_common_points, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points); + static void CreateSliderJointGizmo(const Transform3D &p_offset, const Transform3D &p_trs_joint, const Transform3D &p_trs_body_a, const Transform3D &p_trs_body_b, real_t p_angular_limit_lower, real_t p_angular_limit_upper, real_t p_linear_limit_lower, real_t p_linear_limit_upper, Vector<Vector3> &r_points, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points); + static void CreateConeTwistJointGizmo(const Transform3D &p_offset, const Transform3D &p_trs_joint, const Transform3D &p_trs_body_a, const Transform3D &p_trs_body_b, real_t p_swing, real_t p_twist, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points); static void CreateGeneric6DOFJointGizmo( - const Transform &p_offset, - const Transform &p_trs_joint, - const Transform &p_trs_body_a, - const Transform &p_trs_body_b, + const Transform3D &p_offset, + const Transform3D &p_trs_joint, + const Transform3D &p_trs_body_a, + const Transform3D &p_trs_body_b, real_t p_angular_limit_lower_x, real_t p_angular_limit_upper_x, real_t p_linear_limit_lower_x, diff --git a/editor/plugin_config_dialog.cpp b/editor/plugin_config_dialog.cpp index 7dda61f0bf..f55d77d782 100644 --- a/editor/plugin_config_dialog.cpp +++ b/editor/plugin_config_dialog.cpp @@ -30,7 +30,7 @@ #include "plugin_config_dialog.h" #include "core/io/config_file.h" -#include "core/os/dir_access.h" +#include "core/io/dir_access.h" #include "editor/editor_node.h" #include "editor/editor_plugin.h" #include "editor/editor_scale.h" diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 2be586733b..0083876e69 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -666,93 +666,6 @@ void CanvasItemEditor::_get_canvas_items_at_pos(const Point2 &p_pos, Vector<_Sel } } -void CanvasItemEditor::_get_bones_at_pos(const Point2 &p_pos, Vector<_SelectResult> &r_items) { - Point2 screen_pos = transform.xform(p_pos); - - for (Map<BoneKey, BoneList>::Element *E = bone_list.front(); E; E = E->next()) { - Node2D *from_node = Object::cast_to<Node2D>(ObjectDB::get_instance(E->key().from)); - - Vector<Vector2> bone_shape; - if (!_get_bone_shape(&bone_shape, nullptr, E)) { - continue; - } - - // Check if the point is inside the Polygon2D - if (Geometry2D::is_point_in_polygon(screen_pos, bone_shape)) { - // Check if the item is already in the list - bool duplicate = false; - for (int i = 0; i < r_items.size(); i++) { - if (r_items[i].item == from_node) { - duplicate = true; - break; - } - } - if (duplicate) { - continue; - } - - // Else, add it - _SelectResult res; - res.item = from_node; - res.z_index = from_node ? from_node->get_z_index() : 0; - res.has_z = from_node; - r_items.push_back(res); - } - } -} - -bool CanvasItemEditor::_get_bone_shape(Vector<Vector2> *shape, Vector<Vector2> *outline_shape, Map<BoneKey, BoneList>::Element *bone) { - int bone_width = EditorSettings::get_singleton()->get("editors/2d/bone_width"); - int bone_outline_width = EditorSettings::get_singleton()->get("editors/2d/bone_outline_size"); - - Node2D *from_node = Object::cast_to<Node2D>(ObjectDB::get_instance(bone->key().from)); - Node2D *to_node = Object::cast_to<Node2D>(ObjectDB::get_instance(bone->key().to)); - - if (!from_node) { - return false; - } - if (!from_node->is_inside_tree()) { - return false; //may have been removed - } - - if (!to_node && bone->get().length == 0) { - return false; - } - - Vector2 from = transform.xform(from_node->get_global_position()); - Vector2 to; - - if (to_node) { - to = transform.xform(to_node->get_global_position()); - } else { - to = transform.xform(from_node->get_global_transform().xform(Vector2(bone->get().length, 0))); - } - - Vector2 rel = to - from; - Vector2 relt = rel.orthogonal().normalized() * bone_width; - Vector2 reln = rel.normalized(); - Vector2 reltn = relt.normalized(); - - if (shape) { - shape->clear(); - shape->push_back(from); - shape->push_back(from + rel * 0.2 + relt); - shape->push_back(to); - shape->push_back(from + rel * 0.2 - relt); - } - - if (outline_shape) { - outline_shape->clear(); - outline_shape->push_back(from + (-reln - reltn) * bone_outline_width); - outline_shape->push_back(from + (-reln + reltn) * bone_outline_width); - outline_shape->push_back(from + rel * 0.2 + relt + reltn * bone_outline_width); - outline_shape->push_back(to + (reln + reltn) * bone_outline_width); - outline_shape->push_back(to + (reln - reltn) * bone_outline_width); - outline_shape->push_back(from + rel * 0.2 - relt - reltn * bone_outline_width); - } - return true; -} - void CanvasItemEditor::_find_canvas_items_in_rect(const Rect2 &p_rect, Node *p_node, List<CanvasItem *> *r_items, const Transform2D &p_parent_xform, const Transform2D &p_canvas_xform) { if (!p_node) { return; @@ -886,50 +799,6 @@ Vector2 CanvasItemEditor::_position_to_anchor(const Control *p_control, Vector2 return output; } -void CanvasItemEditor::_save_canvas_item_ik_chain(const CanvasItem *p_canvas_item, List<float> *p_bones_length, List<Dictionary> *p_bones_state) { - if (p_bones_length) { - *p_bones_length = List<float>(); - } - if (p_bones_state) { - *p_bones_state = List<Dictionary>(); - } - - const Node2D *bone = Object::cast_to<Node2D>(p_canvas_item); - if (bone && bone->has_meta("_edit_bone_")) { - // Check if we have an IK chain - List<const Node2D *> bone_ik_list; - bool ik_found = false; - bone = Object::cast_to<Node2D>(bone->get_parent()); - while (bone) { - bone_ik_list.push_back(bone); - if (bone->has_meta("_edit_ik_")) { - ik_found = true; - break; - } else if (!bone->has_meta("_edit_bone_")) { - break; - } - bone = Object::cast_to<Node2D>(bone->get_parent()); - } - - //Save the bone state and length if we have an IK chain - if (ik_found) { - bone = Object::cast_to<Node2D>(p_canvas_item); - Transform2D bone_xform = bone->get_global_transform(); - for (List<const Node2D *>::Element *bone_E = bone_ik_list.front(); bone_E; bone_E = bone_E->next()) { - bone_xform = bone_xform * bone->get_transform().affine_inverse(); - const Node2D *parent_bone = bone_E->get(); - if (p_bones_length) { - p_bones_length->push_back(parent_bone->get_global_transform().get_origin().distance_to(bone->get_global_position())); - } - if (p_bones_state) { - p_bones_state->push_back(parent_bone->_edit_get_state()); - } - bone = parent_bone; - } - } - } -} - void CanvasItemEditor::_save_canvas_item_state(List<CanvasItem *> p_canvas_items, bool save_bones) { for (List<CanvasItem *>::Element *E = p_canvas_items.front(); E; E = E->next()) { CanvasItem *canvas_item = E->get(); @@ -942,31 +811,15 @@ void CanvasItemEditor::_save_canvas_item_state(List<CanvasItem *> p_canvas_items } else { se->pre_drag_rect = Rect2(); } - - // If we have a bone, save the state of all nodes in the IK chain - _save_canvas_item_ik_chain(canvas_item, &(se->pre_drag_bones_length), &(se->pre_drag_bones_undo_state)); } } } -void CanvasItemEditor::_restore_canvas_item_ik_chain(CanvasItem *p_canvas_item, const List<Dictionary> *p_bones_state) { - CanvasItem *canvas_item = p_canvas_item; - for (const List<Dictionary>::Element *E = p_bones_state->front(); E; E = E->next()) { - canvas_item = Object::cast_to<CanvasItem>(canvas_item->get_parent()); - canvas_item->_edit_set_state(E->get()); - } -} - void CanvasItemEditor::_restore_canvas_item_state(List<CanvasItem *> p_canvas_items, bool restore_bones) { for (List<CanvasItem *>::Element *E = drag_selection.front(); E; E = E->next()) { CanvasItem *canvas_item = E->get(); CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item); - if (se) { - canvas_item->_edit_set_state(se->undo_state); - if (restore_bones) { - _restore_canvas_item_ik_chain(canvas_item, &(se->pre_drag_bones_undo_state)); - } - } + canvas_item->_edit_set_state(se->undo_state); } } @@ -1497,76 +1350,6 @@ bool CanvasItemEditor::_gui_input_pivot(const Ref<InputEvent> &p_event) { return false; } -void CanvasItemEditor::_solve_IK(Node2D *leaf_node, Point2 target_position) { - CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(leaf_node); - if (se) { - int nb_bones = se->pre_drag_bones_undo_state.size(); - if (nb_bones > 0) { - // Build the node list - Point2 leaf_pos = target_position; - - List<Node2D *> joints_list; - List<Point2> joints_pos; - Node2D *joint = leaf_node; - Transform2D joint_transform = leaf_node->get_global_transform_with_canvas(); - for (int i = 0; i < nb_bones + 1; i++) { - joints_list.push_back(joint); - joints_pos.push_back(joint_transform.get_origin()); - joint_transform = joint_transform * joint->get_transform().affine_inverse(); - joint = Object::cast_to<Node2D>(joint->get_parent()); - } - Point2 root_pos = joints_list.back()->get()->get_global_transform_with_canvas().get_origin(); - - // Restraints the node to a maximum distance is necessary - float total_len = 0; - for (List<float>::Element *E = se->pre_drag_bones_length.front(); E; E = E->next()) { - total_len += E->get(); - } - if ((root_pos.distance_to(leaf_pos)) > total_len) { - Vector2 rel = leaf_pos - root_pos; - rel = rel.normalized() * total_len; - leaf_pos = root_pos + rel; - } - joints_pos[0] = leaf_pos; - - // Run the solver - int solver_iterations = 64; - float solver_k = 0.3; - - // Build the position list - for (int i = 0; i < solver_iterations; i++) { - // Handle the leaf joint - int node_id = 0; - for (List<float>::Element *E = se->pre_drag_bones_length.front(); E; E = E->next()) { - Vector2 direction = (joints_pos[node_id + 1] - joints_pos[node_id]).normalized(); - int len = E->get(); - if (E == se->pre_drag_bones_length.front()) { - joints_pos[1] = joints_pos[1].lerp(joints_pos[0] + len * direction, solver_k); - } else if (E == se->pre_drag_bones_length.back()) { - joints_pos[node_id] = joints_pos[node_id].lerp(joints_pos[node_id + 1] - len * direction, solver_k); - } else { - Vector2 center = (joints_pos[node_id + 1] + joints_pos[node_id]) / 2.0; - joints_pos[node_id] = joints_pos[node_id].lerp(center - (direction * len) / 2.0, solver_k); - joints_pos[node_id + 1] = joints_pos[node_id + 1].lerp(center + (direction * len) / 2.0, solver_k); - } - node_id++; - } - } - - // Set the position - for (int node_id = joints_list.size() - 1; node_id > 0; node_id--) { - Point2 current = (joints_list[node_id - 1]->get_global_position() - joints_list[node_id]->get_global_position()).normalized(); - Point2 target = (joints_pos[node_id - 1] - joints_list[node_id]->get_global_position()).normalized(); - float rot = current.angle_to(target); - if (joints_list[node_id]->get_global_transform().basis_determinant() < 0) { - rot = -rot; - } - joints_list[node_id]->rotate(rot); - } - } - } -} - bool CanvasItemEditor::_gui_input_rotate(const Ref<InputEvent> &p_event) { Ref<InputEventMouseButton> b = p_event; Ref<InputEventMouseMotion> m = p_event; @@ -2208,14 +1991,6 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) { if (drag_type == DRAG_MOVE || drag_type == DRAG_MOVE_X || drag_type == DRAG_MOVE_Y) { // Move the nodes if (m.is_valid()) { - // Save the ik chain for reapplying before IK solve - Vector<List<Dictionary>> all_bones_ik_states; - for (List<CanvasItem *>::Element *E = drag_selection.front(); E; E = E->next()) { - List<Dictionary> bones_ik_states; - _save_canvas_item_ik_chain(E->get(), nullptr, &bones_ik_states); - all_bones_ik_states.push_back(bones_ik_states); - } - _restore_canvas_item_state(drag_selection, true); drag_to = transform.affine_inverse().xform(m->get_position()); @@ -2244,25 +2019,12 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) { } } - bool force_no_IK = m->is_alt_pressed(); int index = 0; for (List<CanvasItem *>::Element *E = drag_selection.front(); E; E = E->next()) { CanvasItem *canvas_item = E->get(); - CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item); - if (se) { - Transform2D xform = canvas_item->get_global_transform_with_canvas().affine_inverse() * canvas_item->get_transform(); - - Node2D *node2d = Object::cast_to<Node2D>(canvas_item); - if (node2d && se->pre_drag_bones_undo_state.size() > 0 && !force_no_IK) { - real_t initial_leaf_node_rotation = node2d->get_global_transform_with_canvas().get_rotation(); - _restore_canvas_item_ik_chain(node2d, &(all_bones_ik_states[index])); - real_t final_leaf_node_rotation = node2d->get_global_transform_with_canvas().get_rotation(); - node2d->rotate(initial_leaf_node_rotation - final_leaf_node_rotation); - _solve_IK(node2d, new_pos); - } else { - canvas_item->_edit_set_position(canvas_item->_edit_get_position() + xform.xform(new_pos) - xform.xform(previous_pos)); - } - } + Transform2D xform = canvas_item->get_global_transform_with_canvas().affine_inverse() * canvas_item->get_transform(); + + canvas_item->_edit_set_position(canvas_item->_edit_get_position() + xform.xform(new_pos) - xform.xform(previous_pos)); index++; } return true; @@ -2325,14 +2087,6 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) { } if (drag_selection.size() > 0) { - // Save the ik chain for reapplying before IK solve - Vector<List<Dictionary>> all_bones_ik_states; - for (List<CanvasItem *>::Element *E = drag_selection.front(); E; E = E->next()) { - List<Dictionary> bones_ik_states; - _save_canvas_item_ik_chain(E->get(), nullptr, &bones_ik_states); - all_bones_ik_states.push_back(bones_ik_states); - } - _restore_canvas_item_state(drag_selection, true); bool move_local_base = k->is_alt_pressed(); @@ -2384,21 +2138,9 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) { int index = 0; for (List<CanvasItem *>::Element *E = drag_selection.front(); E; E = E->next()) { CanvasItem *canvas_item = E->get(); - CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item); - if (se) { - Transform2D xform = canvas_item->get_global_transform_with_canvas().affine_inverse() * canvas_item->get_transform(); - - Node2D *node2d = Object::cast_to<Node2D>(canvas_item); - if (node2d && se->pre_drag_bones_undo_state.size() > 0) { - real_t initial_leaf_node_rotation = node2d->get_global_transform_with_canvas().get_rotation(); - _restore_canvas_item_ik_chain(node2d, &(all_bones_ik_states[index])); - real_t final_leaf_node_rotation = node2d->get_global_transform_with_canvas().get_rotation(); - node2d->rotate(initial_leaf_node_rotation - final_leaf_node_rotation); - _solve_IK(node2d, new_pos); - } else { - canvas_item->_edit_set_position(canvas_item->_edit_get_position() + xform.xform(new_pos) - xform.xform(previous_pos)); - } - } + Transform2D xform = canvas_item->get_global_transform_with_canvas().affine_inverse() * canvas_item->get_transform(); + + canvas_item->_edit_set_position(canvas_item->_edit_get_position() + xform.xform(new_pos) - xform.xform(previous_pos)); index++; } } @@ -2524,18 +2266,12 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) { // Find the item to select CanvasItem *canvas_item = nullptr; - // Retrieve the bones Vector<_SelectResult> selection = Vector<_SelectResult>(); - _get_bones_at_pos(click, selection); + // Retrieve the canvas items + selection = Vector<_SelectResult>(); + _get_canvas_items_at_pos(click, selection); if (!selection.is_empty()) { canvas_item = selection[0].item; - } else { - // Retrieve the canvas items - selection = Vector<_SelectResult>(); - _get_canvas_items_at_pos(click, selection); - if (!selection.is_empty()) { - canvas_item = selection[0].item; - } } if (!canvas_item) { @@ -3734,65 +3470,6 @@ void CanvasItemEditor::_draw_axis() { } } -void CanvasItemEditor::_draw_bones() { - RID ci = viewport->get_canvas_item(); - - if (skeleton_show_bones) { - Color bone_color1 = EditorSettings::get_singleton()->get("editors/2d/bone_color1"); - Color bone_color2 = EditorSettings::get_singleton()->get("editors/2d/bone_color2"); - Color bone_ik_color = EditorSettings::get_singleton()->get("editors/2d/bone_ik_color"); - Color bone_outline_color = EditorSettings::get_singleton()->get("editors/2d/bone_outline_color"); - Color bone_selected_color = EditorSettings::get_singleton()->get("editors/2d/bone_selected_color"); - - for (Map<BoneKey, BoneList>::Element *E = bone_list.front(); E; E = E->next()) { - Vector<Vector2> bone_shape; - Vector<Vector2> bone_shape_outline; - if (!_get_bone_shape(&bone_shape, &bone_shape_outline, E)) { - continue; - } - - Node2D *from_node = Object::cast_to<Node2D>(ObjectDB::get_instance(E->key().from)); - if (!from_node->is_visible_in_tree()) { - continue; - } - - Vector<Color> colors; - if (from_node->has_meta("_edit_ik_")) { - colors.push_back(bone_ik_color); - colors.push_back(bone_ik_color); - colors.push_back(bone_ik_color); - colors.push_back(bone_ik_color); - } else { - colors.push_back(bone_color1); - colors.push_back(bone_color2); - colors.push_back(bone_color1); - colors.push_back(bone_color2); - } - - Vector<Color> outline_colors; - - if (editor_selection->is_selected(from_node)) { - outline_colors.push_back(bone_selected_color); - outline_colors.push_back(bone_selected_color); - outline_colors.push_back(bone_selected_color); - outline_colors.push_back(bone_selected_color); - outline_colors.push_back(bone_selected_color); - outline_colors.push_back(bone_selected_color); - } else { - outline_colors.push_back(bone_outline_color); - outline_colors.push_back(bone_outline_color); - outline_colors.push_back(bone_outline_color); - outline_colors.push_back(bone_outline_color); - outline_colors.push_back(bone_outline_color); - outline_colors.push_back(bone_outline_color); - } - - RenderingServer::get_singleton()->canvas_item_add_polygon(ci, bone_shape_outline, outline_colors); - RenderingServer::get_singleton()->canvas_item_add_primitive(ci, bone_shape, colors, Vector<Vector2>(), RID()); - } - } -} - void CanvasItemEditor::_draw_invisible_nodes_positions(Node *p_node, const Transform2D &p_parent_xform, const Transform2D &p_canvas_xform) { ERR_FAIL_COND(!p_node); @@ -3908,72 +3585,6 @@ void CanvasItemEditor::_draw_locks_and_groups(Node *p_node, const Transform2D &p } } -bool CanvasItemEditor::_build_bones_list(Node *p_node) { - ERR_FAIL_COND_V(!p_node, false); - - bool has_child_bones = false; - - for (int i = 0; i < p_node->get_child_count(); i++) { - if (_build_bones_list(p_node->get_child(i))) { - has_child_bones = true; - } - } - - CanvasItem *canvas_item = Object::cast_to<CanvasItem>(p_node); - Node *scene = editor->get_edited_scene(); - if (!canvas_item || !canvas_item->is_visible() || (canvas_item != scene && canvas_item->get_owner() != scene && canvas_item != scene->get_deepest_editable_node(canvas_item))) { - return false; - } - - Node *parent = canvas_item->get_parent(); - - if (Object::cast_to<Bone2D>(canvas_item)) { - if (Object::cast_to<Bone2D>(parent)) { - // Add as bone->parent relationship - BoneKey bk; - bk.from = parent->get_instance_id(); - bk.to = canvas_item->get_instance_id(); - if (!bone_list.has(bk)) { - BoneList b; - b.length = 0; - bone_list[bk] = b; - } - - bone_list[bk].last_pass = bone_last_frame; - } - - if (!has_child_bones) { - // Add a last bone if the Bone2D has no Bone2D child - BoneKey bk; - bk.from = canvas_item->get_instance_id(); - bk.to = ObjectID(); - if (!bone_list.has(bk)) { - BoneList b; - b.length = 0; - bone_list[bk] = b; - } - bone_list[bk].last_pass = bone_last_frame; - } - - return true; - } - - if (canvas_item->has_meta("_edit_bone_")) { - // Add a "custom bone" - BoneKey bk; - bk.from = parent->get_instance_id(); - bk.to = canvas_item->get_instance_id(); - if (!bone_list.has(bk)) { - BoneList b; - b.length = 0; - bone_list[bk] = b; - } - bone_list[bk].last_pass = bone_last_frame; - } - - return false; -} - void CanvasItemEditor::_draw_viewport() { // Update the transform transform = Transform2D(); @@ -4033,7 +3644,6 @@ void CanvasItemEditor::_draw_viewport() { force_over_plugin_list->forward_canvas_force_draw_over_viewport(viewport); } - _draw_bones(); if (show_rulers) { _draw_rulers(); } @@ -4159,8 +3769,8 @@ void CanvasItemEditor::_notification(int p_what) { } Bone2D *bone = Object::cast_to<Bone2D>(b); - if (bone && bone->get_default_length() != E->get().length) { - E->get().length = bone->get_default_length(); + if (bone && bone->get_length() != E->get().length) { + E->get().length = bone->get_length(); viewport->update(); } } @@ -4175,18 +3785,11 @@ void CanvasItemEditor::_notification(int p_what) { AnimationPlayerEditor::singleton->get_track_editor()->connect("visibility_changed", callable_mp(this, &CanvasItemEditor::_keying_changed)); _keying_changed(); - get_tree()->connect("node_added", callable_mp(this, &CanvasItemEditor::_tree_changed), varray()); - get_tree()->connect("node_removed", callable_mp(this, &CanvasItemEditor::_tree_changed), varray()); } else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) { select_sb->set_texture(get_theme_icon("EditorRect2D", "EditorIcons")); } - if (p_what == NOTIFICATION_EXIT_TREE) { - get_tree()->disconnect("node_added", callable_mp(this, &CanvasItemEditor::_tree_changed)); - get_tree()->disconnect("node_removed", callable_mp(this, &CanvasItemEditor::_tree_changed)); - } - if (p_what == NOTIFICATION_ENTER_TREE || p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) { select_button->set_icon(get_theme_icon("ToolSelect", "EditorIcons")); list_select_button->set_icon(get_theme_icon("ListSelect", "EditorIcons")); @@ -4321,46 +3924,6 @@ void CanvasItemEditor::edit(CanvasItem *p_canvas_item) { } } -void CanvasItemEditor::_queue_update_bone_list() { - if (bone_list_dirty) { - return; - } - - call_deferred("_update_bone_list"); - bone_list_dirty = true; -} - -void CanvasItemEditor::_update_bone_list() { - bone_last_frame++; - - if (editor->get_edited_scene()) { - _build_bones_list(editor->get_edited_scene()); - } - - List<Map<BoneKey, BoneList>::Element *> bone_to_erase; - for (Map<BoneKey, BoneList>::Element *E = bone_list.front(); E; E = E->next()) { - if (E->get().last_pass != bone_last_frame) { - bone_to_erase.push_back(E); - continue; - } - - Node *node = Object::cast_to<Node>(ObjectDB::get_instance(E->key().from)); - if (!node || !node->is_inside_tree() || (node != get_tree()->get_edited_scene_root() && !get_tree()->get_edited_scene_root()->is_a_parent_of(node))) { - bone_to_erase.push_back(E); - continue; - } - } - while (bone_to_erase.size()) { - bone_list.erase(bone_to_erase.front()->get()); - bone_to_erase.pop_front(); - } - bone_list_dirty = false; -} - -void CanvasItemEditor::_tree_changed(Node *) { - _queue_update_bone_list(); -} - void CanvasItemEditor::_update_scrollbars() { updating_scroll = true; @@ -4376,8 +3939,6 @@ void CanvasItemEditor::_update_scrollbars() { Size2 screen_rect = Size2(ProjectSettings::get_singleton()->get("display/window/size/width"), ProjectSettings::get_singleton()->get("display/window/size/height")); Rect2 local_rect = Rect2(Point2(), viewport->get_size() - Size2(vmin.width, hmin.height)); - _queue_update_bone_list(); - // Calculate scrollable area. Rect2 canvas_item_rect = Rect2(Point2(), screen_rect); if (editor->is_inside_tree() && editor->get_edited_scene()) { @@ -4837,10 +4398,19 @@ void CanvasItemEditor::_popup_callback(int p_op) { snap_dialog->popup_centered(Size2(220, 160) * EDSCALE); } break; case SKELETON_SHOW_BONES: { - skeleton_show_bones = !skeleton_show_bones; - int idx = skeleton_menu->get_popup()->get_item_index(SKELETON_SHOW_BONES); - skeleton_menu->get_popup()->set_item_checked(idx, skeleton_show_bones); - viewport->update(); + List<Node *> selection = editor_selection->get_selected_node_list(); + for (List<Node *>::Element *E = selection.front(); E; E = E->next()) { + // Add children nodes so they are processed + for (int child = 0; child < E->get()->get_child_count(); child++) { + selection.push_back(E->get()->get_child(child)); + } + + Bone2D *bone_2d = Object::cast_to<Bone2D>(E->get()); + if (!bone_2d || !bone_2d->is_inside_tree()) { + continue; + } + bone_2d->_editor_set_show_bone_gizmo(!bone_2d->_editor_get_show_bone_gizmo()); + } } break; case SHOW_HELPERS: { show_helpers = !show_helpers; @@ -5189,107 +4759,45 @@ void CanvasItemEditor::_popup_callback(int p_op) { } break; case SKELETON_MAKE_BONES: { Map<Node *, Object *> &selection = editor_selection->get_selection(); + Node *editor_root = EditorNode::get_singleton()->get_edited_scene()->get_tree()->get_edited_scene_root(); - undo_redo->create_action(TTR("Create Custom Bone(s) from Node(s)")); + undo_redo->create_action(TTR("Create Custom Bone2D(s) from Node(s)")); for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) { Node2D *n2d = Object::cast_to<Node2D>(E->key()); - if (!n2d) { - continue; - } - if (!n2d->is_visible_in_tree()) { - continue; - } - if (!n2d->get_parent_item()) { - continue; - } - if (n2d->has_meta("_edit_bone_") && n2d->get_meta("_edit_bone_")) { - continue; - } - - undo_redo->add_do_method(n2d, "set_meta", "_edit_bone_", true); - undo_redo->add_undo_method(n2d, "remove_meta", "_edit_bone_"); - } - undo_redo->add_do_method(this, "_queue_update_bone_list"); - undo_redo->add_undo_method(this, "_queue_update_bone_list"); - undo_redo->add_do_method(viewport, "update"); - undo_redo->add_undo_method(viewport, "update"); - undo_redo->commit_action(); - } break; - case SKELETON_CLEAR_BONES: { - Map<Node *, Object *> &selection = editor_selection->get_selection(); + Bone2D *new_bone = memnew(Bone2D); + String new_bone_name = n2d->get_name(); + new_bone_name += "Bone2D"; + new_bone->set_name(new_bone_name); + new_bone->set_transform(n2d->get_transform()); - undo_redo->create_action(TTR("Clear Bones")); - for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) { - Node2D *n2d = Object::cast_to<Node2D>(E->key()); - if (!n2d) { + Node *n2d_parent = n2d->get_parent(); + if (!n2d_parent) { continue; } - if (!n2d->is_visible_in_tree()) { - continue; - } - if (!n2d->has_meta("_edit_bone_")) { - continue; - } - - undo_redo->add_do_method(n2d, "remove_meta", "_edit_bone_"); - undo_redo->add_undo_method(n2d, "set_meta", "_edit_bone_", n2d->get_meta("_edit_bone_")); - } - undo_redo->add_do_method(this, "_queue_update_bone_list"); - undo_redo->add_undo_method(this, "_queue_update_bone_list"); - undo_redo->add_do_method(viewport, "update"); - undo_redo->add_undo_method(viewport, "update"); - undo_redo->commit_action(); - } break; - case SKELETON_SET_IK_CHAIN: { - List<Node *> selection = editor_selection->get_selected_node_list(); - - undo_redo->create_action(TTR("Make IK Chain")); - for (List<Node *>::Element *E = selection.front(); E; E = E->next()) { - CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get()); - if (!canvas_item || !canvas_item->is_visible_in_tree()) { - continue; - } - if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root()) { - continue; - } - if (canvas_item->has_meta("_edit_ik_") && canvas_item->get_meta("_edit_ik_")) { - continue; - } + undo_redo->add_do_method(n2d_parent, "add_child", new_bone); + undo_redo->add_do_method(n2d_parent, "remove_child", n2d); + undo_redo->add_do_method(new_bone, "add_child", n2d); + undo_redo->add_do_method(n2d, "set_transform", Transform2D()); + undo_redo->add_do_method(this, "_set_owner_for_node_and_children", new_bone, editor_root); - undo_redo->add_do_method(canvas_item, "set_meta", "_edit_ik_", true); - undo_redo->add_undo_method(canvas_item, "remove_meta", "_edit_ik_"); + undo_redo->add_undo_method(new_bone, "remove_child", n2d); + undo_redo->add_undo_method(n2d_parent, "add_child", n2d); + undo_redo->add_undo_method(n2d, "set_transform", new_bone->get_transform()); + undo_redo->add_undo_method(new_bone, "queue_free"); + undo_redo->add_undo_method(this, "_set_owner_for_node_and_children", n2d, editor_root); } - undo_redo->add_do_method(viewport, "update"); - undo_redo->add_undo_method(viewport, "update"); undo_redo->commit_action(); } break; - case SKELETON_CLEAR_IK_CHAIN: { - Map<Node *, Object *> &selection = editor_selection->get_selection(); - - undo_redo->create_action(TTR("Clear IK Chain")); - for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) { - CanvasItem *n2d = Object::cast_to<CanvasItem>(E->key()); - if (!n2d) { - continue; - } - if (!n2d->is_visible_in_tree()) { - continue; - } - if (!n2d->has_meta("_edit_ik_")) { - continue; - } - - undo_redo->add_do_method(n2d, "remove_meta", "_edit_ik_"); - undo_redo->add_undo_method(n2d, "set_meta", "_edit_ik_", n2d->get_meta("_edit_ik_")); - } - undo_redo->add_do_method(viewport, "update"); - undo_redo->add_undo_method(viewport, "update"); - undo_redo->commit_action(); + } +} - } break; +void CanvasItemEditor::_set_owner_for_node_and_children(Node *p_node, Node *p_owner) { + p_node->set_owner(p_owner); + for (int i = 0; i < p_node->get_child_count(); i++) { + _set_owner_for_node_and_children(p_node->get_child(i), p_owner); } } @@ -5358,14 +4866,12 @@ void CanvasItemEditor::_bind_methods() { ClassDB::bind_method(D_METHOD("_update_override_camera_button", "game_running"), &CanvasItemEditor::_update_override_camera_button); ClassDB::bind_method("_get_editor_data", &CanvasItemEditor::_get_editor_data); ClassDB::bind_method("_unhandled_key_input", &CanvasItemEditor::_unhandled_key_input); - ClassDB::bind_method("_queue_update_bone_list", &CanvasItemEditor::_update_bone_list); - ClassDB::bind_method("_update_bone_list", &CanvasItemEditor::_update_bone_list); - ClassDB::bind_method("_reset_create_position", &CanvasItemEditor::_reset_create_position); - ClassDB::bind_method(D_METHOD("get_state"), &CanvasItemEditor::get_state); ClassDB::bind_method(D_METHOD("set_state"), &CanvasItemEditor::set_state); ClassDB::bind_method(D_METHOD("update_viewport"), &CanvasItemEditor::update_viewport); ClassDB::bind_method(D_METHOD("_zoom_on_position"), &CanvasItemEditor::_zoom_on_position); + ClassDB::bind_method("_set_owner_for_node_and_children", &CanvasItemEditor::_set_owner_for_node_and_children); + ADD_SIGNAL(MethodInfo("item_lock_status_changed")); ADD_SIGNAL(MethodInfo("item_group_status_changed")); } @@ -5402,7 +4908,6 @@ Dictionary CanvasItemEditor::get_state() const { state["snap_scale"] = snap_scale; state["snap_relative"] = snap_relative; state["snap_pixel"] = snap_pixel; - state["skeleton_show_bones"] = skeleton_show_bones; return state; } @@ -5570,12 +5075,6 @@ void CanvasItemEditor::set_state(const Dictionary &p_state) { snap_config_menu->get_popup()->set_item_checked(idx, snap_pixel); } - if (state.has("skeleton_show_bones")) { - skeleton_show_bones = state["skeleton_show_bones"]; - int idx = skeleton_menu->get_popup()->get_item_index(SKELETON_SHOW_BONES); - skeleton_menu->get_popup()->set_item_checked(idx, skeleton_show_bones); - } - if (update_scrollbars) { _update_scrollbars(); } @@ -5658,8 +5157,6 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { selected_from_canvas = false; anchors_mode = false; - skeleton_show_bones = true; - drag_type = DRAG_NONE; drag_from = Vector2(); drag_to = Vector2(); @@ -5675,7 +5172,6 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { bone_last_frame = 0; - bone_list_dirty = false; tool = TOOL_SELECT; undo_redo = p_editor->get_undo_redo(); editor = p_editor; @@ -5940,13 +5436,9 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { p = skeleton_menu->get_popup(); p->set_hide_on_checkable_item_selection(false); - p->add_check_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_set_ik_chain", TTR("Make IK Chain")), SKELETON_SET_IK_CHAIN); - p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_clear_ik_chain", TTR("Clear IK Chain")), SKELETON_CLEAR_IK_CHAIN); + 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 Custom Bone(s) from Node(s)"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_B), SKELETON_MAKE_BONES); - p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_clear_bones", TTR("Clear Custom Bones")), SKELETON_CLEAR_BONES); + 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->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback)); hb->add_child(memnew(VSeparator)); diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h index 21ef3f88df..96a29e0c74 100644 --- a/editor/plugins/canvas_item_editor_plugin.h +++ b/editor/plugins/canvas_item_editor_plugin.h @@ -187,10 +187,7 @@ private: VIEW_FRAME_TO_SELECTION, PREVIEW_CANVAS_SCALE, SKELETON_MAKE_BONES, - SKELETON_CLEAR_BONES, - SKELETON_SHOW_BONES, - SKELETON_SET_IK_CHAIN, - SKELETON_CLEAR_IK_CHAIN + SKELETON_SHOW_BONES }; enum DragType { @@ -223,7 +220,6 @@ private: DRAG_KEY_MOVE }; - EditorSelection *editor_selection; bool selection_menu_additive_selection; Tool tool; @@ -277,7 +273,6 @@ private: bool snap_scale; bool snap_relative; bool snap_pixel; - bool skeleton_show_bones; bool key_pos; bool key_rot; bool key_scale; @@ -412,7 +407,6 @@ private: bool _is_node_movable(const Node *p_node, bool p_popup_warning = false); void _find_canvas_items_at_pos(const Point2 &p_pos, Node *p_node, Vector<_SelectResult> &r_items, const Transform2D &p_parent_xform = Transform2D(), const Transform2D &p_canvas_xform = Transform2D()); void _get_canvas_items_at_pos(const Point2 &p_pos, Vector<_SelectResult> &r_items, bool p_allow_locked = false); - void _get_bones_at_pos(const Point2 &p_pos, Vector<_SelectResult> &r_items); void _find_canvas_items_in_rect(const Rect2 &p_rect, Node *p_node, List<CanvasItem *> *r_items, const Transform2D &p_parent_xform = Transform2D(), const Transform2D &p_canvas_xform = Transform2D()); bool _select_click_on_item(CanvasItem *item, Point2 p_click_pos, bool p_append); @@ -423,9 +417,7 @@ private: void _add_canvas_item(CanvasItem *p_canvas_item); - void _save_canvas_item_ik_chain(const CanvasItem *p_canvas_item, List<float> *p_bones_length, List<Dictionary> *p_bones_state); void _save_canvas_item_state(List<CanvasItem *> p_canvas_items, bool save_bones = false); - void _restore_canvas_item_ik_chain(CanvasItem *p_canvas_item, const List<Dictionary> *p_bones_state); void _restore_canvas_item_state(List<CanvasItem *> p_canvas_items, bool restore_bones = false); void _commit_canvas_item_state(List<CanvasItem *> p_canvas_items, String action_name, bool commit_bones = false); @@ -445,8 +437,6 @@ private: void _reset_create_position(); UndoRedo *undo_redo; - bool _build_bones_list(Node *p_node); - bool _get_bone_shape(Vector<Vector2> *shape, Vector<Vector2> *outline_shape, Map<BoneKey, BoneList>::Element *bone); List<CanvasItem *> _get_edited_canvas_items(bool retreive_locked = false, bool remove_canvas_item_if_parent_in_selection = true); Rect2 _get_encompassing_rect_from_list(List<CanvasItem *> p_list); @@ -476,7 +466,6 @@ private: void _draw_control_helpers(Control *control); void _draw_selection(); void _draw_axis(); - void _draw_bones(); void _draw_invisible_nodes_positions(Node *p_node, const Transform2D &p_parent_xform = Transform2D(), const Transform2D &p_canvas_xform = Transform2D()); void _draw_locks_and_groups(Node *p_node, const Transform2D &p_parent_xform = Transform2D(), const Transform2D &p_canvas_xform = Transform2D()); void _draw_hover(); @@ -503,8 +492,6 @@ private: void _focus_selection(int p_op); - void _solve_IK(Node2D *leaf_node, Point2 target_position); - SnapTarget snap_target[2]; Transform2D snap_transform; void _snap_if_closer_float( @@ -546,14 +533,11 @@ private: HSplitContainer *palette_split; VSplitContainer *bottom_split; - bool bone_list_dirty; - void _queue_update_bone_list(); - void _update_bone_list(); - void _tree_changed(Node *); - void _popup_warning_temporarily(Control *p_control, const float p_duration); void _popup_warning_depop(Control *p_control); + void _set_owner_for_node_and_children(Node *p_node, Node *p_owner); + friend class CanvasItemEditorPlugin; protected: @@ -641,6 +625,8 @@ public: bool is_anchors_mode_enabled() { return anchors_mode; }; + EditorSelection *editor_selection; + CanvasItemEditor(EditorNode *p_editor); }; diff --git a/editor/plugins/collision_polygon_3d_editor_plugin.cpp b/editor/plugins/collision_polygon_3d_editor_plugin.cpp index 252e5c68a0..a0df7e289e 100644 --- a/editor/plugins/collision_polygon_3d_editor_plugin.cpp +++ b/editor/plugins/collision_polygon_3d_editor_plugin.cpp @@ -32,8 +32,8 @@ #include "canvas_item_editor_plugin.h" #include "core/input/input.h" +#include "core/io/file_access.h" #include "core/math/geometry_2d.h" -#include "core/os/file_access.h" #include "core/os/keyboard.h" #include "editor/editor_settings.h" #include "node_3d_editor_plugin.h" @@ -108,8 +108,8 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con return false; } - Transform gt = node->get_global_transform(); - Transform gi = gt.affine_inverse(); + Transform3D gt = node->get_global_transform(); + Transform3D gi = gt.affine_inverse(); float depth = _get_depth() * 0.5; Vector3 n = gt.basis.get_axis(2).normalized(); Plane p(gt.origin + n * depth, n); @@ -516,7 +516,7 @@ CollisionPolygon3DEditor::CollisionPolygon3DEditor(EditorNode *p_editor) { mode = MODE_EDIT; wip_active = false; imgeom = memnew(ImmediateGeometry3D); - imgeom->set_transform(Transform(Basis(), Vector3(0, 0, 0.00001))); + imgeom->set_transform(Transform3D(Basis(), Vector3(0, 0, 0.00001))); line_material = Ref<StandardMaterial3D>(memnew(StandardMaterial3D)); line_material->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED); @@ -539,7 +539,7 @@ CollisionPolygon3DEditor::CollisionPolygon3DEditor(EditorNode *p_editor) { imgeom->add_child(pointsm); m.instance(); pointsm->set_mesh(m); - pointsm->set_transform(Transform(Basis(), Vector3(0, 0, 0.00001))); + pointsm->set_transform(Transform3D(Basis(), Vector3(0, 0, 0.00001))); snap_ignore = false; } diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index 2d79e4f3e3..235ccb18cb 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -359,12 +359,12 @@ EditorMaterialPreviewPlugin::EditorMaterialPreviewPlugin() { camera = RS::get_singleton()->camera_create(); RS::get_singleton()->viewport_attach_camera(viewport, camera); - RS::get_singleton()->camera_set_transform(camera, Transform(Basis(), Vector3(0, 0, 3))); + RS::get_singleton()->camera_set_transform(camera, Transform3D(Basis(), Vector3(0, 0, 3))); RS::get_singleton()->camera_set_perspective(camera, 45, 0.1, 10); light = RS::get_singleton()->directional_light_create(); light_instance = RS::get_singleton()->instance_create2(light, scenario); - RS::get_singleton()->instance_set_transform(light_instance, Transform().looking_at(Vector3(-1, -1, -1), Vector3(0, 1, 0))); + RS::get_singleton()->instance_set_transform(light_instance, Transform3D().looking_at(Vector3(-1, -1, -1), Vector3(0, 1, 0))); light2 = RS::get_singleton()->directional_light_create(); RS::get_singleton()->light_set_color(light2, Color(0.7, 0.7, 0.7)); @@ -372,7 +372,7 @@ EditorMaterialPreviewPlugin::EditorMaterialPreviewPlugin() { light_instance2 = RS::get_singleton()->instance_create2(light2, scenario); - RS::get_singleton()->instance_set_transform(light_instance2, Transform().looking_at(Vector3(0, 1, 0), Vector3(0, 0, 1))); + RS::get_singleton()->instance_set_transform(light_instance2, Transform3D().looking_at(Vector3(0, 1, 0), Vector3(0, 0, 1))); sphere = RS::get_singleton()->mesh_create(); sphere_instance = RS::get_singleton()->instance_create2(sphere, scenario); @@ -720,7 +720,7 @@ Ref<Texture2D> EditorMeshPreviewPlugin::generate(const RES &p_from, const Size2 AABB aabb = mesh->get_aabb(); Vector3 ofs = aabb.position + aabb.size * 0.5; aabb.position -= ofs; - Transform xform; + Transform3D xform; xform.basis = Basis().rotated(Vector3(0, 1, 0), -Math_PI * 0.125); xform.basis = Basis().rotated(Vector3(1, 0, 0), Math_PI * 0.125) * xform.basis; AABB rot_aabb = xform.xform(aabb); @@ -780,20 +780,20 @@ EditorMeshPreviewPlugin::EditorMeshPreviewPlugin() { camera = RS::get_singleton()->camera_create(); RS::get_singleton()->viewport_attach_camera(viewport, camera); - RS::get_singleton()->camera_set_transform(camera, Transform(Basis(), Vector3(0, 0, 3))); + RS::get_singleton()->camera_set_transform(camera, Transform3D(Basis(), Vector3(0, 0, 3))); //RS::get_singleton()->camera_set_perspective(camera,45,0.1,10); RS::get_singleton()->camera_set_orthogonal(camera, 1.0, 0.01, 1000.0); light = RS::get_singleton()->directional_light_create(); light_instance = RS::get_singleton()->instance_create2(light, scenario); - RS::get_singleton()->instance_set_transform(light_instance, Transform().looking_at(Vector3(-1, -1, -1), Vector3(0, 1, 0))); + RS::get_singleton()->instance_set_transform(light_instance, Transform3D().looking_at(Vector3(-1, -1, -1), Vector3(0, 1, 0))); light2 = RS::get_singleton()->directional_light_create(); RS::get_singleton()->light_set_color(light2, Color(0.7, 0.7, 0.7)); //RS::get_singleton()->light_set_color(light2, RS::LIGHT_COLOR_SPECULAR, Color(0.0, 0.0, 0.0)); light_instance2 = RS::get_singleton()->instance_create2(light2, scenario); - RS::get_singleton()->instance_set_transform(light_instance2, Transform().looking_at(Vector3(0, 1, 0), Vector3(0, 0, 1))); + RS::get_singleton()->instance_set_transform(light_instance2, Transform3D().looking_at(Vector3(0, 1, 0), Vector3(0, 0, 1))); //sphere = RS::get_singleton()->mesh_create(); mesh_instance = RS::get_singleton()->instance_create(); @@ -832,7 +832,7 @@ struct FSample { }; static FSample _samples[] = { - { "hani", U"漢語" }, + { "hani", U"漢字" }, { "armn", U"Աբ" }, { "copt", U"Αα" }, { "cyrl", U"Аб" }, diff --git a/editor/plugins/font_editor_plugin.cpp b/editor/plugins/font_editor_plugin.cpp index fa58eb5480..8de7dc2447 100644 --- a/editor/plugins/font_editor_plugin.cpp +++ b/editor/plugins/font_editor_plugin.cpp @@ -56,7 +56,7 @@ struct FSample { }; static FSample _samples[] = { - { "hani", U"漢語" }, + { "hani", U"漢字" }, { "armn", U"Աբ" }, { "copt", U"Αα" }, { "cyrl", U"Аб" }, diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.cpp b/editor/plugins/gpu_particles_3d_editor_plugin.cpp index 89d6aaa5f9..17c7397729 100644 --- a/editor/plugins/gpu_particles_3d_editor_plugin.cpp +++ b/editor/plugins/gpu_particles_3d_editor_plugin.cpp @@ -177,7 +177,7 @@ void GPUParticles3DEditorBase::_node_selected(const NodePath &p_path) { return; } - Transform geom_xform = base_node->get_global_transform().affine_inverse() * vi->get_global_transform(); + Transform3D geom_xform = base_node->get_global_transform().affine_inverse() * vi->get_global_transform(); int gc = geometry.size(); Face3 *w = geometry.ptrw(); diff --git a/editor/plugins/baked_lightmap_editor_plugin.cpp b/editor/plugins/lightmap_gi_editor_plugin.cpp index 470b61bf40..484fdabfe1 100644 --- a/editor/plugins/baked_lightmap_editor_plugin.cpp +++ b/editor/plugins/lightmap_gi_editor_plugin.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* baked_lightmap_editor_plugin.cpp */ +/* lightmap_gi_editor_plugin.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,11 +28,11 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "baked_lightmap_editor_plugin.h" +#include "lightmap_gi_editor_plugin.h" -void BakedLightmapEditorPlugin::_bake_select_file(const String &p_file) { +void LightmapGIEditorPlugin::_bake_select_file(const String &p_file) { if (lightmap) { - BakedLightmap::BakeError err; + LightmapGI::BakeError err; if (get_tree()->get_edited_scene_root() && get_tree()->get_edited_scene_root() == lightmap) { err = lightmap->bake(lightmap, p_file, bake_func_step); } else { @@ -42,7 +42,7 @@ void BakedLightmapEditorPlugin::_bake_select_file(const String &p_file) { bake_func_end(); switch (err) { - case BakedLightmap::BAKE_ERROR_NO_SAVE_PATH: { + case LightmapGI::BAKE_ERROR_NO_SAVE_PATH: { String scene_path = lightmap->get_filename(); if (scene_path == String()) { scene_path = lightmap->get_owner()->get_filename(); @@ -57,10 +57,10 @@ void BakedLightmapEditorPlugin::_bake_select_file(const String &p_file) { file_dialog->popup_file_dialog(); } break; - case BakedLightmap::BAKE_ERROR_NO_MESHES: + case LightmapGI::BAKE_ERROR_NO_MESHES: EditorNode::get_singleton()->show_warning(TTR("No meshes to bake. Make sure they contain an UV2 channel and that the 'Bake Light' flag is on.")); break; - case BakedLightmap::BAKE_ERROR_CANT_CREATE_IMAGE: + case LightmapGI::BAKE_ERROR_CANT_CREATE_IMAGE: EditorNode::get_singleton()->show_warning(TTR("Failed creating lightmap images, make sure path is writable.")); break; default: { @@ -69,12 +69,12 @@ void BakedLightmapEditorPlugin::_bake_select_file(const String &p_file) { } } -void BakedLightmapEditorPlugin::_bake() { +void LightmapGIEditorPlugin::_bake() { _bake_select_file(""); } -void BakedLightmapEditorPlugin::edit(Object *p_object) { - BakedLightmap *s = Object::cast_to<BakedLightmap>(p_object); +void LightmapGIEditorPlugin::edit(Object *p_object) { + LightmapGI *s = Object::cast_to<LightmapGI>(p_object); if (!s) { return; } @@ -82,11 +82,11 @@ void BakedLightmapEditorPlugin::edit(Object *p_object) { lightmap = s; } -bool BakedLightmapEditorPlugin::handles(Object *p_object) const { - return p_object->is_class("BakedLightmap"); +bool LightmapGIEditorPlugin::handles(Object *p_object) const { + return p_object->is_class("LightmapGI"); } -void BakedLightmapEditorPlugin::make_visible(bool p_visible) { +void LightmapGIEditorPlugin::make_visible(bool p_visible) { if (p_visible) { bake->show(); } else { @@ -94,9 +94,9 @@ void BakedLightmapEditorPlugin::make_visible(bool p_visible) { } } -EditorProgress *BakedLightmapEditorPlugin::tmp_progress = nullptr; +EditorProgress *LightmapGIEditorPlugin::tmp_progress = nullptr; -bool BakedLightmapEditorPlugin::bake_func_step(float p_progress, const String &p_description, void *, bool p_refresh) { +bool LightmapGIEditorPlugin::bake_func_step(float p_progress, const String &p_description, void *, bool p_refresh) { if (!tmp_progress) { tmp_progress = memnew(EditorProgress("bake_lightmaps", TTR("Bake Lightmaps"), 1000, false)); ERR_FAIL_COND_V(tmp_progress == nullptr, false); @@ -104,18 +104,18 @@ bool BakedLightmapEditorPlugin::bake_func_step(float p_progress, const String &p return tmp_progress->step(p_description, p_progress * 1000, p_refresh); } -void BakedLightmapEditorPlugin::bake_func_end() { +void LightmapGIEditorPlugin::bake_func_end() { if (tmp_progress != nullptr) { memdelete(tmp_progress); tmp_progress = nullptr; } } -void BakedLightmapEditorPlugin::_bind_methods() { - ClassDB::bind_method("_bake", &BakedLightmapEditorPlugin::_bake); +void LightmapGIEditorPlugin::_bind_methods() { + ClassDB::bind_method("_bake", &LightmapGIEditorPlugin::_bake); } -BakedLightmapEditorPlugin::BakedLightmapEditorPlugin(EditorNode *p_node) { +LightmapGIEditorPlugin::LightmapGIEditorPlugin(EditorNode *p_node) { editor = p_node; bake = memnew(Button); bake->set_flat(true); @@ -130,9 +130,9 @@ BakedLightmapEditorPlugin::BakedLightmapEditorPlugin(EditorNode *p_node) { file_dialog->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE); file_dialog->add_filter("*.lmbake ; LightMap Bake"); file_dialog->set_title(TTR("Select lightmap bake file:")); - file_dialog->connect("file_selected", callable_mp(this, &BakedLightmapEditorPlugin::_bake_select_file)); + file_dialog->connect("file_selected", callable_mp(this, &LightmapGIEditorPlugin::_bake_select_file)); bake->add_child(file_dialog); } -BakedLightmapEditorPlugin::~BakedLightmapEditorPlugin() { +LightmapGIEditorPlugin::~LightmapGIEditorPlugin() { } diff --git a/editor/plugins/baked_lightmap_editor_plugin.h b/editor/plugins/lightmap_gi_editor_plugin.h index d291c377d9..12d080d6be 100644 --- a/editor/plugins/baked_lightmap_editor_plugin.h +++ b/editor/plugins/lightmap_gi_editor_plugin.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* baked_lightmap_editor_plugin.h */ +/* lightmap_gi_editor_plugin.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -33,13 +33,13 @@ #include "editor/editor_node.h" #include "editor/editor_plugin.h" -#include "scene/3d/baked_lightmap.h" +#include "scene/3d/lightmap_gi.h" #include "scene/resources/material.h" -class BakedLightmapEditorPlugin : public EditorPlugin { - GDCLASS(BakedLightmapEditorPlugin, EditorPlugin); +class LightmapGIEditorPlugin : public EditorPlugin { + GDCLASS(LightmapGIEditorPlugin, EditorPlugin); - BakedLightmap *lightmap; + LightmapGI *lightmap; Button *bake; EditorNode *editor; @@ -56,14 +56,14 @@ protected: static void _bind_methods(); public: - virtual String get_name() const override { return "BakedLightmap"; } + virtual String get_name() const override { return "LightmapGI"; } 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; - BakedLightmapEditorPlugin(EditorNode *p_node); - ~BakedLightmapEditorPlugin(); + LightmapGIEditorPlugin(EditorNode *p_node); + ~LightmapGIEditorPlugin(); }; #endif diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp index ad99ad7808..81f0ecacf2 100644 --- a/editor/plugins/material_editor_plugin.cpp +++ b/editor/plugins/material_editor_plugin.cpp @@ -119,17 +119,17 @@ MaterialEditor::MaterialEditor() { viewport->set_msaa(Viewport::MSAA_4X); camera = memnew(Camera3D); - camera->set_transform(Transform(Basis(), Vector3(0, 0, 3))); + camera->set_transform(Transform3D(Basis(), Vector3(0, 0, 3))); camera->set_perspective(45, 0.1, 10); camera->make_current(); viewport->add_child(camera); light1 = memnew(DirectionalLight3D); - light1->set_transform(Transform().looking_at(Vector3(-1, -1, -1), Vector3(0, 1, 0))); + light1->set_transform(Transform3D().looking_at(Vector3(-1, -1, -1), Vector3(0, 1, 0))); viewport->add_child(light1); light2 = memnew(DirectionalLight3D); - light2->set_transform(Transform().looking_at(Vector3(0, 1, 0), Vector3(0, 0, 1))); + light2->set_transform(Transform3D().looking_at(Vector3(0, 1, 0), Vector3(0, 0, 1))); light2->set_color(Color(0.7, 0.7, 0.7)); viewport->add_child(light2); @@ -139,7 +139,7 @@ MaterialEditor::MaterialEditor() { box_instance = memnew(MeshInstance3D); viewport->add_child(box_instance); - Transform box_xform; + Transform3D box_xform; box_xform.basis.rotate(Vector3(1, 0, 0), Math::deg2rad(25.0)); box_xform.basis = box_xform.basis * Basis().rotated(Vector3(0, 1, 0), Math::deg2rad(-25.0)); box_xform.basis.scale(Vector3(0.8, 0.8, 0.8)); diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp index 9d29c31522..8d488dce20 100644 --- a/editor/plugins/mesh_editor_plugin.cpp +++ b/editor/plugins/mesh_editor_plugin.cpp @@ -65,7 +65,7 @@ void MeshEditor::_notification(int p_what) { } void MeshEditor::_update_rotation() { - Transform t; + Transform3D t; t.basis.rotate(Vector3(0, 1, 0), -rot_y); t.basis.rotate(Vector3(1, 0, 0), -rot_x); rotation->set_transform(t); @@ -85,7 +85,7 @@ void MeshEditor::edit(Ref<Mesh> p_mesh) { if (m != 0) { m = 1.0 / m; m *= 0.5; - Transform xform; + Transform3D xform; xform.basis.scale(Vector3(m, m, m)); xform.origin = -xform.basis.xform(ofs); //-ofs*m; //xform.origin.z -= aabb.get_longest_axis_size() * 2; @@ -117,16 +117,16 @@ MeshEditor::MeshEditor() { viewport->set_msaa(Viewport::MSAA_2X); set_stretch(true); camera = memnew(Camera3D); - camera->set_transform(Transform(Basis(), Vector3(0, 0, 1.1))); + camera->set_transform(Transform3D(Basis(), Vector3(0, 0, 1.1))); camera->set_perspective(45, 0.1, 10); viewport->add_child(camera); light1 = memnew(DirectionalLight3D); - light1->set_transform(Transform().looking_at(Vector3(-1, -1, -1), Vector3(0, 1, 0))); + light1->set_transform(Transform3D().looking_at(Vector3(-1, -1, -1), Vector3(0, 1, 0))); viewport->add_child(light1); light2 = memnew(DirectionalLight3D); - light2->set_transform(Transform().looking_at(Vector3(0, 1, 0), Vector3(0, 0, 1))); + light2->set_transform(Transform3D().looking_at(Vector3(0, 1, 0), Vector3(0, 0, 1))); light2->set_color(Color(0.7, 0.7, 0.7)); viewport->add_child(light2); diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp index 6f1f243444..e64992759d 100644 --- a/editor/plugins/mesh_library_editor_plugin.cpp +++ b/editor/plugins/mesh_library_editor_plugin.cpp @@ -127,7 +127,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library, continue; } - //Transform shape_transform = sb->shape_owner_get_transform(E->get()); + //Transform3D shape_transform = sb->shape_owner_get_transform(E->get()); //shape_transform.set_origin(shape_transform.get_origin() - phys_offset); @@ -147,7 +147,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library, p_library->set_item_shapes(id, collisions); Ref<NavigationMesh> navmesh; - Transform navmesh_transform; + Transform3D navmesh_transform; for (int j = 0; j < mi->get_child_count(); j++) { Node *child2 = mi->get_child(j); if (!Object::cast_to<NavigationRegion3D>(child2)) { @@ -170,7 +170,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library, if (true) { Vector<Ref<Mesh>> meshes; - Vector<Transform> transforms; + Vector<Transform3D> transforms; Vector<int> ids = p_library->get_item_list(); for (int i = 0; i < ids.size(); i++) { if (mesh_instances.find(ids[i])) { diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp index 19c6dcf402..48b885930f 100644 --- a/editor/plugins/multimesh_editor_plugin.cpp +++ b/editor/plugins/multimesh_editor_plugin.cpp @@ -111,7 +111,7 @@ void MultiMeshEditor::_populate() { return; } - Transform geom_xform = node->get_global_transform().affine_inverse() * ss_instance->get_global_transform(); + Transform3D geom_xform = node->get_global_transform().affine_inverse() * ss_instance->get_global_transform(); Vector<Face3> geometry = ss_instance->get_faces(VisualInstance3D::FACES_SOLID); @@ -167,7 +167,7 @@ void MultiMeshEditor::_populate() { float _scale = populate_scale->get_value(); int axis = populate_axis->get_selected(); - Transform axis_xform; + Transform3D axis_xform; if (axis == Vector3::AXIS_Z) { axis_xform.rotate(Vector3(1, 0, 0), -Math_PI * 0.5); } @@ -191,7 +191,7 @@ void MultiMeshEditor::_populate() { Vector3 normal = face.get_plane().normal; Vector3 op_axis = (face.vertex[0] - face.vertex[1]).normalized(); - Transform xform; + Transform3D xform; xform.set_look_at(pos, pos + op_axis, normal); xform = xform * axis_xform; diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index ba39ce3aed..46c35291ac 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -361,8 +361,8 @@ void Node3DEditorViewport::_update_camera(float p_interp_delta) { } } -Transform Node3DEditorViewport::to_camera_transform(const Cursor &p_cursor) const { - Transform camera_transform; +Transform3D Node3DEditorViewport::to_camera_transform(const Cursor &p_cursor) const { + Transform3D camera_transform; camera_transform.translate(p_cursor.pos); camera_transform.basis.rotate(Vector3(1, 0, 0), -p_cursor.x_rot); camera_transform.basis.rotate(Vector3(0, 1, 0), -p_cursor.y_rot); @@ -410,7 +410,7 @@ float Node3DEditorViewport::get_fov() const { return CLAMP(spatial_editor->get_fov(), MIN_FOV, MAX_FOV); } -Transform Node3DEditorViewport::_get_camera_transform() const { +Transform3D Node3DEditorViewport::_get_camera_transform() const { return camera->get_global_transform(); } @@ -631,7 +631,7 @@ Vector3 Node3DEditorViewport::_get_screen_to_space(const Vector3 &p_vector3) { } Vector2 screen_he = cm.get_viewport_half_extents(); - Transform camera_transform; + Transform3D camera_transform; camera_transform.translate(cursor.pos); camera_transform.basis.rotate(Vector3(1, 0, 0), -cursor.x_rot); camera_transform.basis.rotate(Vector3(0, 1, 0), -cursor.y_rot); @@ -829,7 +829,7 @@ bool Node3DEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_high Vector3 ray_pos = _get_ray_pos(Vector2(p_screenpos.x, p_screenpos.y)); Vector3 ray = _get_ray(Vector2(p_screenpos.x, p_screenpos.y)); - Transform gt = spatial_editor->get_gizmo_transform(); + Transform3D gt = spatial_editor->get_gizmo_transform(); float gs = gizmo_scale; if (spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_SELECT || spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_MOVE) { @@ -1579,10 +1579,10 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { continue; } - Transform original = se->original; - Transform original_local = se->original_local; - Transform base = Transform(Basis(), _edit.center); - Transform t; + Transform3D original = se->original; + Transform3D original_local = se->original_local; + Transform3D base = Transform3D(Basis(), _edit.center); + Transform3D t; Vector3 local_scale; if (local_coords) { @@ -1608,7 +1608,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { motion.snap(Vector3(snap, snap, snap)); } - Transform r; + Transform3D r; r.basis.scale(motion + Vector3(1, 1, 1)); t = base * (r * (base.inverse() * original)); @@ -1701,8 +1701,8 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { continue; } - Transform original = se->original; - Transform t; + Transform3D original = se->original; + Transform3D t; if (local_coords) { if (_edit.snap || spatial_editor->is_snap_enabled()) { @@ -1797,10 +1797,10 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { continue; } - Transform t; + Transform3D t; if (local_coords) { - Transform original_local = se->original_local; + Transform3D original_local = se->original_local; Basis rot = Basis(axis, angle); t.basis = original_local.get_basis().orthonormalized() * rot; @@ -1811,9 +1811,9 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { sp->set_scale(original_local.basis.get_scale()); // re-apply original scale } else { - Transform original = se->original; - Transform r; - Transform base = Transform(Basis(), _edit.center); + Transform3D original = se->original; + Transform3D r; + Transform3D base = Transform3D(Basis(), _edit.center); r.basis.rotate(plane.normal, angle); t = base * r * base.inverse() * original; @@ -2057,7 +2057,7 @@ void Node3DEditorViewport::_nav_pan(Ref<InputEventWithModifiers> p_event, const pan_speed *= pan_speed_modifier; } - Transform camera_transform; + Transform3D camera_transform; camera_transform.translate(cursor.pos); camera_transform.basis.rotate(Vector3(1, 0, 0), -cursor.x_rot); @@ -2145,7 +2145,7 @@ void Node3DEditorViewport::_nav_look(Ref<InputEventWithModifiers> p_event, const const bool invert_y_axis = EditorSettings::get_singleton()->get("editors/3d/navigation/invert_y_axis"); // Note: do NOT assume the camera has the "current" transform, because it is interpolated and may have "lag". - const Transform prev_camera_transform = to_camera_transform(cursor); + const Transform3D prev_camera_transform = to_camera_transform(cursor); if (invert_y_axis) { cursor.x_rot -= p_relative.y * radians_per_pixel; @@ -2158,7 +2158,7 @@ void Node3DEditorViewport::_nav_look(Ref<InputEventWithModifiers> p_event, const cursor.y_rot += p_relative.x * radians_per_pixel; // Look is like the opposite of Orbit: the focus point rotates around the camera - Transform camera_transform = to_camera_transform(cursor); + Transform3D camera_transform = to_camera_transform(cursor); Vector3 pos = camera_transform.xform(Vector3(0, 0, 0)); Vector3 prev_pos = prev_camera_transform.xform(Vector3(0, 0, 0)); Vector3 diff = prev_pos - pos; @@ -2444,7 +2444,7 @@ void Node3DEditorViewport::_notification(int p_what) { continue; } - Transform t = sp->get_global_gizmo_transform(); + Transform3D t = sp->get_global_gizmo_transform(); VisualInstance3D *vi = Object::cast_to<VisualInstance3D>(sp); AABB new_aabb = vi ? vi->get_aabb() : _calculate_spatial_bounds(sp); @@ -2500,9 +2500,9 @@ void Node3DEditorViewport::_notification(int p_what) { if (show_info) { String text; - text += "X: " + rtos(current_camera->get_translation().x).pad_decimals(1) + "\n"; - text += "Y: " + rtos(current_camera->get_translation().y).pad_decimals(1) + "\n"; - text += "Z: " + rtos(current_camera->get_translation().z).pad_decimals(1) + "\n"; + text += "X: " + rtos(current_camera->get_position().x).pad_decimals(1) + "\n"; + text += "Y: " + rtos(current_camera->get_position().y).pad_decimals(1) + "\n"; + text += "Z: " + rtos(current_camera->get_position().z).pad_decimals(1) + "\n"; text += TTR("Pitch") + ": " + itos(Math::round(current_camera->get_rotation_degrees().x)) + "\n"; text += TTR("Yaw") + ": " + itos(Math::round(current_camera->get_rotation_degrees().y)) + "\n\n"; @@ -2878,7 +2878,7 @@ void Node3DEditorViewport::_menu_option(int p_option) { break; } - Transform camera_transform = camera->get_global_transform(); + Transform3D camera_transform = camera->get_global_transform(); List<Node *> &selection = editor_selection->get_selected_node_list(); @@ -2895,7 +2895,7 @@ void Node3DEditorViewport::_menu_option(int p_option) { continue; } - Transform xform; + Transform3D xform; if (orthogonal) { xform = sp->get_global_transform(); xform.basis.set_euler(camera_transform.basis.get_euler()); @@ -2915,7 +2915,7 @@ void Node3DEditorViewport::_menu_option(int p_option) { break; } - Transform camera_transform = camera->get_global_transform(); + Transform3D camera_transform = camera->get_global_transform(); List<Node *> &selection = editor_selection->get_selected_node_list(); @@ -3060,9 +3060,9 @@ void Node3DEditorViewport::_menu_option(int p_option) { case VIEW_DISPLAY_NORMAL_BUFFER: case VIEW_DISPLAY_DEBUG_SHADOW_ATLAS: case VIEW_DISPLAY_DEBUG_DIRECTIONAL_SHADOW_ATLAS: - case VIEW_DISPLAY_DEBUG_GIPROBE_ALBEDO: - case VIEW_DISPLAY_DEBUG_GIPROBE_LIGHTING: - case VIEW_DISPLAY_DEBUG_GIPROBE_EMISSION: + case VIEW_DISPLAY_DEBUG_VOXEL_GI_ALBEDO: + case VIEW_DISPLAY_DEBUG_VOXEL_GI_LIGHTING: + case VIEW_DISPLAY_DEBUG_VOXEL_GI_EMISSION: case VIEW_DISPLAY_DEBUG_SCENE_LUMINANCE: case VIEW_DISPLAY_DEBUG_SSAO: case VIEW_DISPLAY_DEBUG_PSSM_SPLITS: @@ -3086,9 +3086,9 @@ void Node3DEditorViewport::_menu_option(int p_option) { VIEW_DISPLAY_WIREFRAME, VIEW_DISPLAY_DEBUG_SHADOW_ATLAS, VIEW_DISPLAY_DEBUG_DIRECTIONAL_SHADOW_ATLAS, - VIEW_DISPLAY_DEBUG_GIPROBE_ALBEDO, - VIEW_DISPLAY_DEBUG_GIPROBE_LIGHTING, - VIEW_DISPLAY_DEBUG_GIPROBE_EMISSION, + VIEW_DISPLAY_DEBUG_VOXEL_GI_ALBEDO, + VIEW_DISPLAY_DEBUG_VOXEL_GI_LIGHTING, + VIEW_DISPLAY_DEBUG_VOXEL_GI_EMISSION, VIEW_DISPLAY_DEBUG_SCENE_LUMINANCE, VIEW_DISPLAY_DEBUG_SSAO, VIEW_DISPLAY_DEBUG_GI_BUFFER, @@ -3114,9 +3114,9 @@ void Node3DEditorViewport::_menu_option(int p_option) { Viewport::DEBUG_DRAW_WIREFRAME, Viewport::DEBUG_DRAW_SHADOW_ATLAS, Viewport::DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS, - Viewport::DEBUG_DRAW_GI_PROBE_ALBEDO, - Viewport::DEBUG_DRAW_GI_PROBE_LIGHTING, - Viewport::DEBUG_DRAW_GI_PROBE_EMISSION, + Viewport::DEBUG_DRAW_VOXEL_GI_ALBEDO, + Viewport::DEBUG_DRAW_VOXEL_GI_LIGHTING, + Viewport::DEBUG_DRAW_VOXEL_GI_EMISSION, Viewport::DEBUG_DRAW_SCENE_LUMINANCE, Viewport::DEBUG_DRAW_SSAO, Viewport::DEBUG_DRAW_GI_BUFFER, @@ -3315,9 +3315,9 @@ void Node3DEditorViewport::update_transform_gizmo_view() { return; } - Transform xform = spatial_editor->get_gizmo_transform(); + Transform3D xform = spatial_editor->get_gizmo_transform(); - Transform camera_xform = camera->get_transform(); + Transform3D camera_xform = camera->get_transform(); if (xform.origin.distance_squared_to(camera_xform.origin) < 0.01) { for (int i = 0; i < 3; i++) { @@ -3551,8 +3551,8 @@ Dictionary Node3DEditorViewport::get_state() const { void Node3DEditorViewport::_bind_methods() { ClassDB::bind_method(D_METHOD("update_transform_gizmo_view"), &Node3DEditorViewport::update_transform_gizmo_view); // Used by call_deferred. - ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &Node3DEditorViewport::can_drop_data_fw); - ClassDB::bind_method(D_METHOD("drop_data_fw"), &Node3DEditorViewport::drop_data_fw); + ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &Node3DEditorViewport::can_drop_data_fw); + ClassDB::bind_method(D_METHOD("_drop_data_fw"), &Node3DEditorViewport::drop_data_fw); ADD_SIGNAL(MethodInfo("toggle_maximize_view", PropertyInfo(Variant::OBJECT, "viewport"))); ADD_SIGNAL(MethodInfo("clicked", PropertyInfo(Variant::OBJECT, "viewport"))); @@ -3800,7 +3800,7 @@ bool Node3DEditorViewport::_create_instance(Node *parent, String &path, const Po Node3D *node3d = Object::cast_to<Node3D>(instanced_scene); if (node3d) { - Transform global_transform; + Transform3D global_transform; Node3D *parent_node3d = Object::cast_to<Node3D>(parent); if (parent_node3d) { global_transform = parent_node3d->get_global_gizmo_transform(); @@ -3900,7 +3900,7 @@ bool Node3DEditorViewport::can_drop_data_fw(const Point2 &p_point, const Variant } if (can_instance) { - Transform global_transform = Transform(Basis(), _get_instance_position(p_point)); + Transform3D global_transform = Transform3D(Basis(), _get_instance_position(p_point)); preview_node->set_global_transform(global_transform); } @@ -4036,9 +4036,9 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, Edito display_submenu->add_separator(); display_submenu->add_radio_check_item(TTR("Decal Atlas"), VIEW_DISPLAY_DEBUG_DECAL_ATLAS); display_submenu->add_separator(); - display_submenu->add_radio_check_item(TTR("GIProbe Lighting"), VIEW_DISPLAY_DEBUG_GIPROBE_LIGHTING); - display_submenu->add_radio_check_item(TTR("GIProbe Albedo"), VIEW_DISPLAY_DEBUG_GIPROBE_ALBEDO); - display_submenu->add_radio_check_item(TTR("GIProbe Emission"), VIEW_DISPLAY_DEBUG_GIPROBE_EMISSION); + display_submenu->add_radio_check_item(TTR("VoxelGI Lighting"), VIEW_DISPLAY_DEBUG_VOXEL_GI_LIGHTING); + display_submenu->add_radio_check_item(TTR("VoxelGI Albedo"), VIEW_DISPLAY_DEBUG_VOXEL_GI_ALBEDO); + display_submenu->add_radio_check_item(TTR("VoxelGI Emission"), VIEW_DISPLAY_DEBUG_VOXEL_GI_EMISSION); display_submenu->add_separator(); display_submenu->add_radio_check_item(TTR("SDFGI Cascades"), VIEW_DISPLAY_DEBUG_SDFGI); display_submenu->add_radio_check_item(TTR("SDFGI Probes"), VIEW_DISPLAY_DEBUG_SDFGI_PROBES); @@ -4574,7 +4574,7 @@ void Node3DEditor::update_transform_gizmo() { continue; } - Transform xf = se->sp->get_global_gizmo_transform(); + Transform3D xf = se->sp->get_global_gizmo_transform(); if (first) { center.position = xf.origin; @@ -4955,7 +4955,7 @@ void Node3DEditor::_snap_update() { } void Node3DEditor::_xform_dialog_action() { - Transform t; + Transform3D t; //translation Vector3 scale; Vector3 rotate; @@ -4988,7 +4988,7 @@ void Node3DEditor::_xform_dialog_action() { bool post = xform_type->get_selected() > 0; - Transform tr = sp->get_global_gizmo_transform(); + Transform3D tr = sp->get_global_gizmo_transform(); if (post) { tr = tr * t; } else { @@ -5056,11 +5056,11 @@ void Node3DEditor::_update_camera_override_button(bool p_game_running) { if (p_game_running) { button->set_disabled(false); - button->set_tooltip(TTR("Game Camera Override\nNo game instance running.")); + button->set_tooltip(TTR("Project Camera Override\nOverrides the running project's camera with the editor viewport camera.")); } else { button->set_disabled(true); button->set_pressed(false); - button->set_tooltip(TTR("Game Camera Override\nOverrides game camera with editor viewport camera.")); + button->set_tooltip(TTR("Project Camera Override\nNo project instance running. Run the project from the editor to use this feature.")); } } @@ -5834,7 +5834,7 @@ void Node3DEditor::_init_grid() { return; } Camera3D *camera = get_editor_viewport(0)->camera; - Vector3 camera_position = camera->get_translation(); + Vector3 camera_position = camera->get_position(); if (camera_position == Vector3()) { return; // Camera3D is invalid, don't draw the grid. } @@ -6180,7 +6180,7 @@ void Node3DEditor::snap_selected_nodes_to_floor() { if (ss->intersect_ray(from, to, result, excluded)) { Vector3 position_offset = d["position_offset"]; - Transform new_transform = sp->get_global_transform(); + Transform3D new_transform = sp->get_global_transform(); new_transform.origin.y = result.position.y; new_transform.origin = new_transform.origin - position_offset; @@ -6496,8 +6496,8 @@ void Node3DEditor::_register_all_gizmos() { add_gizmo_plugin(Ref<CPUParticles3DGizmoPlugin>(memnew(CPUParticles3DGizmoPlugin))); add_gizmo_plugin(Ref<ReflectionProbeGizmoPlugin>(memnew(ReflectionProbeGizmoPlugin))); add_gizmo_plugin(Ref<DecalGizmoPlugin>(memnew(DecalGizmoPlugin))); - add_gizmo_plugin(Ref<GIProbeGizmoPlugin>(memnew(GIProbeGizmoPlugin))); - add_gizmo_plugin(Ref<BakedLightmapGizmoPlugin>(memnew(BakedLightmapGizmoPlugin))); + add_gizmo_plugin(Ref<VoxelGIGizmoPlugin>(memnew(VoxelGIGizmoPlugin))); + add_gizmo_plugin(Ref<LightmapGIGizmoPlugin>(memnew(LightmapGIGizmoPlugin))); add_gizmo_plugin(Ref<LightmapProbeGizmoPlugin>(memnew(LightmapProbeGizmoPlugin))); add_gizmo_plugin(Ref<CollisionObject3DGizmoPlugin>(memnew(CollisionObject3DGizmoPlugin))); add_gizmo_plugin(Ref<CollisionShape3DGizmoPlugin>(memnew(CollisionShape3DGizmoPlugin))); @@ -6556,7 +6556,7 @@ void Node3DEditor::_preview_settings_changed() { } { // preview sun - Transform t; + Transform3D t; t.basis = sun_rotation; preview_sun->set_transform(t); sun_direction->update(); @@ -7475,15 +7475,15 @@ Ref<StandardMaterial3D> EditorNode3DGizmoPlugin::get_material(const String &p_na } String EditorNode3DGizmoPlugin::get_gizmo_name() const { - if (get_script_instance() && get_script_instance()->has_method("get_gizmo_name")) { - return get_script_instance()->call("get_gizmo_name"); + if (get_script_instance() && get_script_instance()->has_method("_get_gizmo_name")) { + return get_script_instance()->call("_get_gizmo_name"); } return TTR("Nameless gizmo"); } int EditorNode3DGizmoPlugin::get_priority() const { - if (get_script_instance() && get_script_instance()->has_method("get_priority")) { - return get_script_instance()->call("get_priority"); + if (get_script_instance() && get_script_instance()->has_method("_get_priority")) { + return get_script_instance()->call("_get_priority"); } return 0; } @@ -7510,8 +7510,8 @@ Ref<EditorNode3DGizmo> EditorNode3DGizmoPlugin::get_gizmo(Node3D *p_spatial) { void EditorNode3DGizmoPlugin::_bind_methods() { #define GIZMO_REF PropertyInfo(Variant::OBJECT, "gizmo", PROPERTY_HINT_RESOURCE_TYPE, "EditorNode3DGizmo") - BIND_VMETHOD(MethodInfo(Variant::BOOL, "has_gizmo", PropertyInfo(Variant::OBJECT, "spatial", PROPERTY_HINT_RESOURCE_TYPE, "Node3D"))); - BIND_VMETHOD(MethodInfo(GIZMO_REF, "create_gizmo", PropertyInfo(Variant::OBJECT, "spatial", PROPERTY_HINT_RESOURCE_TYPE, "Node3D"))); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_has_gizmo", PropertyInfo(Variant::OBJECT, "spatial", PROPERTY_HINT_RESOURCE_TYPE, "Node3D"))); + BIND_VMETHOD(MethodInfo(GIZMO_REF, "_create_gizmo", PropertyInfo(Variant::OBJECT, "spatial", PROPERTY_HINT_RESOURCE_TYPE, "Node3D"))); ClassDB::bind_method(D_METHOD("create_material", "name", "color", "billboard", "on_top", "use_vertex_color"), &EditorNode3DGizmoPlugin::create_material, DEFVAL(false), DEFVAL(false), DEFVAL(false)); ClassDB::bind_method(D_METHOD("create_icon_material", "name", "texture", "on_top", "color"), &EditorNode3DGizmoPlugin::create_icon_material, DEFVAL(false), DEFVAL(Color(1, 1, 1, 1))); @@ -7520,38 +7520,38 @@ void EditorNode3DGizmoPlugin::_bind_methods() { ClassDB::bind_method(D_METHOD("get_material", "name", "gizmo"), &EditorNode3DGizmoPlugin::get_material, DEFVAL(Ref<EditorNode3DGizmo>())); - BIND_VMETHOD(MethodInfo(Variant::STRING, "get_gizmo_name")); - BIND_VMETHOD(MethodInfo(Variant::INT, "get_priority")); - BIND_VMETHOD(MethodInfo(Variant::BOOL, "can_be_hidden")); - BIND_VMETHOD(MethodInfo(Variant::BOOL, "is_selectable_when_hidden")); + BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_gizmo_name")); + BIND_VMETHOD(MethodInfo(Variant::INT, "_get_priority")); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_can_be_hidden")); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_is_selectable_when_hidden")); - BIND_VMETHOD(MethodInfo("redraw", GIZMO_REF)); - BIND_VMETHOD(MethodInfo(Variant::STRING, "get_handle_name", GIZMO_REF, PropertyInfo(Variant::INT, "index"))); + BIND_VMETHOD(MethodInfo("_redraw", GIZMO_REF)); + BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_handle_name", GIZMO_REF, PropertyInfo(Variant::INT, "index"))); - MethodInfo hvget(Variant::NIL, "get_handle_value", GIZMO_REF, PropertyInfo(Variant::INT, "index")); + MethodInfo hvget(Variant::NIL, "_get_handle_value", GIZMO_REF, PropertyInfo(Variant::INT, "index")); hvget.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT; BIND_VMETHOD(hvget); - BIND_VMETHOD(MethodInfo("set_handle", GIZMO_REF, PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera3D"), PropertyInfo(Variant::VECTOR2, "point"))); - MethodInfo cm = MethodInfo("commit_handle", GIZMO_REF, PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::NIL, "restore"), PropertyInfo(Variant::BOOL, "cancel")); + BIND_VMETHOD(MethodInfo("_set_handle", GIZMO_REF, PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera3D"), PropertyInfo(Variant::VECTOR2, "point"))); + MethodInfo cm = MethodInfo("_commit_handle", GIZMO_REF, PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::NIL, "restore"), PropertyInfo(Variant::BOOL, "cancel")); cm.default_arguments.push_back(false); BIND_VMETHOD(cm); - BIND_VMETHOD(MethodInfo(Variant::BOOL, "is_handle_highlighted", GIZMO_REF, PropertyInfo(Variant::INT, "index"))); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_is_handle_highlighted", GIZMO_REF, PropertyInfo(Variant::INT, "index"))); #undef GIZMO_REF } bool EditorNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) { - if (get_script_instance() && get_script_instance()->has_method("has_gizmo")) { - return get_script_instance()->call("has_gizmo", p_spatial); + if (get_script_instance() && get_script_instance()->has_method("_has_gizmo")) { + return get_script_instance()->call("_has_gizmo", p_spatial); } return false; } Ref<EditorNode3DGizmo> EditorNode3DGizmoPlugin::create_gizmo(Node3D *p_spatial) { - if (get_script_instance() && get_script_instance()->has_method("create_gizmo")) { - return get_script_instance()->call("create_gizmo", p_spatial); + if (get_script_instance() && get_script_instance()->has_method("_create_gizmo")) { + return get_script_instance()->call("_create_gizmo", p_spatial); } Ref<EditorNode3DGizmo> ref; @@ -7562,55 +7562,55 @@ Ref<EditorNode3DGizmo> EditorNode3DGizmoPlugin::create_gizmo(Node3D *p_spatial) } bool EditorNode3DGizmoPlugin::can_be_hidden() const { - if (get_script_instance() && get_script_instance()->has_method("can_be_hidden")) { - return get_script_instance()->call("can_be_hidden"); + if (get_script_instance() && get_script_instance()->has_method("_can_be_hidden")) { + return get_script_instance()->call("_can_be_hidden"); } return true; } bool EditorNode3DGizmoPlugin::is_selectable_when_hidden() const { - if (get_script_instance() && get_script_instance()->has_method("is_selectable_when_hidden")) { - return get_script_instance()->call("is_selectable_when_hidden"); + if (get_script_instance() && get_script_instance()->has_method("_is_selectable_when_hidden")) { + return get_script_instance()->call("_is_selectable_when_hidden"); } return false; } void EditorNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { - if (get_script_instance() && get_script_instance()->has_method("redraw")) { + if (get_script_instance() && get_script_instance()->has_method("_redraw")) { Ref<EditorNode3DGizmo> ref(p_gizmo); - get_script_instance()->call("redraw", ref); + get_script_instance()->call("_redraw", ref); } } String EditorNode3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const { - if (get_script_instance() && get_script_instance()->has_method("get_handle_name")) { - return get_script_instance()->call("get_handle_name", p_gizmo, p_idx); + if (get_script_instance() && get_script_instance()->has_method("_get_handle_name")) { + return get_script_instance()->call("_get_handle_name", p_gizmo, p_idx); } return ""; } Variant EditorNode3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const { - if (get_script_instance() && get_script_instance()->has_method("get_handle_value")) { - return get_script_instance()->call("get_handle_value", p_gizmo, p_idx); + if (get_script_instance() && get_script_instance()->has_method("_get_handle_value")) { + return get_script_instance()->call("_get_handle_value", p_gizmo, p_idx); } return Variant(); } void EditorNode3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { - if (get_script_instance() && get_script_instance()->has_method("set_handle")) { - get_script_instance()->call("set_handle", p_gizmo, p_idx, p_camera, p_point); + if (get_script_instance() && get_script_instance()->has_method("_set_handle")) { + get_script_instance()->call("_set_handle", p_gizmo, p_idx, p_camera, p_point); } } void EditorNode3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) { - if (get_script_instance() && get_script_instance()->has_method("commit_handle")) { - get_script_instance()->call("commit_handle", p_gizmo, p_idx, p_restore, p_cancel); + if (get_script_instance() && get_script_instance()->has_method("_commit_handle")) { + get_script_instance()->call("_commit_handle", p_gizmo, p_idx, p_restore, p_cancel); } } bool EditorNode3DGizmoPlugin::is_handle_highlighted(const EditorNode3DGizmo *p_gizmo, int p_idx) const { - if (get_script_instance() && get_script_instance()->has_method("is_handle_highlighted")) { - return get_script_instance()->call("is_handle_highlighted", p_gizmo, p_idx); + if (get_script_instance() && get_script_instance()->has_method("_is_handle_highlighted")) { + return get_script_instance()->call("_is_handle_highlighted", p_gizmo, p_idx); } return false; } diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h index 33f4c32471..c68857cd7e 100644 --- a/editor/plugins/node_3d_editor_plugin.h +++ b/editor/plugins/node_3d_editor_plugin.h @@ -206,9 +206,9 @@ class Node3DEditorViewport : public Control { VIEW_DISPLAY_NORMAL_BUFFER, VIEW_DISPLAY_DEBUG_SHADOW_ATLAS, VIEW_DISPLAY_DEBUG_DIRECTIONAL_SHADOW_ATLAS, - VIEW_DISPLAY_DEBUG_GIPROBE_ALBEDO, - VIEW_DISPLAY_DEBUG_GIPROBE_LIGHTING, - VIEW_DISPLAY_DEBUG_GIPROBE_EMISSION, + VIEW_DISPLAY_DEBUG_VOXEL_GI_ALBEDO, + VIEW_DISPLAY_DEBUG_VOXEL_GI_LIGHTING, + VIEW_DISPLAY_DEBUG_VOXEL_GI_EMISSION, VIEW_DISPLAY_DEBUG_SCENE_LUMINANCE, VIEW_DISPLAY_DEBUG_SSAO, VIEW_DISPLAY_DEBUG_PSSM_SPLITS, @@ -322,7 +322,7 @@ private: Vector3 _get_ray_pos(const Vector2 &p_pos) const; Vector3 _get_ray(const Vector2 &p_pos) const; Point2 _point_to_screen(const Vector3 &p_point); - Transform _get_camera_transform() const; + Transform3D _get_camera_transform() const; int get_selected_count() const; Vector3 _get_camera_position() const; @@ -380,7 +380,7 @@ private: struct EditData { TransformMode mode; TransformPlane plane; - Transform original; + Transform3D original; Vector3 click_ray; Vector3 click_ray_pos; Vector3 center; @@ -432,7 +432,7 @@ private: // void _update_camera(float p_interp_delta); - Transform to_camera_transform(const Cursor &p_cursor) const; + Transform3D to_camera_transform(const Cursor &p_cursor) const; void _draw(); void _surface_mouse_enter(); @@ -505,9 +505,9 @@ class Node3DEditorSelectedItem : public Object { public: AABB aabb; - Transform original; // original location when moving - Transform original_local; - Transform last_xform; // last transform + Transform3D original; // original location when moving + Transform3D original_local; + Transform3D last_xform; // last transform bool last_xform_dirty; Node3D *sp; RID sbox_instance; @@ -641,7 +641,7 @@ private: struct Gizmo { bool visible = false; float scale = 0; - Transform transform; + Transform3D transform; } gizmo; enum MenuOption { @@ -824,7 +824,7 @@ public: float get_zfar() const { return settings_zfar->get_value(); } float get_fov() const { return settings_fov->get_value(); } - Transform get_gizmo_transform() const { return gizmo.transform; } + Transform3D get_gizmo_transform() const { return gizmo.transform; } bool is_gizmo_visible() const { return gizmo.visible; } ToolMode get_tool_mode() const { return tool_mode; } diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp index 208abeb87f..838e67b5e7 100644 --- a/editor/plugins/path_2d_editor_plugin.cpp +++ b/editor/plugins/path_2d_editor_plugin.cpp @@ -31,7 +31,7 @@ #include "path_2d_editor_plugin.h" #include "canvas_item_editor_plugin.h" -#include "core/os/file_access.h" +#include "core/io/file_access.h" #include "core/os/keyboard.h" #include "editor/editor_scale.h" #include "editor/editor_settings.h" diff --git a/editor/plugins/path_3d_editor_plugin.cpp b/editor/plugins/path_3d_editor_plugin.cpp index 8c73294723..b0eb13c3c6 100644 --- a/editor/plugins/path_3d_editor_plugin.cpp +++ b/editor/plugins/path_3d_editor_plugin.cpp @@ -94,8 +94,8 @@ void Path3DGizmo::set_handle(int p_idx, Camera3D *p_camera, const Point2 &p_poin return; } - Transform gt = path->get_global_transform(); - Transform gi = gt.affine_inverse(); + Transform3D gt = path->get_global_transform(); + Transform3D gi = gt.affine_inverse(); Vector3 ray_from = p_camera->project_ray_origin(p_point); Vector3 ray_dir = p_camera->project_ray_normal(p_point); @@ -302,8 +302,8 @@ bool Path3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref if (c.is_null()) { return false; } - Transform gt = path->get_global_transform(); - Transform it = gt.affine_inverse(); + Transform3D gt = path->get_global_transform(); + Transform3D it = gt.affine_inverse(); static const int click_dist = 10; //should make global diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp index 6d82685c05..8a14db0cfd 100644 --- a/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/editor/plugins/polygon_2d_editor_plugin.cpp @@ -32,8 +32,8 @@ #include "canvas_item_editor_plugin.h" #include "core/input/input.h" +#include "core/io/file_access.h" #include "core/math/geometry_2d.h" -#include "core/os/file_access.h" #include "core/os/keyboard.h" #include "editor/editor_scale.h" #include "editor/editor_settings.h" @@ -1144,7 +1144,7 @@ void Polygon2DEditor::_uv_draw() { if (!found_child) { //draw normally Transform2D bone_xform = node->get_global_transform().affine_inverse() * (skeleton->get_global_transform() * bone->get_skeleton_rest()); - Transform2D endpoint_xform = bone_xform * Transform2D(0, Vector2(bone->get_default_length(), 0)); + Transform2D endpoint_xform = bone_xform * Transform2D(0, Vector2(bone->get_length(), 0)); Color color = current ? Color(1, 1, 1) : Color(0.5, 0.5, 0.5); uv_edit_draw->draw_line(mtx.xform(bone_xform.get_origin()), mtx.xform(endpoint_xform.get_origin()), Color(0, 0, 0), Math::round((current ? 5 : 4) * EDSCALE)); diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp index b4b8e82124..b8b2c6d343 100644 --- a/editor/plugins/resource_preloader_editor_plugin.cpp +++ b/editor/plugins/resource_preloader_editor_plugin.cpp @@ -339,9 +339,9 @@ void ResourcePreloaderEditor::_bind_methods() { ClassDB::bind_method(D_METHOD("_update_library"), &ResourcePreloaderEditor::_update_library); ClassDB::bind_method(D_METHOD("_remove_resource", "to_remove"), &ResourcePreloaderEditor::_remove_resource); - ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &ResourcePreloaderEditor::get_drag_data_fw); - ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &ResourcePreloaderEditor::can_drop_data_fw); - ClassDB::bind_method(D_METHOD("drop_data_fw"), &ResourcePreloaderEditor::drop_data_fw); + ClassDB::bind_method(D_METHOD("_get_drag_data_fw"), &ResourcePreloaderEditor::get_drag_data_fw); + ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &ResourcePreloaderEditor::can_drop_data_fw); + ClassDB::bind_method(D_METHOD("_drop_data_fw"), &ResourcePreloaderEditor::drop_data_fw); } ResourcePreloaderEditor::ResourcePreloaderEditor() { diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 623e4ea66e..0410ab3a45 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -32,8 +32,8 @@ #include "core/config/project_settings.h" #include "core/input/input.h" +#include "core/io/file_access.h" #include "core/io/resource_loader.h" -#include "core/os/file_access.h" #include "core/os/keyboard.h" #include "core/os/os.h" #include "editor/debugger/editor_debugger_node.h" @@ -230,7 +230,7 @@ void ScriptEditorBase::_bind_methods() { ADD_SIGNAL(MethodInfo("search_in_files_requested", PropertyInfo(Variant::STRING, "text"))); ADD_SIGNAL(MethodInfo("replace_in_files_requested", PropertyInfo(Variant::STRING, "text"))); - BIND_VMETHOD(MethodInfo("add_syntax_highlighter", PropertyInfo(Variant::OBJECT, "highlighter"))); + BIND_VMETHOD(MethodInfo("_add_syntax_highlighter", PropertyInfo(Variant::OBJECT, "highlighter"))); } static bool _is_built_in_script(Script *p_script) { @@ -1640,10 +1640,13 @@ void ScriptEditor::ensure_select_current() { ScriptEditorBase *se = _get_current_editor(); if (se) { se->enable_editor(); + se->set_find_replace_bar(find_replace_bar); if (!grab_focus_block && is_visible_in_tree()) { se->ensure_focus(); } + } else { + find_replace_bar->hide(); } } @@ -2451,7 +2454,9 @@ 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. - save_current_script(); + if (!_is_built_in_script(script.ptr())) { // But only if it's not built-in script. + save_current_script(); + } break; } @@ -3188,7 +3193,7 @@ void ScriptEditor::_on_find_in_files_result_selected(String fpath, int line_numb if (ResourceLoader::exists(fpath)) { RES res = ResourceLoader::load(fpath); - if (fpath.get_extension() == "shader") { + if (fpath.get_extension() == "gdshader") { ShaderEditorPlugin *shader_editor = Object::cast_to<ShaderEditorPlugin>(EditorNode::get_singleton()->get_editor_data().get_editor("Shader")); shader_editor->edit(res.ptr()); shader_editor->make_visible(true); @@ -3271,9 +3276,9 @@ void ScriptEditor::_bind_methods() { ClassDB::bind_method(D_METHOD("register_syntax_highlighter", "syntax_highlighter"), &ScriptEditor::register_syntax_highlighter); ClassDB::bind_method(D_METHOD("unregister_syntax_highlighter", "syntax_highlighter"), &ScriptEditor::unregister_syntax_highlighter); - ClassDB::bind_method(D_METHOD("get_drag_data_fw", "point", "from"), &ScriptEditor::get_drag_data_fw); - ClassDB::bind_method(D_METHOD("can_drop_data_fw", "point", "data", "from"), &ScriptEditor::can_drop_data_fw); - ClassDB::bind_method(D_METHOD("drop_data_fw", "point", "data", "from"), &ScriptEditor::drop_data_fw); + ClassDB::bind_method(D_METHOD("_get_drag_data_fw", "point", "from"), &ScriptEditor::get_drag_data_fw); + ClassDB::bind_method(D_METHOD("_can_drop_data_fw", "point", "data", "from"), &ScriptEditor::can_drop_data_fw); + ClassDB::bind_method(D_METHOD("_drop_data_fw", "point", "data", "from"), &ScriptEditor::drop_data_fw); ClassDB::bind_method(D_METHOD("goto_line", "line_number"), &ScriptEditor::_goto_script_line2); ClassDB::bind_method(D_METHOD("get_current_script"), &ScriptEditor::_get_current_script); @@ -3377,11 +3382,19 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { help_overview->set_custom_minimum_size(Size2(0, 60) * EDSCALE); //need to give a bit of limit to avoid it from disappearing help_overview->set_v_size_flags(SIZE_EXPAND_FILL); + VBoxContainer *code_editor_container = memnew(VBoxContainer); + script_split->add_child(code_editor_container); + tab_container = memnew(TabContainer); tab_container->set_tabs_visible(false); tab_container->set_custom_minimum_size(Size2(200, 0) * EDSCALE); - script_split->add_child(tab_container); + code_editor_container->add_child(tab_container); tab_container->set_h_size_flags(SIZE_EXPAND_FILL); + tab_container->set_v_size_flags(SIZE_EXPAND_FILL); + + find_replace_bar = memnew(FindReplaceBar); + code_editor_container->add_child(find_replace_bar); + 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); diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index 9ae63b7c4f..1d379059d4 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -162,6 +162,7 @@ public: virtual void set_tooltip_request_func(String p_method, Object *p_obj) = 0; virtual Control *get_edit_menu() = 0; virtual void clear_edit_menu() = 0; + virtual void set_find_replace_bar(FindReplaceBar *p_bar) = 0; virtual Control *get_base_editor() const = 0; @@ -270,6 +271,7 @@ class ScriptEditor : public PanelContainer { ConfirmationDialog *erase_tab_confirm; ScriptCreateDialog *script_create_dialog; Button *scripts_visible; + FindReplaceBar *find_replace_bar; String current_theme; diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index fe5d830239..1f6da30547 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -203,6 +203,26 @@ void ScriptTextEditor::_set_theme_for_script() { CodeEdit *text_edit = code_editor->get_text_editor(); text_edit->get_syntax_highlighter()->update_cache(); + List<String> strings; + script->get_language()->get_string_delimiters(&strings); + text_edit->clear_string_delimiters(); + for (List<String>::Element *E = strings.front(); E; E = E->next()) { + String string = E->get(); + String beg = string.get_slice(" ", 0); + String end = string.get_slice_count(" ") > 1 ? string.get_slice(" ", 1) : String(); + text_edit->add_string_delimiter(beg, end, end == ""); + } + + List<String> comments; + script->get_language()->get_comment_delimiters(&comments); + text_edit->clear_comment_delimiters(); + for (List<String>::Element *E = comments.front(); E; E = E->next()) { + String comment = E->get(); + String beg = comment.get_slice(" ", 0); + String end = comment.get_slice_count(" ") > 1 ? comment.get_slice(" ", 1) : String(); + text_edit->add_comment_delimiter(beg, end, end == ""); + } + /* add keywords for auto completion */ // singleton autoloads (as types, just as engine singletons are) Map<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list(); @@ -1056,7 +1076,7 @@ void ScriptTextEditor::_edit_option(int p_op) { _edit_option_toggle_inline_comment(); } break; case EDIT_COMPLETE: { - tx->query_code_comple(); + tx->request_code_completion(true); } break; case EDIT_AUTO_INDENT: { String text = tx->get_text(); @@ -1323,9 +1343,9 @@ void ScriptTextEditor::_notification(int p_what) { void ScriptTextEditor::_bind_methods() { ClassDB::bind_method("_update_connected_methods", &ScriptTextEditor::_update_connected_methods); - ClassDB::bind_method("get_drag_data_fw", &ScriptTextEditor::get_drag_data_fw); - ClassDB::bind_method("can_drop_data_fw", &ScriptTextEditor::can_drop_data_fw); - ClassDB::bind_method("drop_data_fw", &ScriptTextEditor::drop_data_fw); + ClassDB::bind_method("_get_drag_data_fw", &ScriptTextEditor::get_drag_data_fw); + ClassDB::bind_method("_can_drop_data_fw", &ScriptTextEditor::can_drop_data_fw); + ClassDB::bind_method("_drop_data_fw", &ScriptTextEditor::drop_data_fw); ClassDB::bind_method(D_METHOD("add_syntax_highlighter", "highlighter"), &ScriptTextEditor::add_syntax_highlighter); } @@ -1338,6 +1358,10 @@ void ScriptTextEditor::clear_edit_menu() { memdelete(edit_hb); } +void ScriptTextEditor::set_find_replace_bar(FindReplaceBar *p_bar) { + code_editor->set_find_replace_bar(p_bar); +} + void ScriptTextEditor::reload(bool p_soft) { CodeEdit *te = code_editor->get_text_editor(); Ref<Script> scr = script; @@ -1804,9 +1828,7 @@ ScriptTextEditor::ScriptTextEditor() { update_settings(); - code_editor->get_text_editor()->set_callhint_settings( - EditorSettings::get_singleton()->get("text_editor/completion/put_callhint_tooltip_below_current_line"), - EditorSettings::get_singleton()->get("text_editor/completion/callhint_tooltip_offset")); + code_editor->get_text_editor()->set_code_hint_draw_below(EditorSettings::get_singleton()->get("text_editor/completion/put_callhint_tooltip_below_current_line")); code_editor->get_text_editor()->set_select_identifiers_on_hover(true); code_editor->get_text_editor()->set_context_menu_enabled(false); diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h index f784bbe1f8..7bb961bf19 100644 --- a/editor/plugins/script_text_editor.h +++ b/editor/plugins/script_text_editor.h @@ -233,6 +233,8 @@ public: Control *get_edit_menu() override; virtual void clear_edit_menu() override; + virtual void set_find_replace_bar(FindReplaceBar *p_bar) override; + static void register_editor(); virtual Control *get_base_editor() const override; diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index a210a46127..e4a5a3796e 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -154,6 +154,10 @@ void ShaderTextEditor::_load_theme_settings() { syntax_highlighter->add_color_region("/*", "*/", comment_color, false); syntax_highlighter->add_color_region("//", "", comment_color, true); + text_editor->clear_comment_delimiters(); + text_editor->add_comment_delimiter("/*", "*/", false); + text_editor->add_comment_delimiter("//", "", true); + if (warnings_panel) { // Warnings panel warnings_panel->add_theme_font_override("normal_font", EditorNode::get_singleton()->get_gui_base()->get_theme_font("main", "EditorFonts")); @@ -348,7 +352,7 @@ void ShaderEditor::_menu_option(int p_option) { } break; case EDIT_COMPLETE: { - shader_editor->get_text_editor()->query_code_comple(); + shader_editor->get_text_editor()->request_code_completion(); } break; case SEARCH_FIND: { shader_editor->get_find_replace_bar()->popup_search(); @@ -659,9 +663,7 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) { EditorSettings::get_singleton()->connect("settings_changed", callable_mp(this, &ShaderEditor::_editor_settings_changed)); ProjectSettingsEditor::get_singleton()->connect("confirmed", callable_mp(this, &ShaderEditor::_project_settings_changed)); - shader_editor->get_text_editor()->set_callhint_settings( - EditorSettings::get_singleton()->get("text_editor/completion/put_callhint_tooltip_below_current_line"), - EditorSettings::get_singleton()->get("text_editor/completion/callhint_tooltip_offset")); + shader_editor->get_text_editor()->set_code_hint_draw_below(EditorSettings::get_singleton()->get("text_editor/completion/put_callhint_tooltip_below_current_line")); shader_editor->get_text_editor()->set_select_identifiers_on_hover(true); shader_editor->get_text_editor()->set_context_menu_enabled(false); @@ -749,6 +751,11 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) { editor_box->set_v_size_flags(SIZE_EXPAND_FILL); editor_box->add_child(shader_editor); + FindReplaceBar *bar = memnew(FindReplaceBar); + main_container->add_child(bar); + bar->hide(); + shader_editor->set_find_replace_bar(bar); + warnings_panel = memnew(RichTextLabel); warnings_panel->set_custom_minimum_size(Size2(0, 100 * EDSCALE)); warnings_panel->set_h_size_flags(SIZE_EXPAND_FILL); diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp index 404ef62eca..a97584ebce 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.cpp +++ b/editor/plugins/skeleton_3d_editor_plugin.cpp @@ -95,7 +95,7 @@ void BoneTransformEditor::create_editors() { section->get_vbox()->add_child(transform_section); // Transform/Matrix property - transform_property = memnew(EditorPropertyTransform()); + transform_property = memnew(EditorPropertyTransform3D()); transform_property->setup(-10000, 10000, 0.001f, true); transform_property->set_label("Transform"); transform_property->set_use_folding(true); @@ -171,7 +171,7 @@ void BoneTransformEditor::_value_changed(const double p_value) { return; } - Transform tform = compute_transform_from_vector3s(); + Transform3D tform = compute_transform_from_vector3s(); _change_transform(tform); } @@ -179,30 +179,30 @@ void BoneTransformEditor::_value_changed_vector3(const String p_property_name, c if (updating) { return; } - Transform tform = compute_transform_from_vector3s(); + Transform3D tform = compute_transform_from_vector3s(); _change_transform(tform); } -Transform BoneTransformEditor::compute_transform_from_vector3s() const { +Transform3D BoneTransformEditor::compute_transform_from_vector3s() const { // Convert rotation from degrees to radians. Vector3 prop_rotation = rotation_property->get_vector(); prop_rotation.x = Math::deg2rad(prop_rotation.x); prop_rotation.y = Math::deg2rad(prop_rotation.y); prop_rotation.z = Math::deg2rad(prop_rotation.z); - return Transform( + return Transform3D( Basis(prop_rotation, scale_property->get_vector()), translation_property->get_vector()); } -void BoneTransformEditor::_value_changed_transform(const String p_property_name, const Transform p_transform, const StringName p_edited_property_name, const bool p_boolean) { +void BoneTransformEditor::_value_changed_transform(const String p_property_name, const Transform3D p_transform, const StringName p_edited_property_name, const bool p_boolean) { if (updating) { return; } _change_transform(p_transform); } -void BoneTransformEditor::_change_transform(Transform p_new_transform) { +void BoneTransformEditor::_change_transform(Transform3D p_new_transform) { if (property.get_slicec('/', 0) == "bones" && property.get_slicec('/', 2) == "custom_pose") { undo_redo->create_action(TTR("Set Custom Bone Pose Transform"), UndoRedo::MERGE_ENDS); undo_redo->add_undo_method(skeleton, "set_bone_custom_pose", property.get_slicec('/', 1).to_int(), skeleton->get_bone_custom_pose(property.get_slicec('/', 1).to_int())); @@ -235,7 +235,7 @@ void BoneTransformEditor::_update_properties() { updating = true; - Transform tform = skeleton->get(property); + Transform3D tform = skeleton->get(property); _update_transform_properties(tform); } @@ -250,11 +250,11 @@ void BoneTransformEditor::_update_custom_pose_properties() { updating = true; - Transform tform = skeleton->get_bone_custom_pose(property.to_int()); + Transform3D tform = skeleton->get_bone_custom_pose(property.to_int()); _update_transform_properties(tform); } -void BoneTransformEditor::_update_transform_properties(Transform tform) { +void BoneTransformEditor::_update_transform_properties(Transform3D tform) { Basis rotation_basis = tform.get_basis(); Vector3 rotation_radians = rotation_basis.get_rotation_euler(); Vector3 rotation_degrees = Vector3(Math::rad2deg(rotation_radians.x), Math::rad2deg(rotation_radians.y), Math::rad2deg(rotation_radians.z)); @@ -306,7 +306,7 @@ void BoneTransformEditor::_key_button_pressed() { } // Need to normalize the basis before you key it - Transform tform = compute_transform_from_vector3s(); + Transform3D tform = compute_transform_from_vector3s(); tform.orthonormalize(); AnimationPlayerEditor::singleton->get_track_editor()->insert_transform_key(skeleton, name, tform); } @@ -380,7 +380,7 @@ void Skeleton3DEditor::create_physical_skeleton() { } PhysicalBone3D *Skeleton3DEditor::create_physical_bone(int bone_id, int bone_child_id, const Vector<BoneInfo> &bones_infos) { - const Transform child_rest = skeleton->get_bone_rest(bone_child_id); + const Transform3D child_rest = skeleton->get_bone_rest(bone_child_id); const real_t half_height(child_rest.origin.length() * 0.5); const real_t radius(half_height * 0.2); @@ -392,15 +392,15 @@ PhysicalBone3D *Skeleton3DEditor::create_physical_bone(int bone_id, int bone_chi CollisionShape3D *bone_shape = memnew(CollisionShape3D); bone_shape->set_shape(bone_shape_capsule); - Transform capsule_transform; + Transform3D capsule_transform; capsule_transform.basis = Basis(Vector3(1, 0, 0), Vector3(0, 0, 1), Vector3(0, -1, 0)); bone_shape->set_transform(capsule_transform); - Transform body_transform; + Transform3D body_transform; body_transform.set_look_at(Vector3(0, 0, 0), child_rest.origin); body_transform.origin = body_transform.basis.xform(Vector3(0, 0, -half_height)); - Transform joint_transform; + Transform3D joint_transform; joint_transform.origin = Vector3(0, 0, half_height); PhysicalBone3D *physical_bone = memnew(PhysicalBone3D); @@ -666,9 +666,9 @@ void Skeleton3DEditor::_bind_methods() { ClassDB::bind_method(D_METHOD("_update_properties"), &Skeleton3DEditor::_update_properties); ClassDB::bind_method(D_METHOD("_on_click_option"), &Skeleton3DEditor::_on_click_option); - ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &Skeleton3DEditor::get_drag_data_fw); - ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &Skeleton3DEditor::can_drop_data_fw); - ClassDB::bind_method(D_METHOD("drop_data_fw"), &Skeleton3DEditor::drop_data_fw); + ClassDB::bind_method(D_METHOD("_get_drag_data_fw"), &Skeleton3DEditor::get_drag_data_fw); + ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &Skeleton3DEditor::can_drop_data_fw); + ClassDB::bind_method(D_METHOD("_drop_data_fw"), &Skeleton3DEditor::drop_data_fw); ClassDB::bind_method(D_METHOD("move_skeleton_bone"), &Skeleton3DEditor::move_skeleton_bone); } diff --git a/editor/plugins/skeleton_3d_editor_plugin.h b/editor/plugins/skeleton_3d_editor_plugin.h index 14c213f7b2..9de52c6fa8 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.h +++ b/editor/plugins/skeleton_3d_editor_plugin.h @@ -41,7 +41,7 @@ class PhysicalBone3D; class Skeleton3DEditorPlugin; class Button; class CheckBox; -class EditorPropertyTransform; +class EditorPropertyTransform3D; class EditorPropertyVector3; class BoneTransformEditor : public VBoxContainer { @@ -53,7 +53,7 @@ class BoneTransformEditor : public VBoxContainer { EditorPropertyVector3 *rotation_property = nullptr; EditorPropertyVector3 *scale_property = nullptr; EditorInspectorSection *transform_section = nullptr; - EditorPropertyTransform *transform_property = nullptr; + EditorPropertyTransform3D *transform_property = nullptr; Rect2 background_rects[5]; @@ -78,11 +78,11 @@ class BoneTransformEditor : public VBoxContainer { // Called when the one of the EditorPropertyVector3 are updated. void _value_changed_vector3(const String p_property_name, const Vector3 p_vector, const StringName p_edited_property_name, const bool p_boolean); // Called when the transform_property is updated. - void _value_changed_transform(const String p_property_name, const Transform p_transform, const StringName p_edited_property_name, const bool p_boolean); + void _value_changed_transform(const String p_property_name, const Transform3D p_transform, const StringName p_edited_property_name, const bool p_boolean); // Changes the transform to the given transform and updates the UI accordingly. - void _change_transform(Transform p_new_transform); + void _change_transform(Transform3D p_new_transform); // Creates a Transform using the EditorPropertyVector3 properties. - Transform compute_transform_from_vector3s() const; + Transform3D compute_transform_from_vector3s() const; void update_enabled_checkbox(); @@ -98,7 +98,7 @@ public: void _update_properties(); void _update_custom_pose_properties(); - void _update_transform_properties(Transform p_transform); + void _update_transform_properties(Transform3D p_transform); // Can/cannot modify the spinner values for the Transform void set_read_only(const bool p_read_only); @@ -127,7 +127,7 @@ class Skeleton3DEditor : public VBoxContainer { struct BoneInfo { PhysicalBone3D *physical_bone = nullptr; - Transform relative_rest; // Relative to skeleton node + Transform3D relative_rest; // Relative to skeleton node }; EditorNode *editor; diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index 59bc8f9e55..a5a3d624ec 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -964,9 +964,9 @@ void SpriteFramesEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da void SpriteFramesEditor::_bind_methods() { ClassDB::bind_method(D_METHOD("_update_library", "skipsel"), &SpriteFramesEditor::_update_library, DEFVAL(false)); - ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &SpriteFramesEditor::get_drag_data_fw); - ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &SpriteFramesEditor::can_drop_data_fw); - ClassDB::bind_method(D_METHOD("drop_data_fw"), &SpriteFramesEditor::drop_data_fw); + ClassDB::bind_method(D_METHOD("_get_drag_data_fw"), &SpriteFramesEditor::get_drag_data_fw); + ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &SpriteFramesEditor::can_drop_data_fw); + ClassDB::bind_method(D_METHOD("_drop_data_fw"), &SpriteFramesEditor::drop_data_fw); } SpriteFramesEditor::SpriteFramesEditor() { diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp index 1edcbd2cc9..dc7f85a790 100644 --- a/editor/plugins/text_editor.cpp +++ b/editor/plugins/text_editor.cpp @@ -281,6 +281,10 @@ void TextEditor::clear_edit_menu() { memdelete(edit_hb); } +void TextEditor::set_find_replace_bar(FindReplaceBar *p_bar) { + code_editor->set_find_replace_bar(p_bar); +} + void TextEditor::_edit_option(int p_op) { CodeEdit *tx = code_editor->get_text_editor(); @@ -538,7 +542,7 @@ TextEditor::TextEditor() { edit_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextEditor::_edit_option)); edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_undo"), EDIT_UNDO); - edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("un_redo"), EDIT_REDO); + edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_redo"), EDIT_REDO); edit_menu->get_popup()->add_separator(); edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_cut"), EDIT_CUT); edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_copy"), EDIT_COPY); diff --git a/editor/plugins/text_editor.h b/editor/plugins/text_editor.h index abb75cc9d8..4e667dc676 100644 --- a/editor/plugins/text_editor.h +++ b/editor/plugins/text_editor.h @@ -139,6 +139,7 @@ public: virtual Control *get_edit_menu() override; virtual void clear_edit_menu() override; + virtual void set_find_replace_bar(FindReplaceBar *p_bar) override; virtual void validate() override; diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp index 62ecdb8c32..686ff0f9ef 100644 --- a/editor/plugins/texture_region_editor_plugin.cpp +++ b/editor/plugins/texture_region_editor_plugin.cpp @@ -863,13 +863,13 @@ Sprite2D *TextureRegionEditor::get_sprite() { void TextureRegionEditor::edit(Object *p_obj) { if (node_sprite) { - node_sprite->disconnect("changed", callable_mp(this, &TextureRegionEditor::_texture_changed)); + node_sprite->disconnect("texture_changed", callable_mp(this, &TextureRegionEditor::_texture_changed)); } if (node_sprite_3d) { - node_sprite_3d->disconnect("changed", callable_mp(this, &TextureRegionEditor::_texture_changed)); + node_sprite_3d->disconnect("texture_changed", callable_mp(this, &TextureRegionEditor::_texture_changed)); } if (node_ninepatch) { - node_ninepatch->disconnect("changed", callable_mp(this, &TextureRegionEditor::_texture_changed)); + node_ninepatch->disconnect("texture_changed", callable_mp(this, &TextureRegionEditor::_texture_changed)); } if (obj_styleBox.is_valid()) { obj_styleBox->disconnect("changed", callable_mp(this, &TextureRegionEditor::_texture_changed)); @@ -881,13 +881,22 @@ void TextureRegionEditor::edit(Object *p_obj) { node_sprite = Object::cast_to<Sprite2D>(p_obj); node_sprite_3d = Object::cast_to<Sprite3D>(p_obj); node_ninepatch = Object::cast_to<NinePatchRect>(p_obj); + + bool is_resource = false; if (Object::cast_to<StyleBoxTexture>(p_obj)) { obj_styleBox = Ref<StyleBoxTexture>(Object::cast_to<StyleBoxTexture>(p_obj)); + is_resource = true; } if (Object::cast_to<AtlasTexture>(p_obj)) { atlas_tex = Ref<AtlasTexture>(Object::cast_to<AtlasTexture>(p_obj)); + is_resource = true; + } + + if (is_resource) { + p_obj->connect("changed", callable_mp(this, &TextureRegionEditor::_texture_changed)); + } else { + p_obj->connect("texture_changed", callable_mp(this, &TextureRegionEditor::_texture_changed)); } - p_obj->connect("changed", callable_mp(this, &TextureRegionEditor::_texture_changed)); _edit_region(); } else { node_sprite = nullptr; @@ -937,7 +946,6 @@ void TextureRegionEditor::_edit_region() { if (cache_map.has(texture->get_rid())) { autoslice_cache = cache_map[texture->get_rid()]; autoslice_is_dirty = false; - return; } else { if (is_visible() && snap_mode == SNAP_AUTOSLICE) { _update_autoslice(); diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index 623120399a..d1652d3fce 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -30,7 +30,7 @@ #include "theme_editor_plugin.h" -#include "core/os/file_access.h" +#include "core/io/file_access.h" #include "core/os/keyboard.h" #include "core/version.h" #include "editor/editor_scale.h" diff --git a/editor/plugins/tiles/tile_set_editor.cpp b/editor/plugins/tiles/tile_set_editor.cpp index 6078c986cb..11842981f3 100644 --- a/editor/plugins/tiles/tile_set_editor.cpp +++ b/editor/plugins/tiles/tile_set_editor.cpp @@ -436,8 +436,8 @@ void TileSetEditor::_undo_redo_inspector_callback(Object *p_undo_redo, Object *p } void TileSetEditor::_bind_methods() { - ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &TileSetEditor::can_drop_data_fw); - ClassDB::bind_method(D_METHOD("drop_data_fw"), &TileSetEditor::drop_data_fw); + ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &TileSetEditor::can_drop_data_fw); + ClassDB::bind_method(D_METHOD("_drop_data_fw"), &TileSetEditor::drop_data_fw); } TileDataEditor *TileSetEditor::get_tile_data_editor(String p_property) { diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index a0757439c3..9217f2ac4c 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -44,6 +44,7 @@ #include "scene/gui/panel.h" #include "scene/main/window.h" #include "scene/resources/visual_shader_nodes.h" +#include "scene/resources/visual_shader_particle_nodes.h" #include "scene/resources/visual_shader_sdf_nodes.h" #include "servers/display_server.h" #include "servers/rendering/shader_types.h" @@ -71,13 +72,13 @@ const int MAX_FLOAT_CONST_DEFS = sizeof(float_constant_defs) / sizeof(FloatConst Control *VisualShaderNodePlugin::create_editor(const Ref<Resource> &p_parent_resource, const Ref<VisualShaderNode> &p_node) { if (get_script_instance()) { - return get_script_instance()->call("create_editor", p_parent_resource, p_node); + return get_script_instance()->call("_create_editor", p_parent_resource, p_node); } return nullptr; } void VisualShaderNodePlugin::_bind_methods() { - BIND_VMETHOD(MethodInfo(Variant::OBJECT, "create_editor", PropertyInfo(Variant::OBJECT, "parent_resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource"), PropertyInfo(Variant::OBJECT, "for_node", PROPERTY_HINT_RESOURCE_TYPE, "VisualShaderNode"))); + BIND_VMETHOD(MethodInfo(Variant::OBJECT, "_create_editor", PropertyInfo(Variant::OBJECT, "parent_resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource"), PropertyInfo(Variant::OBJECT, "for_node", PROPERTY_HINT_RESOURCE_TYPE, "VisualShaderNode"))); } /////////////////// @@ -417,6 +418,11 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) { } } + Ref<VisualShaderNodeParticleEmit> emit = vsnode; + if (emit.is_valid()) { + node->set_custom_minimum_size(Size2(200 * EDSCALE, 0)); + } + Ref<VisualShaderNodeUniform> uniform = vsnode; if (uniform.is_valid()) { VisualShaderEditor::get_singleton()->graph->add_child(node); @@ -848,6 +854,10 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) { expression_syntax_highlighter->add_color_region("/*", "*/", comment_color, false); expression_syntax_highlighter->add_color_region("//", "", comment_color, true); + expression_box->clear_comment_delimiters(); + expression_box->add_comment_delimiter("/*", "*/", false); + expression_box->add_comment_delimiter("//", "", true); + expression_box->set_text(expression); expression_box->set_context_menu_enabled(false); expression_box->set_draw_line_numbers(true); @@ -1009,13 +1019,13 @@ bool VisualShaderEditor::_is_available(int p_mode) { if (p_mode != -1) { switch (current_mode) { - case 0: // Vertex or Emit + case 0: // Vertex / Emit current_mode = 1; break; - case 1: // Fragment or Process + case 1: // Fragment / Process current_mode = 2; break; - case 2: // Light or End + case 2: // Light / Collide current_mode = 4; break; default: @@ -1231,22 +1241,29 @@ void VisualShaderEditor::_update_options_menu() { void VisualShaderEditor::_set_mode(int p_which) { if (p_which == VisualShader::MODE_SKY) { - edit_type_standart->set_visible(false); + edit_type_standard->set_visible(false); edit_type_particles->set_visible(false); edit_type_sky->set_visible(true); edit_type = edit_type_sky; + custom_mode_box->set_visible(false); mode = MODE_FLAGS_SKY; } else if (p_which == VisualShader::MODE_PARTICLES) { - edit_type_standart->set_visible(false); + edit_type_standard->set_visible(false); edit_type_particles->set_visible(true); edit_type_sky->set_visible(false); edit_type = edit_type_particles; + if ((edit_type->get_selected() + 3) > VisualShader::TYPE_PROCESS) { + custom_mode_box->set_visible(false); + } else { + custom_mode_box->set_visible(true); + } mode = MODE_FLAGS_PARTICLES; } else { edit_type_particles->set_visible(false); - edit_type_standart->set_visible(true); + edit_type_standard->set_visible(true); edit_type_sky->set_visible(false); - edit_type = edit_type_standart; + edit_type = edit_type_standard; + custom_mode_box->set_visible(false); mode = MODE_FLAGS_SPATIAL_CANVASITEM; } visual_shader->set_shader_type(get_current_shader_type()); @@ -1399,9 +1416,9 @@ void VisualShaderEditor::_update_graph() { VisualShader::Type VisualShaderEditor::get_current_shader_type() const { VisualShader::Type type; if (mode & MODE_FLAGS_PARTICLES) { - type = VisualShader::Type(edit_type->get_selected() + 3); + type = VisualShader::Type(edit_type->get_selected() + 3 + (custom_mode_enabled ? 3 : 0)); } else if (mode & MODE_FLAGS_SKY) { - type = VisualShader::Type(edit_type->get_selected() + 6); + type = VisualShader::Type(edit_type->get_selected() + 8); } else { type = VisualShader::Type(edit_type->get_selected()); } @@ -2077,6 +2094,16 @@ void VisualShaderEditor::_setup_node(VisualShaderNode *p_node, int p_op_idx) { } } + //UV_FUNC + { + VisualShaderNodeUVFunc *uvFunc = Object::cast_to<VisualShaderNodeUVFunc>(p_node); + + if (uvFunc) { + uvFunc->set_function((VisualShaderNodeUVFunc::Function)p_op_idx); + return; + } + } + // IS { VisualShaderNodeIs *is = Object::cast_to<VisualShaderNodeIs>(p_node); @@ -2945,9 +2972,6 @@ void VisualShaderEditor::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) { highend_label->set_modulate(get_theme_color("vulkan_color", "Editor")); - error_panel->add_theme_style_override("panel", get_theme_stylebox("bg", "Tree")); - error_label->add_theme_color_override("font_color", get_theme_color("error_color", "Editor")); - node_filter->set_right_icon(Control::get_theme_icon("Search", "EditorIcons")); preview_shader->set_icon(Control::get_theme_icon("Shader", "EditorIcons")); @@ -2984,9 +3008,14 @@ void VisualShaderEditor::_notification(int p_what) { syntax_highlighter->add_color_region("/*", "*/", comment_color, false); syntax_highlighter->add_color_region("//", "", comment_color, true); - error_text->add_theme_font_override("font", get_theme_font("status_source", "EditorFonts")); - error_text->add_theme_font_size_override("font_size", get_theme_font_size("status_source_size", "EditorFonts")); - error_text->add_theme_color_override("font_color", get_theme_color("error_color", "Editor")); + preview_text->clear_comment_delimiters(); + preview_text->add_comment_delimiter("/*", "*/", false); + preview_text->add_comment_delimiter("//", "", true); + + error_panel->add_theme_style_override("panel", get_theme_stylebox("panel", "Panel")); + error_label->add_theme_font_override("font", get_theme_font("status_source", "EditorFonts")); + error_label->add_theme_font_size_override("font_size", get_theme_font_size("status_source_size", "EditorFonts")); + error_label->add_theme_color_override("font_color", get_theme_color("error_color", "Editor")); } tools->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon("Tools", "EditorIcons")); @@ -3208,8 +3237,18 @@ void VisualShaderEditor::_mode_selected(int p_id) { int offset = 0; if (mode & MODE_FLAGS_PARTICLES) { offset = 3; + if (p_id + offset > VisualShader::TYPE_PROCESS) { + custom_mode_box->set_visible(false); + custom_mode_enabled = false; + } else { + custom_mode_box->set_visible(true); + if (custom_mode_box->is_pressed()) { + custom_mode_enabled = true; + offset += 3; + } + } } else if (mode & MODE_FLAGS_SKY) { - offset = 6; + offset = 8; } visual_shader->set_shader_type(VisualShader::Type(p_id + offset)); @@ -3217,6 +3256,21 @@ void VisualShaderEditor::_mode_selected(int p_id) { _update_graph(); } +void VisualShaderEditor::_custom_mode_toggled(bool p_enabled) { + if (!(mode & MODE_FLAGS_PARTICLES)) { + return; + } + custom_mode_enabled = p_enabled; + int id = edit_type->get_selected() + 3; + if (p_enabled) { + visual_shader->set_shader_type(VisualShader::Type(id + 3)); + } else { + visual_shader->set_shader_type(VisualShader::Type(id)); + } + _update_options_menu(); + _update_graph(); +} + void VisualShaderEditor::_input_select_item(Ref<VisualShaderNodeInput> p_input, String p_name) { String prev_name = p_input->get_input_name(); @@ -3602,13 +3656,13 @@ void VisualShaderEditor::_update_preview() { if (err != OK) { Color error_line_color = EDITOR_GET("text_editor/highlighting/mark_color"); preview_text->set_line_background_color(sl.get_error_line() - 1, error_line_color); - error_text->set_visible(true); + error_panel->show(); String text = "error(" + itos(sl.get_error_line()) + "): " + sl.get_error_text(); - error_text->set_text(text); + error_label->set_text(text); shader_error = true; } else { - error_text->set_visible(false); + error_panel->hide(); shader_error = false; } } @@ -3640,9 +3694,9 @@ void VisualShaderEditor::_bind_methods() { ClassDB::bind_method("_update_uniform", &VisualShaderEditor::_update_uniform); ClassDB::bind_method("_expand_output_port", &VisualShaderEditor::_expand_output_port); - ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &VisualShaderEditor::get_drag_data_fw); - ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &VisualShaderEditor::can_drop_data_fw); - ClassDB::bind_method(D_METHOD("drop_data_fw"), &VisualShaderEditor::drop_data_fw); + ClassDB::bind_method(D_METHOD("_get_drag_data_fw"), &VisualShaderEditor::get_drag_data_fw); + ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &VisualShaderEditor::can_drop_data_fw); + ClassDB::bind_method(D_METHOD("_drop_data_fw"), &VisualShaderEditor::drop_data_fw); ClassDB::bind_method("_is_available", &VisualShaderEditor::_is_available); } @@ -3715,17 +3769,23 @@ VisualShaderEditor::VisualShaderEditor() { graph->get_zoom_hbox()->add_child(vs); graph->get_zoom_hbox()->move_child(vs, 0); - edit_type_standart = memnew(OptionButton); - edit_type_standart->add_item(TTR("Vertex")); - edit_type_standart->add_item(TTR("Fragment")); - edit_type_standart->add_item(TTR("Light")); - edit_type_standart->select(1); - edit_type_standart->connect("item_selected", callable_mp(this, &VisualShaderEditor::_mode_selected)); + custom_mode_box = memnew(CheckBox); + custom_mode_box->set_text(TTR("Custom")); + custom_mode_box->set_pressed(false); + custom_mode_box->set_visible(false); + custom_mode_box->connect("toggled", callable_mp(this, &VisualShaderEditor::_custom_mode_toggled)); + + edit_type_standard = memnew(OptionButton); + edit_type_standard->add_item(TTR("Vertex")); + edit_type_standard->add_item(TTR("Fragment")); + edit_type_standard->add_item(TTR("Light")); + edit_type_standard->select(1); + edit_type_standard->connect("item_selected", callable_mp(this, &VisualShaderEditor::_mode_selected)); edit_type_particles = memnew(OptionButton); - edit_type_particles->add_item(TTR("Emit")); + edit_type_particles->add_item(TTR("Start")); edit_type_particles->add_item(TTR("Process")); - edit_type_particles->add_item(TTR("End")); + edit_type_particles->add_item(TTR("Collide")); edit_type_particles->select(0); edit_type_particles->connect("item_selected", callable_mp(this, &VisualShaderEditor::_mode_selected)); @@ -3734,14 +3794,16 @@ VisualShaderEditor::VisualShaderEditor() { edit_type_sky->select(0); edit_type_sky->connect("item_selected", callable_mp(this, &VisualShaderEditor::_mode_selected)); - edit_type = edit_type_standart; + edit_type = edit_type_standard; + graph->get_zoom_hbox()->add_child(custom_mode_box); + graph->get_zoom_hbox()->move_child(custom_mode_box, 0); + graph->get_zoom_hbox()->add_child(edit_type_standard); + graph->get_zoom_hbox()->move_child(edit_type_standard, 0); graph->get_zoom_hbox()->add_child(edit_type_particles); graph->get_zoom_hbox()->move_child(edit_type_particles, 0); graph->get_zoom_hbox()->add_child(edit_type_sky); graph->get_zoom_hbox()->move_child(edit_type_sky, 0); - graph->get_zoom_hbox()->add_child(edit_type_standart); - graph->get_zoom_hbox()->move_child(edit_type_standart, 0); add_node = memnew(Button); add_node->set_flat(true); @@ -3770,6 +3832,7 @@ VisualShaderEditor::VisualShaderEditor() { preview_vbox = memnew(VBoxContainer); preview_window->add_child(preview_vbox); + preview_vbox->add_theme_constant_override("separation", 0); preview_text = memnew(CodeEdit); syntax_highlighter.instance(); @@ -3779,10 +3842,13 @@ VisualShaderEditor::VisualShaderEditor() { preview_text->set_draw_line_numbers(true); preview_text->set_readonly(true); - error_text = memnew(Label); - preview_vbox->add_child(error_text); - error_text->set_autowrap(true); - error_text->set_visible(false); + error_panel = memnew(PanelContainer); + preview_vbox->add_child(error_panel); + error_panel->set_visible(false); + + error_label = memnew(Label); + error_panel->add_child(error_label); + error_label->set_autowrap(true); /////////////////////////////////////// // POPUP MENU @@ -3957,9 +4023,10 @@ VisualShaderEditor::VisualShaderEditor() { // INPUT + const String input_param_shader_modes = TTR("'%s' input parameter for all shader modes."); + // SPATIAL-FOR-ALL - const String input_param_shader_modes = TTR("'%s' input parameter for all shader modes."); add_options.push_back(AddOption("Camera", "Input", "All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "camera"), "camera", VisualShaderNode::PORT_TYPE_TRANSFORM, -1, Shader::MODE_SPATIAL)); add_options.push_back(AddOption("InvCamera", "Input", "All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "inv_camera"), "inv_camera", VisualShaderNode::PORT_TYPE_TRANSFORM, -1, Shader::MODE_SPATIAL)); add_options.push_back(AddOption("InvProjection", "Input", "All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "inv_projection"), "inv_projection", VisualShaderNode::PORT_TYPE_TRANSFORM, -1, Shader::MODE_SPATIAL)); @@ -3978,6 +4045,23 @@ VisualShaderEditor::VisualShaderEditor() { add_options.push_back(AddOption("Time", "Input", "All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "time"), "time", VisualShaderNode::PORT_TYPE_SCALAR, -1, Shader::MODE_CANVAS_ITEM)); add_options.push_back(AddOption("UV", "Input", "All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "uv"), "uv", VisualShaderNode::PORT_TYPE_VECTOR, -1, Shader::MODE_CANVAS_ITEM)); + // PARTICLES-FOR-ALL + + add_options.push_back(AddOption("Active", "Input", "All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "active"), "active", VisualShaderNode::PORT_TYPE_BOOLEAN, -1, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("Alpha", "Input", "All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "alpha"), "alpha", VisualShaderNode::PORT_TYPE_SCALAR, -1, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("AttractorForce", "Input", "All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "attractor_force"), "attractor_force", VisualShaderNode::PORT_TYPE_VECTOR, -1, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("Color", "Input", "All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "color"), "color", VisualShaderNode::PORT_TYPE_VECTOR, -1, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("Custom", "Input", "All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "custom"), "custom", VisualShaderNode::PORT_TYPE_VECTOR, -1, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("CustomAlpha", "Input", "All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "custom_alpha"), "custom_alpha", VisualShaderNode::PORT_TYPE_SCALAR, -1, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("Delta", "Input", "All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "delta"), "delta", VisualShaderNode::PORT_TYPE_SCALAR, -1, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("EmissionTransform", "Input", "All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "emission_transform"), "emission_transform", VisualShaderNode::PORT_TYPE_TRANSFORM, -1, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("Index", "Input", "All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "index"), "index", VisualShaderNode::PORT_TYPE_SCALAR_INT, -1, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("LifeTime", "Input", "All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "lifetime"), "lifetime", VisualShaderNode::PORT_TYPE_SCALAR, -1, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("Restart", "Input", "All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "restart"), "restart", VisualShaderNode::PORT_TYPE_BOOLEAN, -1, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("Time", "Input", "All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "time"), "time", VisualShaderNode::PORT_TYPE_SCALAR, -1, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("Transform", "Input", "All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "transform"), "transform", VisualShaderNode::PORT_TYPE_TRANSFORM, -1, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("Velocity", "Input", "All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "velocity"), "velocity", VisualShaderNode::PORT_TYPE_VECTOR, -1, Shader::MODE_PARTICLES)); + ///////////////// add_options.push_back(AddOption("Input", "Input", "Common", "VisualShaderNodeInput", TTR("Input parameter."))); @@ -3990,11 +4074,12 @@ VisualShaderEditor::VisualShaderEditor() { const String input_param_for_sky_shader_mode = TTR("'%s' input parameter for sky shader mode."); const String input_param_for_light_shader_mode = TTR("'%s' input parameter for light shader mode."); const String input_param_for_vertex_shader_mode = TTR("'%s' input parameter for vertex shader mode."); - const String input_param_for_emit_shader_mode = TTR("'%s' input parameter for emit shader mode."); + const String input_param_for_start_shader_mode = TTR("'%s' input parameter for start shader mode."); const String input_param_for_process_shader_mode = TTR("'%s' input parameter for process shader mode."); - const String input_param_for_end_shader_mode = TTR("'%s' input parameter for end shader mode."); - const String input_param_for_emit_and_process_shader_mode = TTR("'%s' input parameter for emit and process shader mode."); - const String input_param_for_vertex_and_fragment_shader_mode = TTR("'%s' input parameter for vertex and fragment shader mode."); + const String input_param_for_collide_shader_mode = TTR("'%s' input parameter for collide shader mode."); + const String input_param_for_start_and_process_shader_mode = TTR("'%s' input parameter for start and process shader modes."); + const String input_param_for_process_and_collide_shader_mode = TTR("'%s' input parameter for process and collide shader modes."); + const String input_param_for_vertex_and_fragment_shader_mode = TTR("'%s' input parameter for vertex and fragment shader modes."); add_options.push_back(AddOption("Alpha", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "alpha"), "alpha", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL)); add_options.push_back(AddOption("Binormal", "Input", "Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "binormal"), "binormal", VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL)); @@ -4071,50 +4156,6 @@ VisualShaderEditor::VisualShaderEditor() { add_options.push_back(AddOption("Vertex", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "vertex"), "vertex", VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_VERTEX, Shader::MODE_CANVAS_ITEM)); add_options.push_back(AddOption("World", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "world"), "world", VisualShaderNode::PORT_TYPE_TRANSFORM, TYPE_FLAGS_VERTEX, Shader::MODE_CANVAS_ITEM)); - // PARTICLES INPUTS - - add_options.push_back(AddOption("Active", "Input", "Emit", "VisualShaderNodeInput", vformat(input_param_shader_modes, "active"), "active", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Alpha", "Input", "Emit", "VisualShaderNodeInput", vformat(input_param_shader_modes, "alpha"), "alpha", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Color", "Input", "Emit", "VisualShaderNodeInput", vformat(input_param_shader_modes, "color"), "color", VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Custom", "Input", "Emit", "VisualShaderNodeInput", vformat(input_param_shader_modes, "custom"), "custom", VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("CustomAlpha", "Input", "Emit", "VisualShaderNodeInput", vformat(input_param_shader_modes, "custom_alpha"), "custom_alpha", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Delta", "Input", "Emit", "VisualShaderNodeInput", vformat(input_param_shader_modes, "delta"), "delta", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("EmissionTransform", "Input", "Emit", "VisualShaderNodeInput", vformat(input_param_shader_modes, "emission_transform"), "emission_transform", VisualShaderNode::PORT_TYPE_TRANSFORM, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Index", "Input", "Emit", "VisualShaderNodeInput", vformat(input_param_shader_modes, "index"), "index", VisualShaderNode::PORT_TYPE_SCALAR_INT, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("LifeTime", "Input", "Emit", "VisualShaderNodeInput", vformat(input_param_shader_modes, "lifetime"), "lifetime", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Restart", "Input", "Emit", "VisualShaderNodeInput", vformat(input_param_shader_modes, "restart"), "restart", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Time", "Input", "Emit", "VisualShaderNodeInput", vformat(input_param_shader_modes, "time"), "time", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Transform", "Input", "Emit", "VisualShaderNodeInput", vformat(input_param_shader_modes, "transform"), "transform", VisualShaderNode::PORT_TYPE_TRANSFORM, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Velocity", "Input", "Emit", "VisualShaderNodeInput", vformat(input_param_shader_modes, "velocity"), "velocity", VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); - - add_options.push_back(AddOption("Active", "Input", "Process", "VisualShaderNodeInput", vformat(input_param_shader_modes, "active"), "active", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_PROCESS, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Alpha", "Input", "Process", "VisualShaderNodeInput", vformat(input_param_shader_modes, "alpha"), "alpha", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_PROCESS, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Color", "Input", "Process", "VisualShaderNodeInput", vformat(input_param_shader_modes, "color"), "color", VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_PROCESS, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Custom", "Input", "Process", "VisualShaderNodeInput", vformat(input_param_shader_modes, "custom"), "custom", VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_PROCESS, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("CustomAlpha", "Input", "Process", "VisualShaderNodeInput", vformat(input_param_shader_modes, "custom_alpha"), "custom_alpha", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_PROCESS, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Delta", "Input", "Process", "VisualShaderNodeInput", vformat(input_param_shader_modes, "delta"), "delta", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_PROCESS, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("EmissionTransform", "Input", "Process", "VisualShaderNodeInput", vformat(input_param_shader_modes, "emission_transform"), "emission_transform", VisualShaderNode::PORT_TYPE_TRANSFORM, TYPE_FLAGS_PROCESS, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Index", "Input", "Process", "VisualShaderNodeInput", vformat(input_param_shader_modes, "index"), "index", VisualShaderNode::PORT_TYPE_SCALAR_INT, TYPE_FLAGS_PROCESS, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("LifeTime", "Input", "Process", "VisualShaderNodeInput", vformat(input_param_shader_modes, "lifetime"), "lifetime", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_PROCESS, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Restart", "Input", "Process", "VisualShaderNodeInput", vformat(input_param_shader_modes, "restart"), "restart", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_PROCESS, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Time", "Input", "Process", "VisualShaderNodeInput", vformat(input_param_shader_modes, "time"), "time", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_PROCESS, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Transform", "Input", "Process", "VisualShaderNodeInput", vformat(input_param_shader_modes, "transform"), "transform", VisualShaderNode::PORT_TYPE_TRANSFORM, TYPE_FLAGS_PROCESS, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Velocity", "Input", "Process", "VisualShaderNodeInput", vformat(input_param_shader_modes, "velocity"), "velocity", VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_PROCESS, Shader::MODE_PARTICLES)); - - add_options.push_back(AddOption("Active", "Input", "End", "VisualShaderNodeInput", vformat(input_param_shader_modes, "active"), "active", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_END, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Alpha", "Input", "End", "VisualShaderNodeInput", vformat(input_param_shader_modes, "alpha"), "alpha", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_END, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Color", "Input", "End", "VisualShaderNodeInput", vformat(input_param_shader_modes, "color"), "color", VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_END, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Custom", "Input", "End", "VisualShaderNodeInput", vformat(input_param_shader_modes, "custom"), "custom", VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_END, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("CustomAlpha", "Input", "End", "VisualShaderNodeInput", vformat(input_param_shader_modes, "custom_alpha"), "custom_alpha", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_END, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Delta", "Input", "End", "VisualShaderNodeInput", vformat(input_param_shader_modes, "delta"), "delta", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_END, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("EmissionTransform", "Input", "End", "VisualShaderNodeInput", vformat(input_param_shader_modes, "emission_transform"), "emission_transform", VisualShaderNode::PORT_TYPE_TRANSFORM, TYPE_FLAGS_END, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Index", "Input", "End", "VisualShaderNodeInput", vformat(input_param_shader_modes, "index"), "index", VisualShaderNode::PORT_TYPE_SCALAR_INT, TYPE_FLAGS_END, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("LifeTime", "Input", "End", "VisualShaderNodeInput", vformat(input_param_shader_modes, "lifetime"), "lifetime", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_END, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Restart", "Input", "End", "VisualShaderNodeInput", vformat(input_param_shader_modes, "restart"), "restart", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_END, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Time", "Input", "End", "VisualShaderNodeInput", vformat(input_param_shader_modes, "time"), "time", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_END, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Transform", "Input", "End", "VisualShaderNodeInput", vformat(input_param_shader_modes, "transform"), "transform", VisualShaderNode::PORT_TYPE_TRANSFORM, TYPE_FLAGS_END, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Velocity", "Input", "End", "VisualShaderNodeInput", vformat(input_param_shader_modes, "velocity"), "velocity", VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_END, Shader::MODE_PARTICLES)); - // SKY INPUTS add_options.push_back(AddOption("AtCubeMapPass", "Input", "Sky", "VisualShaderNodeInput", vformat(input_param_for_sky_shader_mode, "at_cubemap_pass"), "at_cubemap_pass", VisualShaderNode::PORT_TYPE_BOOLEAN, TYPE_FLAGS_SKY, Shader::MODE_SKY)); @@ -4147,6 +4188,22 @@ VisualShaderEditor::VisualShaderEditor() { add_options.push_back(AddOption("SkyCoords", "Input", "Sky", "VisualShaderNodeInput", vformat(input_param_for_sky_shader_mode, "sky_coords"), "sky_coords", VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_SKY, Shader::MODE_SKY)); add_options.push_back(AddOption("Time", "Input", "Sky", "VisualShaderNodeInput", vformat(input_param_for_sky_shader_mode, "time"), "time", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_SKY, Shader::MODE_SKY)); + // PARTICLES + + add_options.push_back(AddOption("CollisionDepth", "Input", "Collide", "VisualShaderNodeInput", vformat(input_param_for_collide_shader_mode, "collision_depth"), "collision_depth", VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_COLLIDE, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("CollisionNormal", "Input", "Collide", "VisualShaderNodeInput", vformat(input_param_for_collide_shader_mode, "collision_normal"), "collision_normal", VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_COLLIDE, Shader::MODE_PARTICLES)); + + add_options.push_back(AddOption("EmitParticle", "Particles", "", "VisualShaderNodeParticleEmit", "", -1, -1, -1, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("ParticleAccelerator", "Particles", "", "VisualShaderNodeParticleAccelerator", "", -1, VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_PROCESS, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("ParticleRandomness", "Particles", "", "VisualShaderNodeParticleRandomness", "", -1, VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_EMIT | TYPE_FLAGS_PROCESS | TYPE_FLAGS_COLLIDE, Shader::MODE_PARTICLES)); + 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("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)); + + add_options.push_back(AddOption("ConeVelocity", "Particles", "Velocity", "VisualShaderNodeParticleConeVelocity", "", -1, VisualShaderNode::PORT_TYPE_VECTOR, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES)); + // SCALAR add_options.push_back(AddOption("FloatFunc", "Scalar", "Common", "VisualShaderNodeFloatFunc", TTR("Float function."), -1, VisualShaderNode::PORT_TYPE_SCALAR)); @@ -4234,6 +4291,8 @@ VisualShaderEditor::VisualShaderEditor() { // TEXTURES + add_options.push_back(AddOption("UVFunc", "Textures", "Common", "VisualShaderNodeUVFunc", TTR("Function to be applied on texture coordinates."), -1, VisualShaderNode::PORT_TYPE_VECTOR)); + cubemap_node_option_idx = add_options.size(); add_options.push_back(AddOption("CubeMap", "Textures", "Functions", "VisualShaderNodeCubemap", TTR("Perform the cubic texture lookup."), -1, -1)); curve_node_option_idx = add_options.size(); @@ -4244,6 +4303,8 @@ VisualShaderEditor::VisualShaderEditor() { add_options.push_back(AddOption("Texture2DArray", "Textures", "Functions", "VisualShaderNodeTexture2DArray", TTR("Perform the 2D-array texture lookup."), -1, -1, -1, -1, -1)); texture3d_node_option_idx = add_options.size(); add_options.push_back(AddOption("Texture3D", "Textures", "Functions", "VisualShaderNodeTexture3D", TTR("Perform the 3D texture lookup."), -1, -1)); + add_options.push_back(AddOption("UVPanning", "Textures", "Functions", "VisualShaderNodeUVFunc", TTR("Apply panning function on texture coordinates."), VisualShaderNodeUVFunc::FUNC_PANNING, VisualShaderNode::PORT_TYPE_VECTOR)); + add_options.push_back(AddOption("UVScaling", "Textures", "Functions", "VisualShaderNodeUVFunc", TTR("Apply scaling function on texture coordinates."), VisualShaderNodeUVFunc::FUNC_SCALING, VisualShaderNode::PORT_TYPE_VECTOR)); add_options.push_back(AddOption("CubeMapUniform", "Textures", "Variables", "VisualShaderNodeCubemapUniform", TTR("Cubic texture uniform lookup."), -1, -1)); add_options.push_back(AddOption("TextureUniform", "Textures", "Variables", "VisualShaderNodeTextureUniform", TTR("2D texture uniform lookup."), -1, -1)); @@ -4363,13 +4424,6 @@ VisualShaderEditor::VisualShaderEditor() { _update_options_menu(); - error_panel = memnew(PanelContainer); - add_child(error_panel); - error_label = memnew(Label); - error_panel->add_child(error_label); - error_label->set_text("eh"); - error_panel->hide(); - undo_redo = EditorNode::get_singleton()->get_undo_redo(); Ref<VisualShaderNodePluginDefault> default_plugin; @@ -4686,7 +4740,7 @@ Control *VisualShaderNodePluginDefault::create_editor(const Ref<Resource> &p_par if (Object::cast_to<EditorPropertyResource>(prop)) { Object::cast_to<EditorPropertyResource>(prop)->set_use_sub_inspector(false); prop->set_custom_minimum_size(Size2(100 * EDSCALE, 0)); - } else if (Object::cast_to<EditorPropertyTransform>(prop) || Object::cast_to<EditorPropertyVector3>(prop)) { + } else if (Object::cast_to<EditorPropertyTransform3D>(prop) || Object::cast_to<EditorPropertyVector3>(prop)) { prop->set_custom_minimum_size(Size2(250 * EDSCALE, 0)); } else if (Object::cast_to<EditorPropertyFloat>(prop)) { prop->set_custom_minimum_size(Size2(100 * EDSCALE, 0)); diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h index b3510aafa1..fa98c6b780 100644 --- a/editor/plugins/visual_shader_editor_plugin.h +++ b/editor/plugins/visual_shader_editor_plugin.h @@ -41,8 +41,8 @@ #include "scene/gui/tree.h" #include "scene/resources/visual_shader.h" -class VisualShaderNodePlugin : public Reference { - GDCLASS(VisualShaderNodePlugin, Reference); +class VisualShaderNodePlugin : public RefCounted { + GDCLASS(VisualShaderNodePlugin, RefCounted); protected: static void _bind_methods(); @@ -51,8 +51,8 @@ public: virtual Control *create_editor(const Ref<Resource> &p_parent_resource, const Ref<VisualShaderNode> &p_node); }; -class VisualShaderGraphPlugin : public Reference { - GDCLASS(VisualShaderGraphPlugin, Reference); +class VisualShaderGraphPlugin : public RefCounted { + GDCLASS(VisualShaderGraphPlugin, RefCounted); private: struct InputPort { @@ -142,12 +142,11 @@ class VisualShaderEditor : public VBoxContainer { Button *preview_shader; OptionButton *edit_type = nullptr; - OptionButton *edit_type_standart; + OptionButton *edit_type_standard; OptionButton *edit_type_particles; OptionButton *edit_type_sky; - - PanelContainer *error_panel; - Label *error_label; + CheckBox *custom_mode_box; + bool custom_mode_enabled = false; bool pending_update_preview; bool shader_error; @@ -155,7 +154,8 @@ class VisualShaderEditor : public VBoxContainer { VBoxContainer *preview_vbox; CodeEdit *preview_text; Ref<CodeHighlighter> syntax_highlighter; - Label *error_text; + PanelContainer *error_panel; + Label *error_label; UndoRedo *undo_redo; Point2 saved_node_pos; @@ -191,7 +191,9 @@ class VisualShaderEditor : public VBoxContainer { enum ParticlesTypeFlags { TYPE_FLAGS_EMIT = 1, TYPE_FLAGS_PROCESS = 2, - TYPE_FLAGS_END = 4 + TYPE_FLAGS_COLLIDE = 4, + TYPE_FLAGS_EMIT_CUSTOM = 8, + TYPE_FLAGS_PROCESS_CUSTOM = 16, }; enum SkyTypeFlags { @@ -387,6 +389,7 @@ class VisualShaderEditor : public VBoxContainer { Ref<VisualShaderGraphPlugin> graph_plugin; void _mode_selected(int p_id); + void _custom_mode_toggled(bool p_enabled); void _input_select_item(Ref<VisualShaderNodeInput> input, String name); void _uniform_select_item(Ref<VisualShaderNodeUniformRef> p_uniform, String p_name); diff --git a/editor/plugins/gi_probe_editor_plugin.cpp b/editor/plugins/voxel_gi_editor_plugin.cpp index f309c5da01..d30cc7ad17 100644 --- a/editor/plugins/gi_probe_editor_plugin.cpp +++ b/editor/plugins/voxel_gi_editor_plugin.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* gi_probe_editor_plugin.cpp */ +/* voxel_gi_editor_plugin.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,49 +28,49 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "gi_probe_editor_plugin.h" +#include "voxel_gi_editor_plugin.h" -void GIProbeEditorPlugin::_bake() { - if (gi_probe) { - if (gi_probe->get_probe_data().is_null()) { +void VoxelGIEditorPlugin::_bake() { + if (voxel_gi) { + if (voxel_gi->get_probe_data().is_null()) { String path = get_tree()->get_edited_scene_root()->get_filename(); if (path == String()) { - path = "res://" + gi_probe->get_name() + "_data.res"; + path = "res://" + voxel_gi->get_name() + "_data.res"; } else { String ext = path.get_extension(); - path = path.get_basename() + "." + gi_probe->get_name() + "_data.res"; + path = path.get_basename() + "." + voxel_gi->get_name() + "_data.res"; } probe_file->set_current_path(path); probe_file->popup_file_dialog(); return; } - gi_probe->bake(); + voxel_gi->bake(); } } -void GIProbeEditorPlugin::edit(Object *p_object) { - GIProbe *s = Object::cast_to<GIProbe>(p_object); +void VoxelGIEditorPlugin::edit(Object *p_object) { + VoxelGI *s = Object::cast_to<VoxelGI>(p_object); if (!s) { return; } - gi_probe = s; + voxel_gi = s; } -bool GIProbeEditorPlugin::handles(Object *p_object) const { - return p_object->is_class("GIProbe"); +bool VoxelGIEditorPlugin::handles(Object *p_object) const { + return p_object->is_class("VoxelGI"); } -void GIProbeEditorPlugin::_notification(int p_what) { +void VoxelGIEditorPlugin::_notification(int p_what) { if (p_what == NOTIFICATION_PROCESS) { - if (!gi_probe) { + if (!voxel_gi) { return; } - const Vector3i size = gi_probe->get_estimated_cell_size(); + const Vector3i size = voxel_gi->get_estimated_cell_size(); String text = vformat(String::utf8("%d × %d × %d"), size.x, size.y, size.z); int data_size = 4; - if (GLOBAL_GET("rendering/quality/gi_probes/anisotropic")) { + if (GLOBAL_GET("rendering/quality/voxel_gi/anisotropic")) { data_size += 4; } const double size_mb = size.x * size.y * size.z * data_size / (1024.0 * 1024.0); @@ -98,7 +98,7 @@ void GIProbeEditorPlugin::_notification(int p_what) { } } -void GIProbeEditorPlugin::make_visible(bool p_visible) { +void VoxelGIEditorPlugin::make_visible(bool p_visible) { if (p_visible) { bake_hb->show(); set_process(true); @@ -108,38 +108,38 @@ void GIProbeEditorPlugin::make_visible(bool p_visible) { } } -EditorProgress *GIProbeEditorPlugin::tmp_progress = nullptr; +EditorProgress *VoxelGIEditorPlugin::tmp_progress = nullptr; -void GIProbeEditorPlugin::bake_func_begin(int p_steps) { +void VoxelGIEditorPlugin::bake_func_begin(int p_steps) { ERR_FAIL_COND(tmp_progress != nullptr); tmp_progress = memnew(EditorProgress("bake_gi", TTR("Bake GI Probe"), p_steps)); } -void GIProbeEditorPlugin::bake_func_step(int p_step, const String &p_description) { +void VoxelGIEditorPlugin::bake_func_step(int p_step, const String &p_description) { ERR_FAIL_COND(tmp_progress == nullptr); tmp_progress->step(p_description, p_step, false); } -void GIProbeEditorPlugin::bake_func_end() { +void VoxelGIEditorPlugin::bake_func_end() { ERR_FAIL_COND(tmp_progress == nullptr); memdelete(tmp_progress); tmp_progress = nullptr; } -void GIProbeEditorPlugin::_giprobe_save_path_and_bake(const String &p_path) { +void VoxelGIEditorPlugin::_voxel_gi_save_path_and_bake(const String &p_path) { probe_file->hide(); - if (gi_probe) { - gi_probe->bake(); - ERR_FAIL_COND(gi_probe->get_probe_data().is_null()); - ResourceSaver::save(p_path, gi_probe->get_probe_data(), ResourceSaver::FLAG_CHANGE_PATH); + if (voxel_gi) { + voxel_gi->bake(); + ERR_FAIL_COND(voxel_gi->get_probe_data().is_null()); + ResourceSaver::save(p_path, voxel_gi->get_probe_data(), ResourceSaver::FLAG_CHANGE_PATH); } } -void GIProbeEditorPlugin::_bind_methods() { +void VoxelGIEditorPlugin::_bind_methods() { } -GIProbeEditorPlugin::GIProbeEditorPlugin(EditorNode *p_node) { +VoxelGIEditorPlugin::VoxelGIEditorPlugin(EditorNode *p_node) { editor = p_node; bake_hb = memnew(HBoxContainer); bake_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL); @@ -148,7 +148,7 @@ GIProbeEditorPlugin::GIProbeEditorPlugin(EditorNode *p_node) { bake->set_flat(true); bake->set_icon(editor->get_gui_base()->get_theme_icon("Bake", "EditorIcons")); bake->set_text(TTR("Bake GI Probe")); - bake->connect("pressed", callable_mp(this, &GIProbeEditorPlugin::_bake)); + bake->connect("pressed", callable_mp(this, &VoxelGIEditorPlugin::_bake)); bake_hb->add_child(bake); bake_info = memnew(Label); bake_info->set_h_size_flags(Control::SIZE_EXPAND_FILL); @@ -156,18 +156,18 @@ GIProbeEditorPlugin::GIProbeEditorPlugin(EditorNode *p_node) { bake_hb->add_child(bake_info); add_control_to_container(CONTAINER_SPATIAL_EDITOR_MENU, bake_hb); - gi_probe = nullptr; + voxel_gi = nullptr; probe_file = memnew(EditorFileDialog); probe_file->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE); probe_file->add_filter("*.res"); - probe_file->connect("file_selected", callable_mp(this, &GIProbeEditorPlugin::_giprobe_save_path_and_bake)); + probe_file->connect("file_selected", callable_mp(this, &VoxelGIEditorPlugin::_voxel_gi_save_path_and_bake)); get_editor_interface()->get_base_control()->add_child(probe_file); - probe_file->set_title(TTR("Select path for GIProbe Data File")); + probe_file->set_title(TTR("Select path for VoxelGI Data File")); - GIProbe::bake_begin_function = bake_func_begin; - GIProbe::bake_step_function = bake_func_step; - GIProbe::bake_end_function = bake_func_end; + VoxelGI::bake_begin_function = bake_func_begin; + VoxelGI::bake_step_function = bake_func_step; + VoxelGI::bake_end_function = bake_func_end; } -GIProbeEditorPlugin::~GIProbeEditorPlugin() { +VoxelGIEditorPlugin::~VoxelGIEditorPlugin() { } diff --git a/editor/plugins/gi_probe_editor_plugin.h b/editor/plugins/voxel_gi_editor_plugin.h index fdf0623561..4d3cfe90f6 100644 --- a/editor/plugins/gi_probe_editor_plugin.h +++ b/editor/plugins/voxel_gi_editor_plugin.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* gi_probe_editor_plugin.h */ +/* voxel_gi_editor_plugin.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,18 +28,18 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef GIPROBEEDITORPLUGIN_H -#define GIPROBEEDITORPLUGIN_H +#ifndef VOXEL_GIEDITORPLUGIN_H +#define VOXEL_GIEDITORPLUGIN_H #include "editor/editor_node.h" #include "editor/editor_plugin.h" -#include "scene/3d/gi_probe.h" +#include "scene/3d/voxel_gi.h" #include "scene/resources/material.h" -class GIProbeEditorPlugin : public EditorPlugin { - GDCLASS(GIProbeEditorPlugin, EditorPlugin); +class VoxelGIEditorPlugin : public EditorPlugin { + GDCLASS(VoxelGIEditorPlugin, EditorPlugin); - GIProbe *gi_probe; + VoxelGI *voxel_gi; HBoxContainer *bake_hb; Label *bake_info; @@ -54,21 +54,21 @@ class GIProbeEditorPlugin : public EditorPlugin { static void bake_func_end(); void _bake(); - void _giprobe_save_path_and_bake(const String &p_path); + void _voxel_gi_save_path_and_bake(const String &p_path); protected: static void _bind_methods(); void _notification(int p_what); public: - virtual String get_name() const override { return "GIProbe"; } + virtual String get_name() const override { return "VoxelGI"; } 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; - GIProbeEditorPlugin(EditorNode *p_node); - ~GIProbeEditorPlugin(); + VoxelGIEditorPlugin(EditorNode *p_node); + ~VoxelGIEditorPlugin(); }; -#endif // GIPROBEEDITORPLUGIN_H +#endif // VOXEL_GIEDITORPLUGIN_H diff --git a/editor/pot_generator.h b/editor/pot_generator.h index ab055e0c0e..61300064ba 100644 --- a/editor/pot_generator.h +++ b/editor/pot_generator.h @@ -31,7 +31,7 @@ #ifndef POT_GENERATOR_H #define POT_GENERATOR_H -#include "core/os/file_access.h" +#include "core/io/file_access.h" #include "core/templates/ordered_hash_map.h" #include "core/templates/set.h" diff --git a/editor/project_export.cpp b/editor/project_export.cpp index 9b99372735..7ca2d4d324 100644 --- a/editor/project_export.cpp +++ b/editor/project_export.cpp @@ -31,11 +31,11 @@ #include "project_export.h" #include "core/config/project_settings.h" +#include "core/io/dir_access.h" +#include "core/io/file_access.h" #include "core/io/image_loader.h" #include "core/io/resource_loader.h" #include "core/io/resource_saver.h" -#include "core/os/dir_access.h" -#include "core/os/file_access.h" #include "core/os/os.h" #include "core/string/optimized_translation.h" #include "editor_data.h" @@ -978,9 +978,9 @@ void ProjectExportDialog::_export_all(bool p_debug) { } void ProjectExportDialog::_bind_methods() { - ClassDB::bind_method("get_drag_data_fw", &ProjectExportDialog::get_drag_data_fw); - ClassDB::bind_method("can_drop_data_fw", &ProjectExportDialog::can_drop_data_fw); - ClassDB::bind_method("drop_data_fw", &ProjectExportDialog::drop_data_fw); + ClassDB::bind_method("_get_drag_data_fw", &ProjectExportDialog::get_drag_data_fw); + ClassDB::bind_method("_can_drop_data_fw", &ProjectExportDialog::can_drop_data_fw); + ClassDB::bind_method("_drop_data_fw", &ProjectExportDialog::drop_data_fw); ClassDB::bind_method("_export_all", &ProjectExportDialog::_export_all); ClassDB::bind_method("set_export_path", &ProjectExportDialog::set_export_path); ClassDB::bind_method("get_export_path", &ProjectExportDialog::get_export_path); diff --git a/editor/project_export.h b/editor/project_export.h index cfd4934c34..aeace708b8 100644 --- a/editor/project_export.h +++ b/editor/project_export.h @@ -31,7 +31,7 @@ #ifndef PROJECT_EXPORT_SETTINGS_H #define PROJECT_EXPORT_SETTINGS_H -#include "core/os/dir_access.h" +#include "core/io/dir_access.h" #include "core/os/thread.h" #include "editor/editor_export.h" #include "editor/editor_file_dialog.h" diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 49a6d28dc1..12490f687e 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -31,11 +31,11 @@ #include "project_manager.h" #include "core/io/config_file.h" +#include "core/io/dir_access.h" +#include "core/io/file_access.h" #include "core/io/resource_saver.h" #include "core/io/stream_peer_ssl.h" #include "core/io/zip_io.h" -#include "core/os/dir_access.h" -#include "core/os/file_access.h" #include "core/os/keyboard.h" #include "core/os/os.h" #include "core/string/translation.h" @@ -1484,16 +1484,7 @@ Vector<ProjectList::Item> ProjectList::get_selected_projects() const { void ProjectList::ensure_project_visible(int p_index) { const Item &item = _projects[p_index]; - - int item_top = item.control->get_position().y; - int item_bottom = item.control->get_position().y + item.control->get_size().y; - - if (item_top < get_v_scroll()) { - set_v_scroll(item_top); - - } else if (item_bottom > get_v_scroll() + get_size().y) { - set_v_scroll(item_bottom - get_size().y); - } + ensure_control_visible(item.control); } int ProjectList::get_single_selected_index() const { @@ -2499,7 +2490,7 @@ ProjectManager::ProjectManager() { tabs->connect("tab_changed", callable_mp(this, &ProjectManager::_on_tab_changed)); HBoxContainer *projects_hb = memnew(HBoxContainer); - projects_hb->set_name(TTR("Projects")); + projects_hb->set_name(TTR("Local Projects")); tabs->add_child(projects_hb); { @@ -2630,7 +2621,7 @@ ProjectManager::ProjectManager() { version_btn = memnew(LinkButton); String hash = String(VERSION_HASH); if (hash.length() != 0) { - hash = "." + hash.left(9); + hash = " " + vformat("[%s]", hash.left(9)); } version_btn->set_text("v" VERSION_FULL_BUILD + hash); // Fade the version label to be less prominent, but still readable. @@ -2681,7 +2672,7 @@ ProjectManager::ProjectManager() { if (StreamPeerSSL::is_available()) { asset_library = memnew(EditorAssetLibrary(true)); - asset_library->set_name(TTR("Templates")); + asset_library->set_name(TTR("Asset Library Projects")); tabs->add_child(asset_library); asset_library->connect("install_asset", callable_mp(this, &ProjectManager::_install_project)); } else { diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 8b0d9ae0fc..c44f8d9a4b 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -727,13 +727,13 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: value_editor[3]->set_text(String::num(plane.d)); } break; - case Variant::QUAT: { + case Variant::QUATERNION: { field_names.push_back("x"); field_names.push_back("y"); field_names.push_back("z"); field_names.push_back("w"); config_value_editors(4, 4, 10, field_names); - Quat q = v; + Quaternion q = v; value_editor[0]->set_text(String::num(q.x)); value_editor[1]->set_text(String::num(q.y)); value_editor[2]->set_text(String::num(q.z)); @@ -791,7 +791,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: } } break; - case Variant::TRANSFORM: { + case Variant::TRANSFORM3D: { field_names.push_back("xx"); field_names.push_back("xy"); field_names.push_back("xz"); @@ -806,7 +806,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: field_names.push_back("zo"); config_value_editors(12, 4, 16, field_names); - Transform tr = v; + Transform3D tr = v; for (int i = 0; i < 9; i++) { value_editor[(i / 3) * 4 + i % 3]->set_text(String::num(tr.basis.elements[i / 3][i % 3])); } @@ -1446,6 +1446,8 @@ void CustomPropertyEditor::_modified(String p_string) { return; } + Variant prev_v = v; + updating = true; switch (type) { case Variant::INT: { @@ -1459,14 +1461,18 @@ void CustomPropertyEditor::_modified(String p_string) { } else { v = expr->execute(Array(), nullptr, false); } - emit_signal("variant_changed"); + if (v != prev_v) { + emit_signal("variant_changed"); + } } break; case Variant::FLOAT: { if (hint != PROPERTY_HINT_EXP_EASING) { String text = TS->parse_number(value_editor[0]->get_text()); v = _parse_real_expression(text); - emit_signal("variant_changed"); + if (v != prev_v) { + emit_signal("variant_changed"); + } } } break; @@ -1479,7 +1485,9 @@ void CustomPropertyEditor::_modified(String p_string) { vec.x = _parse_real_expression(value_editor[0]->get_text()); vec.y = _parse_real_expression(value_editor[1]->get_text()); v = vec; - _emit_changed_whole_or_field(); + if (v != prev_v) { + _emit_changed_whole_or_field(); + } } break; case Variant::RECT2: { @@ -1490,7 +1498,9 @@ void CustomPropertyEditor::_modified(String p_string) { r2.size.x = _parse_real_expression(value_editor[2]->get_text()); r2.size.y = _parse_real_expression(value_editor[3]->get_text()); v = r2; - _emit_changed_whole_or_field(); + if (v != prev_v) { + _emit_changed_whole_or_field(); + } } break; @@ -1500,7 +1510,9 @@ void CustomPropertyEditor::_modified(String p_string) { vec.y = _parse_real_expression(value_editor[1]->get_text()); vec.z = _parse_real_expression(value_editor[2]->get_text()); v = vec; - _emit_changed_whole_or_field(); + if (v != prev_v) { + _emit_changed_whole_or_field(); + } } break; case Variant::PLANE: { @@ -1510,17 +1522,21 @@ void CustomPropertyEditor::_modified(String p_string) { pl.normal.z = _parse_real_expression(value_editor[2]->get_text()); pl.d = _parse_real_expression(value_editor[3]->get_text()); v = pl; - _emit_changed_whole_or_field(); + if (v != prev_v) { + _emit_changed_whole_or_field(); + } } break; - case Variant::QUAT: { - Quat q; + case Variant::QUATERNION: { + Quaternion q; q.x = _parse_real_expression(value_editor[0]->get_text()); q.y = _parse_real_expression(value_editor[1]->get_text()); q.z = _parse_real_expression(value_editor[2]->get_text()); q.w = _parse_real_expression(value_editor[3]->get_text()); v = q; - _emit_changed_whole_or_field(); + if (v != prev_v) { + _emit_changed_whole_or_field(); + } } break; case Variant::AABB: { @@ -1534,7 +1550,9 @@ void CustomPropertyEditor::_modified(String p_string) { size.y = _parse_real_expression(value_editor[4]->get_text()); size.z = _parse_real_expression(value_editor[5]->get_text()); v = AABB(pos, size); - _emit_changed_whole_or_field(); + if (v != prev_v) { + _emit_changed_whole_or_field(); + } } break; case Variant::TRANSFORM2D: { @@ -1544,7 +1562,9 @@ void CustomPropertyEditor::_modified(String p_string) { } v = m; - _emit_changed_whole_or_field(); + if (v != prev_v) { + _emit_changed_whole_or_field(); + } } break; case Variant::BASIS: { @@ -1554,10 +1574,12 @@ void CustomPropertyEditor::_modified(String p_string) { } v = m; - _emit_changed_whole_or_field(); + if (v != prev_v) { + _emit_changed_whole_or_field(); + } } break; - case Variant::TRANSFORM: { + case Variant::TRANSFORM3D: { Basis basis; for (int i = 0; i < 9; i++) { basis.elements[i / 3][i % 3] = _parse_real_expression(value_editor[(i / 3) * 4 + i % 3]->get_text()); @@ -1569,8 +1591,10 @@ void CustomPropertyEditor::_modified(String p_string) { origin.y = _parse_real_expression(value_editor[7]->get_text()); origin.z = _parse_real_expression(value_editor[11]->get_text()); - v = Transform(basis, origin); - _emit_changed_whole_or_field(); + v = Transform3D(basis, origin); + if (v != prev_v) { + _emit_changed_whole_or_field(); + } } break; case Variant::COLOR: { @@ -1578,7 +1602,9 @@ void CustomPropertyEditor::_modified(String p_string) { case Variant::NODE_PATH: { v = NodePath(value_editor[0]->get_text()); - emit_signal("variant_changed"); + if (v != prev_v) { + emit_signal("variant_changed"); + } } break; case Variant::DICTIONARY: { } break; @@ -1635,11 +1661,11 @@ void CustomPropertyEditor::_focus_enter() { case Variant::RECT2: case Variant::VECTOR3: case Variant::PLANE: - case Variant::QUAT: + case Variant::QUATERNION: case Variant::AABB: case Variant::TRANSFORM2D: case Variant::BASIS: - case Variant::TRANSFORM: { + case Variant::TRANSFORM3D: { for (int i = 0; i < MAX_VALUE_EDITORS; ++i) { if (value_editor[i]->has_focus()) { focused_value_editor = i; @@ -1654,25 +1680,7 @@ void CustomPropertyEditor::_focus_enter() { } void CustomPropertyEditor::_focus_exit() { - switch (type) { - case Variant::FLOAT: - case Variant::STRING: - case Variant::VECTOR2: - case Variant::RECT2: - case Variant::VECTOR3: - case Variant::PLANE: - case Variant::QUAT: - case Variant::AABB: - case Variant::TRANSFORM2D: - case Variant::BASIS: - case Variant::TRANSFORM: { - for (int i = 0; i < MAX_VALUE_EDITORS; ++i) { - value_editor[i]->select(0, 0); - } - } break; - default: { - } - } + _modified(String()); } void CustomPropertyEditor::config_action_buttons(const List<String> &p_strings) { diff --git a/editor/property_editor.h b/editor/property_editor.h index c6929f3b42..8a587b50b0 100644 --- a/editor/property_editor.h +++ b/editor/property_editor.h @@ -50,8 +50,8 @@ class PropertyValueEvaluator; class CreateDialog; class PropertySelector; -class EditorResourceConversionPlugin : public Reference { - GDCLASS(EditorResourceConversionPlugin, Reference); +class EditorResourceConversionPlugin : public RefCounted { + GDCLASS(EditorResourceConversionPlugin, RefCounted); protected: static void _bind_methods(); diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp index bf31be536c..d6db7a988f 100644 --- a/editor/property_selector.cpp +++ b/editor/property_selector.cpp @@ -125,18 +125,23 @@ void PropertySelector::_update_search() { search_options->get_theme_icon("float", "EditorIcons"), search_options->get_theme_icon("String", "EditorIcons"), search_options->get_theme_icon("Vector2", "EditorIcons"), + search_options->get_theme_icon("Vector2i", "EditorIcons"), search_options->get_theme_icon("Rect2", "EditorIcons"), + search_options->get_theme_icon("Rect2i", "EditorIcons"), search_options->get_theme_icon("Vector3", "EditorIcons"), + search_options->get_theme_icon("Vector3i", "EditorIcons"), search_options->get_theme_icon("Transform2D", "EditorIcons"), search_options->get_theme_icon("Plane", "EditorIcons"), - search_options->get_theme_icon("Quat", "EditorIcons"), + search_options->get_theme_icon("Quaternion", "EditorIcons"), search_options->get_theme_icon("AABB", "EditorIcons"), search_options->get_theme_icon("Basis", "EditorIcons"), search_options->get_theme_icon("Transform", "EditorIcons"), search_options->get_theme_icon("Color", "EditorIcons"), - search_options->get_theme_icon("Path", "EditorIcons"), + search_options->get_theme_icon("NodePath", "EditorIcons"), search_options->get_theme_icon("RID", "EditorIcons"), - search_options->get_theme_icon("Object", "EditorIcons"), + search_options->get_theme_icon("MiniObject", "EditorIcons"), + search_options->get_theme_icon("Callable", "EditorIcons"), + search_options->get_theme_icon("Signal", "EditorIcons"), search_options->get_theme_icon("Dictionary", "EditorIcons"), search_options->get_theme_icon("Array", "EditorIcons"), search_options->get_theme_icon("PackedByteArray", "EditorIcons"), diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 349e05b47b..8d6b7f3389 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -2959,6 +2959,7 @@ 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_instanced = EditorPropertyRevert::may_node_be_in_instance(p_node); for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) { if (!(E->get().usage & PROPERTY_USAGE_STORAGE)) { @@ -2969,6 +2970,15 @@ 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_instanced) { + Variant orig; + if (EditorPropertyRevert::get_instanced_node_original_property(p_node, E->get().name, orig)) { + if (!EditorPropertyRevert::is_node_property_different(p_node, v, orig)) { + continue; + } + } + } + if ((res->get_path() == "" || res->get_path().find("::") > -1) && !r_remap.has(res)) { _create_remap_for_resource(res, r_remap); } diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index 6f9b0ae873..a5620f8cc5 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -1129,9 +1129,9 @@ void SceneTreeEditor::_bind_methods() { ClassDB::bind_method("_rename_node", &SceneTreeEditor::_rename_node); ClassDB::bind_method("_test_update_tree", &SceneTreeEditor::_test_update_tree); - ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &SceneTreeEditor::get_drag_data_fw); - ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &SceneTreeEditor::can_drop_data_fw); - ClassDB::bind_method(D_METHOD("drop_data_fw"), &SceneTreeEditor::drop_data_fw); + ClassDB::bind_method(D_METHOD("_get_drag_data_fw"), &SceneTreeEditor::get_drag_data_fw); + ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &SceneTreeEditor::can_drop_data_fw); + ClassDB::bind_method(D_METHOD("_drop_data_fw"), &SceneTreeEditor::drop_data_fw); ClassDB::bind_method(D_METHOD("update_tree"), &SceneTreeEditor::update_tree); diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index c2bfdaae96..650decfd49 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -31,9 +31,9 @@ #include "script_create_dialog.h" #include "core/config/project_settings.h" +#include "core/io/file_access.h" #include "core/io/resource_saver.h" #include "core/object/script_language.h" -#include "core/os/file_access.h" #include "core/string/string_builder.h" #include "editor/create_dialog.h" #include "editor/editor_node.h" diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp index 4cdf820877..c05a3c2f89 100644 --- a/editor/settings_config_dialog.cpp +++ b/editor/settings_config_dialog.cpp @@ -261,10 +261,6 @@ void EditorSettingsDialog::_update_shortcuts() { for (OrderedHashMap<StringName, InputMap::Action>::Element E = action_map.front(); E; E = E.next()) { String action_name = E.key(); - if (!shortcut_filter.is_subsequence_ofi(action_name)) { - continue; - } - InputMap::Action action = E.get(); Array events; // Need to get the list of events into an array so it can be set as metadata on the item. @@ -298,6 +294,10 @@ void EditorSettingsDialog::_update_shortcuts() { // Join the text of the events with a delimiter so they can all be displayed in one cell. String events_display_string = event_strings.is_empty() ? "None" : String("; ").join(event_strings); + if (!shortcut_filter.is_subsequence_ofi(action_name) && (events_display_string == "None" || !shortcut_filter.is_subsequence_ofi(events_display_string))) { + continue; + } + TreeItem *item = shortcuts->create_item(common_section); item->set_text(0, action_name); item->set_text(1, events_display_string); diff --git a/editor/shader_globals_editor.cpp b/editor/shader_globals_editor.cpp index ebef5be9ed..1893c6b6bb 100644 --- a/editor/shader_globals_editor.cpp +++ b/editor/shader_globals_editor.cpp @@ -199,7 +199,7 @@ protected: pinfo.type = Variant::TRANSFORM2D; } break; case RS::GLOBAL_VAR_TYPE_TRANSFORM: { - pinfo.type = Variant::TRANSFORM; + pinfo.type = Variant::TRANSFORM3D; } break; case RS::GLOBAL_VAR_TYPE_MAT4: { pinfo.type = Variant::PACKED_INT32_ARRAY; @@ -326,7 +326,7 @@ static Variant create_var(RS::GlobalVariableType p_type) { return Transform2D(); } case RS::GLOBAL_VAR_TYPE_TRANSFORM: { - return Transform(); + return Transform3D(); } case RS::GLOBAL_VAR_TYPE_MAT4: { Vector<real_t> xform; diff --git a/editor/translations/af.po b/editor/translations/af.po index 887b7983eb..3b031597c5 100644 --- a/editor/translations/af.po +++ b/editor/translations/af.po @@ -10127,7 +10127,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/ar.po b/editor/translations/ar.po index a93fc9a473..14e83cd623 100644 --- a/editor/translations/ar.po +++ b/editor/translations/ar.po @@ -10146,7 +10146,7 @@ msgstr "زر الفأرة" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "اسم فعالية غير صحيح. لا يمكن أن يكون فارغاً أو يتضمن '/'، ':'، '='، '\\' أو " diff --git a/editor/translations/az.po b/editor/translations/az.po index 1dcbe3a7a5..70bae366d7 100644 --- a/editor/translations/az.po +++ b/editor/translations/az.po @@ -9755,7 +9755,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/bg.po b/editor/translations/bg.po index 4005ff2090..f934340bfe 100644 --- a/editor/translations/bg.po +++ b/editor/translations/bg.po @@ -9790,7 +9790,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/bn.po b/editor/translations/bn.po index 5192cd4164..9c6d70b301 100644 --- a/editor/translations/bn.po +++ b/editor/translations/bn.po @@ -10726,7 +10726,7 @@ msgstr "মাউসের বোতাম" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/br.po b/editor/translations/br.po index dfab47a0e2..307b5b365f 100644 --- a/editor/translations/br.po +++ b/editor/translations/br.po @@ -9700,7 +9700,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/ca.po b/editor/translations/ca.po index 3346449af2..5dd319fbc1 100644 --- a/editor/translations/ca.po +++ b/editor/translations/ca.po @@ -10409,7 +10409,7 @@ msgstr "Botó del ratolí" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "Nom d'acció no vàlid. No pot estar buit ni contenir '/', ':', '=', '\\' o " diff --git a/editor/translations/cs.po b/editor/translations/cs.po index b37f9a6a3f..dd0f7a51c9 100644 --- a/editor/translations/cs.po +++ b/editor/translations/cs.po @@ -25,12 +25,13 @@ # kubajz22 <til.jakubesko@seznam.cz>, 2020. # Václav Blažej <vaclavblazej@seznam.cz>, 2020, 2021. # ProfJack <profjackcz@gmail.com>, 2021. +# swifterik <blaha.j502@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-05-03 06:13+0000\n" -"Last-Translator: Vojtěch Šamla <auzkok@seznam.cz>\n" +"PO-Revision-Date: 2021-05-21 11:33+0000\n" +"Last-Translator: swifterik <blaha.j502@gmail.com>\n" "Language-Team: Czech <https://hosted.weblate.org/projects/godot-engine/godot/" "cs/>\n" "Language: cs\n" @@ -2547,14 +2548,14 @@ msgid "Unable to load addon script from path: '%s'." msgstr "Nelze načíst skript rozšíření z cesty: '%s'." #: editor/editor_node.cpp -#, fuzzy msgid "" "Unable to load addon script from path: '%s'. This might be due to a code " "error in that script.\n" "Disabling the addon at '%s' to prevent further errors." msgstr "" "Nelze načíst skript rozšíření z cesty: '%s'. Zdá se, že se v kódu nachází " -"chyba. Prosím, zkontrolujte syntax." +"chyba.\n" +"Deaktivujte rozšíření '%s' abyste předešli dalším chybám." #: editor/editor_node.cpp msgid "" @@ -2995,7 +2996,7 @@ msgstr "O aplikaci" #: editor/editor_node.cpp msgid "Support Godot Development" -msgstr "" +msgstr "Podpořte projekt Godot" #: editor/editor_node.cpp msgid "Play the project." @@ -10104,7 +10105,7 @@ msgstr "Tlačítko myši" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "Neplatné jméno akce. Nesmí být prázdné nebo obsahovat '/', ':', '=', '\\' " @@ -11632,7 +11633,6 @@ msgid "Post processing" msgstr "Následné zpracování" #: modules/lightmapper_cpu/lightmapper_cpu.cpp -#, fuzzy msgid "Plotting lightmaps" msgstr "Vykreslování světelných map" diff --git a/editor/translations/da.po b/editor/translations/da.po index 3cb65a5d82..a4ed166f41 100644 --- a/editor/translations/da.po +++ b/editor/translations/da.po @@ -10353,7 +10353,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/de.po b/editor/translations/de.po index 1c6136ff6f..567a096e48 100644 --- a/editor/translations/de.po +++ b/editor/translations/de.po @@ -68,12 +68,13 @@ # Daniel Plaster <danimineiromc@googlemail.com>, 2021. # El Captian <elcaptian@posteo.me>, 2021. # Ron Eric Hackländer <mail@roneric.net>, 2021. +# Stephan Kerbl <stephankerbl@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-05-14 20:34+0000\n" -"Last-Translator: So Wieso <sowieso@dukun.de>\n" +"PO-Revision-Date: 2021-05-24 21:36+0000\n" +"Last-Translator: Stephan Kerbl <stephankerbl@gmail.com>\n" "Language-Team: German <https://hosted.weblate.org/projects/godot-engine/" "godot/de/>\n" "Language: de\n" @@ -2448,8 +2449,7 @@ msgid "" "Please read the documentation relevant to debugging to better understand " "this workflow." msgstr "" -"Dies ist ein Laufzeit-Objekt Objekt, Änderungen an ihm werden nicht " -"gespeichert.\n" +"Dies ist ein Laufzeit-Objekt, Änderungen werden nicht gespeichert.\n" "Die Dokumentation zum Debugging beschreibt den nötigen Arbeitsablauf." #: editor/editor_node.cpp @@ -3076,7 +3076,7 @@ msgstr "Über" #: editor/editor_node.cpp msgid "Support Godot Development" -msgstr "" +msgstr "Unterstützung der Godot-Entwicklung" #: editor/editor_node.cpp msgid "Play the project." @@ -4940,7 +4940,7 @@ msgstr "Abspielmodus:" #: editor/plugins/animation_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "AnimationTree" -msgstr "AnimationsBaum" +msgstr "AnimationTree" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "New name:" @@ -5316,7 +5316,6 @@ msgstr "" "Kanals im Bereich von 0.0 bis 1.0 liegen." #: editor/plugins/baked_lightmap_editor_plugin.cpp -#, fuzzy msgid "" "Godot editor was built without ray tracing support, lightmaps can't be baked." msgstr "" @@ -10250,7 +10249,7 @@ msgstr "Maustaste" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "Ungültiger Aktionsname. Er kann weder leer sein noch ‚/‘, ‚:‘, ‚=‘, ‘\\‘ " diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot index 5ffb9f106d..2ecb929f1f 100644 --- a/editor/translations/editor.pot +++ b/editor/translations/editor.pot @@ -9678,7 +9678,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/el.po b/editor/translations/el.po index 591ad55930..e968002238 100644 --- a/editor/translations/el.po +++ b/editor/translations/el.po @@ -2,22 +2,22 @@ # Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. # Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). # This file is distributed under the same license as the Godot source code. -# George Tsiamasiotis <gtsiam@windowslive.com>, 2017-2018, 2019, 2020. +# George Tsiamasiotis <gtsiam@windowslive.com>, 2017-2018, 2019, 2020, 2021. # Georgios Katsanakis <geo.elgeo@gmail.com>, 2019. # Overloaded <manoschool@yahoo.gr>, 2019. # Eternal Death <eternaldeath0001@gmail.com>, 2019. # Overloaded @ Orama Interactive http://orama-interactive.com/ <manoschool@yahoo.gr>, 2020. # pandektis <pandektis@gmail.com>, 2020. # KostasMSC <kargyris@athtech.gr>, 2020. -# lawfulRobot <czavantias@gmail.com>, 2020. +# lawfulRobot <czavantias@gmail.com>, 2020, 2021. # Michalis <michalisntovas@yahoo.gr>, 2021. # leriaz <leriaz@live.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-04-26 22:31+0000\n" -"Last-Translator: Michalis <michalisntovas@yahoo.gr>\n" +"PO-Revision-Date: 2021-05-30 04:15+0000\n" +"Last-Translator: lawfulRobot <czavantias@gmail.com>\n" "Language-Team: Greek <https://hosted.weblate.org/projects/godot-engine/godot/" "el/>\n" "Language: el\n" @@ -1051,15 +1051,15 @@ msgstr "" "επαναφέρετε." #: editor/dependency_editor.cpp -#, fuzzy msgid "" "The files being removed are required by other resources in order for them to " "work.\n" "Remove them anyway? (no undo)\n" "You can find the removed files in the system trash to restore them." msgstr "" -"Τα αρχεία που αφαιρούνται απαιτούνται από άλλους πόρους για να δουλέψουν.\n" -"Να αφαιρεθούν; (Αδύνατη η αναίρεση)" +"Τα αρχεία που αφαιρούνται απαιτούνται για την λειτουργία άλλων πόρων.\n" +"Να αφαιρεθούν; (Αδύνατη η αναίρεση)\n" +"Μπορείτε να τα επαναφέρετε αργότερα από τον κάδο ανακύκλωσης του συστήματος." #: editor/dependency_editor.cpp msgid "Cannot remove:" @@ -1614,22 +1614,20 @@ msgstr "" "«Driver Fallback Enabled»." #: editor/editor_export.cpp -#, fuzzy msgid "" "Target platform requires 'PVRTC' texture compression for GLES2. Enable " "'Import Pvrtc' in Project Settings." msgstr "" -"Η πλατφόρμα προορισμού απαιτεί «ETC» συμπίεση υφών για το GLES2. " -"Ενεργοποιήστε το «Import Etc» στις Ρυθμίσεις Έργου." +"Η πλατφόρμα προορισμού απαιτεί συμπίεση υφών 'PVRTC' για το GLES2. " +"Ενεργοποιήστε το 'Εισαγωγή PVRTC' στις Ρυθμίσεις Έργου." #: editor/editor_export.cpp -#, fuzzy msgid "" "Target platform requires 'ETC2' or 'PVRTC' texture compression for GLES3. " "Enable 'Import Etc 2' or 'Import Pvrtc' in Project Settings." msgstr "" -"Η πλατφόρμα προορισμού απαιτεί «ETC2» συμπίεση υφών για το GLES3. " -"Ενεργοποιήστε το «Import Etc 2» στις Ρυθμίσεις Έργου." +"Η πλατφόρμα προορισμού απαιτεί συμπίεση υφών 'ETC2' ή PVRTC' για το GLES3. " +"Ενεργοποιήστε το 'Εισαγωγή ETC2' ή 'Εισαγωγή PVRTC' στις Ρυθμίσεις Έργου." #: editor/editor_export.cpp #, fuzzy @@ -2323,6 +2321,10 @@ msgid "" "An error occurred while trying to save the editor layout.\n" "Make sure the editor's user data path is writable." msgstr "" +"Πρόεκυψε ένα σφάλμα κατά την αποθήκευση της διάταξης του προγράμματος " +"επεξεργασίας.\n" +"Βεβαιωθείτε ότι η διαδρομή δεδομένων του χρήστη του προγράμματος " +"επεξεργασίας είναι εγγράψιμη." #: editor/editor_node.cpp msgid "" @@ -2330,15 +2332,18 @@ msgid "" "To restore the Default layout to its base settings, use the Delete Layout " "option and delete the Default layout." msgstr "" +"Η προεπιλεγμένη διάταξη του προγράμματος επεξεργασίας έχει παρακαμφθεί.\n" +"Για να επαναφέρετε την Προεπιλεγμένη διάταξη στις βασικές ρυθμίσεις, " +"διαλέξτε την επιλογή Διαγραφή Διάταξης και διαγράψτε την Προεπιλεγμένη " +"διάταξη." #: editor/editor_node.cpp msgid "Layout name not found!" msgstr "Το όνομα της διάταξης δεν βρέθηκε!" #: editor/editor_node.cpp -#, fuzzy msgid "Restored the Default layout to its base settings." -msgstr "Επαναφορά της προεπιλεγμένης διάταξης στις βασικές ρυθμίσεις." +msgstr "Έγινε επαναφορά της προεπιλεγμένης διάταξης στις βασικές ρυθμίσεις." #: editor/editor_node.cpp msgid "" @@ -2397,7 +2402,7 @@ msgstr "Δεν υπάρχει καθορισμένη σκηνή για εκτε #: editor/editor_node.cpp msgid "Save scene before running..." -msgstr "" +msgstr "Αποθήκευση σκηνής πριν την εκτέλεση..." #: editor/editor_node.cpp msgid "Could not start subprocess!" @@ -2546,25 +2551,23 @@ msgstr "" "αρχείου ρύθμισης." #: editor/editor_node.cpp -#, fuzzy msgid "Unable to find script field for addon plugin at: '%s'." msgstr "" -"Αδύνατη η έυρεση του πεδίου 'script' για την πρόσθετη επέκταση στο: 'res://" -"addons/%s'." +"Αδύνατη η έυρεση του πεδίου δέσμης ενεργειών για το πρόσθετο στο: '%s'." #: editor/editor_node.cpp msgid "Unable to load addon script from path: '%s'." msgstr "Αδύνατη η φόρτωση δέσμης ενεργειών προσθέτου από τη διαδρομή: '%s'." #: editor/editor_node.cpp -#, fuzzy msgid "" "Unable to load addon script from path: '%s'. This might be due to a code " "error in that script.\n" "Disabling the addon at '%s' to prevent further errors." msgstr "" "Αποτυχία φόρτωσης δέσμης ενεργειών προσθέτου από τη διαδρομή: '%s'. Φαίνεται " -"πως υπάρχει λάθος στον κώδικα." +"πως υπάρχει λάθος στον κώδικα.\n" +"Έγινε απενεργοποίηση το προσθέτου '%s' για αποτροπή περαιτέρω προβλημάτων." #: editor/editor_node.cpp msgid "" @@ -3015,8 +3018,9 @@ msgid "About" msgstr "Σχετικά" #: editor/editor_node.cpp +#, fuzzy msgid "Support Godot Development" -msgstr "" +msgstr "Υποστηρίξτε την ανάπτυξη του Godot" #: editor/editor_node.cpp msgid "Play the project." @@ -3161,13 +3165,12 @@ 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 "" "Τα ακόλουθα αρχεία είναι νεότερα στον δίσκο.\n" -"Τι δράση να ληφθεί;:" +"Τι δράση να ληφθεί;" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: editor/plugins/shader_editor_plugin.cpp @@ -3709,9 +3712,12 @@ msgstr "" "επανεισάγετε το χειροκίνητα." #: editor/filesystem_dock.cpp +#, fuzzy 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." @@ -3758,6 +3764,12 @@ msgid "" "\n" "Do you wish to overwrite them?" msgstr "" +"Τα ακόλουθα αρχεία ή φάκελοι συγκρούονται με στοιχεία στον προορισμό \"%s" +"\":\n" +"\n" +"%s\n" +"\n" +"Θέλετε να τα αντικαταστήσετε;" #: editor/filesystem_dock.cpp msgid "Renaming file:" @@ -3840,7 +3852,7 @@ msgstr "Αναπαραγωγή..." #: editor/filesystem_dock.cpp #, fuzzy msgid "Move to Trash" -msgstr "Μετακίνηση AutoLoad" +msgstr "Μετακίνηση στα απορρίμματα" #: editor/filesystem_dock.cpp editor/plugins/animation_player_editor_plugin.cpp msgid "Rename..." @@ -3951,19 +3963,16 @@ msgid "Searching..." msgstr "Αναζήτηση..." #: editor/find_in_files.cpp -#, fuzzy msgid "%d match in %d file." -msgstr "%d αποτελέσματα." +msgstr "%d αποτέλεσμα σε %d αρχείο." #: editor/find_in_files.cpp -#, fuzzy msgid "%d matches in %d file." -msgstr "%d αποτελέσματα." +msgstr "%d αποτελέσματα σε %d αρχείο." #: editor/find_in_files.cpp -#, fuzzy msgid "%d matches in %d files." -msgstr "%d αποτελέσματα." +msgstr "%d αποτελέσματα σε %d αρχεία." #: editor/groups_editor.cpp msgid "Add to Group" @@ -4103,23 +4112,20 @@ msgid "Saving..." msgstr "Αποθήκευση..." #: editor/import_defaults_editor.cpp -#, fuzzy msgid "Select Importer" -msgstr "Επιλογή Λειτουργίας" +msgstr "Επιλογή Εισαγωγέα" #: editor/import_defaults_editor.cpp -#, fuzzy msgid "Importer:" -msgstr "Εισαγωγή" +msgstr "Εισαγωγέας:" #: editor/import_defaults_editor.cpp -#, fuzzy msgid "Reset to Defaults" -msgstr "Χρήση προεπιλεγμένου sRGB" +msgstr "Επαναφορά προεπιλογών" #: editor/import_dock.cpp msgid "Keep File (No Import)" -msgstr "" +msgstr "Διατήρηση αρχειου (Χωρίς Εισαγωγή)" #: editor/import_dock.cpp msgid "%d Files" @@ -5224,16 +5230,13 @@ msgid "Assets ZIP File" msgstr "Αρχείο ZIP των Στοιχείων" #: 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 "" "Δεν ήταν δυνατός ο προσδιορισμός διαδρομής αποθήκευσης για εικόνες " "lightmap.\n" -"Αποθηκεύστε τη σκηνή σας (ώστε οι εικόνες να αποθηκευτούν στον ίδιο " -"κατάλογο), ή επιλέξτε μία διαδρομή αποθήκευσης από τις ιδιότητες του " -"BakedLightMap." +"Αποθηκεύστε τη σκηνή σας και δοκιμάστε ξανα." #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "" @@ -7429,9 +7432,8 @@ msgid "Yaw" msgstr "Παρέκκλιση" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Size" -msgstr "Μέγεθος: " +msgstr "Μέγεθος" #: editor/plugins/spatial_editor_plugin.cpp msgid "Objects Drawn" @@ -10208,7 +10210,7 @@ msgstr "Κουμπί ποντικιού" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "Άκυρο όνομα ενέργειας. Δεν μπορεί να είναι άδειο ή να περιέχει «/», «:», " @@ -10764,9 +10766,8 @@ msgid "Instance Child Scene" msgstr "Αρχικοποίηση σκηνής ως παιδί" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Can't paste root node into the same scene." -msgstr "Δεν είναι δυνατή η λειτουργία σε κόμβους από ξένη σκηνή!" +msgstr "Δεν είναι δυνατή η επικόλληση του ριζικού κόμβου στην ίδια σκηνή." #: editor/scene_tree_dock.cpp #, fuzzy @@ -12820,9 +12821,8 @@ msgid "Finding meshes and lights" msgstr "" #: scene/3d/baked_lightmap.cpp -#, fuzzy msgid "Preparing geometry (%d/%d)" -msgstr "Ανάλυση γεωμετρίας..." +msgstr "Προετοιμασία γεωμετρίας (%d/%d)" #: scene/3d/baked_lightmap.cpp #, fuzzy diff --git a/editor/translations/eo.po b/editor/translations/eo.po index 4bb0dcbeae..81bc346073 100644 --- a/editor/translations/eo.po +++ b/editor/translations/eo.po @@ -16,7 +16,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" -"PO-Revision-Date: 2021-05-11 06:54+0000\n" +"PO-Revision-Date: 2021-06-02 09:04+0000\n" "Last-Translator: mourning20s <mourning20s@protonmail.com>\n" "Language-Team: Esperanto <https://hosted.weblate.org/projects/godot-engine/" "godot/eo/>\n" @@ -196,27 +196,27 @@ msgstr "Aliigi Animadon Iteracion" #: editor/animation_track_editor.cpp msgid "Property Track" -msgstr "Atributo Vojeto" +msgstr "Atributa trako" #: editor/animation_track_editor.cpp msgid "3D Transform Track" -msgstr "3D Transformo Vojeto" +msgstr "3D-transforma trako" #: editor/animation_track_editor.cpp msgid "Call Method Track" -msgstr "Alvoki Metodon Vojeto" +msgstr "Metod-alvoka trako" #: editor/animation_track_editor.cpp msgid "Bezier Curve Track" -msgstr "Bezier-kurbo Vojeto" +msgstr "Bezier-kurba trako" #: editor/animation_track_editor.cpp msgid "Audio Playback Track" -msgstr "Aŭdio Reproduktado Vojeto" +msgstr "Aŭdia reproduktada trako" #: editor/animation_track_editor.cpp msgid "Animation Playback Track" -msgstr "Animado Reproduktado Vojeto" +msgstr "Animacia reproduktada trako" #: editor/animation_track_editor.cpp msgid "Animation length (frames)" @@ -228,7 +228,7 @@ msgstr "Animado loneco (sekundoj)" #: editor/animation_track_editor.cpp msgid "Add Track" -msgstr "Adici Vojeton" +msgstr "Aldoni trakon" #: editor/animation_track_editor.cpp msgid "Animation Looping" @@ -249,11 +249,11 @@ msgstr "Animado Filmitaĵero:" #: editor/animation_track_editor.cpp msgid "Change Track Path" -msgstr "Aliigi Vojeton Vojon" +msgstr "Ŝanĝi vojon de trako" #: editor/animation_track_editor.cpp msgid "Toggle this track on/off." -msgstr "Baskuligi tio ĉi vojeto ŝaltita/malŝaltita." +msgstr "Ŝalti/malŝalti ĉi tiun trakon." #: editor/animation_track_editor.cpp msgid "Update Mode (How this property is set)" @@ -269,7 +269,7 @@ msgstr "Iteracio Volvi Modo (Interpoli finon kun komenco de iteracio)" #: editor/animation_track_editor.cpp msgid "Remove this track." -msgstr "Forigi tio ĉi vojeton." +msgstr "Forigi ĉi tiun trakon." #: editor/animation_track_editor.cpp msgid "Time (s): " @@ -277,7 +277,7 @@ msgstr "Fojo (s): " #: editor/animation_track_editor.cpp msgid "Toggle Track Enabled" -msgstr "Baskuligi Vojeton Ŝaltitis" +msgstr "Ŝalti/malŝalti trakon" #: editor/animation_track_editor.cpp msgid "Continuous" @@ -343,15 +343,15 @@ msgstr "Aliigi Animadon Iteracion Modon" #: editor/animation_track_editor.cpp msgid "Remove Anim Track" -msgstr "Formovi Animadon Vojeton" +msgstr "Forigi animacian trakon" #: editor/animation_track_editor.cpp msgid "Create NEW track for %s and insert key?" -msgstr "Fari NOVAN vojeton por %s kaj enmeti ŝlosilon?" +msgstr "Krei NOVAN trakon por %s kaj enmeti ŝlosilon?" #: editor/animation_track_editor.cpp msgid "Create %d NEW tracks and insert keys?" -msgstr "Fari %d NOVAJN vojetojn kaj enmeti ŝlosilojn?" +msgstr "Krei %d NOVAJN trakojn kaj enmeti ŝlosilojn?" #: editor/animation_track_editor.cpp editor/create_dialog.cpp #: editor/editor_audio_buses.cpp editor/editor_feature_profile.cpp @@ -379,7 +379,7 @@ msgstr "Animado Krei & Enmeti" #: editor/animation_track_editor.cpp msgid "Anim Insert Track & Key" -msgstr "Animado Enmeti Vojeton & Ŝlosilon" +msgstr "Animacio enmeti trakon kaj ŝlosilon" #: editor/animation_track_editor.cpp msgid "Anim Insert Key" @@ -391,11 +391,12 @@ msgstr "Aliigi Animadon Paŝon" #: editor/animation_track_editor.cpp msgid "Rearrange Tracks" -msgstr "Rearanĝi Vojetojn" +msgstr "Rearanĝi trakojn" #: editor/animation_track_editor.cpp +#, fuzzy msgid "Transform tracks only apply to Spatial-based nodes." -msgstr "Transforma vojetoj nur almetas al Spatial nodojn." +msgstr "Transformaj trakoj nur aplikas al Spatial-ajn nodojn." #: editor/animation_track_editor.cpp msgid "" @@ -404,14 +405,14 @@ msgid "" "-AudioStreamPlayer2D\n" "-AudioStreamPlayer3D" msgstr "" -"Aŭdio vojetoj nur volas indiki al nodojn de tipojn:\n" +"Aŭdiaj trakoj nur eblas indiki al nodoj de tipoj:\n" "-AudioStreamPlayer\n" "-AudioStreamPlayer2D\n" "-AudioStreamPlayer3D" #: editor/animation_track_editor.cpp msgid "Animation tracks can only point to AnimationPlayer nodes." -msgstr "Animado vojetoj nur volas indiki al AnimationPlayer nodojn." +msgstr "Animaciaj trakoj nur eblas indiki al AnimationPlayer-aj nodoj." #: editor/animation_track_editor.cpp msgid "An animation player can't animate itself, only other players." @@ -419,39 +420,39 @@ msgstr "Animado legilo ne volas animi si mem, nur aliajn ludantojn." #: editor/animation_track_editor.cpp msgid "Not possible to add a new track without a root" -msgstr "Ĝi ne estas ebla adici novan vojeton sen radiko" +msgstr "Ne eblas aldoni novan trakon sen radiko" #: editor/animation_track_editor.cpp msgid "Invalid track for Bezier (no suitable sub-properties)" -msgstr "Nevalida trako por Bezier (neniu taŭga subproprietaĵoj)" +msgstr "Nevalida trako por Bezier (neniaj taŭgaj atributoj)" #: editor/animation_track_editor.cpp msgid "Add Bezier Track" -msgstr "Adici Bezier-vojeton" +msgstr "Aldoni Bezier-an trakon" #: editor/animation_track_editor.cpp msgid "Track path is invalid, so can't add a key." -msgstr "Vojeto vojo estas malvalida, do ne volas adici ŝlosilon." +msgstr "Vojo de trako estas nevalida, do ne eblas aldoni ŝlosilon." #: editor/animation_track_editor.cpp msgid "Track is not of type Spatial, can't insert key" -msgstr "Vojeto ne estas de tipo Spatial, ne volas enmeti ŝlosilon" +msgstr "Trako ne estas de tipo Spatial, ne eblas enmeti ŝlosilon" #: editor/animation_track_editor.cpp msgid "Add Transform Track Key" -msgstr "Adici Transformon Vojeton Ŝlosilon" +msgstr "Aldoni transforman trakan ŝlosilon" #: editor/animation_track_editor.cpp msgid "Add Track Key" -msgstr "Adici Vojeton Ŝlosilon" +msgstr "Aldoni trakan ŝlosilon" #: editor/animation_track_editor.cpp msgid "Track path is invalid, so can't add a method key." -msgstr "Vojeto vojo estas malvalida, do ne volas adici metodon ŝlosilon." +msgstr "Vojo de trako estas nevalida, do ne eblas aldoni metodan ŝlosilon." #: editor/animation_track_editor.cpp msgid "Add Method Track Key" -msgstr "Adici Metodon Vojeton Ŝlosilon" +msgstr "Aldoni metodan trakan ŝlosilon" #: editor/animation_track_editor.cpp msgid "Method not found in object: " @@ -467,7 +468,7 @@ msgstr "Tondujo estas malplena" #: editor/animation_track_editor.cpp msgid "Paste Tracks" -msgstr "Elpoŝigi Vojetojn" +msgstr "Alglui trakojn" #: editor/animation_track_editor.cpp msgid "Anim Scale Keys" @@ -477,7 +478,8 @@ msgstr "Animado Skali Ŝlosilojn" msgid "" "This option does not work for Bezier editing, as it's only a single track." msgstr "" -"Tio ĉi opcio ne funkcias por Bezier redakti, ĉar ĝi estas nur unuopa vojeto." +"Tiu ĉi opcio ne funkcias por Bezier-a redaktado, ĉar ĝi estas nur unuopa " +"trako." #: editor/animation_track_editor.cpp msgid "" @@ -491,14 +493,14 @@ msgid "" "Alternatively, use an import preset that imports animations to separate " "files." msgstr "" -"Tio ĉi animado apartenas al enporta sceno, do aliigoj al enportajn vojetojn " +"Tiu ĉi animacio apartenas enportitan scenon, do ŝanĝojn al enportitaj trakoj " "ne konservos.\n" "\n" -"Por ŝalti la eblecon aldoni proprajn vojetojn, navigu al la enporto-agordoj " -"de la sceno kaj agordu \n" -"\"Animado > Memorilo\" al \"Dosieroj\", ŝaltu \"Animado -> Konservi Proprajn " -"Vojetojn\", poste re-enportu.\n" -"Alterne, uzu enporto-antaŭelekton ke enportas animadojn al malkunajn " +"Por ŝalti la eblecon de aldoni proprajn trakojn, navigu al la enportaj " +"agordoj de la sceno kaj agordu\n" +"\"Animacio > Memorilo\" al \"Dosieroj\", ŝaltu \"Animacio -> Konservi " +"proprajn trakojn\", poste reenportu.\n" +"Alterne, uzu enporta antaŭagordo ke enportas animaciojn al malkunajn " "dosierojn." #: editor/animation_track_editor.cpp @@ -507,15 +509,15 @@ msgstr "Averto: Redaktanti importis animadon" #: editor/animation_track_editor.cpp msgid "Select an AnimationPlayer node to create and edit animations." -msgstr "Selektu AnimationPlayer nodo por krei kaj redakti animadoj." +msgstr "Elektu AnimationPlayer-a nodo por krei kaj redakti animadojn." #: editor/animation_track_editor.cpp msgid "Only show tracks from nodes selected in tree." -msgstr "Nur vidigi vojetojn el elektis nodojn en arbo." +msgstr "Nur vidigi trakojn el elektitajn nodojn en la arbo." #: editor/animation_track_editor.cpp msgid "Group tracks by node or display them as plain list." -msgstr "Grupigi vojetoj de nodo aŭ montri ilin kiel klara listo." +msgstr "Grupigi trakojn per nodo aŭ vidigi ilin kiel simplan liston." #: editor/animation_track_editor.cpp msgid "Snap:" @@ -542,7 +544,7 @@ msgstr "FPS" #: editor/project_settings_editor.cpp editor/property_editor.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Edit" -msgstr "Editi" +msgstr "Redakti" #: editor/animation_track_editor.cpp msgid "Animation properties." @@ -550,7 +552,7 @@ msgstr "Animado atributoj." #: editor/animation_track_editor.cpp msgid "Copy Tracks" -msgstr "Duplikati Vojetojn" +msgstr "Kopii trakojn" #: editor/animation_track_editor.cpp msgid "Scale Selection" @@ -622,7 +624,7 @@ msgstr "Forigi Nevalidajn Ŝlosilojn" #: editor/animation_track_editor.cpp msgid "Remove unresolved and empty tracks" -msgstr "Forigi maladrestrajn kaj malplenajn vojetojn" +msgstr "Forigi nesolvitajn kaj malplenajn trakojn" #: editor/animation_track_editor.cpp msgid "Clean-up all animations" @@ -642,7 +644,7 @@ msgstr "Skali Rejŝo:" #: editor/animation_track_editor.cpp msgid "Select Tracks to Copy" -msgstr "Elekti vojetojn por duplikati" +msgstr "Elekti trakojn por kopii" #: editor/animation_track_editor.cpp editor/editor_log.cpp #: editor/editor_properties.cpp @@ -651,7 +653,7 @@ msgstr "Elekti vojetojn por duplikati" #: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp #: editor/scene_tree_dock.cpp scene/gui/line_edit.cpp scene/gui/text_edit.cpp msgid "Copy" -msgstr "Duplikati" +msgstr "Kopii" #: editor/animation_track_editor.cpp msgid "Select All/None" @@ -659,15 +661,15 @@ msgstr "Elekti Ĉiuj/Neniuj" #: editor/animation_track_editor_plugins.cpp msgid "Add Audio Track Clip" -msgstr "Adici Aŭdio-Vojeton Eltondaĵon" +msgstr "Aldoni aŭdio-trakan eltondaĵon" #: editor/animation_track_editor_plugins.cpp msgid "Change Audio Track Clip Start Offset" -msgstr "Aliigi Aŭdio-Vojeton Eltondaĵon Komencon Deiĝon" +msgstr "Ŝanĝi komencan deŝovon de aŭdio-traka eltondaĵo" #: editor/animation_track_editor_plugins.cpp msgid "Change Audio Track Clip End Offset" -msgstr "Aliigi Aŭdio-Vojeton Eltondaĵon Finon Deiĝon" +msgstr "Ŝanĝi finan deŝovon de aŭdio-traka eltondaĵo" #: editor/array_property_edit.cpp msgid "Resize Array" @@ -998,7 +1000,7 @@ msgstr "Rimedo" #: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp #: editor/project_manager.cpp editor/project_settings_editor.cpp msgid "Path" -msgstr "dosierindiko" +msgstr "Dosierindiko" #: editor/dependency_editor.cpp msgid "Dependencies:" @@ -1127,7 +1129,7 @@ msgstr "Fondintoj de la Projekto" #: editor/editor_about.cpp msgid "Lead Developer" -msgstr "Ĉefprogramisto" +msgstr "Ĉefa ellaboranto" #. TRANSLATORS: This refers to a job title. #. The trailing space is used to distinguish with the project list application, @@ -1389,7 +1391,7 @@ msgstr "Eraris konservi dosieron: %s" #: editor/editor_audio_buses.cpp msgid "Add Bus" -msgstr "Aldoni Buso" +msgstr "Aldoni Buson" #: editor/editor_audio_buses.cpp msgid "Add a new Audio Bus to this layout." @@ -1415,7 +1417,7 @@ msgstr "Konservi ĉi tiun busan aranĝon al dosiero." #: editor/editor_audio_buses.cpp editor/import_dock.cpp msgid "Load Default" -msgstr "Ŝargi defaŭlto" +msgstr "Ŝargi defaŭlton" #: editor/editor_audio_buses.cpp msgid "Load the default Bus Layout." @@ -1985,7 +1987,7 @@ msgstr "Priskribo" #: editor/editor_help.cpp msgid "Online Tutorials" -msgstr "Retaj Instruiloj" +msgstr "Retaj instruiloj" #: editor/editor_help.cpp msgid "Properties" @@ -2005,7 +2007,7 @@ msgstr "Metodoj" #: editor/editor_help.cpp msgid "Theme Properties" -msgstr "Etosaj Atributoj" +msgstr "Etosaj atributoj" #: editor/editor_help.cpp msgid "Enumerations" @@ -2017,7 +2019,7 @@ msgstr "Konstantoj" #: editor/editor_help.cpp msgid "Property Descriptions" -msgstr "Priskribo de Atributoj" +msgstr "Priskribo de atributoj" #: editor/editor_help.cpp msgid "(value)" @@ -2033,7 +2035,7 @@ msgstr "" #: editor/editor_help.cpp msgid "Method Descriptions" -msgstr "Metodaj Priskriboj" +msgstr "Metodaj priskriboj" #: editor/editor_help.cpp msgid "" @@ -2273,6 +2275,8 @@ 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 "" +"Tiun ĉi scenon ne konserveblas ĉar estas enmeto de cikla ekzemplado.\n" +"Bonvolu solvi ĝin kaj poste provu rekonservi." #: editor/editor_node.cpp msgid "" @@ -2283,9 +2287,8 @@ msgstr "" "verigus." #: editor/editor_node.cpp editor/scene_tree_dock.cpp -#, fuzzy msgid "Can't overwrite scene that is still open!" -msgstr "Ne eble anstataŭigas scenon ke esti ankoraŭ malferma!" +msgstr "Ne eble anstataŭigas scenon ke estas ankoraŭ malferma!" #: editor/editor_node.cpp msgid "Can't load MeshLibrary for merging!" @@ -2308,6 +2311,8 @@ msgid "" "An error occurred while trying to save the editor layout.\n" "Make sure the editor's user data path is writable." msgstr "" +"Eraro okazis dum provas konservi la aranĝon de la redaktilon.\n" +"Verigu la uzantan datumvojon de la redaktilo esti skribebla." #: editor/editor_node.cpp msgid "" @@ -2315,6 +2320,9 @@ msgid "" "To restore the Default layout to its base settings, use the Delete Layout " "option and delete the Default layout." msgstr "" +"Defaŭlta redaktila aranĝo transpasiĝis.\n" +"Por restaŭri la defaŭltan aranĝon al ĝiaj bazaj agordoj, uzu la opcion " +"\"Forigi aranĝon\" kontraŭ la defaŭlta aranĝo." #: editor/editor_node.cpp msgid "Layout name not found!" @@ -2322,7 +2330,7 @@ msgstr "Nomon de aranĝo ne trovis!" #: editor/editor_node.cpp msgid "Restored the Default layout to its base settings." -msgstr "" +msgstr "Restaŭris la defaŭltan aranĝon al ĝiaj bazaj agordoj." #: editor/editor_node.cpp msgid "" @@ -2330,18 +2338,25 @@ msgid "" "Please read the documentation relevant to importing scenes to better " "understand this workflow." msgstr "" +"Tiu ĉi risurco apartenas enportitan scenon, do ĝi estas ne redaktebla.\n" +"Bonvolu legi la dokumentaron rilate enportecon de scenoj por pli bone " +"komprenu ĉi tiun laborfluon." #: editor/editor_node.cpp msgid "" "This resource belongs to a scene that was instanced or inherited.\n" "Changes to it won't be kept when saving the current scene." msgstr "" +"Tiu ĉi risurco apartenas ekzemplitan aŭ hereditan scenon.\n" +"Ŝanĝoj al ĝi ne teniĝos kiam konservi la aktualan scenon." #: editor/editor_node.cpp msgid "" "This resource was imported, so it's not editable. Change its settings in the " "import panel and then re-import." msgstr "" +"Tiu ĉi risurco enportiĝis, do ĝi ne estas redaktebla. Ŝanĝu ĝiajn agordojn " +"en la enporta panelo kaj poste reenportu." #: editor/editor_node.cpp msgid "" @@ -2350,6 +2365,10 @@ msgid "" "Please read the documentation relevant to importing scenes to better " "understand this workflow." msgstr "" +"Tiu ĉi sceno enportiĝis, do ŝanĝoj al ĝi ne teniĝos.\n" +"Ekzempli ĝin aŭ heredi permesigos ŝanĝojn al ĝi.\n" +"Bonvolu legi la dokumentaron rilate enportecon de scenoj por pli bone " +"komprenu ĉi tiun laborfluon." #: editor/editor_node.cpp msgid "" @@ -2357,10 +2376,13 @@ msgid "" "Please read the documentation relevant to debugging to better understand " "this workflow." msgstr "" +"Tio ĉi estas fora objekto, do ŝanĝoj al ĝi ne teniĝos.\n" +"Bonvolu legi la dokumentaron rilate sencimigon por pli bone komprenu ĉi tiun " +"laborfluon." #: editor/editor_node.cpp msgid "There is no defined scene to run." -msgstr "" +msgstr "Estas ne definita sceno por ruli." #: editor/editor_node.cpp msgid "Save scene before running..." @@ -2452,6 +2474,8 @@ msgid "" "The current scene has unsaved changes.\n" "Reload the saved scene anyway? This action cannot be undone." msgstr "" +"La aktuala sceno havas malkonservitajn ŝanĝojn.\n" +"Reŝargi la konservitan scenon spite? Tiu ĉi ago ne estas malfarebla." #: editor/editor_node.cpp msgid "Quick Run Scene..." @@ -2479,21 +2503,25 @@ msgstr "Konservi kaj foriri" #: editor/editor_node.cpp msgid "Save changes to the following scene(s) before quitting?" -msgstr "" +msgstr "Konservi ŝanĝojn al la jena(j) sceno(j) antaŭ foriri?" #: editor/editor_node.cpp msgid "Save changes the following scene(s) before opening Project Manager?" msgstr "" +"Konservi ŝanĝojn al la jena(j) sceno(j) antaŭ malfermi projektan mastrumilon?" #: editor/editor_node.cpp +#, fuzzy msgid "" "This option is deprecated. Situations where refresh must be forced are now " "considered a bug. Please report." msgstr "" +"Tiu ĉi opcio estas evitinda. Statoj en kiu aktualigo deviĝi estas nun " +"konsideri kiel cimo. Bonvolu raporti." #: editor/editor_node.cpp msgid "Pick a Main Scene" -msgstr "" +msgstr "Elektu ĉefan scenon" #: editor/editor_node.cpp msgid "Close Scene" @@ -2506,14 +2534,15 @@ msgstr "Remalfermi ferman scenon" #: editor/editor_node.cpp msgid "Unable to enable addon plugin at: '%s' parsing of config failed." msgstr "" +"Ne eblas enŝalti kromprogramon ĉe: '%s' analizo de agordaro ne sukcesis." #: editor/editor_node.cpp msgid "Unable to find script field for addon plugin at: '%s'." -msgstr "" +msgstr "Ne eblas trovi skriptan kampon por kromprogramo ĉe: '%s'." #: editor/editor_node.cpp msgid "Unable to load addon script from path: '%s'." -msgstr "" +msgstr "Ne eblas ŝargi kromprograman skripton el dosierindiko: '%s'." #: editor/editor_node.cpp msgid "" @@ -2521,21 +2550,31 @@ msgid "" "error in that script.\n" "Disabling the addon at '%s' to prevent further errors." msgstr "" +"Ne eblas ŝargi kromprograman skripton el dosierindinko: '%s'. Povas esti pro " +"koda eraro en tiu skripto.\n" +"Malŝaltas la kromprogramon ĉe '%s' por malebligi pli erarojn." #: editor/editor_node.cpp msgid "" "Unable to load addon script from path: '%s' Base type is not EditorPlugin." msgstr "" +"Ne eblas ŝargi kromprograman skripton ĉe dosierindiko: '%s'. Baza tipo ne " +"estas EditorPlugin." #: editor/editor_node.cpp msgid "Unable to load addon script from path: '%s' Script is not in tool mode." msgstr "" +"Ne eblas ŝargi kromprograman skripton ĉe dosierindiko: '%s'. Skripto ne " +"estas en ila reĝimo." #: editor/editor_node.cpp +#, fuzzy 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 "" +"Sceno '%s' aŭtomate enportiĝis, do ne eblas redakti ĝin.\n" +"Por ŝanĝu ĝin, nova heredita sceno povas kreiĝi." #: editor/editor_node.cpp msgid "" @@ -2545,11 +2584,11 @@ msgstr "" #: editor/editor_node.cpp msgid "Scene '%s' has broken dependencies:" -msgstr "" +msgstr "Sceno '%s' havas rompitajn dependojn:" #: editor/editor_node.cpp msgid "Clear Recent Scenes" -msgstr "" +msgstr "Vakigi lastajn scenojn" #: editor/editor_node.cpp msgid "" @@ -2557,6 +2596,8 @@ msgid "" "You can change it later in \"Project Settings\" under the 'application' " "category." msgstr "" +"Ne ĉefa sceno definiĝis iam, elekti unu?\n" +"Vi povas ŝanĝi ĝin poste en \"Projektaj agordoj\" en la 'apliko' kategorio." #: editor/editor_node.cpp msgid "" @@ -2564,6 +2605,8 @@ msgid "" "You can change it later in \"Project Settings\" under the 'application' " "category." msgstr "" +"Elektita sceno '%s' ekzisitas, elekti validan unuon?\n" +"Vi povas ŝanĝi ĝin poste en \"Projektaj agordoj\" en la 'apliko' kategorio." #: editor/editor_node.cpp msgid "" @@ -2571,14 +2614,16 @@ msgid "" "You can change it later in \"Project Settings\" under the 'application' " "category." msgstr "" +"Elektita sceno '%s' ne estas scena dosiero, elekti validan unuon?\n" +"Vi povas ŝanĝi ĝin poste en \"Projektaj agordoj\" en la 'apliko' kategorio." #: editor/editor_node.cpp msgid "Save Layout" -msgstr "" +msgstr "Konservi aranĝon" #: editor/editor_node.cpp msgid "Delete Layout" -msgstr "" +msgstr "Forigi aranĝon" #: editor/editor_node.cpp editor/import_dock.cpp #: editor/script_create_dialog.cpp @@ -2592,7 +2637,7 @@ msgstr "Montri en dosiersistemo" #: editor/editor_node.cpp msgid "Play This Scene" -msgstr "Starti ĉi tiu scenon" +msgstr "Ludi ĉi tiun scenon" #: editor/editor_node.cpp msgid "Close Tab" @@ -2652,7 +2697,7 @@ msgstr "Sceno" #: editor/editor_node.cpp msgid "Go to previously opened scene." -msgstr "" +msgstr "Iri al antaŭe malfermitan scenon." #: editor/editor_node.cpp msgid "Copy Text" @@ -2732,7 +2777,7 @@ msgstr "Projekto" #: editor/editor_node.cpp msgid "Project Settings..." -msgstr "Projekta agordoj..." +msgstr "Projektaj agordoj..." #: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp #, fuzzy @@ -2877,11 +2922,11 @@ msgstr "Redaktilo" #: editor/editor_node.cpp msgid "Editor Settings..." -msgstr "Editila agordoj..." +msgstr "Agordoj de la redaktilo..." #: editor/editor_node.cpp msgid "Editor Layout" -msgstr "Aranĝon de editilo" +msgstr "Aranĝo de la redaktilo" #: editor/editor_node.cpp msgid "Take Screenshot" @@ -2890,6 +2935,8 @@ msgstr "Ekranfoti" #: editor/editor_node.cpp msgid "Screenshots are stored in the Editor Data/Settings Folder." msgstr "" +"Ekrankopioj estas konservintaj en la datumaj/agordaj dosierujo de la " +"redaktilo." #: editor/editor_node.cpp msgid "Toggle Fullscreen" @@ -2901,19 +2948,19 @@ msgstr "Baskuli la konzolon de sistemo" #: editor/editor_node.cpp msgid "Open Editor Data/Settings Folder" -msgstr "Malfermi dosierujon de editilan datumoj/agordoj" +msgstr "Malfermi datumajn/agordajn dosierujon de la redaktilo" #: editor/editor_node.cpp msgid "Open Editor Data Folder" -msgstr "Malfermi dosierujon de editila datumoj" +msgstr "Malfermi datumajn dosierujon de la redaktilo" #: editor/editor_node.cpp msgid "Open Editor Settings Folder" -msgstr "Malfermi dosierujon de editila agordoj" +msgstr "Malfermi agordajn dosierujon de la redaktilo" #: editor/editor_node.cpp msgid "Manage Editor Features..." -msgstr "Mastrumi editilan eblecoj..." +msgstr "Mastrumi eblecojn de la redaktilo..." #: editor/editor_node.cpp msgid "Manage Export Templates..." @@ -2925,9 +2972,8 @@ msgstr "Helpo" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: editor/plugins/shader_editor_plugin.cpp -#, fuzzy msgid "Online Docs" -msgstr "Enreta dokoj" +msgstr "Enreta dokumentaro" #: editor/editor_node.cpp msgid "Q&A" @@ -2951,15 +2997,15 @@ msgstr "Pri" #: editor/editor_node.cpp msgid "Support Godot Development" -msgstr "" +msgstr "Subteni Godot ellaboradon" #: editor/editor_node.cpp msgid "Play the project." -msgstr "Stari la projekton." +msgstr "Ludi la projekton." #: editor/editor_node.cpp msgid "Play" -msgstr "Starti" +msgstr "Ludi" #: editor/editor_node.cpp msgid "Pause the scene execution for debugging." @@ -2975,19 +3021,19 @@ msgstr "Halti la scenon." #: editor/editor_node.cpp msgid "Play the edited scene." -msgstr "Starti la redaktantan scenon." +msgstr "Ludi la redaktantan scenon." #: editor/editor_node.cpp msgid "Play Scene" -msgstr "Starti scenon" +msgstr "Ludi scenon" #: editor/editor_node.cpp msgid "Play custom scene" -msgstr "Starti propran scenon" +msgstr "Ludi laŭmendan scenon" #: editor/editor_node.cpp msgid "Play Custom Scene" -msgstr "Starti propran scenon" +msgstr "Ludi laŭmendan scenon" #: editor/editor_node.cpp #, fuzzy @@ -3026,7 +3072,7 @@ msgstr "Inspektoro" #: editor/editor_node.cpp msgid "Expand Bottom Panel" -msgstr "" +msgstr "Etendi suban panelon" #: editor/editor_node.cpp msgid "Output" @@ -3065,7 +3111,7 @@ msgstr "" #: editor/editor_node.cpp msgid "Import Templates From ZIP File" -msgstr "" +msgstr "Enporti ŝablonojn el ZIP-a dosiero" #: editor/editor_node.cpp #, fuzzy @@ -3074,11 +3120,11 @@ msgstr "Ŝablonoj" #: editor/editor_node.cpp msgid "Export Library" -msgstr "" +msgstr "Eksporti bibliotekon" #: editor/editor_node.cpp msgid "Merge With Existing" -msgstr "" +msgstr "Kunfandi kun ekzistanta" #: editor/editor_node.cpp msgid "Open & Run a Script" @@ -3089,24 +3135,26 @@ msgid "" "The following files are newer on disk.\n" "What action should be taken?" msgstr "" +"La jenaj dosieroj estas pli novaj sur disko.\n" +"Kian agon fari?" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Reload" -msgstr "" +msgstr "Reŝargi" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Resave" -msgstr "" +msgstr "Rekonservi" #: editor/editor_node.cpp msgid "New Inherited" -msgstr "" +msgstr "Nova heredita" #: editor/editor_node.cpp msgid "Load Errors" -msgstr "" +msgstr "Ŝargaj eraroj" #: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp msgid "Select" @@ -3159,11 +3207,11 @@ msgstr "Konektu al skripto:" #: editor/editor_plugin_settings.cpp msgid "Edit Plugin" -msgstr "" +msgstr "Redakti kromprogramon" #: editor/editor_plugin_settings.cpp msgid "Installed Plugins:" -msgstr "" +msgstr "Instalitaj kromprogramoj:" #: editor/editor_plugin_settings.cpp editor/plugin_config_dialog.cpp msgid "Update" @@ -3184,7 +3232,7 @@ msgstr "Stato:" #: editor/editor_plugin_settings.cpp msgid "Edit:" -msgstr "" +msgstr "Redakti:" #: editor/editor_profiler.cpp msgid "Measure:" @@ -3228,27 +3276,27 @@ msgstr "Alvokoj" #: editor/editor_properties.cpp msgid "Edit Text:" -msgstr "" +msgstr "Redakti tekston:" #: editor/editor_properties.cpp editor/script_create_dialog.cpp msgid "On" -msgstr "" +msgstr "Ŝaltita" #: editor/editor_properties.cpp msgid "Layer" -msgstr "" +msgstr "Tavolo" #: editor/editor_properties.cpp msgid "Bit %d, value %d" -msgstr "" +msgstr "Bito %d, valoro %d" #: editor/editor_properties.cpp msgid "[Empty]" -msgstr "" +msgstr "[Malplena]" #: editor/editor_properties.cpp editor/plugins/root_motion_editor_plugin.cpp msgid "Assign..." -msgstr "" +msgstr "Asigni..." #: editor/editor_properties.cpp msgid "Invalid RID" @@ -3259,12 +3307,16 @@ msgid "" "The selected resource (%s) does not match any type expected for this " "property (%s)." msgstr "" +"La elektinta risurco (%s) ne kongruas ian atenditan tipon por ĉi tiu " +"atributo (%s)." #: editor/editor_properties.cpp msgid "" "Can't create a ViewportTexture on resources saved as a file.\n" "Resource needs to belong to a scene." msgstr "" +"Ne eblas krei ViewportTexture por risurcoj konservite kiel dosiero.\n" +"Risurco devas aparteni scenon." #: editor/editor_properties.cpp msgid "" @@ -3273,10 +3325,14 @@ msgid "" "Please switch on the 'local to scene' property on it (and all resources " "containing it up to a node)." msgstr "" +"Ne eblas krei ViewportTexture por tiu risurco ĉar ĝi ne agordas esti loke al " +"sceno.\n" +"Bonvolu ŝalti la 'loke al sceno' atributon por ĝi (kaj ĉiaj risurcoj kiu " +"enhavas ĝin, rekursie al nodo)." #: editor/editor_properties.cpp editor/property_editor.cpp msgid "Pick a Viewport" -msgstr "" +msgstr "Elekti Viewport" #: editor/editor_properties.cpp editor/property_editor.cpp msgid "New Script" @@ -3314,7 +3370,7 @@ msgstr "Konverti al %s" #: editor/editor_properties.cpp editor/property_editor.cpp msgid "Selected node is not a Viewport!" -msgstr "" +msgstr "Elektinta nodo ne estas Viewport!" #: editor/editor_properties_array_dict.cpp msgid "Size: " @@ -3347,6 +3403,9 @@ msgid "" "Please add a runnable preset in the Export menu or define an existing preset " "as runnable." msgstr "" +"Ne rulebla eksporta antaŭagordo troviĝis por ĉi tiu platformo.\n" +"Bonvolu aldoni ruleblan antaŭagordon per la Eksporto menuo aŭ defini " +"ekzistantan antaŭagordon kiel rulebla." #: editor/editor_run_script.cpp msgid "Write your logic in the _run() method." @@ -3354,15 +3413,15 @@ msgstr "Skribu vian logikon en la _run() metodo." #: editor/editor_run_script.cpp msgid "There is an edited scene already." -msgstr "" +msgstr "Estas redaktanta sceno jam." #: editor/editor_run_script.cpp msgid "Couldn't instance script:" -msgstr "" +msgstr "Ne eblis ekzempli skripton:" #: editor/editor_run_script.cpp msgid "Did you forget the 'tool' keyword?" -msgstr "" +msgstr "Ĉu vi forgesis la ŝlosilvorton 'tool'?" #: editor/editor_run_script.cpp msgid "Couldn't run script:" @@ -3375,6 +3434,8 @@ msgstr "Ĉu vi forgesis la '_run' metodo?" #: editor/editor_spin_slider.cpp msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes." msgstr "" +"Premteni stirklavon por rondigi al entjeroj. Premteni majuskligan klavon por " +"pli precizaj ŝanĝoj." #: editor/editor_sub_scene.cpp #, fuzzy @@ -3387,7 +3448,7 @@ msgstr "Foliumi" #: editor/editor_sub_scene.cpp msgid "Scene Path:" -msgstr "" +msgstr "Scena dosierindiko:" #: editor/editor_sub_scene.cpp msgid "Import From Node:" @@ -3424,182 +3485,188 @@ msgstr "(Aktuala)" #: editor/export_template_manager.cpp msgid "Retrieving mirrors, please wait..." -msgstr "" +msgstr "Ricevas spegulojn, bonvolu atendi..." #: editor/export_template_manager.cpp msgid "Remove template version '%s'?" -msgstr "" +msgstr "Forigi la version '%s' de ŝablono?" #: editor/export_template_manager.cpp msgid "Can't open export templates zip." -msgstr "" +msgstr "Ne eblas malfermi ZIP de eksportaj ŝablonoj." #: editor/export_template_manager.cpp msgid "Invalid version.txt format inside templates: %s." -msgstr "" +msgstr "Nevalida formo de version.txt en ŝablonoj: %s." #: editor/export_template_manager.cpp msgid "No version.txt found inside templates." -msgstr "" +msgstr "Ne version.txt troviĝis en ŝablonoj." #: editor/export_template_manager.cpp msgid "Error creating path for templates:" -msgstr "" +msgstr "Eraro dum kreo de dosierindiko por ŝablonoj:" #: editor/export_template_manager.cpp msgid "Extracting Export Templates" -msgstr "" +msgstr "Ekstraktas eksportajn ŝablonojn" #: editor/export_template_manager.cpp msgid "Importing:" -msgstr "" +msgstr "Enportas:" #: editor/export_template_manager.cpp msgid "Error getting the list of mirrors." -msgstr "" +msgstr "Eraro dum ricevo de la listo de speguloj." #: editor/export_template_manager.cpp msgid "Error parsing JSON of mirror list. Please report this issue!" msgstr "" +"Eraro dum analizo de la JSON de la spegula listo. Bonvolu raporti tiun " +"problemon!" #: editor/export_template_manager.cpp msgid "" "No download links found for this version. Direct download is only available " "for official releases." msgstr "" +"Ne elŝutaj ligiloj troviĝis por ĉi tiu versio. Direkta elŝuto estas nur " +"disponebla por oficaj eldonoj." #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp msgid "Can't resolve." -msgstr "" +msgstr "Ne eblas adrestrovi." #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp msgid "Can't connect." -msgstr "" +msgstr "Ne eblas konekti." #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp msgid "No response." -msgstr "" +msgstr "Ne respondo." #: editor/export_template_manager.cpp msgid "Request Failed." -msgstr "" +msgstr "Demando eraris." #: editor/export_template_manager.cpp msgid "Redirect Loop." -msgstr "" +msgstr "Alidirekta iteracio." #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp msgid "Failed:" -msgstr "" +msgstr "Eraris:" #: editor/export_template_manager.cpp msgid "Download Complete." -msgstr "" +msgstr "Elŝuto kompleta." #: editor/export_template_manager.cpp msgid "Cannot remove temporary file:" -msgstr "" +msgstr "Ne eblas forigi provizoran dosieron:" #: editor/export_template_manager.cpp msgid "" "Templates installation failed.\n" "The problematic templates archives can be found at '%s'." msgstr "" +"Instalado de ŝablonoj eraris.\n" +"La arkivoj de problemaj ŝablonoj eble troviĝas ĉe '%s'." #: editor/export_template_manager.cpp msgid "Error requesting URL:" -msgstr "" +msgstr "Eraro dum demandi la URL:" #: editor/export_template_manager.cpp msgid "Connecting to Mirror..." -msgstr "" +msgstr "Konektas al spegulo..." #: editor/export_template_manager.cpp msgid "Disconnected" -msgstr "" +msgstr "Malkonektis" #: editor/export_template_manager.cpp msgid "Resolving" -msgstr "" +msgstr "Adrestrovas" #: editor/export_template_manager.cpp msgid "Can't Resolve" -msgstr "" +msgstr "Ne eblas adrestrovi" #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp msgid "Connecting..." -msgstr "" +msgstr "Konektas..." #: editor/export_template_manager.cpp msgid "Can't Connect" -msgstr "" +msgstr "Ne eblas konekti" #: editor/export_template_manager.cpp msgid "Connected" -msgstr "" +msgstr "Konektis" #: editor/export_template_manager.cpp #: editor/plugins/asset_library_editor_plugin.cpp msgid "Requesting..." -msgstr "" +msgstr "Demandas..." #: editor/export_template_manager.cpp msgid "Downloading" -msgstr "" +msgstr "Elŝutas" #: editor/export_template_manager.cpp msgid "Connection Error" -msgstr "" +msgstr "Konekta eraro" #: editor/export_template_manager.cpp msgid "SSL Handshake Error" -msgstr "" +msgstr "SSL-kvitanca eraro" #: editor/export_template_manager.cpp msgid "Uncompressing Android Build Sources" -msgstr "" +msgstr "Malkompaktigas kompilajn fontkodojn por Android" #: editor/export_template_manager.cpp msgid "Current Version:" -msgstr "" +msgstr "Aktuala versio:" #: editor/export_template_manager.cpp msgid "Installed Versions:" -msgstr "" +msgstr "Instalintaj versioj:" #: editor/export_template_manager.cpp msgid "Install From File" -msgstr "" +msgstr "Instali el dosiero" #: editor/export_template_manager.cpp msgid "Remove Template" -msgstr "" +msgstr "Forigi ŝablonon" #: editor/export_template_manager.cpp msgid "Select Template File" -msgstr "" +msgstr "Elekti ŝablonan dosieron" #: editor/export_template_manager.cpp -#, fuzzy msgid "Godot Export Templates" -msgstr "Mastrumi eksportaj ŝablonoj" +msgstr "Eksportajn ŝablonojn de Godot" #: editor/export_template_manager.cpp msgid "Export Template Manager" -msgstr "" +msgstr "Mastrumilo de eksportaj ŝablonoj" #: editor/export_template_manager.cpp msgid "Download Templates" -msgstr "" +msgstr "Elŝutilo de ŝablonoj" #: editor/export_template_manager.cpp msgid "Select mirror from list: (Shift+Click: Open in Browser)" msgstr "" +"Elekti spegulon el listo: (Majuskliga klavo+Alklako: Malfermi en retumilon)" #: editor/filesystem_dock.cpp msgid "Favorites" @@ -3608,31 +3675,36 @@ msgstr "Favoritaj" #: editor/filesystem_dock.cpp msgid "Status: Import of file failed. Please fix file and reimport manually." msgstr "" +"Stato: Enporto de dosiero eraris. Bonvolu ripari dosieron kaj reenporti " +"permane." #: editor/filesystem_dock.cpp msgid "" "Importing has been disabled for this file, so it can't be opened for editing." msgstr "" +"Enportadon malŝaltis por ĉi tiu dosiero, do ĝin ne eblas malfermi por " +"redakto." #: editor/filesystem_dock.cpp msgid "Cannot move/rename resources root." -msgstr "" +msgstr "Ne eblas movi/renomi risurcan radikon." #: editor/filesystem_dock.cpp +#, fuzzy msgid "Cannot move a folder into itself." -msgstr "" +msgstr "Ne eblas movi dosierujon en sin mem." #: editor/filesystem_dock.cpp msgid "Error moving:" -msgstr "" +msgstr "Eraro dum movado de:" #: editor/filesystem_dock.cpp msgid "Error duplicating:" -msgstr "" +msgstr "Eraro dum duplikati:" #: editor/filesystem_dock.cpp msgid "Unable to update dependencies:" -msgstr "" +msgstr "Ne eblas ĝisdatigi dependojn:" #: editor/filesystem_dock.cpp editor/scene_tree_editor.cpp msgid "No name provided." @@ -3659,31 +3731,36 @@ msgid "" "\n" "Do you wish to overwrite them?" msgstr "" +"La jenaj dosieroj aŭ dosierujoj konfliktas kun elementoj en la cela loko " +"'%s':\n" +"\n" +"%s\n" +"\n" +"Ĉu vi volas anstataŭigi ilin?" #: editor/filesystem_dock.cpp msgid "Renaming file:" -msgstr "" +msgstr "Renomas dosieron:" #: editor/filesystem_dock.cpp msgid "Renaming folder:" -msgstr "" +msgstr "Renomas dosierujon:" #: editor/filesystem_dock.cpp msgid "Duplicating file:" -msgstr "" +msgstr "Duplikatas dosieron:" #: editor/filesystem_dock.cpp msgid "Duplicating folder:" -msgstr "" +msgstr "Duplikatas dosierujon:" #: editor/filesystem_dock.cpp msgid "New Inherited Scene" msgstr "Nova heredita sceno" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Set As Main Scene" -msgstr "Konservi ĉiujn scenojn" +msgstr "Defini kiel ĉefan scenon" #: editor/filesystem_dock.cpp msgid "Open Scenes" @@ -3728,12 +3805,12 @@ msgstr "Nova risurco..." #: editor/filesystem_dock.cpp editor/plugins/visual_shader_editor_plugin.cpp #: editor/script_editor_debugger.cpp msgid "Expand All" -msgstr "" +msgstr "Etendi tuton" #: editor/filesystem_dock.cpp editor/plugins/visual_shader_editor_plugin.cpp #: editor/script_editor_debugger.cpp msgid "Collapse All" -msgstr "" +msgstr "Maletendi tuton" #: editor/filesystem_dock.cpp msgid "Duplicate..." @@ -3772,6 +3849,8 @@ msgid "" "Scanning Files,\n" "Please Wait..." msgstr "" +"Skanas dosierojn,\n" +"Bonvolu atendi..." #: editor/filesystem_dock.cpp msgid "Move" @@ -3850,19 +3929,16 @@ msgid "Searching..." msgstr "Serĉas..." #: editor/find_in_files.cpp -#, fuzzy msgid "%d match in %d file." -msgstr "Trovis %d matĉo(j)n." +msgstr "%d rekono en %d dosiero." #: editor/find_in_files.cpp -#, fuzzy msgid "%d matches in %d file." -msgstr "Trovis %d matĉo(j)n." +msgstr "%d rekonoj en %d dosiero." #: editor/find_in_files.cpp -#, fuzzy msgid "%d matches in %d files." -msgstr "Trovis %d matĉo(j)n." +msgstr "%d rekonoj en %d dosieroj." #: editor/groups_editor.cpp msgid "Add to Group" @@ -3893,7 +3969,6 @@ msgid "Groups" msgstr "Grupoj" #: editor/groups_editor.cpp -#, fuzzy msgid "Nodes Not in Group" msgstr "Nodoj ne en grupo" @@ -3915,9 +3990,8 @@ msgid "Group Editor" msgstr "Grupredaktilo" #: editor/groups_editor.cpp -#, fuzzy msgid "Manage Groups" -msgstr "Administri grupojn" +msgstr "Agordi grupojn" #: editor/import/resource_importer_scene.cpp msgid "Import as Single Scene" @@ -3986,15 +4060,15 @@ msgstr "Ne elbe ŝargis la post-enportan skripton:" #: editor/import/resource_importer_scene.cpp msgid "Invalid/broken script for post-import (check console):" -msgstr "" +msgstr "Nevalida/rompita skripto por post-enporto (ekzamenu konzolon):" #: editor/import/resource_importer_scene.cpp msgid "Error running post-import script:" -msgstr "" +msgstr "Eraro dum ruli post-enportan skripton:" #: editor/import/resource_importer_scene.cpp msgid "Did you return a Node-derived object in the `post_import()` method?" -msgstr "" +msgstr "Ĉu vi revenis Nodo-devenitan objekton en la metodo `post_import()`?" #: editor/import/resource_importer_scene.cpp msgid "Saving..." @@ -4010,11 +4084,11 @@ msgstr "Enportilo:" #: editor/import_defaults_editor.cpp msgid "Reset to Defaults" -msgstr "" +msgstr "Rekomencigi al defaŭltoj" #: editor/import_dock.cpp msgid "Keep File (No Import)" -msgstr "" +msgstr "Konservi dosieron (ne enporto)" #: editor/import_dock.cpp #, fuzzy @@ -4023,11 +4097,11 @@ msgstr "Trovi en dosierojn" #: editor/import_dock.cpp msgid "Set as Default for '%s'" -msgstr "" +msgstr "Agordi kiel defaŭlton por '%s'" #: editor/import_dock.cpp msgid "Clear Default for '%s'" -msgstr "" +msgstr "Vakigi defaŭlton por '%s'" #: editor/import_dock.cpp msgid "Import As:" @@ -4035,19 +4109,20 @@ msgstr "Enporti kiel:" #: editor/import_dock.cpp msgid "Preset" -msgstr "" +msgstr "Antaŭagordo" #: editor/import_dock.cpp msgid "Reimport" -msgstr "" +msgstr "Reenporti" #: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" -msgstr "" +msgstr "Konservi scenojn, reenporti, kaj rekomenci" #: editor/import_dock.cpp msgid "Changing the type of an imported file requires editor restart." msgstr "" +"Ŝanĝado de la tipo de enportita dosiero postulas redaktilan rekomencon." #: editor/import_dock.cpp #, fuzzy @@ -4058,15 +4133,15 @@ msgstr "" #: editor/inspector_dock.cpp msgid "Failed to load resource." -msgstr "" +msgstr "Ne eblas ŝargi risurcon." #: editor/inspector_dock.cpp msgid "Expand All Properties" -msgstr "" +msgstr "Etendi ĉiajn atributojn" #: editor/inspector_dock.cpp msgid "Collapse All Properties" -msgstr "" +msgstr "Maletendi ĉiajn atributojn" #: editor/inspector_dock.cpp editor/plugins/animation_player_editor_plugin.cpp #: editor/plugins/script_editor_plugin.cpp @@ -4075,23 +4150,23 @@ msgstr "Konservi kiel..." #: editor/inspector_dock.cpp msgid "Copy Params" -msgstr "" +msgstr "Kopii parametrojn" #: editor/inspector_dock.cpp msgid "Edit Resource Clipboard" -msgstr "" +msgstr "Redakti risurcan tondujon" #: editor/inspector_dock.cpp msgid "Copy Resource" -msgstr "" +msgstr "Kopii risurcon" #: editor/inspector_dock.cpp msgid "Make Built-In" -msgstr "" +msgstr "Enkonstruigi" #: editor/inspector_dock.cpp msgid "Make Sub-Resources Unique" -msgstr "" +msgstr "Subrisurcojn unikigi" #: editor/inspector_dock.cpp msgid "Open in Help" @@ -4099,39 +4174,39 @@ msgstr "Malfermi en helpo" #: editor/inspector_dock.cpp msgid "Create a new resource in memory and edit it." -msgstr "" +msgstr "Krei novan risurcon en memoro kaj redakti ĝin." #: editor/inspector_dock.cpp msgid "Load an existing resource from disk and edit it." -msgstr "" +msgstr "Ŝargi ekzistantan risurcon el disko kaj redakti ĝin." #: editor/inspector_dock.cpp msgid "Save the currently edited resource." -msgstr "" +msgstr "Konservi la aktuale redaktantan risurcon." #: editor/inspector_dock.cpp msgid "Go to the previous edited object in history." -msgstr "" +msgstr "Iri al la antaŭe redaktinta objekto en historio." #: editor/inspector_dock.cpp msgid "Go to the next edited object in history." -msgstr "" +msgstr "Iri al la poste redaktinta objekto en historio." #: editor/inspector_dock.cpp msgid "History of recently edited objects." -msgstr "" +msgstr "Historio de lastatempe redaktintaj objektoj." #: editor/inspector_dock.cpp msgid "Object properties." -msgstr "" +msgstr "Atributoj de la objekto." #: editor/inspector_dock.cpp msgid "Filter properties" -msgstr "" +msgstr "Filtri atributojn" #: editor/inspector_dock.cpp msgid "Changes may be lost!" -msgstr "" +msgstr "Ŝanĝoj eble perdiĝos!" #: editor/multi_node_edit.cpp msgid "MultiNode Set" @@ -4139,46 +4214,46 @@ msgstr "" #: editor/node_dock.cpp msgid "Select a single node to edit its signals and groups." -msgstr "" +msgstr "Elektu unu nodon por redakti ĝiajn signalojn kaj grupojn." #: editor/plugin_config_dialog.cpp msgid "Edit a Plugin" -msgstr "" +msgstr "Redakti kromprogramon" #: editor/plugin_config_dialog.cpp msgid "Create a Plugin" -msgstr "" +msgstr "Krei kromprogramon" #: editor/plugin_config_dialog.cpp msgid "Plugin Name:" -msgstr "" +msgstr "Nomo de kromprogramon:" #: editor/plugin_config_dialog.cpp msgid "Subfolder:" -msgstr "" +msgstr "Subdosierujo:" #: editor/plugin_config_dialog.cpp editor/script_create_dialog.cpp msgid "Language:" -msgstr "" +msgstr "Lingvo:" #: editor/plugin_config_dialog.cpp msgid "Script Name:" -msgstr "" +msgstr "Nomo de skripto:" #: editor/plugin_config_dialog.cpp msgid "Activate now?" -msgstr "" +msgstr "Aktivigi nun?" #: editor/plugins/abstract_polygon_2d_editor.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Create Polygon" -msgstr "" +msgstr "Krei plurlateron" #: editor/plugins/abstract_polygon_2d_editor.cpp #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Create points." -msgstr "" +msgstr "Krei punktojn." #: editor/plugins/abstract_polygon_2d_editor.cpp msgid "" @@ -4186,27 +4261,30 @@ msgid "" "LMB: Move Point\n" "RMB: Erase Point" msgstr "" +"Redakti punktojn.\n" +"Maldekstra musbutono: Movi punkton\n" +"Dekstra musbutono: Forigi punkton" #: editor/plugins/abstract_polygon_2d_editor.cpp #: editor/plugins/animation_blend_space_1d_editor.cpp msgid "Erase points." -msgstr "" +msgstr "Forigi punktojn." #: editor/plugins/abstract_polygon_2d_editor.cpp msgid "Edit Polygon" -msgstr "" +msgstr "Redakti plurlateron" #: editor/plugins/abstract_polygon_2d_editor.cpp msgid "Insert Point" -msgstr "" +msgstr "Enmeti punkton" #: editor/plugins/abstract_polygon_2d_editor.cpp msgid "Edit Polygon (Remove Point)" -msgstr "" +msgstr "Redakti plurlateron (forigi punkton)" #: editor/plugins/abstract_polygon_2d_editor.cpp msgid "Remove Polygon And Point" -msgstr "" +msgstr "Forigi plurlateron kaj punkton" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp @@ -4214,51 +4292,52 @@ msgstr "" #: editor/plugins/animation_state_machine_editor.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Add Animation" -msgstr "" +msgstr "Aldoni animacion" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_state_machine_editor.cpp msgid "Load..." -msgstr "" +msgstr "Ŝargi..." #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Move Node Point" -msgstr "" +msgstr "Movi punkton de nodo" #: editor/plugins/animation_blend_space_1d_editor.cpp msgid "Change BlendSpace1D Limits" -msgstr "" +msgstr "Ŝanĝi limojn de BlendSpace1D" #: editor/plugins/animation_blend_space_1d_editor.cpp msgid "Change BlendSpace1D Labels" -msgstr "" +msgstr "Ŝanĝi etikedojn de BlendSpace1D" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp #: editor/plugins/animation_state_machine_editor.cpp msgid "This type of node can't be used. Only root nodes are allowed." msgstr "" +"Tiun ĉi tipon de nodo ne eblas uzi. Nur radikaj nodoj estas permesitaj." #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Add Node Point" -msgstr "" +msgstr "Aldoni punkton de nodo" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Add Animation Point" -msgstr "" +msgstr "Aldoni punkton de animacio" #: editor/plugins/animation_blend_space_1d_editor.cpp msgid "Remove BlendSpace1D Point" -msgstr "" +msgstr "Forigi punkton de BlendSpace1D" #: editor/plugins/animation_blend_space_1d_editor.cpp msgid "Move BlendSpace1D Node Point" -msgstr "" +msgstr "Movi punkton de BlendSpace1D" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp @@ -4268,26 +4347,29 @@ msgid "" "AnimationTree is inactive.\n" "Activate to enable playback, check node warnings if activation fails." msgstr "" +"AnimationTree estas neaktiva.\n" +"Aktivigu por ŝalti reproduktado, ekzamenu avertojn de nodo se aktivigo " +"erarus." #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Set the blending position within the space" -msgstr "" +msgstr "Difini la miksan pozicion en la spaco" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Select and move points, create points with RMB." -msgstr "" +msgstr "Elekti kaj movi punktojn, krei punktojn per dekstra musbutono." #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp scene/gui/graph_edit.cpp msgid "Enable snap and show grid." -msgstr "" +msgstr "Ŝalti kradokapton kaj vidi kradon." #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Point" -msgstr "" +msgstr "Punkto" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp @@ -4300,125 +4382,126 @@ msgstr "Malfermi la redaktilon" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_state_machine_editor.cpp msgid "Open Animation Node" -msgstr "" +msgstr "Malfermi animacian nodon" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Triangle already exists." -msgstr "" +msgstr "Triangulo jam ekzistas." #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Add Triangle" -msgstr "" +msgstr "Aldoni triangulon" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Change BlendSpace2D Limits" -msgstr "" +msgstr "Ŝanĝi limojn de BlendSpace2D" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Change BlendSpace2D Labels" -msgstr "" +msgstr "Ŝanĝi etikedojn de BlendSpace2D" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Remove BlendSpace2D Point" -msgstr "" +msgstr "Forigi punktojn de BlendSpace2D" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Remove BlendSpace2D Triangle" -msgstr "" +msgstr "Forigi triangulojn de BlendSpace2D" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "BlendSpace2D does not belong to an AnimationTree node." -msgstr "" +msgstr "BlendSpace2D ne apartenas AnimationTree-an nodon." #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "No triangles exist, so no blending can take place." -msgstr "" +msgstr "Ne trianguloj ekzistas, do miksado ne eblas." #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Toggle Auto Triangles" -msgstr "" +msgstr "Baskuli aŭtomatajn triangulojn" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Create triangles by connecting points." -msgstr "" +msgstr "Krei triangulojn per konekti punktojn." #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Erase points and triangles." -msgstr "" +msgstr "Forigi punktojn kaj triangulojn." #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Generate blend triangles automatically (instead of manually)" -msgstr "" +msgstr "Generi miksajn triangulojn aŭtomate (anstataŭ permane)" #: editor/plugins/animation_blend_space_2d_editor.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Blend:" -msgstr "" +msgstr "Mikso:" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Parameter Changed" -msgstr "" +msgstr "Parametro ŝanĝiĝis" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Edit Filters" -msgstr "" +msgstr "Redakti filtrojn" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Output node can't be added to the blend tree." -msgstr "" +msgstr "Ne eblas aldoni eligan nodon al la miksan arbon." #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Add Node to BlendTree" -msgstr "" +msgstr "Aldoni nodon al BlendTree" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Node Moved" -msgstr "" +msgstr "Nodo moviĝis" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Unable to connect, port may be in use or connection may be invalid." msgstr "" +"Ne eblas konekti, pordo povas esti en uzo aŭ konekto povas esti nevalida." #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Nodes Connected" -msgstr "" +msgstr "Nodoj konektiĝis" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Nodes Disconnected" -msgstr "" +msgstr "Nodoj malkonektiĝis" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Set Animation" -msgstr "" +msgstr "Difini animacion" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Delete Node" -msgstr "" +msgstr "Forigi nodon" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/scene_tree_dock.cpp msgid "Delete Node(s)" -msgstr "" +msgstr "Forigi nodo(j)n" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Toggle Filter On/Off" -msgstr "" +msgstr "Ŝalti/malŝalti filtron" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Change Filter" -msgstr "" +msgstr "Ŝanĝi filtron" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "No animation player set, so unable to retrieve track names." -msgstr "" +msgstr "Ne animacian ludilon difinas, do ne eblas ricevi nomojn de trakoj." #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Player path set is invalid, so unable to retrieve track names." -msgstr "" +msgstr "Vojaro de ludilo estas nevalida, do ne eblas ricevi nomojn de trakoj." #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/root_motion_editor_plugin.cpp @@ -4426,6 +4509,8 @@ msgid "" "Animation player has no valid root node path, so unable to retrieve track " "names." msgstr "" +"Animacia ludilo ne havas valida radika nodo-vojo, do ne eblas ricevi nomojn " +"de trakoj." #: editor/plugins/animation_blend_tree_editor_plugin.cpp #, fuzzy @@ -4445,55 +4530,56 @@ msgstr "Funkcioj:" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_state_machine_editor.cpp msgid "Node Renamed" -msgstr "" +msgstr "Nodo renomiĝis" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Add Node..." -msgstr "" +msgstr "Aldoni nodon..." #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/root_motion_editor_plugin.cpp msgid "Edit Filtered Tracks:" -msgstr "" +msgstr "Redakti filtritajn trakojn:" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Enable Filtering" -msgstr "" +msgstr "Ŝalti filtradon" #: editor/plugins/animation_player_editor_plugin.cpp +#, fuzzy msgid "Toggle Autoplay" -msgstr "" +msgstr "Baskuli aŭtoludadon" #: editor/plugins/animation_player_editor_plugin.cpp msgid "New Animation Name:" -msgstr "" +msgstr "Nomo de nova animacio:" #: editor/plugins/animation_player_editor_plugin.cpp msgid "New Anim" -msgstr "" +msgstr "Nova animacio" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Change Animation Name:" -msgstr "" +msgstr "Ŝanĝi nomon de animacio:" #: editor/plugins/animation_player_editor_plugin.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Delete Animation?" -msgstr "" +msgstr "Forigi animacion?" #: editor/plugins/animation_player_editor_plugin.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Remove Animation" -msgstr "" +msgstr "Forigi animacion" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Invalid animation name!" -msgstr "" +msgstr "Nevalida nomo de animacio!" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Animation name already exists!" -msgstr "" +msgstr "Nomo de animacio jam ekzistas!" #: editor/plugins/animation_player_editor_plugin.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -4503,71 +4589,71 @@ msgstr "Renomi animaĵon" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Blend Next Changed" -msgstr "" +msgstr "Mikso sekvo ŝanĝiĝis" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Change Blend Time" -msgstr "" +msgstr "Ŝanĝi tempon de mikso" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Load Animation" -msgstr "" +msgstr "Ŝargi animacion" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Duplicate Animation" -msgstr "" +msgstr "Duplikati animacion" #: editor/plugins/animation_player_editor_plugin.cpp msgid "No animation to copy!" -msgstr "" +msgstr "Ne animacio por kopii!" #: editor/plugins/animation_player_editor_plugin.cpp msgid "No animation resource on clipboard!" -msgstr "" +msgstr "Ne animacia risurco en tondujo!" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Pasted Animation" -msgstr "" +msgstr "Algluis animacion" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Paste Animation" -msgstr "" +msgstr "Alglui animacion" #: editor/plugins/animation_player_editor_plugin.cpp msgid "No animation to edit!" -msgstr "" +msgstr "Ne animacio por redakti!" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Play selected animation backwards from current pos. (A)" -msgstr "" +msgstr "Ludi elektitan animacion retre el aktuala pozicio. (A)" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Play selected animation backwards from end. (Shift+A)" -msgstr "" +msgstr "Ludi elektitan animacion retre el fino. (Majuskliga klavo+A)" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Stop animation playback. (S)" -msgstr "" +msgstr "Halti reproduktadon de animacio. (S)" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Play selected animation from start. (Shift+D)" -msgstr "" +msgstr "Ludi elektitan animacion el komenco. (Majuskliga klavo+D)" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Play selected animation from current pos. (D)" -msgstr "" +msgstr "Ludi elektitan animacion el aktuala pozicio. (D)" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Animation position (in seconds)." -msgstr "" +msgstr "Pozicio de animacio (en sekundoj)." #: editor/plugins/animation_player_editor_plugin.cpp msgid "Scale animation playback globally for the node." -msgstr "" +msgstr "Skali reproduktadon de animacio malloke por la nodo." #: editor/plugins/animation_player_editor_plugin.cpp msgid "Animation Tools" -msgstr "" +msgstr "Iloj de animacio" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Animation" @@ -4575,7 +4661,7 @@ msgstr "Animacio" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Edit Transitions..." -msgstr "" +msgstr "Redakti transpasojn..." #: editor/plugins/animation_player_editor_plugin.cpp msgid "Open in Inspector" @@ -4583,147 +4669,147 @@ msgstr "Malfermi en la Inspektoro" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Display list of animations in player." -msgstr "" +msgstr "Vidigi liston de animacioj en ludilo." #: editor/plugins/animation_player_editor_plugin.cpp msgid "Autoplay on Load" -msgstr "" +msgstr "Aŭtoludi al ŝargo" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Enable Onion Skinning" -msgstr "" +msgstr "Ŝalti cepo-haŭtadon" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Onion Skinning Options" -msgstr "" +msgstr "Cepo-haŭtadaj opcioj" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Directions" -msgstr "" +msgstr "Direktoj" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Past" -msgstr "" +msgstr "Pasinteco" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Future" -msgstr "" +msgstr "Estonteco" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Depth" -msgstr "" +msgstr "Profundo" #: editor/plugins/animation_player_editor_plugin.cpp msgid "1 step" -msgstr "" +msgstr "1 paŝo" #: editor/plugins/animation_player_editor_plugin.cpp msgid "2 steps" -msgstr "" +msgstr "2 paŝoj" #: editor/plugins/animation_player_editor_plugin.cpp msgid "3 steps" -msgstr "" +msgstr "3 paŝoj" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Differences Only" -msgstr "" +msgstr "Malsamoj nur" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Force White Modulate" -msgstr "" +msgstr "Altrudi blankan moduladon" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Include Gizmos (3D)" -msgstr "" +msgstr "Inkludi gizmojn (3D)" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Pin AnimationPlayer" -msgstr "" +msgstr "Fiksi AnimationPlayer" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Create New Animation" -msgstr "" +msgstr "Krei novan animacion" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Animation Name:" -msgstr "" +msgstr "Nomo de animacio:" #: editor/plugins/animation_player_editor_plugin.cpp #: editor/plugins/resource_preloader_editor_plugin.cpp #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp msgid "Error!" -msgstr "" +msgstr "Eraro!" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Blend Times:" -msgstr "" +msgstr "Tempoj de mikso:" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Next (Auto Queue):" -msgstr "" +msgstr "Sekvo (aŭtomata atendovico):" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Cross-Animation Blend Times" -msgstr "" +msgstr "Tempoj de trans-animacia mikso" #: editor/plugins/animation_state_machine_editor.cpp msgid "Move Node" -msgstr "" +msgstr "Movi nodon" #: editor/plugins/animation_state_machine_editor.cpp msgid "Transition exists!" -msgstr "" +msgstr "Transpaso ekzistas!" #: editor/plugins/animation_state_machine_editor.cpp msgid "Add Transition" -msgstr "" +msgstr "Aldoni transpason" #: editor/plugins/animation_state_machine_editor.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Add Node" -msgstr "" +msgstr "Aldoni nodon" #: editor/plugins/animation_state_machine_editor.cpp msgid "End" -msgstr "" +msgstr "Fino" #: editor/plugins/animation_state_machine_editor.cpp msgid "Immediate" -msgstr "" +msgstr "Tuja" #: editor/plugins/animation_state_machine_editor.cpp msgid "Sync" -msgstr "" +msgstr "Sinkrona" #: editor/plugins/animation_state_machine_editor.cpp msgid "At End" -msgstr "" +msgstr "Je la fino" #: editor/plugins/animation_state_machine_editor.cpp msgid "Travel" -msgstr "" +msgstr "Vojaĝa" #: editor/plugins/animation_state_machine_editor.cpp msgid "Start and end nodes are needed for a sub-transition." -msgstr "" +msgstr "Komencan kaj finan nodojn bezonas por sub-transpaso." #: editor/plugins/animation_state_machine_editor.cpp msgid "No playback resource set at path: %s." -msgstr "" +msgstr "Ne reproduktada risurcaro al vojo: %s." #: editor/plugins/animation_state_machine_editor.cpp msgid "Node Removed" -msgstr "" +msgstr "Nodon forigis" #: editor/plugins/animation_state_machine_editor.cpp msgid "Transition Removed" -msgstr "" +msgstr "Transpason forigis" #: editor/plugins/animation_state_machine_editor.cpp msgid "Set Start Node (Autoplay)" -msgstr "" +msgstr "Difini komencan nodon (aŭtoludadon)" #: editor/plugins/animation_state_machine_editor.cpp msgid "" @@ -4731,56 +4817,62 @@ msgid "" "RMB to add new nodes.\n" "Shift+LMB to create connections." msgstr "" +"Elekti kaj movi nodojn.\n" +"Dekstra musbutono por aldoni novajn nodojn.\n" +"Majuskliga klavo+maldekstra musbutono por krei konektojn." #: editor/plugins/animation_state_machine_editor.cpp msgid "Create new nodes." -msgstr "" +msgstr "Krei novajn nodojn." #: editor/plugins/animation_state_machine_editor.cpp msgid "Connect nodes." -msgstr "" +msgstr "Konekti nodojn." #: editor/plugins/animation_state_machine_editor.cpp msgid "Remove selected node or transition." -msgstr "" +msgstr "Forigi elektitan nodon aŭ transpason." #: editor/plugins/animation_state_machine_editor.cpp +#, fuzzy msgid "Toggle autoplay this animation on start, restart or seek to zero." msgstr "" +"Baskuli aŭtoludadon de ĉi tiu animacio al komenco, rekomenco aŭ enpoziciigo " +"al nulo." #: editor/plugins/animation_state_machine_editor.cpp msgid "Set the end animation. This is useful for sub-transitions." -msgstr "" +msgstr "Difinu la finan animacion. Tio ĉi estas utila por sub-transpasoj." #: editor/plugins/animation_state_machine_editor.cpp msgid "Transition: " -msgstr "" +msgstr "Transpaso: " #: editor/plugins/animation_state_machine_editor.cpp msgid "Play Mode:" -msgstr "" +msgstr "Reĝimo de ludado:" #: editor/plugins/animation_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "AnimationTree" -msgstr "" +msgstr "AnimationTree" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "New name:" -msgstr "" +msgstr "Nova nomo:" #: editor/plugins/animation_tree_player_editor_plugin.cpp #: editor/plugins/multimesh_editor_plugin.cpp msgid "Scale:" -msgstr "" +msgstr "Skalo:" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Fade In (s):" -msgstr "" +msgstr "Maldissolvo (s):" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Fade Out (s):" -msgstr "" +msgstr "Fordissolvo (s):" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Blend" @@ -4903,100 +4995,99 @@ msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Contents:" -msgstr "" +msgstr "Enhavo:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "View Files" -msgstr "" +msgstr "Vidi dosierojn" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Connection error, please try again." -msgstr "" +msgstr "Konekta eraro, bonvolu provi ree." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Can't connect to host:" -msgstr "" +msgstr "Ne eblas konekti al retejo:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "No response from host:" -msgstr "" +msgstr "Ne respondo el retejo:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Can't resolve hostname:" -msgstr "" +msgstr "Ne eblas adrestrovi nomon de retejo:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Request failed, return code:" -msgstr "" +msgstr "Peto eraris, revena kodo:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Request failed." -msgstr "" +msgstr "Peto eraris." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Cannot save response to:" -msgstr "" +msgstr "Ne eblas konservi respondon al:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Write error." -msgstr "" +msgstr "Skribada eraro." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Request failed, too many redirects" -msgstr "" +msgstr "Peto eraris, tro da alidirektoj" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Redirect loop." -msgstr "" +msgstr "Alidirekta iteracio." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Request failed, timeout" -msgstr "" +msgstr "Peto eraris, tempolimo" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Timeout." -msgstr "Tempo:" +msgstr "Tempolimo." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Bad download hash, assuming file has been tampered with." -msgstr "" +msgstr "Malbona haketaĵo el elŝutaĵo, supozas dosieron esti tuŝaĉita." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Expected:" -msgstr "" +msgstr "Atendito:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Got:" -msgstr "" +msgstr "Ricevinto:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Failed SHA-256 hash check" -msgstr "" +msgstr "Kontrolo de SHA-256-a haketaĵo eraris" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Asset Download Error:" -msgstr "" +msgstr "Eraro de havaĵa elŝuto:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Downloading (%s / %s)..." -msgstr "" +msgstr "Elŝutas (%s / %s)..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Downloading..." -msgstr "" +msgstr "Elŝutas..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Resolving..." -msgstr "" +msgstr "Adrestrovas..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Error making request" -msgstr "" +msgstr "Eraro dum petado" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Idle" -msgstr "" +msgstr "Senokupa" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Install..." @@ -5008,105 +5099,107 @@ msgstr "Reprovi" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Download Error" -msgstr "" +msgstr "Elŝuta eraro" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Download for this asset is already in progress!" -msgstr "" +msgstr "Elŝutado de ĉi tiu havaĵo estas jam farata!" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Recently Updated" -msgstr "" +msgstr "Plej lastatempe ĝisdatigita" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Least Recently Updated" -msgstr "" +msgstr "Malplej lastatempe ĝisdatigita" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Name (A-Z)" -msgstr "" +msgstr "Nomo (A-Z)" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Name (Z-A)" -msgstr "" +msgstr "Nomo (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp msgid "License (A-Z)" -msgstr "" +msgstr "Permesilo (A-Z)" #: editor/plugins/asset_library_editor_plugin.cpp msgid "License (Z-A)" -msgstr "" +msgstr "Permesilo (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp msgid "First" -msgstr "" +msgstr "Unua" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Previous" -msgstr "" +msgstr "Antaŭa" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Next" -msgstr "" +msgstr "Sekva" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Last" -msgstr "" +msgstr "Lasta" #: editor/plugins/asset_library_editor_plugin.cpp msgid "All" -msgstr "" +msgstr "Tuta" #: editor/plugins/asset_library_editor_plugin.cpp msgid "No results for \"%s\"." -msgstr "" +msgstr "Ne rezultoj por \"%s\"." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Import..." -msgstr "" +msgstr "Enporti..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Plugins..." -msgstr "" +msgstr "Kromprogramoj..." #: editor/plugins/asset_library_editor_plugin.cpp editor/project_manager.cpp msgid "Sort:" -msgstr "Ordigi:" +msgstr "Ordigo:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Category:" -msgstr "" +msgstr "Kategorio:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Site:" -msgstr "" +msgstr "Retejo:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Support" -msgstr "" +msgstr "Helpo" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Official" -msgstr "" +msgstr "Ofica" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Testing" -msgstr "" +msgstr "Testada" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Loading..." -msgstr "" +msgstr "Ŝargas..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" -msgstr "" +msgstr "ZIP-dosiero de havaĵoj" #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "" "Can't determine a save path for lightmap images.\n" "Save your scene and try again." msgstr "" +"Ne eblas determini konservan dosierindikon por lummapaj bildoj.\n" +"Konservu vian scenon kaj provu ree." #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "" @@ -5135,11 +5228,11 @@ msgstr "" #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "Bake Lightmaps" -msgstr "" +msgstr "Baki lummapojn" #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "Select lightmap bake file:" -msgstr "" +msgstr "Elekti dosieron por bakado de lummapo:" #: editor/plugins/camera_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5148,106 +5241,103 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Configure Snap" -msgstr "" +msgstr "Agordi kapton" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Grid Offset:" -msgstr "" +msgstr "Krada deŝovo:" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Grid Step:" -msgstr "" +msgstr "Krada paŝo:" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Primary Line Every:" -msgstr "" +msgstr "Ĉefa linio al ĉiu:" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "steps" -msgstr "" +msgstr "paŝoj" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Rotation Offset:" -msgstr "" +msgstr "Rotacia deŝovo:" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Rotation Step:" -msgstr "" +msgstr "Rotacia paŝo:" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Scale Step:" -msgstr "Skali Rejŝo:" +msgstr "Skala paŝo:" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Move Vertical Guide" -msgstr "" +msgstr "Movi vertikalan gvidilon" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Create Vertical Guide" -msgstr "" +msgstr "Krei vertikalan gvidilon" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Remove Vertical Guide" -msgstr "Forigi Nevalidajn Ŝlosilojn" +msgstr "Forigi vertikalan gvidilon" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Move Horizontal Guide" -msgstr "" +msgstr "Movi horizontalan gvidilon" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Create Horizontal Guide" -msgstr "" +msgstr "Krei horizontalan gvidilon" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Remove Horizontal Guide" -msgstr "Forigi Nevalidajn Ŝlosilojn" +msgstr "Forigi horizontalan gvidilon" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Create Horizontal and Vertical Guides" -msgstr "" +msgstr "Krei horizontalajn kaj vertikalajn gvidilojn" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Set CanvasItem \"%s\" Pivot Offset to (%d, %d)" -msgstr "" +msgstr "Agordi la deŝovon de la pivoto de CanvasItem \"%s\" al (%d, %d)" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Rotate %d CanvasItems" -msgstr "" +msgstr "Rotacii %d CanvasItem-ojn" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Rotate CanvasItem \"%s\" to %d degrees" -msgstr "" +msgstr "Rotacii CanvasItem \"%s\" al %d gradoj" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Move CanvasItem \"%s\" Anchor" -msgstr "" +msgstr "Movi la ankron de CanvasItem \"%s\"" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Scale Node2D \"%s\" to (%s, %s)" -msgstr "" +msgstr "Skali Node2D \"%s\" al (%s, %s)" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Resize Control \"%s\" to (%d, %d)" -msgstr "" +msgstr "Regrandigi Control \"%s\" al (%d, %d)" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Scale %d CanvasItems" -msgstr "" +msgstr "Skali %d CanvasItem-ojn" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Scale CanvasItem \"%s\" to (%s, %s)" -msgstr "" +msgstr "Skali CanvasItem \"%s\" al (%s, %s)" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Move %d CanvasItems" -msgstr "" +msgstr "Movi %d CanvasItem-ojn" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Move CanvasItem \"%s\" to (%d, %d)" -msgstr "" +msgstr "Movi CanvasItem \"%s\" al (%d, %d)" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -5267,67 +5357,67 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Top Left" -msgstr "" +msgstr "Supre maldekstre" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Top Right" -msgstr "" +msgstr "Supre dekstre" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Bottom Right" -msgstr "" +msgstr "Malsupre dekstre" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Bottom Left" -msgstr "" +msgstr "Malsupre maldekstre" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Center Left" -msgstr "" +msgstr "Centre maldekstre" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Center Top" -msgstr "" +msgstr "Centre supre" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Center Right" -msgstr "" +msgstr "Centre dekstre" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Center Bottom" -msgstr "" +msgstr "Centre malsupre" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Center" -msgstr "" +msgstr "Centre" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Left Wide" -msgstr "" +msgstr "Maldekstre vaste" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Top Wide" -msgstr "" +msgstr "Supre vaste" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Right Wide" -msgstr "" +msgstr "Dekstre vaste" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Bottom Wide" -msgstr "" +msgstr "Malsupre vaste" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "VCenter Wide" -msgstr "" +msgstr "Vertikalcentre vaste" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "HCenter Wide" -msgstr "" +msgstr "Horizontalcentre vaste" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Full Rect" -msgstr "" +msgstr "Plene rektangula" #: editor/plugins/canvas_item_editor_plugin.cpp #, fuzzy @@ -5336,15 +5426,15 @@ msgstr "Skali Rejŝo:" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Anchors only" -msgstr "" +msgstr "Nur ankroj" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Change Anchors and Margins" -msgstr "" +msgstr "Ŝanĝi ankrojn kaj marĝenojn" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Change Anchors" -msgstr "" +msgstr "Ŝanĝi ankrojn" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5352,6 +5442,8 @@ msgid "" "Game Camera Override\n" "Overrides game camera with editor viewport camera." msgstr "" +"Transpaso de la luda fotilo\n" +"Transpasi ludan fotilon kun viduja fotilo de la redaktilo." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5359,98 +5451,104 @@ msgid "" "Game Camera Override\n" "No game instance running." msgstr "" +"Transpaso de la luda fotilo\n" +"Ne luda ekzemplo ruliĝas." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Lock Selected" -msgstr "" +msgstr "Ŝlosi elektiton" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Unlock Selected" -msgstr "" +msgstr "Malŝlosi elektiton" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Group Selected" -msgstr "" +msgstr "Grupigi elektiton" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Ungroup Selected" -msgstr "" +msgstr "Malgrupigi elektiton" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Paste Pose" -msgstr "" +msgstr "Alglui pozon" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Clear Guides" -msgstr "" +msgstr "Vakigi gvidilojn" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Create Custom Bone(s) from Node(s)" -msgstr "" +msgstr "Krei proprajn osto(j)n el nodo(j)" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Clear Bones" -msgstr "" +msgstr "Vakigi ostojn" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Make IK Chain" -msgstr "" +msgstr "Krei IK-an ĉenon" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Clear IK Chain" -msgstr "" +msgstr "Vakigi IK-an ĉenon" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" "Warning: Children of a container get their position and size determined only " "by their parent." msgstr "" +"Verto: Infanoj de stirilujo determinas iliajn poziciojn kaj grandojn nur per " +"ilia patro." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/texture_region_editor_plugin.cpp #: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp msgid "Zoom Reset" -msgstr "" +msgstr "Rekomencigi zomon" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Select Mode" -msgstr "" +msgstr "Elektada reĝimo" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Drag: Rotate" -msgstr "" +msgstr "Ŝovado: Rotacii" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Alt+Drag: Move" -msgstr "" +msgstr "Alt-klavo+ŝovado: Movi" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Press 'v' to Change Pivot, 'Shift+v' to Drag Pivot (while moving)." msgstr "" +"Premi 'V' por ŝanĝi pivoton, 'Majuskliga klavo+V' por ŝovi pivoton (dum " +"movado)." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Alt+RMB: Depth list selection" -msgstr "" +msgstr "Alt-klavo+dekstra musbutono: Elektado el profunda listo" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Move Mode" -msgstr "" +msgstr "Movada reĝimo" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Rotate Mode" -msgstr "" +msgstr "Rotaciada reĝimo" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Scale Mode" -msgstr "" +msgstr "Skalada reĝimo" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5458,97 +5556,99 @@ msgid "" "Show a list of all objects at the position clicked\n" "(same as Alt+RMB in select mode)." msgstr "" +"Vidigi liston de ĉiuj objektoj al la alklakita pozicio.\n" +"(samo kiel Alt-klavo+dekstra musbutono en elektada reĝimo)." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Click to change object's rotation pivot." -msgstr "" +msgstr "Alklaku por ŝanĝi rotacian pivoton de objekto." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Pan Mode" -msgstr "" +msgstr "Panoramada reĝimo" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Ruler Mode" -msgstr "" +msgstr "Mezurado reĝimo" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Toggle smart snapping." -msgstr "" +msgstr "Baskuli inteligentan kaptadon." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Use Smart Snap" -msgstr "" +msgstr "Uzi inteligentan kaptadon" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Toggle grid snapping." -msgstr "" +msgstr "Baskuli kaptadon per krado." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Use Grid Snap" -msgstr "" +msgstr "Uzi kapton per krado" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snapping Options" -msgstr "" +msgstr "Opcioj de kaptado" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Use Rotation Snap" -msgstr "" +msgstr "Uzi rotacian kaptadon" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Use Scale Snap" -msgstr "" +msgstr "Uzi skalan kaptadon" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snap Relative" -msgstr "" +msgstr "Kapti relative" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Use Pixel Snap" -msgstr "" +msgstr "Uzi kaptadon per rastrumero" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Smart Snapping" -msgstr "" +msgstr "Inteligenta kaptado" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Configure Snap..." -msgstr "" +msgstr "Agordi kaptadon..." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snap to Parent" -msgstr "" +msgstr "Kapti al patro" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snap to Node Anchor" -msgstr "" +msgstr "Kapti al ankro de nodo" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snap to Node Sides" -msgstr "" +msgstr "Kapti al flankoj de nodo" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snap to Node Center" -msgstr "" +msgstr "Kapti al centro de nodo" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snap to Other Nodes" -msgstr "" +msgstr "Kapti al aliaj nodoj" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snap to Guides" -msgstr "" +msgstr "Kapti al gvidiloj" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Lock the selected object in place (can't be moved)." -msgstr "" +msgstr "Ŝlosi la elektitan objekton samloke (ne movebla)." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Unlock the selected object (can be moved)." -msgstr "" +msgstr "Malŝlosi la elektitan objekton (movebla)." #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -6862,20 +6962,20 @@ msgstr "Serĉo" #: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp msgid "Step Into" -msgstr "" +msgstr "Paŝi en" #: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp msgid "Step Over" -msgstr "" +msgstr "Paŝi poste" #: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp msgid "Break" -msgstr "" +msgstr "Paŭzi rulon" #: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp #: editor/script_editor_debugger.cpp msgid "Continue" -msgstr "" +msgstr "Daŭrigi" #: editor/plugins/script_editor_plugin.cpp msgid "Keep Debugger Open" @@ -6887,7 +6987,7 @@ msgstr "" #: editor/plugins/script_editor_plugin.cpp msgid "Open Godot online documentation." -msgstr "" +msgstr "Malfermi enretan dokumentaron de Godot." #: editor/plugins/script_editor_plugin.cpp #, fuzzy @@ -6922,19 +7022,19 @@ msgstr "Rezultoj de serĉo" #: editor/plugins/script_editor_plugin.cpp msgid "Clear Recent Scripts" -msgstr "" +msgstr "Vakigi lastajn skriptojn" #: editor/plugins/script_text_editor.cpp msgid "Connections to method:" -msgstr "" +msgstr "Konektoj al metodo:" #: editor/plugins/script_text_editor.cpp editor/script_editor_debugger.cpp msgid "Source" -msgstr "" +msgstr "Fonto" #: editor/plugins/script_text_editor.cpp msgid "Target" -msgstr "" +msgstr "Celo" #: editor/plugins/script_text_editor.cpp msgid "" @@ -6947,15 +7047,15 @@ msgstr "" #: editor/plugins/script_text_editor.cpp msgid "Line" -msgstr "" +msgstr "Linio" #: editor/plugins/script_text_editor.cpp msgid "Go to Function" -msgstr "" +msgstr "Iri al funkcio" #: editor/plugins/script_text_editor.cpp msgid "Only resources from filesystem can be dropped." -msgstr "Nur risurcoj el dosiersistemo povas esti forigita." +msgstr "Nur risurcojn el la dosiersistemo eblas forigi." #: editor/plugins/script_text_editor.cpp #: modules/visual_script/visual_script_editor.cpp @@ -6964,83 +7064,83 @@ msgstr "" #: editor/plugins/script_text_editor.cpp msgid "Lookup Symbol" -msgstr "" +msgstr "Ricevi simbolon" #: editor/plugins/script_text_editor.cpp msgid "Pick Color" -msgstr "" +msgstr "Elekti koloron" #: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp msgid "Convert Case" -msgstr "" +msgstr "Konverti usklon" #: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp msgid "Uppercase" -msgstr "" +msgstr "Majuskla" #: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp msgid "Lowercase" -msgstr "" +msgstr "Minuskla" #: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp msgid "Capitalize" -msgstr "" +msgstr "Kapitaligi" #: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp msgid "Syntax Highlighter" -msgstr "" +msgstr "Sintaksa markilo" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp msgid "Bookmarks" -msgstr "" +msgstr "Paĝosignoj" #: editor/plugins/script_text_editor.cpp msgid "Breakpoints" -msgstr "" +msgstr "Paŭzpunktoj" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp msgid "Go To" -msgstr "" +msgstr "Iri al" #: 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 "Eltondi" #: editor/plugins/script_text_editor.cpp scene/gui/line_edit.cpp #: scene/gui/text_edit.cpp msgid "Select All" -msgstr "Elektaro ĉiuj" +msgstr "Elekti tutan" #: editor/plugins/script_text_editor.cpp msgid "Delete Line" -msgstr "" +msgstr "Forigi linion" #: editor/plugins/script_text_editor.cpp msgid "Indent Left" -msgstr "" +msgstr "Krommarĝeni maldekstren" #: editor/plugins/script_text_editor.cpp msgid "Indent Right" -msgstr "" +msgstr "Krommarĝeni dekstren" #: editor/plugins/script_text_editor.cpp msgid "Toggle Comment" -msgstr "" +msgstr "Baskuli komenton" #: editor/plugins/script_text_editor.cpp msgid "Fold/Unfold Line" -msgstr "" +msgstr "Faldi/Malfaldi linion" #: editor/plugins/script_text_editor.cpp msgid "Fold All Lines" -msgstr "" +msgstr "Faldi ĉiujn liniojn" #: editor/plugins/script_text_editor.cpp msgid "Unfold All Lines" -msgstr "" +msgstr "Malfaldi ĉiujn liniojn" #: editor/plugins/script_text_editor.cpp msgid "Clone Down" @@ -7433,6 +7533,12 @@ msgid "" "Closed eye: Gizmo is hidden.\n" "Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")." msgstr "" +"Alklaku por baskuli inter videblaj statoj.\n" +"\n" +"Malferma okulo: Gizmo estas videbla.\n" +"Ferma okulo: Gizmo estas kaŝita.\n" +"Duonferma okulo: Gizmo estas ankaŭ videbla tra maldiafanaj surfacoj (\"iks-" +"rada\")." #: editor/plugins/spatial_editor_plugin.cpp msgid "Snap Nodes To Floor" @@ -7451,11 +7557,11 @@ msgstr "" #: editor/plugins/spatial_editor_plugin.cpp msgid "Use Local Space" -msgstr "" +msgstr "Uzi lokan spacon" #: editor/plugins/spatial_editor_plugin.cpp msgid "Use Snap" -msgstr "" +msgstr "Uzi kapton krade" #: editor/plugins/spatial_editor_plugin.cpp msgid "Bottom View" @@ -9517,16 +9623,17 @@ msgstr "" #: editor/project_manager.cpp msgid "The path specified doesn't exist." -msgstr "" +msgstr "La provizinta dosierindiko ne ekzistas." #: editor/project_manager.cpp msgid "Error opening package file (it's not in ZIP format)." -msgstr "" +msgstr "Eraro dum malfermi pakaĵan dosieron (ne estas en ZIP-formo)." #: editor/project_manager.cpp msgid "" "Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file." msgstr "" +"Nevalida projekta \".zip\" dosiero; ĝi ne enhavas dosieron \"project.godot\"." #: editor/project_manager.cpp msgid "Please choose an empty folder." @@ -9534,11 +9641,11 @@ msgstr "Bonvolu, elektu malplenan dosierujon." #: editor/project_manager.cpp msgid "Please choose a \"project.godot\" or \".zip\" file." -msgstr "" +msgstr "Bonvolu elekti \"project.godot\" aŭ \".zip\" dosieron." #: editor/project_manager.cpp msgid "This directory already contains a Godot project." -msgstr "" +msgstr "Tiu ĉi dosierujo jam enhavas Godot-an projekton." #: editor/project_manager.cpp msgid "New Game Project" @@ -9546,41 +9653,43 @@ msgstr "Nova luda projekto" #: editor/project_manager.cpp msgid "Imported Project" -msgstr "" +msgstr "Enportita projekto" #: editor/project_manager.cpp msgid "Invalid Project Name." -msgstr "" +msgstr "Nevalida nomo de projekto." #: editor/project_manager.cpp msgid "Couldn't create folder." -msgstr "Ne povis krei dosierujon." +msgstr "Ne eblas krei dosierujon." #: editor/project_manager.cpp msgid "There is already a folder in this path with the specified name." -msgstr "" +msgstr "Estas jam dosierujo en ĉi tiu dosierindiko kun la provizinta nomo." #: editor/project_manager.cpp msgid "It would be a good idea to name your project." -msgstr "" +msgstr "Nomi vian projekton estus konsilinde." #: editor/project_manager.cpp msgid "Invalid project path (changed anything?)." -msgstr "" +msgstr "Nevalida dosierindiko de projekto (ŝanĝis ion ajn?)." #: editor/project_manager.cpp msgid "" "Couldn't load project.godot in project path (error %d). It may be missing or " "corrupted." msgstr "" +"Ne eblas ŝargi project.godot en projekta dosierindiko (eraro %d). Ĝi eble " +"estas manka aŭ difektita." #: editor/project_manager.cpp msgid "Couldn't edit project.godot in project path." -msgstr "" +msgstr "Ne eblas redakti project.godot en projekta dosierindiko." #: editor/project_manager.cpp msgid "Couldn't create project.godot in project path." -msgstr "" +msgstr "Ne eblas krei project.godot en projekta dosierindiko." #: editor/project_manager.cpp msgid "Rename Project" @@ -9588,11 +9697,11 @@ msgstr "Renomi projekton" #: editor/project_manager.cpp msgid "Import Existing Project" -msgstr "" +msgstr "Enporti ekzistantan projekton" #: editor/project_manager.cpp msgid "Import & Edit" -msgstr "" +msgstr "Enporti kaj redakti" #: editor/project_manager.cpp msgid "Create New Project" @@ -9619,9 +9728,8 @@ msgid "Project Path:" msgstr "Projekta vojo:" #: editor/project_manager.cpp -#, fuzzy msgid "Project Installation Path:" -msgstr "Projekta instala vojo:" +msgstr "Dosierindiko de projekta instalo:" #: editor/project_manager.cpp msgid "Renderer:" @@ -9629,68 +9737,64 @@ msgstr "Bildigilo:" #: editor/project_manager.cpp msgid "OpenGL ES 3.0" -msgstr "" +msgstr "OpenGL ES 3.0" #: editor/project_manager.cpp msgid "Not supported by your GPU drivers." -msgstr "" +msgstr "Ne subtenata de la peliloj de via grafika procesoro." #: editor/project_manager.cpp -#, fuzzy msgid "" "Higher visual quality\n" "All features available\n" "Incompatible with older hardware\n" "Not recommended for web games" msgstr "" -"Pli alta vida kvalito\n" -"Ĉiuj ebloj disponeblaj\n" +"Pli bona vida kvalito\n" +"Ĉiuj eblecoj disponeblas\n" "Nekongruas kun pli malnova aparataro\n" -"Nerekomendita por teksaĵaj ludoj" +"Ne rekomendas por retaj ludoj" #: editor/project_manager.cpp msgid "OpenGL ES 2.0" -msgstr "" +msgstr "OpenGL ES 2.0" #: editor/project_manager.cpp -#, fuzzy msgid "" "Lower visual quality\n" "Some features not available\n" "Works on most hardware\n" "Recommended for web games" msgstr "" -"Pli malalta vida kvalito\n" -"Iom ebloj ne disponeblaj\n" -"Laboras en plej multaj aparataroj\n" -"Rekomendita por teksaĵaj ludoj" +"Malpli bona vida kvalito\n" +"Iuj eblecoj ne disponeblas\n" +"Kongruas kun plej de aparataro\n" +"Rekomendas por retaj ludoj" #: editor/project_manager.cpp +#, fuzzy msgid "Renderer can be changed later, but scenes may need to be adjusted." -msgstr "" +msgstr "Bildigilo ŝanĝeblas poste, sed scenoj eble bezonos ĝustigon." #: editor/project_manager.cpp msgid "Unnamed Project" -msgstr "" +msgstr "Sennoma projekto" #: editor/project_manager.cpp -#, fuzzy msgid "Missing Project" -msgstr "Malkanta projekto" +msgstr "Manka projekto" #: editor/project_manager.cpp -#, fuzzy msgid "Error: Project is missing on the filesystem." msgstr "Eraro: projekto estas manka en la dosiersistemo." #: editor/project_manager.cpp msgid "Can't open project at '%s'." -msgstr "Ne povas malfermi projekto ĉe '%s'." +msgstr "Ne eblas malfermi projekton ĉe '%s'." #: editor/project_manager.cpp -#, fuzzy msgid "Are you sure to open more than one project?" -msgstr "Ĉu vi certa en malfermaĵo pli ol unun projekton?" +msgstr "Ĉu vi certe volas malfermi plurajn projektojn?" #: editor/project_manager.cpp msgid "" @@ -9704,6 +9808,15 @@ msgid "" "Warning: You won't be able to open the project with previous versions of the " "engine anymore." msgstr "" +"La jena projekto-agordara dosiero ne specifas la versio de Godot per kiu " +"krei ĝin.\n" +"\n" +"%s\n" +"\n" +"Se vi pluigus malfermi ĝin, ĝi konvertiĝos al aktuala agordo-dosierformo de " +"Godot.\n" +"Averto: Vi ne eblos malfermi la projekton per antaŭaj versioj de la " +"videoludilo plue." #: editor/project_manager.cpp msgid "" @@ -9716,12 +9829,22 @@ msgid "" "Warning: You won't be able to open the project with previous versions of the " "engine anymore." msgstr "" +"La jena projekto-agordara dosiero generiĝis per pli malnova versio de la " +"videoludilo, kaj bezonas konverti al ĉi tiu versio:\n" +"\n" +"%s\n" +"\n" +"Ĉu vi volas konverti ĝin?\n" +"Averto: Vi ne eblos malfermi la projekton per antaŭaj versioj de la " +"videoludilo plue." #: editor/project_manager.cpp msgid "" "The project settings were created by a newer engine version, whose settings " "are not compatible with this version." msgstr "" +"La projektaj agordoj kreiĝis per pli nova versio de la videoludilo, en kio " +"la agordoj ne estas kongruantaj kun ĉi tiu versio." #: editor/project_manager.cpp msgid "" @@ -9773,7 +9896,7 @@ msgstr "" #. TRANSLATORS: This refers to the application where users manage their Godot projects. #: editor/project_manager.cpp msgid "Project Manager" -msgstr "" +msgstr "Mastrumilo de Projektoj" #: editor/project_manager.cpp msgid "Projects" @@ -9781,12 +9904,11 @@ msgstr "Projektoj" #: editor/project_manager.cpp msgid "Loading, please wait..." -msgstr "" +msgstr "Ŝargas, bonvolu atendi..." #: editor/project_manager.cpp -#, fuzzy msgid "Last Modified" -msgstr "Modifita" +msgstr "Lastaj modifitaj" #: editor/project_manager.cpp msgid "Scan" @@ -9802,7 +9924,7 @@ msgstr "Nova projekto" #: editor/project_manager.cpp msgid "Remove Missing" -msgstr "" +msgstr "Forigi mankan" #: editor/project_manager.cpp msgid "Templates" @@ -9810,17 +9932,20 @@ msgstr "Ŝablonoj" #: editor/project_manager.cpp msgid "Restart Now" -msgstr "" +msgstr "Rekomenci nun" #: editor/project_manager.cpp msgid "Can't run project" -msgstr "" +msgstr "Ne eblas ruli projekton" #: editor/project_manager.cpp msgid "" "You currently don't have any projects.\n" "Would you like to explore official example projects in the Asset Library?" msgstr "" +"Vi aktuale ne havas iujn projektojn.\n" +"Ĉu vi volas esplori la oficajn ekzemplajn projektojn en la biblioteko de " +"havaĵoj?" #: editor/project_manager.cpp msgid "" @@ -9831,145 +9956,147 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "Key " -msgstr "" +msgstr "Klavo " #: editor/project_settings_editor.cpp msgid "Joy Button" -msgstr "" +msgstr "Butono de stirstango" #: editor/project_settings_editor.cpp msgid "Joy Axis" -msgstr "" +msgstr "Akso de stirstango" #: editor/project_settings_editor.cpp msgid "Mouse Button" -msgstr "" +msgstr "Musbutono" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" +"Nevalida nomo de faro. Ĝi eblas nek esti malplena nek enhavi '/', ':', '=', " +"'\\' aŭ '\"'" #: editor/project_settings_editor.cpp msgid "An action with the name '%s' already exists." -msgstr "" +msgstr "Faro kun la nomo '%s' jam ekzistas." #: editor/project_settings_editor.cpp msgid "Rename Input Action Event" -msgstr "" +msgstr "Renomi eventon de eniga faro" #: editor/project_settings_editor.cpp msgid "Change Action deadzone" -msgstr "" +msgstr "Ŝanĝi mortzonon de faro" #: editor/project_settings_editor.cpp msgid "Add Input Action Event" -msgstr "" +msgstr "Aldoni eventon de eniga faro" #: editor/project_settings_editor.cpp msgid "All Devices" -msgstr "" +msgstr "Ĉiuj aparatoj" #: editor/project_settings_editor.cpp msgid "Device" -msgstr "" +msgstr "Aparato" #: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Press a Key..." -msgstr "" +msgstr "Premi klavon..." #: editor/project_settings_editor.cpp msgid "Mouse Button Index:" -msgstr "" +msgstr "Indekso de musbutono:" #: editor/project_settings_editor.cpp msgid "Left Button" -msgstr "" +msgstr "Maldekstra butono" #: editor/project_settings_editor.cpp msgid "Right Button" -msgstr "" +msgstr "Dekstra butono" #: editor/project_settings_editor.cpp msgid "Middle Button" -msgstr "" +msgstr "Meza butono" #: editor/project_settings_editor.cpp msgid "Wheel Up Button" -msgstr "" +msgstr "Radeto supren" #: editor/project_settings_editor.cpp msgid "Wheel Down Button" -msgstr "" +msgstr "Radeto malsupren" #: editor/project_settings_editor.cpp msgid "Wheel Left Button" -msgstr "" +msgstr "Radeto maldekstren" #: editor/project_settings_editor.cpp msgid "Wheel Right Button" -msgstr "" +msgstr "Radeto dekstren" #: editor/project_settings_editor.cpp msgid "X Button 1" -msgstr "" +msgstr "X-butono 1" #: editor/project_settings_editor.cpp msgid "X Button 2" -msgstr "" +msgstr "X-butono 2" #: editor/project_settings_editor.cpp msgid "Joypad Axis Index:" -msgstr "" +msgstr "Indekso de la stirstanga akso:" #: editor/project_settings_editor.cpp msgid "Axis" -msgstr "" +msgstr "Akso" #: editor/project_settings_editor.cpp msgid "Joypad Button Index:" -msgstr "" +msgstr "Indekso de la stirstanga butono:" #: editor/project_settings_editor.cpp msgid "Erase Input Action" -msgstr "" +msgstr "Forigi enigan faron" #: editor/project_settings_editor.cpp msgid "Erase Input Action Event" -msgstr "" +msgstr "Forigi eventon de eniga faro" #: editor/project_settings_editor.cpp msgid "Add Event" -msgstr "" +msgstr "Aldoni eventon" #: editor/project_settings_editor.cpp msgid "Button" -msgstr "" +msgstr "Butono" #: editor/project_settings_editor.cpp msgid "Left Button." -msgstr "" +msgstr "Maldesktra butono." #: editor/project_settings_editor.cpp msgid "Right Button." -msgstr "" +msgstr "Dekstra butono." #: editor/project_settings_editor.cpp msgid "Middle Button." -msgstr "" +msgstr "Meza butono." #: editor/project_settings_editor.cpp msgid "Wheel Up." -msgstr "" +msgstr "Radeto supren." #: editor/project_settings_editor.cpp msgid "Wheel Down." -msgstr "" +msgstr "Radeto malsupren." #: editor/project_settings_editor.cpp msgid "Add Global Property" -msgstr "" +msgstr "Aldoni mallokan atributon" #: editor/project_settings_editor.cpp msgid "Select a setting item first!" @@ -9985,7 +10112,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "Delete Item" -msgstr "" +msgstr "Forigi elementon" #: editor/project_settings_editor.cpp msgid "" @@ -9995,19 +10122,19 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "Add Input Action" -msgstr "" +msgstr "Aldoni enigan faron" #: editor/project_settings_editor.cpp msgid "Error saving settings." -msgstr "" +msgstr "Eraro dum konservi agordojn." #: editor/project_settings_editor.cpp msgid "Settings saved OK." -msgstr "" +msgstr "Agordoj konserviĝis bone." #: editor/project_settings_editor.cpp msgid "Moved Input Action Event" -msgstr "" +msgstr "Movis eventon de eniga faro" #: editor/project_settings_editor.cpp msgid "Override for Feature" @@ -10015,15 +10142,15 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "Add Translation" -msgstr "" +msgstr "Aldoni tradukon" #: editor/project_settings_editor.cpp msgid "Remove Translation" -msgstr "" +msgstr "Forigi tradukon" #: editor/project_settings_editor.cpp msgid "Add Remapped Path" -msgstr "" +msgstr "Aldoni dosierindikon de remapo" #: editor/project_settings_editor.cpp msgid "Resource Remap Add Remap" @@ -10051,108 +10178,107 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "Project Settings (project.godot)" -msgstr "" +msgstr "Projektaj agordoj (project.godot)" #: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "General" -msgstr "" +msgstr "Ĝenerala" #: editor/project_settings_editor.cpp msgid "Override For..." -msgstr "" +msgstr "Redifino por..." #: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "The editor must be restarted for changes to take effect." -msgstr "" +msgstr "La redaktilon devas rekomencigi por ŝanĝoj efektiviĝus." #: editor/project_settings_editor.cpp msgid "Input Map" -msgstr "" +msgstr "Eniga mapo" #: editor/project_settings_editor.cpp msgid "Action:" -msgstr "" +msgstr "Faro:" #: editor/project_settings_editor.cpp msgid "Action" -msgstr "" +msgstr "Faro" #: editor/project_settings_editor.cpp msgid "Deadzone" -msgstr "" +msgstr "Mortzono" #: editor/project_settings_editor.cpp msgid "Device:" -msgstr "" +msgstr "Aparato:" #: editor/project_settings_editor.cpp msgid "Index:" -msgstr "" +msgstr "Indekso:" #: editor/project_settings_editor.cpp msgid "Localization" -msgstr "" +msgstr "Lokaĵigado" #: editor/project_settings_editor.cpp msgid "Translations" -msgstr "" +msgstr "Tradukoj" #: editor/project_settings_editor.cpp msgid "Translations:" -msgstr "" +msgstr "Tradukoj:" #: editor/project_settings_editor.cpp msgid "Remaps" -msgstr "" +msgstr "Remapoj" #: editor/project_settings_editor.cpp msgid "Resources:" -msgstr "" +msgstr "Risurcoj:" #: editor/project_settings_editor.cpp msgid "Remaps by Locale:" -msgstr "" +msgstr "Remapoj per lokaĵaro:" #: editor/project_settings_editor.cpp msgid "Locale" -msgstr "" +msgstr "Lokaĵaro" #: editor/project_settings_editor.cpp msgid "Locales Filter" -msgstr "" +msgstr "Filtro de lokaĵaroj" #: editor/project_settings_editor.cpp msgid "Show All Locales" -msgstr "" +msgstr "Vidigi ĉiajn lokaĵarojn" #: editor/project_settings_editor.cpp msgid "Show Selected Locales Only" -msgstr "" +msgstr "Vidigi nur elektitajn lokaĵarojn" #: editor/project_settings_editor.cpp msgid "Filter mode:" -msgstr "" +msgstr "Reĝimo de filtro:" #: editor/project_settings_editor.cpp msgid "Locales:" -msgstr "" +msgstr "Lokaĵaroj:" #: editor/project_settings_editor.cpp msgid "AutoLoad" -msgstr "" +msgstr "Aŭtoŝargado" #: editor/project_settings_editor.cpp msgid "Plugins" -msgstr "" +msgstr "Kromprogramoj" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Import Defaults" -msgstr "Enporti dokon" +msgstr "Enporti defaŭltojn" #: editor/property_editor.cpp msgid "Preset..." -msgstr "" +msgstr "Antaŭagordo..." #: editor/property_editor.cpp msgid "Zero" @@ -10168,19 +10294,19 @@ msgstr "" #: editor/property_editor.cpp msgid "File..." -msgstr "" +msgstr "Dosiero..." #: editor/property_editor.cpp msgid "Dir..." -msgstr "" +msgstr "Dosierujo..." #: editor/property_editor.cpp msgid "Assign" -msgstr "" +msgstr "Valorizi" #: editor/property_editor.cpp msgid "Select Node" -msgstr "" +msgstr "Elekti nodon" #: editor/property_editor.cpp msgid "Error loading file: Not a resource!" @@ -10188,55 +10314,55 @@ msgstr "" #: editor/property_editor.cpp msgid "Pick a Node" -msgstr "" +msgstr "Elekti nodon" #: editor/property_editor.cpp msgid "Bit %d, val %d." -msgstr "" +msgstr "Bito %d, valoro %d." #: editor/property_selector.cpp msgid "Select Property" -msgstr "" +msgstr "Elekti atributon" #: editor/property_selector.cpp msgid "Select Virtual Method" -msgstr "" +msgstr "Elekti virtualan metodon" #: editor/property_selector.cpp msgid "Select Method" -msgstr "" +msgstr "Elekti metodon" #: editor/rename_dialog.cpp editor/scene_tree_dock.cpp msgid "Batch Rename" -msgstr "" +msgstr "Renomi staple" #: editor/rename_dialog.cpp msgid "Replace:" -msgstr "Anstataŭigi:" +msgstr "Anstataŭigo:" #: editor/rename_dialog.cpp msgid "Prefix:" -msgstr "" +msgstr "Prefikso:" #: editor/rename_dialog.cpp msgid "Suffix:" -msgstr "" +msgstr "Sufikso:" #: editor/rename_dialog.cpp msgid "Use Regular Expressions" -msgstr "" +msgstr "Uzi regulesprimojn" #: editor/rename_dialog.cpp msgid "Advanced Options" -msgstr "" +msgstr "Specialaj opcioj" #: editor/rename_dialog.cpp msgid "Substitute" -msgstr "" +msgstr "Anstatŭigi" #: editor/rename_dialog.cpp msgid "Node name" -msgstr "" +msgstr "Nomo de nodo" #: editor/rename_dialog.cpp msgid "Node's parent name, if available" @@ -10348,27 +10474,27 @@ msgstr "" #: editor/run_settings_dialog.cpp msgid "Run Mode:" -msgstr "" +msgstr "Reĝimo de rulo:" #: editor/run_settings_dialog.cpp msgid "Current Scene" -msgstr "" +msgstr "Aktuala sceno" #: editor/run_settings_dialog.cpp msgid "Main Scene" -msgstr "" +msgstr "Ĉefa sceno" #: editor/run_settings_dialog.cpp msgid "Main Scene Arguments:" -msgstr "" +msgstr "Parametroj de ĉefa sceno:" #: editor/run_settings_dialog.cpp msgid "Scene Run Settings" -msgstr "" +msgstr "Agordoj de rulo de la sceno" #: editor/scene_tree_dock.cpp msgid "No parent to instance the scenes at." -msgstr "" +msgstr "Ne patro por ekzempli la scenojn al." #: editor/scene_tree_dock.cpp msgid "Error loading scene from %s" @@ -10570,7 +10696,7 @@ msgstr "Ŝargi kiel lokokupilo" #: editor/scene_tree_dock.cpp msgid "Open Documentation" -msgstr "Malfermi dokumentaro" +msgstr "Malfermi dokumentaron" #: editor/scene_tree_dock.cpp msgid "" diff --git a/editor/translations/es.po b/editor/translations/es.po index 643fb16a57..fcb8ffc033 100644 --- a/editor/translations/es.po +++ b/editor/translations/es.po @@ -61,12 +61,14 @@ # SteamGoblin <SteamGoblin860@gmail.com>, 2021. # Francisco C <pruebasfrancisco17@gmail.com>, 2021. # Cam <cameron.toms@gmail.com>, 2021. +# Juan camilo <jugarciago01@gmail.com>, 2021. +# Manuel González <mgoopazo@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-04-27 22:12+0000\n" -"Last-Translator: Cam <cameron.toms@gmail.com>\n" +"PO-Revision-Date: 2021-05-29 13:49+0000\n" +"Last-Translator: Manuel González <mgoopazo@gmail.com>\n" "Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/" "godot/es/>\n" "Language: es\n" @@ -2611,14 +2613,14 @@ msgid "Unable to load addon script from path: '%s'." msgstr "No se pudo cargar el script addon desde la ruta: '%s'." #: editor/editor_node.cpp -#, fuzzy msgid "" "Unable to load addon script from path: '%s'. This might be due to a code " "error in that script.\n" "Disabling the addon at '%s' to prevent further errors." msgstr "" "No se puede cargar el script de addon desde la ruta: '%s' Parece que hay un " -"error en el código, por favor compruebe la sintaxis." +"error en el código, por favor compruebe la sintaxis.\n" +"Desactivar el addon en '%s' para prevenir mas errores." #: editor/editor_node.cpp msgid "" @@ -3069,7 +3071,7 @@ msgstr "Acerca de" #: editor/editor_node.cpp msgid "Support Godot Development" -msgstr "" +msgstr "Apoyar el desarrollo de Godot" #: editor/editor_node.cpp msgid "Play the project." @@ -10244,7 +10246,7 @@ msgstr "Botón del Mouse" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "Nombre de acción inválido. No puede estar vacío o contener '/', ':', '=', " diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po index 5441d3def1..c4f8c6c4e4 100644 --- a/editor/translations/es_AR.po +++ b/editor/translations/es_AR.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-04-22 14:39+0000\n" -"Last-Translator: Javier Ocampos <xavier.ocampos@gmail.com>\n" +"PO-Revision-Date: 2021-05-29 13:49+0000\n" +"Last-Translator: Lisandro Lorea <lisandrolorea@gmail.com>\n" "Language-Team: Spanish (Argentina) <https://hosted.weblate.org/projects/" "godot-engine/godot/es_AR/>\n" "Language: es_AR\n" @@ -2564,14 +2564,14 @@ msgid "Unable to load addon script from path: '%s'." msgstr "No se pudo cargar el script de addon desde la ruta: '%s'." #: editor/editor_node.cpp -#, fuzzy msgid "" "Unable to load addon script from path: '%s'. This might be due to a code " "error in that script.\n" "Disabling the addon at '%s' to prevent further errors." msgstr "" -"No se pudo cargar el script de addon desde la ruta: '%s' Parece haber un " -"error en el código. Por favor, revisá la sintaxis." +"No se pudo cargar el script de addon desde la ruta: '%s'. Puede ser por un " +"error de código en dicho script.\n" +"Desactivando el addon en '%s' para prevenir nuevos errores." #: editor/editor_node.cpp msgid "" @@ -3020,7 +3020,7 @@ msgstr "Acerca de" #: editor/editor_node.cpp msgid "Support Godot Development" -msgstr "" +msgstr "Apoyar el desarrollo de Godot" #: editor/editor_node.cpp msgid "Play the project." @@ -5266,11 +5266,10 @@ msgstr "" "contenidos dentro de la región cuadrada [0,0,1,0]." #: editor/plugins/baked_lightmap_editor_plugin.cpp -#, fuzzy msgid "" "Godot editor was built without ray tracing support, lightmaps can't be baked." msgstr "" -"El editor de Godot se compiló sin soporte de ray tracing, los lightmaps no " +"El editor de Godot se compiló sin soporte para ray tracing, los lightmaps no " "pueden ser bakeados." #: editor/plugins/baked_lightmap_editor_plugin.cpp @@ -10186,7 +10185,7 @@ msgstr "Botón de Mouse" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "Nombre de acción inválido. No puede estar vacío o contener '/', ':', '=', " diff --git a/editor/translations/et.po b/editor/translations/et.po index e4b33e89a0..d75337154a 100644 --- a/editor/translations/et.po +++ b/editor/translations/et.po @@ -9746,7 +9746,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/eu.po b/editor/translations/eu.po index 26f1c1a3bd..b74c0906fc 100644 --- a/editor/translations/eu.po +++ b/editor/translations/eu.po @@ -9711,7 +9711,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/fa.po b/editor/translations/fa.po index 54cf408469..388bf1ca48 100644 --- a/editor/translations/fa.po +++ b/editor/translations/fa.po @@ -10177,7 +10177,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/fi.po b/editor/translations/fi.po index 912e0f14f4..9a1d7d7df1 100644 --- a/editor/translations/fi.po +++ b/editor/translations/fi.po @@ -16,7 +16,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-05-18 10:00+0000\n" +"PO-Revision-Date: 2021-05-19 20:16+0000\n" "Last-Translator: Tapani Niemi <tapani.niemi@kapsi.fi>\n" "Language-Team: Finnish <https://hosted.weblate.org/projects/godot-engine/" "godot/fi/>\n" @@ -2986,7 +2986,7 @@ msgstr "Tietoja" #: editor/editor_node.cpp msgid "Support Godot Development" -msgstr "" +msgstr "Tue Godotin kehitystä" #: editor/editor_node.cpp msgid "Play the project." @@ -5222,7 +5222,6 @@ msgstr "" "välisen neliön alueella." #: editor/plugins/baked_lightmap_editor_plugin.cpp -#, fuzzy msgid "" "Godot editor was built without ray tracing support, lightmaps can't be baked." msgstr "" @@ -10129,7 +10128,7 @@ msgstr "Hiiren painike" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "Virheellinen toiminnon nimi. Se ei voi olla tyhjä eikä voi sisältää merkkejä " diff --git a/editor/translations/fil.po b/editor/translations/fil.po index 525dc19561..e0bc6cd724 100644 --- a/editor/translations/fil.po +++ b/editor/translations/fil.po @@ -9704,7 +9704,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/fr.po b/editor/translations/fr.po index 95af6d8a20..5b310fc215 100644 --- a/editor/translations/fr.po +++ b/editor/translations/fr.po @@ -10285,7 +10285,7 @@ msgstr "Bouton de souris" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "Nom d'action invalide. Il ne peut être vide ni contenir « / », « : », « = », " diff --git a/editor/translations/ga.po b/editor/translations/ga.po index cbecefd928..4da29e17ba 100644 --- a/editor/translations/ga.po +++ b/editor/translations/ga.po @@ -9699,7 +9699,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/gl.po b/editor/translations/gl.po index 0e30715772..f4394da9da 100644 --- a/editor/translations/gl.po +++ b/editor/translations/gl.po @@ -9990,7 +9990,7 @@ msgstr "Botón do Rato" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "Nome de acción inválido. O nome non pode estar baleiro, nin conter '/', ':', " diff --git a/editor/translations/he.po b/editor/translations/he.po index bb16512835..08780f2e03 100644 --- a/editor/translations/he.po +++ b/editor/translations/he.po @@ -10167,7 +10167,7 @@ msgstr "כפתור עכבר" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/hi.po b/editor/translations/hi.po index cf1ab6d57a..30381cf861 100644 --- a/editor/translations/hi.po +++ b/editor/translations/hi.po @@ -9934,7 +9934,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/hr.po b/editor/translations/hr.po index a78a4f01c3..826d73fda0 100644 --- a/editor/translations/hr.po +++ b/editor/translations/hr.po @@ -9720,7 +9720,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/hu.po b/editor/translations/hu.po index 76aaf2da96..698e87b776 100644 --- a/editor/translations/hu.po +++ b/editor/translations/hu.po @@ -9903,7 +9903,7 @@ msgstr "Egérgomb" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/id.po b/editor/translations/id.po index 13ce1dba23..8d20cb79fb 100644 --- a/editor/translations/id.po +++ b/editor/translations/id.po @@ -10154,7 +10154,7 @@ msgstr "Tombol Mouse" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "Nama aksi tidak valid. Tidak boleh kosong atau mengandung '/', ':', '=', " diff --git a/editor/translations/is.po b/editor/translations/is.po index 693a6f9397..8f3e11c207 100644 --- a/editor/translations/is.po +++ b/editor/translations/is.po @@ -9811,7 +9811,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/it.po b/editor/translations/it.po index e087489c94..d8a4db264f 100644 --- a/editor/translations/it.po +++ b/editor/translations/it.po @@ -63,7 +63,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-05-14 11:20+0000\n" +"PO-Revision-Date: 2021-06-02 09:04+0000\n" "Last-Translator: Riteo Siuga <lorenzocerqua@tutanota.com>\n" "Language-Team: Italian <https://hosted.weblate.org/projects/godot-engine/" "godot/it/>\n" @@ -1315,15 +1315,15 @@ msgstr "Altoparlanti" #: editor/editor_audio_buses.cpp msgid "Add Effect" -msgstr "Aggiungi effetto" +msgstr "Aggiungi un effetto" #: editor/editor_audio_buses.cpp msgid "Rename Audio Bus" -msgstr "Rinomina bus audio" +msgstr "Rinomina un bus audio" #: editor/editor_audio_buses.cpp msgid "Change Audio Bus Volume" -msgstr "Cambia il volume del bus audio" +msgstr "Cambia il volume di un bus audio" #: editor/editor_audio_buses.cpp msgid "Toggle Audio Bus Solo" @@ -1334,6 +1334,7 @@ msgid "Toggle Audio Bus Mute" msgstr "Commuta l'ammutolimento di un bus audio" #: editor/editor_audio_buses.cpp +#, fuzzy msgid "Toggle Audio Bus Bypass Effects" msgstr "Commuta bypass effetti del bus audio" @@ -1366,6 +1367,7 @@ msgid "Mute" msgstr "Muto" #: editor/editor_audio_buses.cpp +#, fuzzy msgid "Bypass" msgstr "Bypassa" @@ -1501,26 +1503,32 @@ msgid "Must not collide with an existing global constant name." msgstr "Non deve collidere con il nome di una costante globale esistente." #: editor/editor_autoload_settings.cpp +#, fuzzy msgid "Keyword cannot be used as an autoload name." msgstr "Una parola chiave non può essere utilizzata come nome di un Autoload." #: editor/editor_autoload_settings.cpp +#, fuzzy msgid "Autoload '%s' already exists!" msgstr "L'Autoload \"%s\" esiste già!" #: editor/editor_autoload_settings.cpp +#, fuzzy msgid "Rename Autoload" msgstr "Rinomina un Autoload" #: editor/editor_autoload_settings.cpp +#, fuzzy msgid "Toggle AutoLoad Globals" msgstr "Commuta AutoLoad globals" #: editor/editor_autoload_settings.cpp +#, fuzzy msgid "Move Autoload" msgstr "Sposta un Autoload" #: editor/editor_autoload_settings.cpp +#, fuzzy msgid "Remove Autoload" msgstr "Rimuovi un Autoload" @@ -1712,25 +1720,29 @@ msgstr "Editor 3D" #: editor/editor_feature_profile.cpp msgid "Script Editor" -msgstr "Editor script" +msgstr "Editor degli script" #: editor/editor_feature_profile.cpp +#, fuzzy msgid "Asset Library" msgstr "Libreria degli asset" #: editor/editor_feature_profile.cpp msgid "Scene Tree Editing" -msgstr "Editor delle scene" +msgstr "Modifica delle scene" #: editor/editor_feature_profile.cpp +#, fuzzy msgid "Node Dock" msgstr "Riquadro dei nodi" #: editor/editor_feature_profile.cpp +#, fuzzy msgid "FileSystem Dock" msgstr "Riquadro del FileSystem" #: editor/editor_feature_profile.cpp +#, fuzzy msgid "Import Dock" msgstr "Riquadro d'importazione" @@ -1739,6 +1751,7 @@ msgid "Erase profile '%s'? (no undo)" msgstr "Eliminare il profilo \"%s\"? (non annullabile)" #: editor/editor_feature_profile.cpp +#, fuzzy msgid "Profile must be a valid filename and must not contain '.'" msgstr "" "Il profilo deve essere un nome di file valido e non può contenere \".\"" @@ -2014,16 +2027,17 @@ msgid "" "There are multiple importers for different types pointing to file %s, import " "aborted" msgstr "" -"Ci sono importatori multipli per tipi differenti che puntano al file %s, " +"Esistono più importatori per tipi diversi che puntano al file %s, " "importazione annullata" #: editor/editor_file_system.cpp +#, fuzzy msgid "(Re)Importing Assets" msgstr "Reimportazione degli asset" #: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp msgid "Top" -msgstr "In alto" +msgstr "In cima" #: editor/editor_help.cpp msgid "Class:" @@ -2043,6 +2057,7 @@ msgid "Description" msgstr "Descrizione" #: editor/editor_help.cpp +#, fuzzy msgid "Online Tutorials" msgstr "Tutorial Online" @@ -2109,7 +2124,7 @@ msgstr "Cerca aiuto" #: editor/editor_help_search.cpp msgid "Case Sensitive" -msgstr "Distinzione maiuscole/minuscole" +msgstr "Distingui tra maiuscole e minuscole" #: editor/editor_help_search.cpp msgid "Show Hierarchy" @@ -2181,7 +2196,7 @@ msgstr "Imposta" #: editor/editor_inspector.cpp msgid "Set Multiple:" -msgstr "Imposta multiplo:" +msgstr "Imposta più valori:" #: editor/editor_log.cpp msgid "Output:" @@ -2202,6 +2217,7 @@ msgid "Clear" msgstr "Rimuovi tutto" #: editor/editor_log.cpp +#, fuzzy msgid "Clear Output" msgstr "Svuota output" @@ -2606,14 +2622,14 @@ msgstr "" "\"." #: editor/editor_node.cpp -#, fuzzy msgid "" "Unable to load addon script from path: '%s'. This might be due to a code " "error in that script.\n" "Disabling the addon at '%s' to prevent further errors." msgstr "" "Impossibile caricare uno script aggiuntivo dal percorso: \"%s\" Sembra " -"esserci un errore nel codice, controlla la sintassi." +"esserci un errore nel codice, controlla la sintassi.\n" +"Disabilitata l'aggiunta di '%s' per prevenire ulteriori errori." #: editor/editor_node.cpp msgid "" @@ -3061,7 +3077,7 @@ msgstr "Informazioni su Godot" #: editor/editor_node.cpp msgid "Support Godot Development" -msgstr "" +msgstr "Supporta lo Sviluppo di Godot" #: editor/editor_node.cpp msgid "Play the project." @@ -3907,7 +3923,7 @@ msgstr "Cartella/File successivo" #: editor/filesystem_dock.cpp msgid "Re-Scan Filesystem" -msgstr "Re-Scan Filesystem" +msgstr "Riscansiona il Filesystem" #: editor/filesystem_dock.cpp msgid "Toggle Split Mode" @@ -7645,9 +7661,12 @@ msgid "View Rotation Locked" msgstr "Rotazione Vista Bloccata" #: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "" "To zoom further, change the camera's clipping planes (View -> Settings...)" msgstr "" +"Per maggiore zoom, cambia i piani del clip della videocamera (Vista -> " +"Impostazioni)" #: editor/plugins/spatial_editor_plugin.cpp msgid "" @@ -10243,7 +10262,7 @@ msgstr "Pulsante Mouse" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "Nome dell'azione non valido. Non può essere vuoto o contenere \"/\", \":\", " diff --git a/editor/translations/ja.po b/editor/translations/ja.po index 3e03c04b72..b47b97b20e 100644 --- a/editor/translations/ja.po +++ b/editor/translations/ja.po @@ -32,12 +32,13 @@ # Wataru Onuki <bettawat@yahoo.co.jp>, 2020, 2021. # sporeball <sporeballdev@gmail.com>, 2020. # BinotaLIU <me@binota.org>, 2020, 2021. +# 都築 本成 <motonari728@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-05-10 15:32+0000\n" -"Last-Translator: nitenook <admin@alterbaum.net>\n" +"PO-Revision-Date: 2021-05-29 13:49+0000\n" +"Last-Translator: 都築 本成 <motonari728@gmail.com>\n" "Language-Team: Japanese <https://hosted.weblate.org/projects/godot-engine/" "godot/ja/>\n" "Language: ja\n" @@ -2562,14 +2563,14 @@ msgid "Unable to load addon script from path: '%s'." msgstr "パス '%s' からアドオンスクリプトを読込めません。" #: editor/editor_node.cpp -#, fuzzy msgid "" "Unable to load addon script from path: '%s'. This might be due to a code " "error in that script.\n" "Disabling the addon at '%s' to prevent further errors." msgstr "" "パス '%s' からアドオンスクリプトを読み込めません。コードにエラーがある可能性" -"があります。構文を確認してください。" +"があります。\n" +"構文を確認してください。" #: editor/editor_node.cpp msgid "" @@ -3014,7 +3015,7 @@ msgstr "概要" #: editor/editor_node.cpp msgid "Support Godot Development" -msgstr "" +msgstr "Godotの開発をサポートする" #: editor/editor_node.cpp msgid "Play the project." @@ -4103,9 +4104,8 @@ msgid "Importer:" msgstr "インポート" #: editor/import_defaults_editor.cpp -#, fuzzy msgid "Reset to Defaults" -msgstr "デフォルトを読込む" +msgstr "デフォルトにリセットする" #: editor/import_dock.cpp msgid "Keep File (No Import)" @@ -10140,7 +10140,7 @@ msgstr "マウスボタン" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "アクション名が無効です。空にしたり、'/'、':'、'='、'\\'、'\"'を含めることはで" diff --git a/editor/translations/ka.po b/editor/translations/ka.po index fd1f34ae59..7c6f378627 100644 --- a/editor/translations/ka.po +++ b/editor/translations/ka.po @@ -10017,7 +10017,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/km.po b/editor/translations/km.po index 3d0c4b2f9d..21149c748f 100644 --- a/editor/translations/km.po +++ b/editor/translations/km.po @@ -9684,7 +9684,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/ko.po b/editor/translations/ko.po index 604479435e..cc41ee5d41 100644 --- a/editor/translations/ko.po +++ b/editor/translations/ko.po @@ -26,7 +26,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-05-18 10:00+0000\n" +"PO-Revision-Date: 2021-05-19 20:16+0000\n" "Last-Translator: Myeongjin Lee <aranet100@gmail.com>\n" "Language-Team: Korean <https://hosted.weblate.org/projects/godot-engine/" "godot/ko/>\n" @@ -2992,7 +2992,7 @@ msgstr "정보" #: editor/editor_node.cpp msgid "Support Godot Development" -msgstr "" +msgstr "Godot 개발 지원" #: editor/editor_node.cpp msgid "Play the project." @@ -5207,7 +5207,6 @@ msgstr "" "어 있는지 확인해주세요." #: editor/plugins/baked_lightmap_editor_plugin.cpp -#, fuzzy msgid "" "Godot editor was built without ray tracing support, lightmaps can't be baked." msgstr "" @@ -10064,7 +10063,7 @@ msgstr "마우스 버튼" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "잘못된 액션 이름. 공백이거나, '/' , ':', '=', '\\', '\"' 를 포함하면 안 됩니" diff --git a/editor/translations/lt.po b/editor/translations/lt.po index 6dad903aac..b04d49c871 100644 --- a/editor/translations/lt.po +++ b/editor/translations/lt.po @@ -9990,7 +9990,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/lv.po b/editor/translations/lv.po index 3333b65210..f51c38c6b8 100644 --- a/editor/translations/lv.po +++ b/editor/translations/lv.po @@ -9815,7 +9815,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/mi.po b/editor/translations/mi.po index 780599c2da..6beaf559b3 100644 --- a/editor/translations/mi.po +++ b/editor/translations/mi.po @@ -9676,7 +9676,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/mk.po b/editor/translations/mk.po index 01dbc3ed02..6cb5e626cb 100644 --- a/editor/translations/mk.po +++ b/editor/translations/mk.po @@ -9683,7 +9683,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/ml.po b/editor/translations/ml.po index b03638aded..0b3a3e2f85 100644 --- a/editor/translations/ml.po +++ b/editor/translations/ml.po @@ -9693,7 +9693,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/mr.po b/editor/translations/mr.po index d7a76e3f10..7b2683f181 100644 --- a/editor/translations/mr.po +++ b/editor/translations/mr.po @@ -9684,7 +9684,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/ms.po b/editor/translations/ms.po index 3798405050..0dc54a314a 100644 --- a/editor/translations/ms.po +++ b/editor/translations/ms.po @@ -9,11 +9,12 @@ # Muhammad Hazim bin Hafizalshah <muhammadhazimhafizalshah@gmail.com>, 2020. # keviinx <keviinx@yahoo.com>, 2020. # Keviindran Ramachandran <keviinx@yahoo.com>, 2020, 2021. +# Jacque Fresco <aidter@use.startmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-05-10 15:32+0000\n" +"PO-Revision-Date: 2021-05-29 13:49+0000\n" "Last-Translator: Keviindran Ramachandran <keviinx@yahoo.com>\n" "Language-Team: Malay <https://hosted.weblate.org/projects/godot-engine/godot/" "ms/>\n" @@ -3031,7 +3032,7 @@ msgstr "Tentang" #: editor/editor_node.cpp msgid "Support Godot Development" -msgstr "" +msgstr "Sokong Pembangunan Godot" #: editor/editor_node.cpp #, fuzzy @@ -4417,15 +4418,15 @@ msgstr "Sunting Poligon" #: editor/plugins/abstract_polygon_2d_editor.cpp msgid "Insert Point" -msgstr "" +msgstr "Masukkan Titik" #: editor/plugins/abstract_polygon_2d_editor.cpp msgid "Edit Polygon (Remove Point)" -msgstr "" +msgstr "Sunting Poligon (Keluarkan Titik)" #: editor/plugins/abstract_polygon_2d_editor.cpp msgid "Remove Polygon And Point" -msgstr "" +msgstr "Keluarkan Poligon Dan Titik" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp @@ -4433,38 +4434,38 @@ msgstr "" #: editor/plugins/animation_state_machine_editor.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Add Animation" -msgstr "" +msgstr "Tambah Animasi" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_state_machine_editor.cpp msgid "Load..." -msgstr "" +msgstr "Muatkan..." #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Move Node Point" -msgstr "" +msgstr "Pindahkan Titik Nod" #: editor/plugins/animation_blend_space_1d_editor.cpp msgid "Change BlendSpace1D Limits" -msgstr "" +msgstr "Tukar Had-had BlendSpace1D" #: editor/plugins/animation_blend_space_1d_editor.cpp msgid "Change BlendSpace1D Labels" -msgstr "" +msgstr "Tukar Label-label BlendSpace1D" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp #: editor/plugins/animation_state_machine_editor.cpp msgid "This type of node can't be used. Only root nodes are allowed." -msgstr "" +msgstr "Nod jenis ini tidak boleh digunakan. Hanya nod-nod akar dibenarkan." #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Add Node Point" -msgstr "" +msgstr "Tambah Titik Nod" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp @@ -4473,11 +4474,11 @@ msgstr "Tambah Titik Animasi" #: editor/plugins/animation_blend_space_1d_editor.cpp msgid "Remove BlendSpace1D Point" -msgstr "" +msgstr "Keluarkan Titik BlendSpace1D" #: editor/plugins/animation_blend_space_1d_editor.cpp msgid "Move BlendSpace1D Node Point" -msgstr "" +msgstr "Pindahkan Titik Nod BlendSpace1D" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp @@ -4487,11 +4488,15 @@ msgid "" "AnimationTree is inactive.\n" "Activate to enable playback, check node warnings if activation fails." msgstr "" +"AnimationTree tidak aktif.\n" +"Aktifkan untuk membenarkan main balik, periksa amaran nod jika pengaktifan " +"gagal." #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp +#, fuzzy msgid "Set the blending position within the space" -msgstr "" +msgstr "Tetapkan kedudukan pengadunan dalam ruang" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp @@ -4833,15 +4838,15 @@ msgstr "" #: editor/plugins/animation_player_editor_plugin.cpp msgid "1 step" -msgstr "" +msgstr "1 langkah" #: editor/plugins/animation_player_editor_plugin.cpp msgid "2 steps" -msgstr "" +msgstr "2 langkah" #: editor/plugins/animation_player_editor_plugin.cpp msgid "3 steps" -msgstr "" +msgstr "3 langkah" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Differences Only" @@ -8196,15 +8201,15 @@ msgstr "Tidak Aktif" #: editor/plugins/theme_editor_plugin.cpp msgid "Tab 1" -msgstr "" +msgstr "Tab 1" #: editor/plugins/theme_editor_plugin.cpp msgid "Tab 2" -msgstr "" +msgstr "Tab 2" #: editor/plugins/theme_editor_plugin.cpp msgid "Tab 3" -msgstr "" +msgstr "Tab 3" #: editor/plugins/theme_editor_plugin.cpp msgid "Editable Item" @@ -8749,7 +8754,7 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "(GLES3 only)" -msgstr "" +msgstr "(GLES3 sahaja)" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Add Output" @@ -10050,7 +10055,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" @@ -10116,11 +10121,11 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "X Button 1" -msgstr "" +msgstr "Butang X 1" #: editor/project_settings_editor.cpp msgid "X Button 2" -msgstr "" +msgstr "Butang X 2" #: editor/project_settings_editor.cpp msgid "Joypad Axis Index:" @@ -11018,7 +11023,7 @@ msgstr "" #: editor/script_create_dialog.cpp msgid "Allowed: a-z, A-Z, 0-9, _ and ." -msgstr "" +msgstr "Benarkan: a-z, A-Z, 0-9, _ dan ." #: editor/script_create_dialog.cpp msgid "Built-in script (into scene file)." @@ -12355,7 +12360,7 @@ msgstr "" #: scene/2d/joints_2d.cpp msgid "Node A and Node B must be PhysicsBody2Ds" -msgstr "" +msgstr "Nod A dan Nod B mestilah PhysicsBody2Ds" #: scene/2d/joints_2d.cpp msgid "Node A must be a PhysicsBody2D" diff --git a/editor/translations/nb.po b/editor/translations/nb.po index 39f45f5ae5..7d6077e69c 100644 --- a/editor/translations/nb.po +++ b/editor/translations/nb.po @@ -17,12 +17,13 @@ # Petter Reinholdtsen <pere-weblate@hungry.com>, 2019, 2020. # Patrick Sletvold <patricksletvold@hotmail.com>, 2021. # Kristoffer <kskau93@gmail.com>, 2021. +# Lili Zoey <sayaks1@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-03-31 03:53+0000\n" -"Last-Translator: Kristoffer <kskau93@gmail.com>\n" +"PO-Revision-Date: 2021-05-29 13:49+0000\n" +"Last-Translator: Lili Zoey <sayaks1@gmail.com>\n" "Language-Team: Norwegian Bokmål <https://hosted.weblate.org/projects/godot-" "engine/godot/nb_NO/>\n" "Language: nb\n" @@ -30,7 +31,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.6-dev\n" +"X-Generator: Weblate 4.7-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -188,9 +189,8 @@ msgid "Anim Multi Change Keyframe Value" msgstr "Anim Endre flere Nøkkelbildeverdier" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Anim Multi Change Call" -msgstr "Anim Forandre Kall" +msgstr "Anim Forandre flere Kall" #: editor/animation_track_editor.cpp msgid "Change Animation Length" @@ -924,9 +924,8 @@ msgid "Signals" msgstr "Signaler" #: editor/connections_dialog.cpp -#, fuzzy msgid "Filter signals" -msgstr "Filtrer Filer..." +msgstr "Filtrer Signaler" #: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" @@ -939,9 +938,8 @@ msgid "Disconnect All" msgstr "Koble Fra" #: editor/connections_dialog.cpp -#, fuzzy msgid "Edit..." -msgstr "Rediger" +msgstr "Rediger..." #: editor/connections_dialog.cpp #, fuzzy @@ -1496,7 +1494,7 @@ msgstr "" #: editor/editor_autoload_settings.cpp msgid "Keyword cannot be used as an autoload name." -msgstr "" +msgstr "Nøkkelord kan ikke brukes som autoloadnavn." #: editor/editor_autoload_settings.cpp msgid "Autoload '%s' already exists!" @@ -4133,7 +4131,7 @@ msgstr "Legg til i Gruppe" #: editor/groups_editor.cpp msgid "Empty groups will be automatically removed." -msgstr "" +msgstr "Tomme grupper vil automatisk bli fjernet." #: editor/groups_editor.cpp msgid "Group Editor" @@ -4973,11 +4971,11 @@ msgstr "Legg til node" #: editor/plugins/animation_state_machine_editor.cpp msgid "End" -msgstr "" +msgstr "Slutt" #: editor/plugins/animation_state_machine_editor.cpp msgid "Immediate" -msgstr "" +msgstr "Umiddelbart" #: editor/plugins/animation_state_machine_editor.cpp msgid "Sync" @@ -5335,11 +5333,11 @@ msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Name (A-Z)" -msgstr "" +msgstr "Navn (A-Z)" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Name (Z-A)" -msgstr "" +msgstr "Navn (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy @@ -8824,9 +8822,8 @@ msgid "" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Delete selected Rect." -msgstr "Slett valgte filer?" +msgstr "Slett valgte Rect." #: editor/plugins/tile_set_editor_plugin.cpp msgid "" @@ -10451,7 +10448,7 @@ msgstr "Museknapp" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/nl.po b/editor/translations/nl.po index 32b3ff9117..41a5cf103a 100644 --- a/editor/translations/nl.po +++ b/editor/translations/nl.po @@ -43,11 +43,14 @@ # kitfka <philipthuijs@gmail.com>, 2020. # Mike van Leeuwen <mkvanleeuwen@gmail.com>, 2020. # marnicq van loon <marnicqvanloon@gmail.com>, 2020. +# T-rex08 <ipadtriceratops@gmail.com>, 2021. +# Dwarffish <hoogvlietjohan@gmail.com>, 2021. +# Arthur de Roos <arthur.de.roos@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-02-05 23:44+0000\n" +"PO-Revision-Date: 2021-05-29 13:49+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" @@ -56,7 +59,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.5-dev\n" +"X-Generator: Weblate 4.7-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -1197,11 +1200,11 @@ msgstr "Gouden Sponsors" #: editor/editor_about.cpp msgid "Silver Sponsors" -msgstr "Zilveren Sponsoren" +msgstr "Zilveren Sponsors" #: editor/editor_about.cpp msgid "Bronze Sponsors" -msgstr "Bronzen Sponsoren" +msgstr "Bronzen Sponsors" #: editor/editor_about.cpp msgid "Mini Sponsors" @@ -1643,34 +1646,31 @@ msgstr "" "'Driver Fallback Enabled' uit." #: editor/editor_export.cpp -#, fuzzy msgid "" "Target platform requires 'PVRTC' texture compression for GLES2. Enable " "'Import Pvrtc' in Project Settings." msgstr "" -"Doelplatform vereist 'ETC' textuurcompressie voor GLES2. Schakel 'Import " +"Doelplatform vereist 'PVRTC' textuurcompressie voor GLES2. Schakel 'Import " "Etc' in bij de Projectinstellingen." #: editor/editor_export.cpp -#, fuzzy msgid "" "Target platform requires 'ETC2' or 'PVRTC' texture compression for GLES3. " "Enable 'Import Etc 2' or 'Import Pvrtc' in Project Settings." msgstr "" -"Doelplatform vereist 'ETC2' textuurcompressie voor GLES3. Schakel 'Import " -"Etc 2' in de Projectinstellingen in." +"Doelplatform vereist 'ETC2' of 'PVRTC' textuurcompressie voor GLES3. Schakel " +"'Import Etc 2' of 'Import Pvrtc' in de Projectinstellingen in." #: editor/editor_export.cpp -#, fuzzy msgid "" "Target platform requires 'PVRTC' texture compression for the driver fallback " "to GLES2.\n" "Enable 'Import Pvrtc' in Project Settings, or disable 'Driver Fallback " "Enabled'." msgstr "" -"Doelplatform vereist 'ETC' textuurcompressie zodat het stuurprogramma kan " +"Doelplatform vereist 'PVRTC' textuurcompressie zodat het stuurprogramma kan " "terugvallen op GLES2.\n" -"Schakel 'Import Etc' in bij de Projectinstellingen, of schakel de optie " +"Schakel 'Import Pvrtc' in bij de Projectinstellingen, of schakel de optie " "'Driver Fallback Enabled' uit." #: editor/editor_export.cpp platform/android/export/export.cpp @@ -1931,7 +1931,7 @@ msgstr "Favoriet Omschakelen" #: editor/editor_file_dialog.cpp msgid "Toggle Mode" -msgstr "Modus omschakelen" +msgstr "Modus wisselen" #: editor/editor_file_dialog.cpp msgid "Focus Path" @@ -2030,7 +2030,7 @@ msgstr "Beschrijving" #: editor/editor_help.cpp msgid "Online Tutorials" -msgstr "Online Zelfstudie" +msgstr "Online Handleidingen" #: editor/editor_help.cpp msgid "Properties" @@ -2577,24 +2577,22 @@ msgstr "" "mislukt." #: editor/editor_node.cpp -#, fuzzy msgid "Unable to find script field for addon plugin at: '%s'." -msgstr "" -"Onmogelijk om scriptveld te vinden voor de plugin op: 'res://addons/%s'." +msgstr "Onmogelijk om scriptveld te vinden voor de plugin op: '%s'." #: editor/editor_node.cpp msgid "Unable to load addon script from path: '%s'." msgstr "Volgend script kon niet geladen worden: '%s'." #: editor/editor_node.cpp -#, fuzzy msgid "" "Unable to load addon script from path: '%s'. This might be due to a code " "error in that script.\n" "Disabling the addon at '%s' to prevent further errors." msgstr "" -"Script kon niet geladen worden van het pad: '%s'. Er lijkt een fout in de " -"code te zijn, controleer de syntax." +"Extra script kon niet geladen worden van het pad: '%s'. Dit kan veroorzaakt " +"worden door een fout in dat script.\n" +"Schakel de extra uit op '%s' om toekomstige fouten te vermijden." #: editor/editor_node.cpp msgid "" @@ -2886,7 +2884,6 @@ msgid "Small Deploy with Network Filesystem" msgstr "Kleine uitrol met netwerkbestandssysteem" #: editor/editor_node.cpp -#, fuzzy msgid "" "When this option is enabled, using one-click deploy for Android will only " "export an executable without the project data.\n" @@ -2895,11 +2892,11 @@ msgid "" "On Android, deploying will use the USB cable for faster performance. This " "option speeds up testing for projects with large assets." msgstr "" -"Wanneer deze optie is ingeschakeld, zal export of deploy een minimaal " -"uitvoerbaar bestand creëren.\n" +"Wanneer deze optie is ingeschakeld, zal op Android een uitvoerbaar bestand " +"zonder de project data geëxporteerd worden.\n" "Het bestandssysteem wordt beschikbaar gesteld aan het project door de editor " "over het netwerk.\n" -"Op Android zal deploy de USB verbinding gebruiken voor hogere prestaties. " +"Op Android zal de USB verbinding gebruikt worden voor hogere prestaties. " "Deze optie versnelt het testen van spellen met veel data." #: editor/editor_node.cpp @@ -2907,26 +2904,24 @@ msgid "Visible Collision Shapes" msgstr "Botsingsvormen tonen" #: editor/editor_node.cpp -#, fuzzy msgid "" "When this option is enabled, collision shapes and raycast nodes (for 2D and " "3D) will be visible in the running project." msgstr "" -"Botsingsdetectievormen en raycast knopen (voor 2D en 3D) zullen zichtbaar " -"zijn in het draaiend spel wanneer deze optie aan staat." +"Wanneer deze optie aan staat zullen botsingsdetectievormen en raycast knopen " +"(voor 2D en 3D) zichtbaar zijn in het draaiend spel." #: editor/editor_node.cpp msgid "Visible Navigation" msgstr "Navigatie zichtbaar" #: editor/editor_node.cpp -#, fuzzy msgid "" "When this option is enabled, navigation meshes and polygons will be visible " "in the running project." msgstr "" -"Navigatie meshes en polygonen zijn zichtbaar in het draaiend spel wanneer " -"deze optie aanstaat." +"Navigatie vormen zijn zichtbaar in het draaiend spel wanneer deze optie " +"aanstaat." #: editor/editor_node.cpp msgid "Synchronize Scene Changes" @@ -2949,17 +2944,16 @@ msgid "Synchronize Script Changes" msgstr "Veranderingen in scripts synchroniseren" #: editor/editor_node.cpp -#, fuzzy msgid "" "When this option is enabled, any script that is saved will be reloaded in " "the running project.\n" "When used remotely on a device, this is more efficient when the network " "filesystem option is enabled." msgstr "" -"Wanneer deze optie aanstaat wordt ieder script dat wordt opgeslagen " -"toegepast op het draaiend spel.\n" +"Wanneer deze optie aanstaat wordt ieder script dat is opgeslagen herlopen in " +"het draaiende spel.\n" "Wanneer dit op afstand wordt gebruikt op een andere machine, is dit " -"efficiënter met het netwerk bestandssysteem." +"efficiënter met de netwerk bestandssysteem optie aan." #: editor/editor_node.cpp editor/script_create_dialog.cpp msgid "Editor" @@ -3040,7 +3034,7 @@ msgstr "Over" #: editor/editor_node.cpp msgid "Support Godot Development" -msgstr "" +msgstr "Ondersteun Godot Development" #: editor/editor_node.cpp msgid "Play the project." @@ -3184,13 +3178,12 @@ msgid "Open & Run a Script" msgstr "Voer Een Script Uit" #: editor/editor_node.cpp -#, fuzzy msgid "" "The following files are newer on disk.\n" "What action should be taken?" msgstr "" "De volgende bestanden zijn nieuwer op de schijf.\n" -"Welke aktie moet worden genomen?:" +"Welke actie moet worden genomen?" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: editor/plugins/shader_editor_plugin.cpp @@ -3452,13 +3445,12 @@ msgid "Add Key/Value Pair" msgstr "Sleutel/waarde-paar toevoegen" #: editor/editor_run_native.cpp -#, fuzzy msgid "" "No runnable export preset found for this platform.\n" "Please add a runnable preset in the Export menu or define an existing preset " "as runnable." msgstr "" -"Geen uitvoerbare export preset gevonden voor dit platform.\n" +"Geen uitvoerbare exporteer preset gevonden voor dit platform.\n" "Voeg een uitvoerbare preset toe in het exportmenu." #: editor/editor_run_script.cpp @@ -3735,6 +3727,8 @@ msgstr "" msgid "" "Importing has been disabled for this file, so it can't be opened for editing." msgstr "" +"Importeren is uitgeschakeld voor dit bestand, het kan niet worden geopend om " +"te bewerken." #: editor/filesystem_dock.cpp msgid "Cannot move/rename resources root." @@ -3781,11 +3775,12 @@ msgid "" "\n" "Do you wish to overwrite them?" msgstr "" -"De volgende bestanden of mappen conflicteren met elementen in '%s':\n" +"De volgende bestanden of folders conflicteren met de bestanden in de locatie " +"'%s':\n" "\n" "%s\n" "\n" -"Wil je deze overschrijven?" +"Wilt u deze bestanden overschrijven?" #: editor/filesystem_dock.cpp msgid "Renaming file:" @@ -4125,23 +4120,20 @@ msgid "Saving..." msgstr "Opslaan..." #: editor/import_defaults_editor.cpp -#, fuzzy msgid "Select Importer" -msgstr "Selecteermodus" +msgstr "Selecteer Importeren" #: editor/import_defaults_editor.cpp -#, fuzzy msgid "Importer:" -msgstr "Importeren" +msgstr "Lader:" #: editor/import_defaults_editor.cpp -#, fuzzy msgid "Reset to Defaults" -msgstr "Laad standaard" +msgstr "Reset naar standaard waarden" #: editor/import_dock.cpp msgid "Keep File (No Import)" -msgstr "" +msgstr "Bestand bewaren (niet importeren)" #: editor/import_dock.cpp msgid "%d Files" @@ -5110,9 +5102,8 @@ msgid "Got:" msgstr "Gekregen:" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Failed SHA-256 hash check" -msgstr "SHA256-proef mislukt" +msgstr "SHA256-hash controle mislukt" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Asset Download Error:" @@ -5243,14 +5234,12 @@ msgid "Assets ZIP File" msgstr "Assets ZIP Bestand" #: 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 geen opslag pad voor de lichtmappen bepalen.\n" -"Sla jouw scène op (om lichtmappen op te slaan in dezelfde map) of kies een " -"opslag pad vanaf de BakedLightmap eigenschappen." +"Kan geen opslagplaats voor de lichtmap afbeeldingen bepalen.\n" +"Sla uw scène op en probeer opnieuw." #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "" @@ -5269,17 +5258,22 @@ msgstr "" #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "Failed determining lightmap size. Maximum lightmap size too small?" msgstr "" +"Lichtmap grootte bepalen mislukt. Is de maximale lichtmap grootte te klein?" #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "" "Some mesh is invalid. Make sure the UV2 channel values are contained within " "the [0.0,1.0] square region." msgstr "" +"Sommige vormen zijn ongeldig. Controleer of de UV2 kanaal waarden binnen het " +"vierkante [0.0,1.0] bereik zijn." #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "" "Godot editor was built without ray tracing support, lightmaps can't be baked." msgstr "" +"Godot editor is gemaakt zonder ray tracing ondersteuning, en lichtmappen " +"kunnen hierdoor niet ingebakken worden." #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "Bake Lightmaps" @@ -5356,7 +5350,7 @@ msgstr "Maak nieuwe horizontale en verticale gidsen" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Set CanvasItem \"%s\" Pivot Offset to (%d, %d)" -msgstr "Draaipuntverschuiving van het CanvasItem „%s“ op (%d, %d) zetten" +msgstr "CanvasItem \"%s\" draaipunt verschuiving instellen als (%d, %d)" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Rotate %d CanvasItems" @@ -6686,7 +6680,6 @@ msgid "Shift: Move All" msgstr "Shift: Beweeg alles" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Shift+Command: Scale" msgstr "Shift+Ctrl: Schaal" @@ -7422,9 +7415,8 @@ msgid "Yaw" msgstr "Yaw" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Size" -msgstr "Grootte: " +msgstr "Grootte" #: editor/plugins/spatial_editor_plugin.cpp msgid "Objects Drawn" @@ -9584,7 +9576,7 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "A reference to an existing uniform." -msgstr "Een verwijzing naar een bestaande uniform." +msgstr "Een verwijzing naar een bestaand uniform." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "(Fragment/Light mode only) Scalar derivative function." @@ -9951,7 +9943,7 @@ msgstr "OpenGL ES 3.0" #: editor/project_manager.cpp msgid "Not supported by your GPU drivers." -msgstr "Niet ondersteund door de GPU drivers op dit systeem." +msgstr "Niet ondersteund door uw GPU drivers." #: editor/project_manager.cpp msgid "" @@ -10108,9 +10100,8 @@ msgid "" "Language changed.\n" "The interface will update after restarting the editor or project manager." msgstr "" -"De taal is veranderd. \n" -"De gebruikersomgeving wordt bij het herstarten van de editor of " -"projectbeheer bijgewerkt." +"De taal is veranderd.\n" +"De gebruikersomgeving wordt bijgewerkt na het herstarten." #: editor/project_manager.cpp msgid "" @@ -10130,9 +10121,8 @@ msgid "Projects" msgstr "Projecten" #: editor/project_manager.cpp -#, fuzzy msgid "Loading, please wait..." -msgstr "Mirrors ophalen, even wachten a.u.b..." +msgstr "Aan het laden, even wachten a.u.b..." #: editor/project_manager.cpp msgid "Last Modified" @@ -10203,7 +10193,7 @@ msgstr "Muis Knop" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "Ongeldige actienaam. Kan niet leeg zijn en mag niet '/', ':', '=', '\\' of " @@ -10506,9 +10496,8 @@ msgid "Plugins" msgstr "Plugins" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Import Defaults" -msgstr "Laad standaard" +msgstr "Laad de standaard waarden" #: editor/property_editor.cpp msgid "Preset..." @@ -10766,7 +10755,6 @@ msgid "Can't paste root node into the same scene." msgstr "Kan deze operatie niet uitvoeren op knopen uit een vreemde scène!" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Paste Node(s)" msgstr "Knopen plakken" @@ -10810,7 +10798,7 @@ msgstr "Knoop tot wortelknoop maken" #: editor/scene_tree_dock.cpp msgid "Delete %d nodes and any children?" -msgstr "%d knopen en hun (eventuele) kinderen verwijderen?" +msgstr "Verwijder %d knopen en eventuele kinderen?" #: editor/scene_tree_dock.cpp msgid "Delete %d nodes?" @@ -10898,7 +10886,6 @@ msgid "Attach Script" msgstr "Script toevoegen" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Cut Node(s)" msgstr "Knopen knippen" @@ -11416,7 +11403,7 @@ msgstr "Editor Instellingen" #: editor/settings_config_dialog.cpp msgid "Shortcuts" -msgstr "Snelkoppelingen" +msgstr "Sneltoetsen" #: editor/settings_config_dialog.cpp msgid "Binding" @@ -12303,7 +12290,7 @@ msgstr "Ongeldig Android SDK pad voor custom build in Editor Settings." #: platform/android/export/export.cpp msgid "Missing 'build-tools' directory!" -msgstr "" +msgstr "'build tools' map ontbreekt!" #: platform/android/export/export.cpp msgid "Unable to find Android SDK build-tools' apksigner command." @@ -12353,19 +12340,20 @@ msgstr "" #: platform/android/export/export.cpp msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled." -msgstr "" +msgstr "\"Export AAB\" is alleen geldig als \"Use Custom Build\" aan staat." #: platform/android/export/export.cpp msgid "Invalid filename! Android App Bundle requires the *.aab extension." msgstr "" +"Bestandsnaam niet toegestaan! Android App Bundle vereist een *.aab extensie." #: platform/android/export/export.cpp msgid "APK Expansion not compatible with Android App Bundle." -msgstr "" +msgstr "APK Expansion werkt niet samen met Android App Bundle." #: platform/android/export/export.cpp msgid "Invalid filename! Android APK requires the *.apk extension." -msgstr "" +msgstr "Bestandsnaam niet toegestaan! Android APK vereist een *.apk extensie." #: platform/android/export/export.cpp msgid "" @@ -12401,13 +12389,15 @@ msgstr "" #: platform/android/export/export.cpp msgid "Moving output" -msgstr "" +msgstr "Output verplaatsen" #: platform/android/export/export.cpp msgid "" "Unable to copy and rename export file, check gradle project directory for " "outputs." msgstr "" +"Niet in staat om het export bestand te kopiëren en hernoemen. Controleer de " +"gradle project folder voor outputs." #: platform/iphone/export/export.cpp msgid "Identifier is missing." @@ -12599,6 +12589,9 @@ msgid "" "Polygon-based shapes are not meant be used nor edited directly through the " "CollisionShape2D node. Please use the CollisionPolygon2D node instead." msgstr "" +"Op polygonen gebaseerde vormen zijn niet bedoeld om rechtstreeks via het " +"CollisionShape2D-knooppunt te worden gebruikt of bewerkt. Gebruik in plaats " +"daarvan het CollisionPolygon2D-knooppunt." #: scene/2d/cpu_particles_2d.cpp msgid "" @@ -12610,15 +12603,15 @@ msgstr "" #: scene/2d/joints_2d.cpp msgid "Node A and Node B must be PhysicsBody2Ds" -msgstr "" +msgstr "Knoop A en Knoop B moeten PhysicsBody2D zijn" #: scene/2d/joints_2d.cpp msgid "Node A must be a PhysicsBody2D" -msgstr "" +msgstr "Knoop A moet een PhysicsBody2D zijn" #: scene/2d/joints_2d.cpp msgid "Node B must be a PhysicsBody2D" -msgstr "" +msgstr "Knoop B moet een PhysicsBody2D zijn" #: scene/2d/joints_2d.cpp msgid "Joint is not connected to two PhysicsBody2Ds" @@ -12626,7 +12619,7 @@ msgstr "" #: scene/2d/joints_2d.cpp msgid "Node A and Node B must be different PhysicsBody2Ds" -msgstr "" +msgstr "Knoop A en Knoop B moeten verschillende PhysicsBody2D's zijn" #: scene/2d/light_2d.cpp msgid "" @@ -12788,14 +12781,12 @@ msgid "Finding meshes and lights" msgstr "" #: scene/3d/baked_lightmap.cpp -#, fuzzy msgid "Preparing geometry (%d/%d)" -msgstr "Geometrie aan het ontleden..." +msgstr "Geometrie aan het voorbereiden (%d/%d)" #: scene/3d/baked_lightmap.cpp -#, fuzzy msgid "Preparing environment" -msgstr "Bekijk Omgeving" +msgstr "Omgeving aan het voorbereiden" #: scene/3d/baked_lightmap.cpp #, fuzzy @@ -12803,14 +12794,12 @@ msgid "Generating capture" msgstr "Bouw Lightmappen" #: scene/3d/baked_lightmap.cpp -#, fuzzy msgid "Saving lightmaps" -msgstr "Bouw Lightmappen" +msgstr "Lightmappen aan het opslaan" #: scene/3d/baked_lightmap.cpp -#, fuzzy msgid "Done" -msgstr "Klaar!" +msgstr "Klaar" #: scene/3d/collision_object.cpp msgid "" @@ -12961,15 +12950,15 @@ msgstr "" #: scene/3d/physics_joint.cpp msgid "Node A and Node B must be PhysicsBodies" -msgstr "" +msgstr "Knoop A en Knoop B moeten PhysicsBody's zijn" #: scene/3d/physics_joint.cpp msgid "Node A must be a PhysicsBody" -msgstr "" +msgstr "Knoop A moet een PhysicsBody zijn" #: scene/3d/physics_joint.cpp msgid "Node B must be a PhysicsBody" -msgstr "" +msgstr "Knoop B moet een PhysicsBody zijn" #: scene/3d/physics_joint.cpp msgid "Joint is not connected to any PhysicsBodies" @@ -12977,7 +12966,7 @@ msgstr "" #: scene/3d/physics_joint.cpp msgid "Node A and Node B must be different PhysicsBodies" -msgstr "" +msgstr "Knoop A en Knoop B moeten PhysicsBody's zijn" #: scene/3d/remote_transform.cpp msgid "" diff --git a/editor/translations/or.po b/editor/translations/or.po index 8e40eb4b04..e3b057e2c8 100644 --- a/editor/translations/or.po +++ b/editor/translations/or.po @@ -9682,7 +9682,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/pl.po b/editor/translations/pl.po index 483d572041..6c3367a0ab 100644 --- a/editor/translations/pl.po +++ b/editor/translations/pl.po @@ -52,7 +52,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-04-22 14:39+0000\n" +"PO-Revision-Date: 2021-05-19 20:16+0000\n" "Last-Translator: Tomek <kobewi4e@gmail.com>\n" "Language-Team: Polish <https://hosted.weblate.org/projects/godot-engine/" "godot/pl/>\n" @@ -2572,14 +2572,14 @@ msgid "Unable to load addon script from path: '%s'." msgstr "Nie można załadować skryptu dodatku z ścieżki: \"%s\"." #: editor/editor_node.cpp -#, fuzzy msgid "" "Unable to load addon script from path: '%s'. This might be due to a code " "error in that script.\n" "Disabling the addon at '%s' to prevent further errors." msgstr "" -"Nie można załadować skryptu dodatku ze ścieżki: \"%s\" W kodzie znajduje się " -"błąd, sprawdź składnię." +"Nie można załadować skryptu dodatku ze ścieżki: \"%s\". Może to być " +"spowodowane błędem w skrypcie.\n" +"Wyłączam dodatek \"%s\" by uniknąć dalszych błędów." #: editor/editor_node.cpp msgid "" @@ -3023,7 +3023,7 @@ msgstr "O silniku" #: editor/editor_node.cpp msgid "Support Godot Development" -msgstr "" +msgstr "Wesprzyj rozwój Godota" #: editor/editor_node.cpp msgid "Play the project." @@ -3272,11 +3272,11 @@ msgstr "Zmierzono:" #: editor/editor_profiler.cpp msgid "Frame Time (sec)" -msgstr "Czas ramki (sek)" +msgstr "Czas klatki (sek)" #: editor/editor_profiler.cpp msgid "Average Time (sec)" -msgstr "Średni Czas (sek)" +msgstr "Średni czas (sek)" #: editor/editor_profiler.cpp msgid "Frame %" @@ -3288,11 +3288,11 @@ msgstr "Klatka fizyki %" #: editor/editor_profiler.cpp msgid "Inclusive" -msgstr "Włącznie" +msgstr "Łącznie" #: editor/editor_profiler.cpp msgid "Self" -msgstr "Ten obiekt" +msgstr "Pojedynczo" #: editor/editor_profiler.cpp msgid "Frame #:" @@ -5257,12 +5257,11 @@ msgstr "" "mieszczą się w kwadratowym obszarze [0.0, 1.0]." #: editor/plugins/baked_lightmap_editor_plugin.cpp -#, fuzzy msgid "" "Godot editor was built without ray tracing support, lightmaps can't be baked." msgstr "" -"Godot został zbudowany bez wsparcia ray tracingu, mapy światła nie mogą być " -"wypalone." +"Edytor Godota został zbudowany bez wsparcia ray tracingu, mapy światła nie " +"mogą zostać wypalone." #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "Bake Lightmaps" @@ -10168,7 +10167,7 @@ msgstr "Przycisk myszy" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "Niepoprawna nazwa akcji. Nie może być pusta ani zawierać \"/\", \":\", \"=" diff --git a/editor/translations/pr.po b/editor/translations/pr.po index a0a9719128..8ad62171b2 100644 --- a/editor/translations/pr.po +++ b/editor/translations/pr.po @@ -10020,7 +10020,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/pt.po b/editor/translations/pt.po index 99f9934e1c..b164fc2f52 100644 --- a/editor/translations/pt.po +++ b/editor/translations/pt.po @@ -22,8 +22,8 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-05-10 15:32+0000\n" -"Last-Translator: ssantos <ssantos@web.de>\n" +"PO-Revision-Date: 2021-05-18 14:51+0000\n" +"Last-Translator: João Lopes <linux-man@hotmail.com>\n" "Language-Team: Portuguese <https://hosted.weblate.org/projects/godot-engine/" "godot/pt/>\n" "Language: pt\n" @@ -2550,14 +2550,14 @@ msgid "Unable to load addon script from path: '%s'." msgstr "Incapaz de carregar script addon do caminho: '%s'." #: editor/editor_node.cpp -#, fuzzy msgid "" "Unable to load addon script from path: '%s'. This might be due to a code " "error in that script.\n" "Disabling the addon at '%s' to prevent further errors." msgstr "" "Incapaz de carregar script addon do caminho: '%s' Parece haver um erro no " -"código, reveja a sintaxe." +"código, reveja a sintaxe.\n" +"A desativar o addon em '%s' para prevenir mais erros." #: editor/editor_node.cpp msgid "" @@ -3003,7 +3003,7 @@ msgstr "Sobre" #: editor/editor_node.cpp msgid "Support Godot Development" -msgstr "" +msgstr "Apoie o Desenvolvimento do Godot" #: editor/editor_node.cpp msgid "Play the project." @@ -5235,7 +5235,6 @@ msgstr "" "contidos na região quadrada [0.0,1.0]." #: editor/plugins/baked_lightmap_editor_plugin.cpp -#, fuzzy msgid "" "Godot editor was built without ray tracing support, lightmaps can't be baked." msgstr "" @@ -10133,7 +10132,7 @@ msgstr "Botão do rato" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "Nome de ação inválido. Não pode ser vazio nem conter '/', ':', '=', '\\' ou " diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po index 25cdec4f49..7bfa3e7b97 100644 --- a/editor/translations/pt_BR.po +++ b/editor/translations/pt_BR.po @@ -115,12 +115,13 @@ # Lucas E. <lukas.ed45@gmail.com>, 2021. # Gabriel Silveira <gabomfim99@gmail.com>, 2021. # Arthur Phillip D. Silva <artphil.dev@gmail.com>, 2021. +# Gustavo HM 102 <gustavohm102@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: 2016-05-30\n" -"PO-Revision-Date: 2021-04-11 22:02+0000\n" -"Last-Translator: Arthur Phillip D. Silva <artphil.dev@gmail.com>\n" +"PO-Revision-Date: 2021-05-24 21:36+0000\n" +"Last-Translator: Gustavo HM 102 <gustavohm102@gmail.com>\n" "Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/" "godot-engine/godot/pt_BR/>\n" "Language: pt_BR\n" @@ -128,7 +129,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.6-dev\n" +"X-Generator: Weblate 4.7-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -2650,14 +2651,14 @@ msgstr "" "'%s'." #: editor/editor_node.cpp -#, fuzzy msgid "" "Unable to load addon script from path: '%s'. This might be due to a code " "error in that script.\n" "Disabling the addon at '%s' to prevent further errors." msgstr "" -"Não foi possível localizar a área do script para o complemento do plugin em: " -"'%s'." +"Não foi possível localizar o script do caminho: '%s'. Isso pode ser devido a " +"um erro de código nesse script.\n" +"Desativando o addon em '%s' para prevenir erros futuros." #: editor/editor_node.cpp msgid "" @@ -3102,8 +3103,9 @@ msgid "About" msgstr "Sobre" #: editor/editor_node.cpp +#, fuzzy msgid "Support Godot Development" -msgstr "" +msgstr "Apoie o desenvolvimento do Godot" #: editor/editor_node.cpp msgid "Play the project." @@ -5345,12 +5347,11 @@ msgstr "" "contidos na região quadrada [0.0,1.0]." #: editor/plugins/baked_lightmap_editor_plugin.cpp -#, fuzzy msgid "" "Godot editor was built without ray tracing support, lightmaps can't be baked." msgstr "" "O editor Godot foi construído sem suporte à ray tracing, os lightmaps não " -"podem ser bakeados." +"podem ser refinados." #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "Bake Lightmaps" @@ -7671,9 +7672,12 @@ msgid "View Rotation Locked" msgstr "Ver Rotação Bloqueada" #: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "" "To zoom further, change the camera's clipping planes (View -> Settings...)" msgstr "" +"Para dar mais zoom, mude os planos de clipping da câmera (Visão -> " +"Configurações...)" #: editor/plugins/spatial_editor_plugin.cpp msgid "" @@ -10251,7 +10255,7 @@ msgstr "Botão do Mous" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "Nome da ação inválido. Não pode estar vazio nem conter '/', ':', '=', '\\' " @@ -11058,11 +11062,15 @@ msgid "Remote" msgstr "Remoto" #: editor/scene_tree_dock.cpp +#, fuzzy msgid "" "If selected, the Remote scene tree dock will cause the project to stutter " "every time it updates.\n" "Switch back to the Local scene tree dock to improve performance." msgstr "" +"Se selecionado, o painel da árvore de cena Remota vai fazer o projeto travar " +"toda hora que atualizar.\n" +"Volta para o painel da árvore de cena Local para melhorar a performance." #: editor/scene_tree_dock.cpp msgid "Local" diff --git a/editor/translations/ro.po b/editor/translations/ro.po index d2ecad4c74..b86af89ae2 100644 --- a/editor/translations/ro.po +++ b/editor/translations/ro.po @@ -10181,7 +10181,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/ru.po b/editor/translations/ru.po index dfda002c17..acf8b3caaf 100644 --- a/editor/translations/ru.po +++ b/editor/translations/ru.po @@ -98,7 +98,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-05-14 11:20+0000\n" +"PO-Revision-Date: 2021-05-21 11:33+0000\n" "Last-Translator: Danil Alexeev <danil@alexeev.xyz>\n" "Language-Team: Russian <https://hosted.weblate.org/projects/godot-engine/" "godot/ru/>\n" @@ -2625,14 +2625,14 @@ msgid "Unable to load addon script from path: '%s'." msgstr "Не удалось загрузить скрипт из источника: «%s»." #: editor/editor_node.cpp -#, fuzzy msgid "" "Unable to load addon script from path: '%s'. This might be due to a code " "error in that script.\n" "Disabling the addon at '%s' to prevent further errors." msgstr "" -"Невозможно загрузить скрипт аддона из источника: «%s». В коде есть ошибка, " -"пожалуйста, проверьте синтаксис." +"Невозможно загрузить скрипт аддона по пути: «%s». Это может быть связано с " +"ошибкой в коде скрипта.\n" +"Аддон «%s» отключён для предотвращения дальнейших ошибок." #: editor/editor_node.cpp msgid "" @@ -3076,7 +3076,7 @@ msgstr "О Godot Engine" #: editor/editor_node.cpp msgid "Support Godot Development" -msgstr "" +msgstr "Поддержать разработку Godot" #: editor/editor_node.cpp msgid "Play the project." @@ -5308,7 +5308,6 @@ msgstr "" "находятся в квадратной области [0.0,1.0]." #: editor/plugins/baked_lightmap_editor_plugin.cpp -#, fuzzy msgid "" "Godot editor was built without ray tracing support, lightmaps can't be baked." msgstr "" @@ -10213,7 +10212,7 @@ msgstr "Кнопка мыши" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "Неверное имя действия. Оно не может быть пустым и не может содержать символы " @@ -10817,7 +10816,7 @@ msgstr "Сделать узел корневым" #: editor/scene_tree_dock.cpp msgid "Delete %d nodes and any children?" -msgstr "Удалить узел «%d» и его дочерние элементы?" +msgstr "Удалить %d узлов и их детей?" #: editor/scene_tree_dock.cpp msgid "Delete %d nodes?" @@ -10829,7 +10828,7 @@ msgstr "Удалить корневой узел «%s»?" #: editor/scene_tree_dock.cpp msgid "Delete node \"%s\" and its children?" -msgstr "Удалить узел «%s» и его дочерние элементы?" +msgstr "Удалить узел «%s» и его детей?" #: editor/scene_tree_dock.cpp msgid "Delete node \"%s\"?" diff --git a/editor/translations/si.po b/editor/translations/si.po index 7bc9066904..b62a68170b 100644 --- a/editor/translations/si.po +++ b/editor/translations/si.po @@ -9761,7 +9761,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/sk.po b/editor/translations/sk.po index 3bb1bce542..c56b65ea9b 100644 --- a/editor/translations/sk.po +++ b/editor/translations/sk.po @@ -10077,7 +10077,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/sl.po b/editor/translations/sl.po index fd38959e1d..534d8a8af8 100644 --- a/editor/translations/sl.po +++ b/editor/translations/sl.po @@ -10418,7 +10418,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/sq.po b/editor/translations/sq.po index abf3243545..9adfd21568 100644 --- a/editor/translations/sq.po +++ b/editor/translations/sq.po @@ -10072,7 +10072,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/sr_Cyrl.po b/editor/translations/sr_Cyrl.po index 6518f9b2bd..d839ee4d1b 100644 --- a/editor/translations/sr_Cyrl.po +++ b/editor/translations/sr_Cyrl.po @@ -11277,7 +11277,7 @@ msgstr "Миш Дугме" #: editor/project_settings_editor.cpp #, fuzzy msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "Неважеће име акције. Не може бити празно или садржати '/', ':', '=', '\\' " diff --git a/editor/translations/sr_Latn.po b/editor/translations/sr_Latn.po index b646003e1a..bb42742181 100644 --- a/editor/translations/sr_Latn.po +++ b/editor/translations/sr_Latn.po @@ -9841,7 +9841,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/sv.po b/editor/translations/sv.po index 7253693a74..073e2b0670 100644 --- a/editor/translations/sv.po +++ b/editor/translations/sv.po @@ -10206,7 +10206,7 @@ msgstr "Musknapp" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/ta.po b/editor/translations/ta.po index 9107c43f7c..ed08398eeb 100644 --- a/editor/translations/ta.po +++ b/editor/translations/ta.po @@ -9761,7 +9761,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/te.po b/editor/translations/te.po index c983fbe90e..62741d508d 100644 --- a/editor/translations/te.po +++ b/editor/translations/te.po @@ -9686,7 +9686,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/th.po b/editor/translations/th.po index 24b007b891..3f01cae158 100644 --- a/editor/translations/th.po +++ b/editor/translations/th.po @@ -9976,7 +9976,7 @@ msgstr "ปุ่มเมาส์" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "ชื่อผิดพลาด ไม่สามารถเป็นช่องว่างหรือประกอบด้วย '/', ':', '=', '\\' หรือ '\"'" diff --git a/editor/translations/tr.po b/editor/translations/tr.po index 43c8aa9e52..ae07c290e2 100644 --- a/editor/translations/tr.po +++ b/editor/translations/tr.po @@ -58,12 +58,14 @@ # Çağlar KOPARIR <ckoparir@gmail.com>, 2021. # Cem Eren Fukara <cefukara@hotmail.com>, 2021. # Jafar Tarverdiyev <cefertarverdiyevv@gmail.com>, 2021. +# ali aydın <alimxaydin@gmail.com>, 2021. +# Cannur Daşkıran <canndask@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-05-14 11:20+0000\n" -"Last-Translator: Jafar Tarverdiyev <cefertarverdiyevv@gmail.com>\n" +"PO-Revision-Date: 2021-05-29 13:49+0000\n" +"Last-Translator: ali aydın <alimxaydin@gmail.com>\n" "Language-Team: Turkish <https://hosted.weblate.org/projects/godot-engine/" "godot/tr/>\n" "Language: tr\n" @@ -1556,7 +1558,7 @@ msgstr "İsim" #: editor/editor_autoload_settings.cpp msgid "Singleton" -msgstr "Tekil" +msgstr "Tekil nesne" #: editor/editor_data.cpp editor/inspector_dock.cpp msgid "Paste Params" @@ -2040,7 +2042,7 @@ msgstr "Çevrimiçi Rehberler" #: editor/editor_help.cpp msgid "Properties" -msgstr "Özellikleri" +msgstr "Özellikler" #: editor/editor_help.cpp msgid "override:" @@ -2581,21 +2583,22 @@ msgstr "" #: editor/editor_node.cpp msgid "Unable to find script field for addon plugin at: '%s'." -msgstr "Eklentide için betik alanı bulunamıyor: '%s'." +msgstr "Eklenti için betik alanı şu konumda bulunamıyor: '%s'." #: editor/editor_node.cpp msgid "Unable to load addon script from path: '%s'." msgstr "Yoldaki eklenti betiği yüklenemedi: '%s'." #: editor/editor_node.cpp -#, fuzzy msgid "" "Unable to load addon script from path: '%s'. This might be due to a code " "error in that script.\n" "Disabling the addon at '%s' to prevent further errors." msgstr "" "'%s' adresindeki eklenti betik yüklenemiyor. Kodun içinde bir hata var gibi " -"görünüyor, lütfen sözdizimini kontrol edin." +"görünüyor.\n" +"Daha fazla hatayı önlemek için '% s' adresindeki eklenti devre dışı " +"bırakılıyor." #: editor/editor_node.cpp msgid "" @@ -3039,7 +3042,7 @@ msgstr "Hakkında" #: editor/editor_node.cpp msgid "Support Godot Development" -msgstr "" +msgstr "Godot'u Geliştirmeye Destek Olun" #: editor/editor_node.cpp msgid "Play the project." @@ -4130,7 +4133,7 @@ msgstr "İçe Aktarıcı'yı seçin" #: editor/import_defaults_editor.cpp msgid "Importer:" -msgstr "İçe Aktar" +msgstr "İçe Alımcı:" #: editor/import_defaults_editor.cpp msgid "Reset to Defaults" @@ -5108,7 +5111,7 @@ msgstr "Alınan:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Failed SHA-256 hash check" -msgstr "SHA-256 hash kontrolü başarısız oldu" +msgstr "Başarısız SHA-256 hash sınaması" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Asset Download Error:" @@ -5273,12 +5276,11 @@ msgstr "" "içerdiğinden emin olun." #: editor/plugins/baked_lightmap_editor_plugin.cpp -#, fuzzy msgid "" "Godot editor was built without ray tracing support, lightmaps can't be baked." msgstr "" -"Godot editör ışın yansıma desteği olmadan derlenmiş, ışık haritaları " -"pişirilemez." +"Godot editör ışın yansıma desteği olmadan derlenmiş, ışık haritaları çizilip " +"sabitlenemez." #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "Bake Lightmaps" @@ -10172,7 +10174,7 @@ msgstr "Fare Düğmesi" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "Geçersiz işlem adı. Boş olamaz ve '/', ':', '=', '\\' veya '\"' içeremez" @@ -10728,11 +10730,11 @@ msgstr "Çocuk Sahnesini Örnekle" #: editor/scene_tree_dock.cpp msgid "Can't paste root node into the same scene." -msgstr "Kök düğüm aynı sahneye yapıştırılamıyor." +msgstr "Kök düğümü aynı sahne içine yapıştırılamaz." #: editor/scene_tree_dock.cpp msgid "Paste Node(s)" -msgstr "Düğümleri Yapıştır" +msgstr "Düğüm(leri) Yapıştır" #: editor/scene_tree_dock.cpp msgid "Detach Script" @@ -10863,7 +10865,7 @@ msgstr "Betik İliştir" #: editor/scene_tree_dock.cpp msgid "Cut Node(s)" -msgstr "Düğümleri Kes(s)" +msgstr "Düğüm(leri) Kes" #: editor/scene_tree_dock.cpp msgid "Remove Node(s)" @@ -10983,6 +10985,9 @@ msgid "" "every time it updates.\n" "Switch back to the Local scene tree dock to improve performance." msgstr "" +"Seçilirse, Uzak sahne ağacı yuvası, projenin her güncellendiğinde " +"takılmasına neden olur.\n" +"Performansı artırmak için Yerel sahne ağaç yuvasına geri dönün." #: editor/scene_tree_dock.cpp msgid "Local" diff --git a/editor/translations/tzm.po b/editor/translations/tzm.po index a28dce76f9..c06fa4f106 100644 --- a/editor/translations/tzm.po +++ b/editor/translations/tzm.po @@ -9683,7 +9683,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/uk.po b/editor/translations/uk.po index 251c85a8ba..52a125fc02 100644 --- a/editor/translations/uk.po +++ b/editor/translations/uk.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: Ukrainian (Godot Engine)\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-05-14 20:34+0000\n" +"PO-Revision-Date: 2021-05-18 14:51+0000\n" "Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n" "Language-Team: Ukrainian <https://hosted.weblate.org/projects/godot-engine/" "godot/uk/>\n" @@ -3011,7 +3011,7 @@ msgstr "Про" #: editor/editor_node.cpp msgid "Support Godot Development" -msgstr "" +msgstr "Підтримати розробку Godot" #: editor/editor_node.cpp msgid "Play the project." @@ -5251,7 +5251,6 @@ msgstr "" "потрапляють до квадратної області [0.0,1.0]." #: editor/plugins/baked_lightmap_editor_plugin.cpp -#, fuzzy msgid "" "Godot editor was built without ray tracing support, lightmaps can't be baked." msgstr "" @@ -10169,7 +10168,7 @@ msgstr "Кнопка миші" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" "Некоректна назва дії. Назва не може бути порожньою і не може містити " diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po index 32a88830cb..19e41bb657 100644 --- a/editor/translations/ur_PK.po +++ b/editor/translations/ur_PK.po @@ -9932,7 +9932,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/vi.po b/editor/translations/vi.po index 3939ac7a4d..c532ba4f50 100644 --- a/editor/translations/vi.po +++ b/editor/translations/vi.po @@ -10013,7 +10013,7 @@ msgstr "Nút chuột" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "Tên hành động không được trống hoặc chứa '/', ':', '=', '\\' hoặc '\"'" diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po index 3b528525e1..b65b62655e 100644 --- a/editor/translations/zh_CN.po +++ b/editor/translations/zh_CN.po @@ -78,11 +78,12 @@ # Weiduo Xie <xwditfr@gmail.com>, 2021. # suplife <2634557184@qq.com>, 2021. # luoji <564144019@qq.com>, 2021. +# zeng haochen <m18621006730@163.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Chinese (Simplified) (Godot Engine)\n" "POT-Creation-Date: 2018-01-20 12:15+0200\n" -"PO-Revision-Date: 2021-05-16 03:32+0000\n" +"PO-Revision-Date: 2021-05-29 13:49+0000\n" "Last-Translator: Haoyu Qiu <timothyqiu32@gmail.com>\n" "Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/" "godot-engine/godot/zh_Hans/>\n" @@ -100,7 +101,7 @@ msgstr "convert() 的参数类型无效,请使用 TYPE_* 常量。" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp msgid "Expected a string of length 1 (a character)." -msgstr "应为长度为 1 的字符串(1 字符)。" +msgstr "应为长度为 1 的字符串(1个字符)。" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/mono/glue/gd_glue.cpp @@ -2997,7 +2998,7 @@ msgstr "关于" #: editor/editor_node.cpp msgid "Support Godot Development" -msgstr "" +msgstr "支持 Godot 开发" #: editor/editor_node.cpp msgid "Play the project." @@ -5189,10 +5190,9 @@ msgid "" msgstr "某些网格无效。确保UV2通道值包含在[0.0,1.0]平方区域内。" #: editor/plugins/baked_lightmap_editor_plugin.cpp -#, fuzzy msgid "" "Godot editor was built without ray tracing support, lightmaps can't be baked." -msgstr "Godot 编辑器是在没有光线跟踪支持的情况下构建的;无法烘焙光照贴图。" +msgstr "Godot 编辑器是在没有光线跟踪支持的情况下构建的,无法烘焙光照贴图。" #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "Bake Lightmaps" @@ -10008,7 +10008,7 @@ msgstr "鼠标按键" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "无效的操作名称。操作名不能为空,也不能包含 “/”, “:”, “=”, “\\” 或 “\"”" diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po index 2350817f1f..0e5af962b5 100644 --- a/editor/translations/zh_HK.po +++ b/editor/translations/zh_HK.po @@ -10365,7 +10365,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "" diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po index a24b8831d2..255f31dfbc 100644 --- a/editor/translations/zh_TW.po +++ b/editor/translations/zh_TW.po @@ -6,7 +6,7 @@ # Billy SU <g4691821@gmail.com>, 2018. # Chao Yu <casd82@gmail.com>, 2017. # Cliffs Dover <bottle@dancingbottle.com>, 2017. -# Kisaragi Hiu <mail@kisaragi-hiu.com>, 2018. +# Kisaragi Hiu <mail@kisaragi-hiu.com>, 2018, 2021. # Matt <chchwy@gmail.com>, 2017. # popcade <popcade@gmail.com>, 2016. # Qing <icinriiq@gmail.com>, 2018. @@ -29,8 +29,8 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-03-16 10:40+0000\n" -"Last-Translator: BinotaLIU <me@binota.org>\n" +"PO-Revision-Date: 2021-05-24 21:36+0000\n" +"Last-Translator: Kisaragi Hiu <mail@kisaragi-hiu.com>\n" "Language-Team: Chinese (Traditional) <https://hosted.weblate.org/projects/" "godot-engine/godot/zh_Hant/>\n" "Language: zh_TW\n" @@ -38,7 +38,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.5.2-dev\n" +"X-Generator: Weblate 4.7-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -2945,7 +2945,7 @@ msgstr "關於" #: editor/editor_node.cpp msgid "Support Godot Development" -msgstr "" +msgstr "支援 Godot 開發" #: editor/editor_node.cpp msgid "Play the project." @@ -4019,7 +4019,7 @@ msgstr "重設為預設" #: editor/import_dock.cpp msgid "Keep File (No Import)" -msgstr "" +msgstr "保留檔案(不匯入)" #: editor/import_dock.cpp msgid "%d Files" @@ -7439,7 +7439,7 @@ msgstr "視圖旋轉已鎖定" #: editor/plugins/spatial_editor_plugin.cpp msgid "" "To zoom further, change the camera's clipping planes (View -> Settings...)" -msgstr "" +msgstr "若要再繼續放大,請至 檢視 -> 設定... 修改攝影機的剪裁平面" #: editor/plugins/spatial_editor_plugin.cpp msgid "" @@ -9958,7 +9958,7 @@ msgstr "滑鼠按鈕" #: editor/project_settings_editor.cpp msgid "" -"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or " +"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or " "'\"'" msgstr "無效的操作名稱。名稱不可留空或包含 “/”, “:”, “=”, “\\” 或 “\"”" |