diff options
Diffstat (limited to 'editor')
43 files changed, 717 insertions, 438 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 9f3893a5db..c27417f037 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -1522,6 +1522,8 @@ void AnimationTimelineEdit::set_animation(const Ref<Animation> &p_animation, boo animation = p_animation; read_only = p_read_only; + length->set_read_only(read_only); + if (animation.is_valid()) { len_hb->show(); if (read_only) { @@ -6621,7 +6623,7 @@ AnimationTrackEditor::AnimationTrackEditor() { optimize_dialog = memnew(ConfirmationDialog); add_child(optimize_dialog); - optimize_dialog->set_title(TTR("Anim. Optimizer")); + optimize_dialog->set_title(TTR("Animation Optimizer")); VBoxContainer *optimize_vb = memnew(VBoxContainer); optimize_dialog->add_child(optimize_vb); @@ -6630,19 +6632,19 @@ AnimationTrackEditor::AnimationTrackEditor() { optimize_velocity_error->set_min(0.001); optimize_velocity_error->set_step(0.001); optimize_velocity_error->set_value(0.01); - optimize_vb->add_margin_child(TTR("Max. Velocity Error:"), optimize_velocity_error); + optimize_vb->add_margin_child(TTR("Max Velocity Error:"), optimize_velocity_error); optimize_angular_error = memnew(SpinBox); optimize_angular_error->set_max(1.0); optimize_angular_error->set_min(0.001); optimize_angular_error->set_step(0.001); optimize_angular_error->set_value(0.01); - optimize_vb->add_margin_child(TTR("Max. Angular Error:"), optimize_angular_error); + optimize_vb->add_margin_child(TTR("Max Angular Error:"), optimize_angular_error); optimize_precision_error = memnew(SpinBox); optimize_precision_error->set_max(6); optimize_precision_error->set_min(1); optimize_precision_error->set_step(1); optimize_precision_error->set_value(3); - optimize_vb->add_margin_child(TTR("Max. Precision Error:"), optimize_precision_error); + optimize_vb->add_margin_child(TTR("Max Precision Error:"), optimize_precision_error); optimize_dialog->set_ok_button_text(TTR("Optimize")); optimize_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_OPTIMIZE_ANIMATION_CONFIRM)); @@ -6733,7 +6735,7 @@ AnimationTrackEditor::AnimationTrackEditor() { // bake_dialog = memnew(ConfirmationDialog); - bake_dialog->set_title(TTR("Anim. Baker")); + bake_dialog->set_title(TTR("Animation Baker")); bake_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_BAKE_ANIMATION_CONFIRM)); add_child(bake_dialog); GridContainer *bake_grid = memnew(GridContainer); diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp index 2895aa9710..be4a070213 100644 --- a/editor/animation_track_editor_plugins.cpp +++ b/editor/animation_track_editor_plugins.cpp @@ -847,9 +847,14 @@ bool AnimationTrackEditTypeAudio::is_key_selectable_by_distance() const { void AnimationTrackEditTypeAudio::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) { Ref<AudioStream> stream = get_animation()->audio_track_get_key_stream(get_track(), p_index); - if (!stream.is_valid()) { - AnimationTrackEdit::draw_key(p_index, p_pixels_sec, p_x, p_selected, p_clip_left, p_clip_right); + AnimationTrackEdit::draw_key(p_index, p_pixels_sec, p_x, p_selected, p_clip_left, p_clip_right); // Draw diamond. + return; + } + + float len = stream->get_length(); + if (len == 0) { + AnimationTrackEdit::draw_key(p_index, p_pixels_sec, p_x, p_selected, p_clip_left, p_clip_right); // Draw diamond. return; } @@ -871,16 +876,10 @@ void AnimationTrackEditTypeAudio::draw_key(int p_index, float p_pixels_sec, int int font_size = get_theme_font_size(SNAME("font_size"), SNAME("Label")); float fh = int(font->get_height(font_size) * 1.5); - float len = stream->get_length(); - Ref<AudioStreamPreview> preview = AudioStreamPreviewGenerator::get_singleton()->generate_preview(stream); float preview_len = preview->get_length(); - if (len == 0) { - len = preview_len; - } - int pixel_total_len = len * p_pixels_sec; len -= end_ofs; @@ -1044,16 +1043,13 @@ void AnimationTrackEditTypeAudio::gui_input(const Ref<InputEvent> &p_event) { continue; } - float start_ofs = get_animation()->audio_track_get_key_start_offset(get_track(), i); - float end_ofs = get_animation()->audio_track_get_key_end_offset(get_track(), i); float len = stream->get_length(); - if (len == 0) { - Ref<AudioStreamPreview> preview = AudioStreamPreviewGenerator::get_singleton()->generate_preview(stream); - float preview_len = preview->get_length(); - len = preview_len; + continue; } + float start_ofs = get_animation()->audio_track_get_key_start_offset(get_track(), i); + float end_ofs = get_animation()->audio_track_get_key_end_offset(get_track(), i); len -= end_ofs; len -= start_ofs; diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 97a73d89e7..9a8a1097cd 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -1629,14 +1629,15 @@ void CodeTextEditor::toggle_inline_comment(const String &delimiter) { int selection_i = 0; int offset = (is_commented ? -1 : 1) * delimiter.length(); for (const int &c2 : caret_edit_order) { + bool is_line_selection = text_editor->has_selection(c2) && text_editor->get_selection_from_line(c2) < text_editor->get_selection_to_line(c2); if (text_editor->get_caret_line(c2) >= from && text_editor->get_caret_line(c2) <= to) { int caret_col = caret_cols[caret_i++]; - caret_col += (caret_col == 0) ? 0 : offset; + caret_col += (is_line_selection && caret_col == 0) ? 0 : offset; text_editor->set_caret_column(caret_col, c2 == 0, c2); } if (text_editor->has_selection(c2) && text_editor->get_selection_to_line(c2) >= from && text_editor->get_selection_to_line(c2) <= to) { int from_col = text_editor->get_selection_from_column(c2); - from_col += (from_col == 0) ? 0 : offset; + from_col += (is_line_selection && from_col == 0) ? 0 : offset; int to_col = selection_to_cols[selection_i++]; to_col += (to_col == 0) ? 0 : offset; text_editor->select( diff --git a/editor/debugger/editor_profiler.cpp b/editor/debugger/editor_profiler.cpp index e4730faf38..b0d6135d52 100644 --- a/editor/debugger/editor_profiler.cpp +++ b/editor/debugger/editor_profiler.cpp @@ -624,7 +624,9 @@ EditorProfiler::EditorProfiler() { hb->add_child(memnew(Label(TTR("Time:")))); display_time = memnew(OptionButton); + // TRANSLATORS: This is an option in the profiler to display the time spent in a function, including the time spent in other functions called by that function. display_time->add_item(TTR("Inclusive")); + // TRANSLATORS: This is an option in the profiler to display the time spent in a function, exincluding the time spent in other functions called by that function. display_time->add_item(TTR("Self")); display_time->set_tooltip_text(TTR("Inclusive: Includes time from other functions called by this function.\nUse this to spot bottlenecks.\n\nSelf: Only count the time spent in the function itself, not in other functions called by that function.\nUse this to find individual functions to optimize.")); display_time->connect("item_selected", callable_mp(this, &EditorProfiler::_combo_changed)); diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index f4cefc606b..ed7638414c 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -1336,6 +1336,8 @@ EditorAudioBuses::EditorAudioBuses() { add_child(file_dialog); file_dialog->connect("file_selected", callable_mp(this, &EditorAudioBuses::_file_dialog_callback)); + AudioServer::get_singleton()->connect("bus_layout_changed", callable_mp(this, &EditorAudioBuses::_update_buses)); + set_process(true); } diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index 4a1f0b4c09..3de4379c5d 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -50,7 +50,7 @@ #include "servers/display_server.h" EditorFileDialog::GetIconFunc EditorFileDialog::get_icon_func = nullptr; -EditorFileDialog::GetIconFunc EditorFileDialog::get_large_icon_func = nullptr; +EditorFileDialog::GetIconFunc EditorFileDialog::get_thumbnail_func = nullptr; EditorFileDialog::RegisterFunc EditorFileDialog::register_func = nullptr; EditorFileDialog::RegisterFunc EditorFileDialog::unregister_func = nullptr; @@ -472,6 +472,14 @@ void EditorFileDialog::_action_pressed() { } } + // First check we're not having an empty name. + String file_name = file_text.strip_edges().get_file(); + if (file_name.is_empty()) { + error_dialog->set_text(TTR("Cannot save file with an empty filename.")); + error_dialog->popup_centered(Size2(250, 80) * EDSCALE); + return; + } + // Add first extension of filter if no valid extension is found. if (!valid) { int idx = filter->get_selected(); @@ -480,9 +488,15 @@ void EditorFileDialog::_action_pressed() { f += "." + ext; } + if (file_name.begins_with(".")) { // Could still happen if typed manually. + error_dialog->set_text(TTR("Cannot save file with a name starting with a dot.")); + error_dialog->popup_centered(Size2(250, 80) * EDSCALE); + return; + } + if (dir_access->file_exists(f) && !disable_overwrite_warning) { - confirm_save->set_text(TTR("File exists, overwrite?")); - confirm_save->popup_centered(Size2(200, 80)); + confirm_save->set_text(vformat(TTR("File \"%s\" already exists.\nDo you want to overwrite it?"), f)); + confirm_save->popup_centered(Size2(250, 80) * EDSCALE); } else { _save_to_recent(); hide(); @@ -888,7 +902,15 @@ void EditorFileDialog::update_file_list() { if (get_icon_func) { Ref<Texture2D> icon = get_icon_func(cdir.path_join(files.front()->get())); if (display_mode == DISPLAY_THUMBNAILS) { - item_list->set_item_icon(-1, file_thumbnail); + Ref<Texture2D> thumbnail; + if (get_thumbnail_func) { + thumbnail = get_thumbnail_func(cdir.path_join(files.front()->get())); + } + if (thumbnail.is_null()) { + thumbnail = file_thumbnail; + } + + item_list->set_item_icon(-1, thumbnail); item_list->set_item_tag_icon(-1, icon); } else { item_list->set_item_icon(-1, icon); diff --git a/editor/editor_file_dialog.h b/editor/editor_file_dialog.h index 021f2e6d4c..1944cacf70 100644 --- a/editor/editor_file_dialog.h +++ b/editor/editor_file_dialog.h @@ -68,7 +68,7 @@ public: typedef void (*RegisterFunc)(EditorFileDialog *); static GetIconFunc get_icon_func; - static GetIconFunc get_large_icon_func; + static GetIconFunc get_thumbnail_func; static RegisterFunc register_func; static RegisterFunc unregister_func; diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 8a595be6e6..b37d12e5ee 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -1560,7 +1560,7 @@ void EditorFileSystem::_update_script_classes() { ScriptServer::add_global_class(efd->files[index]->script_class_name, efd->files[index]->script_class_extends, lang, path); EditorNode::get_editor_data().script_class_set_icon_path(efd->files[index]->script_class_name, efd->files[index]->script_class_icon_path); - EditorNode::get_editor_data().script_class_set_name(efd->files[index]->file, efd->files[index]->script_class_name); + EditorNode::get_editor_data().script_class_set_name(path, efd->files[index]->script_class_name); } } diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 0c7ea33b54..acbc3ce0dc 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -1540,6 +1540,10 @@ void EditorHelp::_update_doc() { if (cd.properties[i].overridden) { continue; } + // Ignore undocumented private. + if (cd.properties[i].name.begins_with("_") && cd.properties[i].description.strip_edges().is_empty()) { + continue; + } property_line[cd.properties[i].name] = class_desc->get_paragraph_count() - 2; diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index dd912eac42..36462f6805 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -414,6 +414,18 @@ StringName EditorProperty::get_edited_property() const { return property; } +EditorInspector *EditorProperty::get_parent_inspector() const { + Node *parent = get_parent(); + while (parent) { + EditorInspector *ei = Object::cast_to<EditorInspector>(parent); + if (ei) { + return ei; + } + parent = parent->get_parent(); + } + ERR_FAIL_V_MSG(nullptr, "EditorProperty is outside inspector."); +} + void EditorProperty::set_doc_path(const String &p_doc_path) { doc_path = p_doc_path; } @@ -693,7 +705,7 @@ void EditorProperty::gui_input(const Ref<InputEvent> &p_event) { bool is_valid_revert = false; Variant revert_value = EditorPropertyRevert::get_property_revert_value(object, property, &is_valid_revert); ERR_FAIL_COND(!is_valid_revert); - emit_changed(property, revert_value); + emit_changed(_get_revert_property(), revert_value); update_property(); } @@ -2484,6 +2496,10 @@ Button *EditorInspector::create_inspector_action_button(const String &p_text) { return button; } +bool EditorInspector::is_main_editor_inspector() const { + return InspectorDock::get_singleton() && InspectorDock::get_inspector_singleton() == this; +} + String EditorInspector::get_selected_path() const { return property_selected; } @@ -3286,7 +3302,7 @@ void EditorInspector::update_tree() { _parse_added_editors(main_vbox, nullptr, ped); } - if (_is_main_editor_inspector()) { + if (is_main_editor_inspector()) { // Updating inspector might invalidate some editing owners. EditorNode::get_singleton()->hide_unused_editors(); } @@ -3316,7 +3332,7 @@ void EditorInspector::_clear(bool p_hide_plugins) { pending.clear(); restart_request_props.clear(); - if (p_hide_plugins && _is_main_editor_inspector()) { + if (p_hide_plugins && is_main_editor_inspector()) { EditorNode::get_singleton()->hide_unused_editors(this); } } @@ -3652,10 +3668,6 @@ void EditorInspector::_edit_set(const String &p_name, const Variant &p_value, bo } } -bool EditorInspector::_is_main_editor_inspector() const { - return InspectorDock::get_singleton() && InspectorDock::get_inspector_singleton() == this; -} - void EditorInspector::_property_changed(const String &p_path, const Variant &p_value, const String &p_name, bool p_changing, bool p_update_all) { // The "changing" variable must be true for properties that trigger events as typing occurs, // like "text_changed" signal. E.g. text property of Label, Button, RichTextLabel, etc. diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h index 37ff2e9b52..01231108d8 100644 --- a/editor/editor_inspector.h +++ b/editor/editor_inspector.h @@ -38,6 +38,7 @@ class AcceptDialog; class Button; class ConfirmationDialog; +class EditorInspector; class LineEdit; class OptionButton; class PanelContainer; @@ -147,6 +148,7 @@ public: Object *get_edited_object(); StringName get_edited_property() const; + EditorInspector *get_parent_inspector() const; void set_doc_path(const String &p_doc_path); @@ -223,7 +225,7 @@ public: protected: static void _bind_methods(); - GDVIRTUAL1RC(bool, _can_handle, Variant) + GDVIRTUAL1RC(bool, _can_handle, Object *) GDVIRTUAL1(_parse_begin, Object *) GDVIRTUAL2(_parse_category, Object *, String) GDVIRTUAL2(_parse_group, Object *, String) @@ -498,7 +500,6 @@ class EditorInspector : public ScrollContainer { bool restrict_to_basic = false; void _edit_set(const String &p_name, const Variant &p_value, bool p_refresh_all, const String &p_changed_field); - bool _is_main_editor_inspector() const; void _property_changed(const String &p_path, const Variant &p_value, const String &p_name = "", bool p_changing = false, bool p_update_all = false); void _multiple_properties_changed(Vector<String> p_paths, Array p_values, bool p_changing = false); @@ -552,6 +553,7 @@ public: static EditorProperty *instantiate_property_editor(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false); + bool is_main_editor_inspector() const; String get_selected_path() const; void update_tree(); diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index a0e876315c..b854da8e4f 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -8116,6 +8116,7 @@ void EditorPluginList::forward_3d_force_draw_over_viewport(Control *p_overlay) { } void EditorPluginList::add_plugin(EditorPlugin *p_plugin) { + ERR_FAIL_COND(plugins_list.has(p_plugin)); plugins_list.push_back(p_plugin); } diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index 14cdbc364e..7b01ae69bf 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -662,11 +662,7 @@ void EditorPlugin::make_visible(bool p_visible) { } void EditorPlugin::edit(Object *p_object) { - if (Object::cast_to<Resource>(p_object)) { - GDVIRTUAL_CALL(_edit, Ref<Resource>(Object::cast_to<Resource>(p_object))); - } else { - GDVIRTUAL_CALL(_edit, p_object); - } + GDVIRTUAL_CALL(_edit, p_object); } bool EditorPlugin::handles(Object *p_object) const { diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h index a5a17acdf1..74f46b2d0b 100644 --- a/editor/editor_plugin.h +++ b/editor/editor_plugin.h @@ -164,8 +164,8 @@ protected: GDVIRTUAL0RC(Ref<Texture2D>, _get_plugin_icon) GDVIRTUAL0RC(bool, _has_main_screen) GDVIRTUAL1(_make_visible, bool) - GDVIRTUAL1(_edit, Variant) - GDVIRTUAL1RC(bool, _handles, Variant) + GDVIRTUAL1(_edit, Object *) + GDVIRTUAL1RC(bool, _handles, Object *) GDVIRTUAL0RC(Dictionary, _get_state) GDVIRTUAL1(_set_state, Dictionary) GDVIRTUAL0(_clear) diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 33bba90c70..801f1ca5b6 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -4141,6 +4141,13 @@ void EditorPropertyResource::_notification(int p_what) { _update_property_bg(); } } break; + + case NOTIFICATION_EXIT_TREE: { + const EditorInspector *ei = get_parent_inspector(); + if (ei && !ei->is_main_editor_inspector()) { + fold_resource(); + } + } break; } } @@ -4174,9 +4181,12 @@ struct EditorPropertyRangeHint { bool radians = false; }; -static EditorPropertyRangeHint _parse_range_hint(PropertyHint p_hint, const String &p_hint_text, double p_default_step) { +static EditorPropertyRangeHint _parse_range_hint(PropertyHint p_hint, const String &p_hint_text, double p_default_step, bool is_int = false) { EditorPropertyRangeHint hint; hint.step = p_default_step; + if (is_int) { + hint.hide_slider = false; // Always show slider for ints, unless specified in hint range. + } Vector<String> slices = p_hint_text.split(","); if (p_hint == PROPERTY_HINT_RANGE) { ERR_FAIL_COND_V_MSG(slices.size() < 2, hint, @@ -4294,7 +4304,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_ } else { EditorPropertyInteger *editor = memnew(EditorPropertyInteger); - EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1); + EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1, true); editor->setup(hint.min, hint.max, hint.step, hint.hide_slider, hint.or_greater, hint.or_less, hint.suffix); return editor; @@ -4383,7 +4393,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_ } break; case Variant::VECTOR2I: { EditorPropertyVector2i *editor = memnew(EditorPropertyVector2i(p_wide)); - EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1); + EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1, true); editor->setup(hint.min, hint.max, p_hint == PROPERTY_HINT_LINK, hint.suffix); return editor; @@ -4396,7 +4406,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_ } break; case Variant::RECT2I: { EditorPropertyRect2i *editor = memnew(EditorPropertyRect2i(p_wide)); - EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1); + EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1, true); editor->setup(hint.min, hint.max, hint.suffix); return editor; @@ -4410,7 +4420,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_ } break; case Variant::VECTOR3I: { EditorPropertyVector3i *editor = memnew(EditorPropertyVector3i(p_wide)); - EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1); + EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1, true); editor->setup(hint.min, hint.max, p_hint == PROPERTY_HINT_LINK, hint.suffix); return editor; @@ -4424,7 +4434,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_ } break; case Variant::VECTOR4I: { EditorPropertyVector4i *editor = memnew(EditorPropertyVector4i); - EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1); + EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1, true); editor->setup(hint.min, hint.max, hint.suffix); return editor; diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index dd84f3b9e1..c90f8e9bf0 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -384,9 +384,6 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { if (score > 0 && score >= best_score) { best = locale; best_score = score; - if (score == 10) { - break; // Exact match, skip the rest. - } } } if (best_score == 0) { @@ -1493,11 +1490,11 @@ void ED_SHORTCUT_OVERRIDE_ARRAY(const String &p_path, const String &p_feature, c } // Override the existing shortcut only if it wasn't customized by the user (i.e. still "original"). + sc->set_meta("original", events.duplicate(true)); + if (Shortcut::is_event_array_equal(sc->get_events(), sc->get_meta("original"))) { sc->set_events(events); } - - sc->set_meta("original", events.duplicate(true)); } Ref<Shortcut> ED_SHORTCUT(const String &p_path, const String &p_name, Key p_keycode) { diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 6410821dcf..304a7acff1 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -509,6 +509,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { const Color font_disabled_color = Color(mono_color.r, mono_color.g, mono_color.b, 0.35); const Color font_readonly_color = Color(mono_color.r, mono_color.g, mono_color.b, 0.65); const Color font_placeholder_color = Color(mono_color.r, mono_color.g, mono_color.b, 0.6); + const Color font_outline_color = Color(0, 0, 0, 0); const Color selection_color = accent_color * Color(1, 1, 1, 0.4); const Color disabled_color = mono_color.inverted().lerp(base_color, 0.7); const Color disabled_bg_color = mono_color.inverted().lerp(base_color, 0.9); @@ -816,6 +817,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { style_write_movie_button->set_expand_margin(SIDE_RIGHT, 2 * EDSCALE); theme->set_stylebox("MovieWriterButtonPressed", "EditorStyles", style_write_movie_button); + // MenuButton theme->set_stylebox("normal", "MenuButton", style_menu); theme->set_stylebox("hover", "MenuButton", style_widget_hover); theme->set_stylebox("pressed", "MenuButton", style_menu); @@ -826,6 +828,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("font_hover_color", "MenuButton", font_hover_color); theme->set_color("font_hover_pressed_color", "MenuButton", font_hover_pressed_color); theme->set_color("font_focus_color", "MenuButton", font_focus_color); + theme->set_color("font_outline_color", "MenuButton", font_outline_color); + + theme->set_constant("outline_size", "MenuButton", 0 * EDSCALE); theme->set_stylebox("MenuHover", "EditorStyles", style_widget_hover); @@ -842,6 +847,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("font_focus_color", "Button", font_focus_color); theme->set_color("font_pressed_color", "Button", accent_color); theme->set_color("font_disabled_color", "Button", font_disabled_color); + theme->set_color("font_outline_color", "Button", font_outline_color); theme->set_color("icon_normal_color", "Button", icon_normal_color); theme->set_color("icon_hover_color", "Button", icon_hover_color); @@ -849,6 +855,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("icon_pressed_color", "Button", icon_pressed_color); theme->set_color("icon_disabled_color", "Button", icon_disabled_color); + theme->set_constant("outline_size", "Button", 0 * EDSCALE); + const float ACTION_BUTTON_EXTRA_MARGIN = 32 * EDSCALE; theme->set_type_variation("InspectorActionButton", "Button"); @@ -895,6 +903,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("font_focus_color", "MenuBar", font_focus_color); theme->set_color("font_pressed_color", "MenuBar", accent_color); theme->set_color("font_disabled_color", "MenuBar", font_disabled_color); + theme->set_color("font_outline_color", "MenuBar", font_outline_color); theme->set_color("icon_normal_color", "MenuBar", icon_normal_color); theme->set_color("icon_hover_color", "MenuBar", icon_hover_color); @@ -902,6 +911,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("icon_pressed_color", "MenuBar", icon_pressed_color); theme->set_color("icon_disabled_color", "MenuBar", icon_disabled_color); + theme->set_constant("outline_size", "MenuBar", 0 * EDSCALE); + // OptionButton Ref<StyleBoxFlat> style_option_button_focus = style_widget_focus->duplicate(); Ref<StyleBoxFlat> style_option_button_normal = style_widget->duplicate(); @@ -932,6 +943,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("font_focus_color", "OptionButton", font_focus_color); theme->set_color("font_pressed_color", "OptionButton", accent_color); theme->set_color("font_disabled_color", "OptionButton", font_disabled_color); + theme->set_color("font_outline_color", "OptionButton", font_outline_color); theme->set_color("icon_normal_color", "OptionButton", icon_normal_color); theme->set_color("icon_hover_color", "OptionButton", icon_hover_color); @@ -943,6 +955,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_constant("arrow_margin", "OptionButton", widget_default_margin.x - 2 * EDSCALE); theme->set_constant("modulate_arrow", "OptionButton", true); theme->set_constant("h_separation", "OptionButton", 4 * EDSCALE); + theme->set_constant("outline_size", "OptionButton", 0 * EDSCALE); // CheckButton theme->set_stylebox("normal", "CheckButton", style_menu); @@ -967,6 +980,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("font_focus_color", "CheckButton", font_focus_color); theme->set_color("font_pressed_color", "CheckButton", accent_color); theme->set_color("font_disabled_color", "CheckButton", font_disabled_color); + theme->set_color("font_outline_color", "CheckButton", font_outline_color); theme->set_color("icon_normal_color", "CheckButton", icon_normal_color); theme->set_color("icon_hover_color", "CheckButton", icon_hover_color); @@ -976,6 +990,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_constant("h_separation", "CheckButton", 8 * EDSCALE); theme->set_constant("check_v_offset", "CheckButton", 0 * EDSCALE); + theme->set_constant("outline_size", "CheckButton", 0 * EDSCALE); // Checkbox Ref<StyleBoxFlat> sb_checkbox = style_menu->duplicate(); @@ -1001,6 +1016,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("font_focus_color", "CheckBox", font_focus_color); theme->set_color("font_pressed_color", "CheckBox", accent_color); theme->set_color("font_disabled_color", "CheckBox", font_disabled_color); + theme->set_color("font_outline_color", "CheckBox", font_outline_color); theme->set_color("icon_normal_color", "CheckBox", icon_normal_color); theme->set_color("icon_hover_color", "CheckBox", icon_hover_color); @@ -1010,6 +1026,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_constant("h_separation", "CheckBox", 8 * EDSCALE); theme->set_constant("check_v_offset", "CheckBox", 0 * EDSCALE); + theme->set_constant("outline_size", "CheckBox", 0 * EDSCALE); // PopupDialog theme->set_stylebox("panel", "PopupDialog", style_popup); @@ -1043,6 +1060,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("font_accelerator_color", "PopupMenu", font_disabled_color); theme->set_color("font_disabled_color", "PopupMenu", font_disabled_color); theme->set_color("font_separator_color", "PopupMenu", font_disabled_color); + theme->set_color("font_outline_color", "PopupMenu", font_outline_color); theme->set_icon("checked", "PopupMenu", theme->get_icon(SNAME("GuiChecked"), SNAME("EditorIcons"))); theme->set_icon("unchecked", "PopupMenu", theme->get_icon(SNAME("GuiUnchecked"), SNAME("EditorIcons"))); theme->set_icon("radio_checked", "PopupMenu", theme->get_icon(SNAME("GuiRadioChecked"), SNAME("EditorIcons"))); @@ -1063,6 +1081,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { const int vsep_base = extra_spacing + default_margin_size + 6; const int force_even_vsep = vsep_base + (vsep_base % 2); theme->set_constant("v_separation", "PopupMenu", force_even_vsep * EDSCALE); + theme->set_constant("outline_size", "PopupMenu", 0 * EDSCALE); theme->set_constant("item_start_padding", "PopupMenu", default_margin_size * 1.5 * EDSCALE); theme->set_constant("item_end_padding", "PopupMenu", default_margin_size * 1.5 * EDSCALE); @@ -1171,6 +1190,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("custom_button_font_highlight", "Tree", font_hover_color); theme->set_color("font_color", "Tree", font_color); theme->set_color("font_selected_color", "Tree", mono_color); + theme->set_color("font_outline_color", "Tree", font_outline_color); theme->set_color("title_button_color", "Tree", font_color); theme->set_color("drop_position_color", "Tree", accent_color); theme->set_constant("v_separation", "Tree", widget_default_margin.y - EDSCALE); @@ -1180,6 +1200,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_constant("button_margin", "Tree", default_margin_size * EDSCALE); theme->set_constant("scroll_border", "Tree", 40 * EDSCALE); theme->set_constant("scroll_speed", "Tree", 12); + theme->set_constant("outline_size", "Tree", 0 * EDSCALE); const Color guide_color = mono_color * Color(1, 1, 1, 0.05); Color relationship_line_color = mono_color * Color(1, 1, 1, relationship_line_opacity); @@ -1269,11 +1290,13 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_stylebox("selected", "ItemList", style_tree_selected); theme->set_color("font_color", "ItemList", font_color); theme->set_color("font_selected_color", "ItemList", mono_color); + theme->set_color("font_outline_color", "ItemList", font_outline_color); theme->set_color("guide_color", "ItemList", guide_color); theme->set_constant("v_separation", "ItemList", force_even_vsep * 0.5 * EDSCALE); theme->set_constant("h_separation", "ItemList", 6 * EDSCALE); theme->set_constant("icon_margin", "ItemList", 6 * EDSCALE); theme->set_constant("line_separation", "ItemList", 3 * EDSCALE); + theme->set_constant("outline_size", "ItemList", 0 * EDSCALE); // TabBar & TabContainer Ref<StyleBoxFlat> style_tabbar_background = make_flat_stylebox(dark_color_1, 0, 0, 0, 0, corner_radius * EDSCALE); @@ -1291,8 +1314,10 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_stylebox("button_highlight", "TabBar", style_menu); theme->set_color("font_selected_color", "TabContainer", font_color); theme->set_color("font_unselected_color", "TabContainer", font_disabled_color); + theme->set_color("font_outline_color", "TabContainer", font_outline_color); theme->set_color("font_selected_color", "TabBar", font_color); theme->set_color("font_unselected_color", "TabBar", font_disabled_color); + theme->set_color("font_outline_color", "TabBar", font_outline_color); theme->set_color("drop_mark_color", "TabContainer", tab_highlight); theme->set_color("drop_mark_color", "TabBar", tab_highlight); theme->set_icon("menu", "TabContainer", theme->get_icon(SNAME("GuiTabMenu"), SNAME("EditorIcons"))); @@ -1309,7 +1334,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_icon("drop_mark", "TabContainer", theme->get_icon(SNAME("GuiTabDropMark"), SNAME("EditorIcons"))); theme->set_icon("drop_mark", "TabBar", theme->get_icon(SNAME("GuiTabDropMark"), SNAME("EditorIcons"))); theme->set_constant("side_margin", "TabContainer", 0); + theme->set_constant("outline_size", "TabContainer", 0 * EDSCALE); theme->set_constant("h_separation", "TabBar", 4 * EDSCALE); + theme->set_constant("outline_size", "TabBar", 0 * EDSCALE); // Content of each tab. Ref<StyleBoxFlat> style_content_panel = style_default->duplicate(); @@ -1400,10 +1427,12 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("font_selected_color", "LineEdit", mono_color); theme->set_color("font_uneditable_color", "LineEdit", font_readonly_color); theme->set_color("font_placeholder_color", "LineEdit", font_placeholder_color); + theme->set_color("font_outline_color", "LineEdit", font_outline_color); theme->set_color("caret_color", "LineEdit", font_color); theme->set_color("selection_color", "LineEdit", selection_color); theme->set_color("clear_button_color", "LineEdit", font_color); theme->set_color("clear_button_color_pressed", "LineEdit", accent_color); + theme->set_constant("outline_size", "LineEdit", 0 * EDSCALE); // TextEdit theme->set_stylebox("normal", "TextEdit", style_line_edit); @@ -1414,9 +1443,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("font_color", "TextEdit", font_color); theme->set_color("font_readonly_color", "TextEdit", font_readonly_color); theme->set_color("font_placeholder_color", "TextEdit", font_placeholder_color); + theme->set_color("font_outline_color", "TextEdit", font_outline_color); theme->set_color("caret_color", "TextEdit", font_color); theme->set_color("selection_color", "TextEdit", selection_color); theme->set_constant("line_spacing", "TextEdit", 4 * EDSCALE); + theme->set_constant("outline_size", "TextEdit", 0 * EDSCALE); theme->set_icon("h_grabber", "SplitContainer", theme->get_icon(SNAME("GuiHsplitter"), SNAME("EditorIcons"))); theme->set_icon("v_grabber", "SplitContainer", theme->get_icon(SNAME("GuiVsplitter"), SNAME("EditorIcons"))); @@ -1549,9 +1580,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { // RichTextLabel theme->set_color("default_color", "RichTextLabel", font_color); theme->set_color("font_shadow_color", "RichTextLabel", Color(0, 0, 0, 0)); + theme->set_color("font_outline_color", "RichTextLabel", font_outline_color); theme->set_constant("shadow_offset_x", "RichTextLabel", 1 * EDSCALE); theme->set_constant("shadow_offset_y", "RichTextLabel", 1 * EDSCALE); theme->set_constant("shadow_outline_size", "RichTextLabel", 1 * EDSCALE); + theme->set_constant("outline_size", "RichTextLabel", 0 * EDSCALE); theme->set_stylebox("focus", "RichTextLabel", make_empty_stylebox()); theme->set_stylebox("normal", "RichTextLabel", style_tree_bg); @@ -1590,10 +1623,12 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_stylebox("normal", "Label", style_empty); theme->set_color("font_color", "Label", font_color); theme->set_color("font_shadow_color", "Label", Color(0, 0, 0, 0)); + theme->set_color("font_outline_color", "Label", font_outline_color); theme->set_constant("shadow_offset_x", "Label", 1 * EDSCALE); theme->set_constant("shadow_offset_y", "Label", 1 * EDSCALE); theme->set_constant("shadow_outline_size", "Label", 1 * EDSCALE); theme->set_constant("line_spacing", "Label", 3 * EDSCALE); + theme->set_constant("outline_size", "Label", 0 * EDSCALE); // LinkButton theme->set_stylebox("focus", "LinkButton", style_empty); @@ -1603,6 +1638,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("font_focus_color", "LinkButton", font_focus_color); theme->set_color("font_pressed_color", "LinkButton", accent_color); theme->set_color("font_disabled_color", "LinkButton", font_disabled_color); + theme->set_color("font_outline_color", "LinkButton", font_outline_color); + + theme->set_constant("outline_size", "LinkButton", 0 * EDSCALE); // TooltipPanel + TooltipLabel // TooltipPanel is also used for custom tooltips, while TooltipLabel @@ -1638,6 +1676,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_stylebox("background", "ProgressBar", make_stylebox(theme->get_icon(SNAME("GuiProgressBar"), SNAME("EditorIcons")), 4, 4, 4, 4, 0, 0, 0, 0)); theme->set_stylebox("fill", "ProgressBar", make_stylebox(theme->get_icon(SNAME("GuiProgressFill"), SNAME("EditorIcons")), 6, 6, 6, 6, 2, 1, 2, 1)); theme->set_color("font_color", "ProgressBar", font_color); + theme->set_color("font_outline_color", "ProgressBar", font_outline_color); + theme->set_constant("outline_size", "ProgressBar", 0 * EDSCALE); // GraphEdit theme->set_stylebox("bg", "GraphEdit", style_tree_bg); diff --git a/editor/export/editor_export_platform.cpp b/editor/export/editor_export_platform.cpp index a46484bb0e..fe3c2333ed 100644 --- a/editor/export/editor_export_platform.cpp +++ b/editor/export/editor_export_platform.cpp @@ -247,7 +247,8 @@ Error EditorExportPlatform::_save_pack_file(void *p_userdata, const String &p_pa pd->file_ofs.push_back(sd); - if (pd->ep->step(TTR("Storing File:") + " " + p_path, 2 + p_file * 100 / p_total, false)) { + // TRANSLATORS: This is an editor progress label describing the storing of a file. + if (pd->ep->step(vformat(TTR("Storing File: %s"), p_path), 2 + p_file * 100 / p_total, false)) { return ERR_SKIP; } @@ -1513,7 +1514,7 @@ Error EditorExportPlatform::save_pack(const Ref<EditorExportPreset> &p_preset, b f = FileAccess::open(p_path, FileAccess::WRITE); if (f.is_null()) { DirAccess::remove_file_or_error(tmppath); - add_message(EXPORT_MESSAGE_ERROR, TTR("Save PCK"), vformat(TTR("Can't open file to read from path \"%s\"."), tmppath)); + add_message(EXPORT_MESSAGE_ERROR, TTR("Save PCK"), vformat(TTR("Can't open file for writing at path \"%s\"."), p_path)); return ERR_CANT_CREATE; } } else { @@ -1521,7 +1522,7 @@ Error EditorExportPlatform::save_pack(const Ref<EditorExportPreset> &p_preset, b f = FileAccess::open(p_path, FileAccess::READ_WRITE); if (f.is_null()) { DirAccess::remove_file_or_error(tmppath); - add_message(EXPORT_MESSAGE_ERROR, TTR("Save PCK"), vformat(TTR("Can't open executable file from path \"%s\"."), tmppath)); + add_message(EXPORT_MESSAGE_ERROR, TTR("Save PCK"), vformat(TTR("Can't open file for reading-writing at path \"%s\"."), p_path)); return ERR_FILE_CANT_OPEN; } diff --git a/editor/export/editor_export_platform_pc.cpp b/editor/export/editor_export_platform_pc.cpp index bbfd73be5e..7f934bc45b 100644 --- a/editor/export/editor_export_platform_pc.cpp +++ b/editor/export/editor_export_platform_pc.cpp @@ -33,6 +33,9 @@ #include "core/config/project_settings.h" void EditorExportPlatformPC::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const { + if (p_preset->get("texture_format/bptc")) { + r_features->push_back("bptc"); + } if (p_preset->get("texture_format/s3tc")) { r_features->push_back("s3tc"); } diff --git a/editor/icons/GodotFile.svg b/editor/icons/GodotFile.svg new file mode 100644 index 0000000000..3989c842dc --- /dev/null +++ b/editor/icons/GodotFile.svg @@ -0,0 +1 @@ +<svg height="64" viewBox="0 0 64 64" width="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path clip-rule="evenodd" d="m0 0h16v16h-16z"/></clipPath><g fill-rule="nonzero"><g clip-path="url(#a)" transform="matrix(1.68179 0 0 1.68179 18.54568 24.26388)"><path d="m0 0s-.325 1.994-.515 1.976l-36.182-3.491c-2.879-.278-5.115-2.574-5.317-5.459l-.994-14.247-27.992-1.997-1.904 12.912c-.424 2.872-2.932 5.037-5.835 5.037h-38.188c-2.902 0-5.41-2.165-5.834-5.037l-1.905-12.912-27.992 1.997-.994 14.247c-.202 2.886-2.438 5.182-5.317 5.46l-36.2 3.49c-.187.018-.324-1.978-.511-1.978l-.049-7.83 30.658-4.944 1.004-14.374c.203-2.91 2.551-5.263 5.463-5.472l38.551-2.75c.146-.01.29-.016.434-.016 2.897 0 5.401 2.166 5.825 5.038l1.959 13.286h28.005l1.959-13.286c.423-2.871 2.93-5.037 5.831-5.037.142 0 .284.005.423.015l38.556 2.75c2.911.209 5.26 2.562 5.463 5.472l1.003 14.374 30.645 4.966z" fill="#fff" transform="matrix(.0717673866 0 0 -.0717673866 15.02102684 10.60436247)"/><path d="m0 0v-59.041c.108-.001.216-.005.323-.015l36.196-3.49c1.896-.183 3.382-1.709 3.514-3.609l1.116-15.978 31.574-2.253 2.175 14.747c.282 1.912 1.922 3.329 3.856 3.329h38.188c1.933 0 3.573-1.417 3.855-3.329l2.175-14.747 31.575 2.253 1.115 15.978c.133 1.9 1.618 3.425 3.514 3.609l36.182 3.49c.107.01.214.014.322.015v4.711l.015.005v54.325h.134c4.795 6.12 9.232 12.569 13.487 19.449-5.651 9.62-12.575 18.217-19.976 26.182-6.864-3.455-13.531-7.369-19.828-11.534-3.151 3.132-6.7 5.694-10.186 8.372-3.425 2.751-7.285 4.768-10.946 7.118 1.09 8.117 1.629 16.108 1.846 24.448-9.446 4.754-19.519 7.906-29.708 10.17-4.068-6.837-7.788-14.241-11.028-21.479-3.842.642-7.702.88-11.567.926v.006c-.027 0-.052-.006-.075-.006-.024 0-.049.006-.073.006v-.006c-3.872-.046-7.729-.284-11.572-.926-3.238 7.238-6.956 14.642-11.03 21.479-10.184-2.264-20.258-5.416-29.703-10.17.216-8.34.755-16.331 1.848-24.448-3.668-2.35-7.523-4.367-10.949-7.118-3.481-2.678-7.036-5.24-10.188-8.372-6.297 4.165-12.962 8.079-19.828 11.534-7.401-7.965-14.321-16.562-19.974-26.182 4.253-6.88 8.693-13.329 13.487-19.449z" fill="#478cbf" transform="matrix(.0717673866 0 0 -.0717673866 .9775427 6.36721431)"/><path d="m0 0-1.121-16.063c-.135-1.936-1.675-3.477-3.611-3.616l-38.555-2.751c-.094-.007-.188-.01-.281-.01-1.916 0-3.569 1.406-3.852 3.33l-2.211 14.994h-31.459l-2.211-14.994c-.297-2.018-2.101-3.469-4.133-3.32l-38.555 2.751c-1.936.139-3.476 1.68-3.611 3.616l-1.121 16.063-32.547 3.138c.015-3.498.06-7.33.06-8.093 0-34.374 43.605-50.896 97.781-51.086h.133c54.176.19 97.766 16.712 97.766 51.086 0 .777.047 4.593.063 8.093z" fill="#478cbf" transform="matrix(.0717673866 0 0 -.0717673866 12.69056087 11.39003484)"/><path d="m0 0c0-12.052-9.765-21.815-21.813-21.815-12.042 0-21.81 9.763-21.81 21.815 0 12.044 9.768 21.802 21.81 21.802 12.048 0 21.813-9.758 21.813-21.802" fill="#fff" transform="matrix(.0717673866 0 0 -.0717673866 5.88277961 8.08717647)"/><path d="m0 0c0-7.994-6.479-14.473-14.479-14.473-7.996 0-14.479 6.479-14.479 14.473s6.483 14.479 14.479 14.479c8 0 14.479-6.485 14.479-14.479" fill="#414042" transform="matrix(.0717673866 0 0 -.0717673866 5.50623617 8.18010546)"/><path d="m0 0c-3.878 0-7.021 2.858-7.021 6.381v20.081c0 3.52 3.143 6.381 7.021 6.381s7.028-2.861 7.028-6.381v-20.081c0-3.523-3.15-6.381-7.028-6.381" fill="#fff" transform="matrix(.0717673866 0 0 -.0717673866 7.99962959 9.79524234)"/><path d="m0 0c0-12.052 9.765-21.815 21.815-21.815 12.041 0 21.808 9.763 21.808 21.815 0 12.044-9.767 21.802-21.808 21.802-12.05 0-21.815-9.758-21.815-21.802" fill="#fff" transform="matrix(.0717673866 0 0 -.0717673866 10.11682439 8.08717647)"/><path d="m0 0c0-7.994 6.477-14.473 14.471-14.473 8.002 0 14.479 6.479 14.479 14.473s-6.477 14.479-14.479 14.479c-7.994 0-14.471-6.485-14.471-14.479" fill="#414042" transform="matrix(.0717673866 0 0 -.0717673866 10.49354024 8.18010546)"/></g><path d="m14 5c-2.199 0-4 1.801-4 4v46c0 2.199 1.801 4 4 4h36c2.199 0 4-1.801 4-4v-33h-.008c.002-.248-.079-.501-.285-.707l-16-16c-.188-.187-.442-.289-.707-.289v-.004zm0 2h22v12c0 2.199 1.801 4 4 4h12v32c0 1.125-.875 2-2 2h-36c-1.125 0-2-.875-2-2v-46c0-1.125.875-2 2-2z" fill="#fff" fill-opacity=".59" transform="translate(0 -.000017)"/></g></svg> diff --git a/editor/icons/GodotMonochrome.svg b/editor/icons/GodotMonochrome.svg new file mode 100644 index 0000000000..d0991e7343 --- /dev/null +++ b/editor/icons/GodotMonochrome.svg @@ -0,0 +1 @@ +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#fff" fill-rule="nonzero" transform="matrix(.0165985 0 0 .0165985 -.498437 -.50081)"><path d="m417.615 76.875c-42.392 9.424-84.326 22.545-123.642 42.334.899 34.716 3.143 67.98 7.693 101.768-15.268 9.782-31.315 18.177-45.576 29.628-14.49 11.148-29.29 21.813-42.41 34.85-26.212-17.337-53.955-33.63-82.535-48.012-30.808 33.156-59.614 68.94-83.145 108.985 18.493 29.029 38.329 58.205 56.699 80.959v245.765c.45.005.899.021 1.344.063l150.67 14.527c7.892.762 14.077 7.115 14.627 15.024l4.646 66.509 131.43 9.379 9.055-61.386c1.174-7.959 8-13.858 16.05-13.858h158.961c8.047 0 14.873 5.899 16.047 13.858l9.055 61.386 131.434-9.379 4.642-66.509c.554-7.909 6.735-14.258 14.627-15.024l150.611-14.527c.446-.042.891-.058 1.34-.063v-19.611l.063-.02v-226.134c21.216-26.71 41.307-56.172 56.699-80.959-23.523-40.045-52.345-75.829-83.152-108.985-28.573 14.382-56.325 30.675-82.537 48.012-13.117-13.037-27.89-23.702-42.401-34.85-14.257-11.451-30.323-19.846-45.562-29.628 4.537-33.788 6.78-67.052 7.683-101.768-39.32-19.789-81.249-32.91-123.662-42.334-16.933 28.46-32.419 59.279-45.906 89.408-15.993-2.672-32.06-3.662-48.149-3.853v-.026c-.112 0-.216.026-.312.026-.1 0-.205-.026-.305-.026v.026c-16.117.191-32.171 1.181-48.168 3.853-13.478-30.129-28.955-60.948-45.914-89.408zm-119.199 359.523c50.151 0 90.799 40.618 90.799 90.752 0 50.168-40.648 90.809-90.799 90.809-50.126 0-90.787-40.641-90.787-90.809 0-50.134 40.661-90.752 90.787-90.752zm427.178 0c50.122 0 90.779 40.618 90.779 90.752 0 50.168-40.657 90.809-90.779 90.809-50.16 0-90.807-40.641-90.807-90.809 0-50.134 40.647-90.752 90.807-90.752zm-213.6 53.11c16.143 0 29.254 11.908 29.254 26.56v83.59c0 14.665-13.111 26.563-29.254 26.563-16.142 0-29.226-11.898-29.226-26.563v-83.59c0-14.652 13.084-26.56 29.226-26.56z"/><path d="m0 0-1.121-16.063c-.135-1.936-1.675-3.477-3.611-3.616l-38.555-2.751c-.094-.007-.188-.01-.281-.01-1.916 0-3.569 1.406-3.852 3.33l-2.211 14.994h-31.459l-2.211-14.994c-.297-2.018-2.101-3.469-4.133-3.32l-38.555 2.751c-1.936.139-3.476 1.68-3.611 3.616l-1.121 16.063-32.547 3.138c.015-3.498.06-7.33.06-8.093 0-34.374 43.605-50.896 97.781-51.086h.133c54.176.19 97.766 16.712 97.766 51.086 0 .777.047 4.593.063 8.093z" transform="matrix(4.16261 0 0 -4.16261 784.071 718.723)"/><path d="m0 0c0-7.994-6.479-14.473-14.479-14.473-7.996 0-14.479 6.479-14.479 14.473s6.483 14.479 14.479 14.479c8 0 14.479-6.485 14.479-14.479" transform="matrix(4.16261 0 0 -4.16261 367.367 532.537)"/><path d="m0 0c0-7.994 6.477-14.473 14.471-14.473 8.002 0 14.479 6.479 14.479 14.473s-6.477 14.479-14.479 14.479c-7.994 0-14.471-6.485-14.471-14.479" transform="matrix(4.16261 0 0 -4.16261 656.641 532.537)"/></g></svg> diff --git a/editor/icons/editor_icons_builders.py b/editor/icons/editor_icons_builders.py index fb9a57c429..2b621071ce 100644 --- a/editor/icons/editor_icons_builders.py +++ b/editor/icons/editor_icons_builders.py @@ -58,6 +58,8 @@ def make_editor_icons_action(target, source, env): thumb_medium_indices.append(str(index)) if icon_name.endswith("BigThumb"): # don't know a better way to handle this thumb_big_indices.append(str(index)) + if icon_name.endswith("GodotFile"): # don't know a better way to handle this + thumb_big_indices.append(str(index)) s.write('\t"{0}"'.format(icon_name)) diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index d0f04cb46f..32c16255dd 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -2267,6 +2267,7 @@ Node *ResourceImporterScene::pre_import(const String &p_source_file, const HashM Ref<EditorSceneFormatImporter> importer; String ext = p_source_file.get_extension().to_lower(); + // TRANSLATORS: This is an editor progress label. EditorProgress progress("pre-import", TTR("Pre-Import Scene"), 0); progress.step(TTR("Importing Scene..."), 0); diff --git a/editor/import/scene_import_settings.cpp b/editor/import/scene_import_settings.cpp index 6eebb84216..348aad1162 100644 --- a/editor/import/scene_import_settings.cpp +++ b/editor/import/scene_import_settings.cpp @@ -142,24 +142,23 @@ void SceneImportSettings::_fill_material(Tree *p_tree, const Ref<Material> &p_ma String import_id; bool has_import_id = false; - bool created = false; - if (!material_set.has(p_material)) { - material_set.insert(p_material); - created = true; - } - if (p_material->has_meta("import_id")) { import_id = p_material->get_meta("import_id"); has_import_id = true; } else if (!p_material->get_name().is_empty()) { import_id = p_material->get_name(); has_import_id = true; + } else if (unnamed_material_name_map.has(p_material)) { + import_id = unnamed_material_name_map[p_material]; } else { - import_id = "@MATERIAL:" + itos(material_set.size() - 1); + import_id = "@MATERIAL:" + itos(material_map.size()); + unnamed_material_name_map[p_material] = import_id; } + bool created = false; if (!material_map.has(import_id)) { MaterialData md; + created = true; md.has_import_id = has_import_id; md.material = p_material; @@ -169,6 +168,7 @@ void SceneImportSettings::_fill_material(Tree *p_tree, const Ref<Material> &p_ma } MaterialData &material_data = material_map[import_id]; + ERR_FAIL_COND(p_material != material_data.material); Ref<Texture2D> icon = get_theme_icon(SNAME("StandardMaterial3D"), SNAME("EditorIcons")); @@ -564,10 +564,10 @@ void SceneImportSettings::open_settings(const String &p_path, bool p_for_animati base_path = p_path; - material_set.clear(); mesh_set.clear(); animation_map.clear(); material_map.clear(); + unnamed_material_name_map.clear(); mesh_map.clear(); node_map.clear(); defaults.clear(); diff --git a/editor/import/scene_import_settings.h b/editor/import/scene_import_settings.h index 69bf58b627..d65bb1404a 100644 --- a/editor/import/scene_import_settings.h +++ b/editor/import/scene_import_settings.h @@ -107,6 +107,7 @@ class SceneImportSettings : public ConfirmationDialog { HashMap<StringName, Variant> settings; }; HashMap<String, MaterialData> material_map; + HashMap<Ref<Material>, String> unnamed_material_name_map; struct MeshData { bool has_import_id; @@ -141,7 +142,6 @@ class SceneImportSettings : public ConfirmationDialog { void _fill_scene(Node *p_node, TreeItem *p_parent_item); HashSet<Ref<Mesh>> mesh_set; - HashSet<Ref<Material>> material_set; String selected_type; String selected_id; diff --git a/editor/input_event_configuration_dialog.cpp b/editor/input_event_configuration_dialog.cpp index fb450a41d3..c620858439 100644 --- a/editor/input_event_configuration_dialog.cpp +++ b/editor/input_event_configuration_dialog.cpp @@ -538,6 +538,8 @@ void InputEventConfigurationDialog::_notification(int p_what) { icon_cache.joypad_button = get_theme_icon(SNAME("JoyButton"), SNAME("EditorIcons")); icon_cache.joypad_axis = get_theme_icon(SNAME("JoyAxis"), SNAME("EditorIcons")); + event_as_text->add_theme_font_override("font", get_theme_font(SNAME("bold"), SNAME("EditorFonts"))); + _update_input_list(); } break; } @@ -591,7 +593,6 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() { event_as_text = memnew(Label); event_as_text->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART); event_as_text->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER); - event_as_text->add_theme_font_override("font", get_theme_font(SNAME("bold"), SNAME("EditorFonts"))); event_as_text->add_theme_font_size_override("font_size", 18 * EDSCALE); main_vbox->add_child(event_as_text); diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index b33ad67f23..c5bfd968d7 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -1134,6 +1134,7 @@ void AnimationPlayerEditor::_animation_duplicate() { name_dialog_op = TOOL_DUPLICATE_ANIM; name_dialog->set_title(TTR("Duplicate Animation")); + // TRANSLATORS: This is a label for the new name field in the "Duplicate Animation" dialog. name_title->set_text(TTR("Duplicated Animation Name:")); name->set_text(new_name); name_dialog->popup_centered(Size2(300, 90)); diff --git a/editor/plugins/cast_2d_editor_plugin.cpp b/editor/plugins/cast_2d_editor_plugin.cpp index 723082c293..331b4749cc 100644 --- a/editor/plugins/cast_2d_editor_plugin.cpp +++ b/editor/plugins/cast_2d_editor_plugin.cpp @@ -78,7 +78,7 @@ bool Cast2DEditor::forward_canvas_gui_input(const Ref<InputEvent> &p_event) { } } else if (pressed) { EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton(); - undo_redo->create_action(TTR("Set target_position")); + undo_redo->create_action(TTR("Set Target Position")); undo_redo->add_do_property(node, "target_position", target_position); undo_redo->add_do_method(canvas_item_editor, "update_viewport"); undo_redo->add_undo_property(node, "target_position", original_target_position); diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index b001b4f766..96f5aeedf0 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -1666,6 +1666,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { } break; case TRANSFORM_Z_AXIS: { _edit.plane = TRANSFORM_VIEW; + // TRANSLATORS: This refers to the transform of the view plane. set_message(TTR("View Plane Transform."), 2); } break; @@ -3392,7 +3393,6 @@ void Node3DEditorViewport::_menu_option(int p_option) { VIEW_DISPLAY_SHADELESS, VIEW_DISPLAY_LIGHTING, VIEW_DISPLAY_NORMAL_BUFFER, - VIEW_DISPLAY_WIREFRAME, VIEW_DISPLAY_DEBUG_SHADOW_ATLAS, VIEW_DISPLAY_DEBUG_DIRECTIONAL_SHADOW_ATLAS, VIEW_DISPLAY_DEBUG_VOXEL_GI_ALBEDO, @@ -3422,7 +3422,6 @@ void Node3DEditorViewport::_menu_option(int p_option) { Viewport::DEBUG_DRAW_UNSHADED, Viewport::DEBUG_DRAW_LIGHTING, Viewport::DEBUG_DRAW_NORMAL_BUFFER, - Viewport::DEBUG_DRAW_WIREFRAME, Viewport::DEBUG_DRAW_SHADOW_ATLAS, Viewport::DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS, Viewport::DEBUG_DRAW_VOXEL_GI_ALBEDO, @@ -3445,9 +3444,7 @@ void Node3DEditorViewport::_menu_option(int p_option) { Viewport::DEBUG_DRAW_MOTION_VECTORS, }; - int idx = 0; - - while (display_options[idx] != VIEW_MAX) { + for (int idx = 0; display_options[idx] != VIEW_MAX; idx++) { int id = display_options[idx]; int item_idx = view_menu->get_popup()->get_item_index(id); if (item_idx != -1) { @@ -3461,7 +3458,6 @@ void Node3DEditorViewport::_menu_option(int p_option) { if (id == p_option) { viewport->set_debug_draw(debug_draw_modes[idx]); } - idx++; } } break; } @@ -4961,6 +4957,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p view_menu->get_popup()->add_separator(); view_menu->get_popup()->add_check_shortcut(ED_SHORTCUT("spatial_editor/view_lock_rotation", TTR("Lock View Rotation")), VIEW_LOCK_ROTATION); view_menu->get_popup()->add_separator(); + // TRANSLATORS: "Normal" as in "normal life", not "normal vector". view_menu->get_popup()->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/view_display_normal", TTR("Display Normal")), VIEW_DISPLAY_NORMAL); view_menu->get_popup()->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/view_display_wireframe", TTR("Display Wireframe")), VIEW_DISPLAY_WIREFRAME); view_menu->get_popup()->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/view_display_overdraw", TTR("Display Overdraw")), VIEW_DISPLAY_OVERDRAW); diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 74d82aa4a2..ccbc7c3d74 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -33,6 +33,7 @@ #include "core/config/project_settings.h" #include "core/input/input.h" #include "core/io/file_access.h" +#include "core/io/json.h" #include "core/io/resource_loader.h" #include "core/os/keyboard.h" #include "core/os/os.h" @@ -209,6 +210,27 @@ Ref<EditorSyntaxHighlighter> EditorPlainTextSyntaxHighlighter::_create() const { return syntax_highlighter; } +//// + +void EditorJSONSyntaxHighlighter::_update_cache() { + highlighter->set_text_edit(text_edit); + highlighter->clear_keyword_colors(); + highlighter->clear_member_keyword_colors(); + highlighter->clear_color_regions(); + + highlighter->set_symbol_color(EDITOR_GET("text_editor/theme/highlighting/symbol_color")); + highlighter->set_number_color(EDITOR_GET("text_editor/theme/highlighting/number_color")); + + const Color string_color = EDITOR_GET("text_editor/theme/highlighting/string_color"); + highlighter->add_color_region("\"", "\"", string_color); +} + +Ref<EditorSyntaxHighlighter> EditorJSONSyntaxHighlighter::_create() const { + Ref<EditorJSONSyntaxHighlighter> syntax_highlighter; + syntax_highlighter.instantiate(); + return syntax_highlighter; +} + //////////////////////////////////////////////////////////////////////////////// /*** SCRIPT EDITOR ****/ @@ -702,9 +724,10 @@ void ScriptEditor::_open_recent_script(int p_idx) { if (FileAccess::exists(path)) { List<String> extensions; ResourceLoader::get_recognized_extensions_for_type("Script", &extensions); + ResourceLoader::get_recognized_extensions_for_type("JSON", &extensions); if (extensions.find(path.get_extension())) { - Ref<Script> scr = ResourceLoader::load(path); + Ref<Resource> scr = ResourceLoader::load(path); if (scr.is_valid()) { edit(scr, true); return; @@ -1182,6 +1205,7 @@ void ScriptEditor::_menu_option(int p_option) { List<String> extensions; ResourceLoader::get_recognized_extensions_for_type("Script", &extensions); + ResourceLoader::get_recognized_extensions_for_type("JSON", &extensions); bool built_in = !path.is_resource_file(); if (extensions.find(path.get_extension()) || built_in) { @@ -1196,7 +1220,7 @@ void ScriptEditor::_menu_option(int p_option) { } } - Ref<Script> scr = ResourceLoader::load(path); + Ref<Resource> scr = ResourceLoader::load(path); if (!scr.is_valid()) { EditorNode::get_singleton()->show_warning(TTR("Could not load file at:") + "\n\n" + path, TTR("Error!")); file_dialog_option = -1; @@ -2319,12 +2343,23 @@ bool ScriptEditor::edit(const Ref<Resource> &p_resource, int p_line, int p_col, } se->add_syntax_highlighter(highlighter); - if (scr != nullptr && !highlighter_set) { - PackedStringArray languages = highlighter->_get_supported_languages(); + if (highlighter_set) { + continue; + } + + PackedStringArray languages = highlighter->_get_supported_languages(); + // If script try language, else use extension. + if (scr != nullptr) { if (languages.has(scr->get_language()->get_name())) { se->set_syntax_highlighter(highlighter); highlighter_set = true; } + continue; + } + + if (languages.has(p_resource->get_path().get_extension())) { + se->set_syntax_highlighter(highlighter); + highlighter_set = true; } } @@ -2483,7 +2518,7 @@ void ScriptEditor::save_all_scripts() { } else { // For built-in scripts, save their scenes instead. const String scene_path = edited_res->get_path().get_slice("::", 0); - if (!scenes_to_save.has(scene_path)) { + if (!scene_path.is_empty() && !scenes_to_save.has(scene_path)) { scenes_to_save.push_back(scene_path); } } @@ -2536,6 +2571,14 @@ void ScriptEditor::reload_scripts(bool p_refresh_only) { scr->reload(true); } + Ref<JSON> json = edited_res; + if (json != nullptr) { + Ref<JSON> rel_json = ResourceLoader::load(json->get_path(), json->get_class(), ResourceFormatLoader::CACHE_MODE_IGNORE); + ERR_CONTINUE(!rel_json.is_valid()); + json->parse(rel_json->get_parsed_text(), true); + json->set_last_modified_time(rel_json->get_last_modified_time()); + } + Ref<TextFile> text_file = edited_res; if (text_file.is_valid()) { text_file->reload_from_file(); @@ -2564,8 +2607,9 @@ void ScriptEditor::open_text_file_create_dialog(const String &p_base_path, const Ref<Resource> ScriptEditor::open_file(const String &p_file) { List<String> extensions; ResourceLoader::get_recognized_extensions_for_type("Script", &extensions); + ResourceLoader::get_recognized_extensions_for_type("JSON", &extensions); if (extensions.find(p_file.get_extension())) { - Ref<Script> scr = ResourceLoader::load(p_file); + Ref<Resource> scr = ResourceLoader::load(p_file); if (!scr.is_valid()) { EditorNode::get_singleton()->show_warning(TTR("Could not load file at:") + "\n\n" + p_file, TTR("Error!")); return Ref<Resource>(); @@ -2866,8 +2910,8 @@ bool ScriptEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data if (file.is_empty() || !FileAccess::exists(file)) { continue; } - if (ResourceLoader::exists(file, "Script")) { - Ref<Script> scr = ResourceLoader::load(file); + if (ResourceLoader::exists(file, "Script") || ResourceLoader::exists(file, "JSON")) { + Ref<Resource> scr = ResourceLoader::load(file); if (scr.is_valid()) { return true; } @@ -2947,7 +2991,7 @@ void ScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Co continue; } - if (!ResourceLoader::exists(file, "Script") && !textfile_extensions.has(file.get_extension())) { + if (!ResourceLoader::exists(file, "Script") && !ResourceLoader::exists(file, "JSON") && !textfile_extensions.has(file.get_extension())) { continue; } @@ -3105,6 +3149,7 @@ void ScriptEditor::set_window_layout(Ref<ConfigFile> p_layout) { HashSet<String> loaded_scripts; List<String> extensions; ResourceLoader::get_recognized_extensions_for_type("Script", &extensions); + ResourceLoader::get_recognized_extensions_for_type("JSON", &extensions); for (int i = 0; i < scripts.size(); i++) { String path = scripts[i]; @@ -3123,7 +3168,7 @@ void ScriptEditor::set_window_layout(Ref<ConfigFile> p_layout) { loaded_scripts.insert(path); if (extensions.find(path.get_extension())) { - Ref<Script> scr = ResourceLoader::load(path); + Ref<Resource> scr = ResourceLoader::load(path); if (!scr.is_valid()) { continue; } @@ -3477,6 +3522,12 @@ void ScriptEditor::_open_script_request(const String &p_path) { return; } + Ref<JSON> json = ResourceLoader::load(p_path); + if (json.is_valid()) { + script_editor->edit(json, false); + return; + } + Error err; Ref<TextFile> text_file = script_editor->_load_text_file(p_path, &err); if (text_file.is_valid()) { @@ -3539,7 +3590,8 @@ void ScriptEditor::_on_find_in_files_result_selected(String fpath, int line_numb return; } else { Ref<Script> scr = res; - if (scr.is_valid()) { + Ref<JSON> json = res; + if (scr.is_valid() || json.is_valid()) { edit(scr); ScriptTextEditor *ste = Object::cast_to<ScriptTextEditor>(_get_current_editor()); @@ -3942,6 +3994,10 @@ ScriptEditor::ScriptEditor() { add_theme_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("ScriptEditorPanel"), SNAME("EditorStyles"))); tab_container->add_theme_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("ScriptEditor"), SNAME("EditorStyles"))); + + Ref<EditorJSONSyntaxHighlighter> json_syntax_highlighter; + json_syntax_highlighter.instantiate(); + register_syntax_highlighter(json_syntax_highlighter); } ScriptEditor::~ScriptEditor() { @@ -3963,6 +4019,8 @@ void ScriptEditorPlugin::edit(Object *p_object) { } } script_editor->edit(p_script); + } else if (Object::cast_to<JSON>(p_object)) { + script_editor->edit(Object::cast_to<JSON>(p_object)); } else if (Object::cast_to<TextFile>(p_object)) { script_editor->edit(Object::cast_to<TextFile>(p_object)); } @@ -3977,6 +4035,10 @@ bool ScriptEditorPlugin::handles(Object *p_object) const { return true; } + if (Object::cast_to<JSON>(p_object)) { + return true; + } + return p_object->is_class("Script"); } diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index 988d07621c..f8e684ae34 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -96,6 +96,24 @@ public: virtual Ref<EditorSyntaxHighlighter> _create() const override; }; +class EditorJSONSyntaxHighlighter : public EditorSyntaxHighlighter { + GDCLASS(EditorJSONSyntaxHighlighter, EditorSyntaxHighlighter) + +private: + Ref<CodeHighlighter> highlighter; + +public: + virtual void _update_cache() override; + virtual Dictionary _get_line_syntax_highlighting_impl(int p_line) override { return highlighter->get_line_syntax_highlighting(p_line); } + + virtual PackedStringArray _get_supported_languages() const override { return PackedStringArray{ "json" }; } + virtual String _get_name() const override { return TTR("JSON"); } + + virtual Ref<EditorSyntaxHighlighter> _create() const override; + + EditorJSONSyntaxHighlighter() { highlighter.instantiate(); } +}; + /////////////////////////////////////////////////////////////////////////////// class ScriptEditorQuickOpen : public ConfirmationDialog { diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index c41bf4b8cc..20b3cf3618 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -807,13 +807,17 @@ void SpriteFramesEditor::_animation_name_edited() { return; } + if (new_name.is_empty()) { + new_name = "new_animation"; + } + new_name = new_name.replace("/", "_").replace(",", " "); String name = new_name; int counter = 0; while (frames->has_animation(name)) { counter++; - name = new_name + " " + itos(counter); + name = new_name + "_" + itos(counter); } EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton(); diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp index a376699e54..ceb170d7d8 100644 --- a/editor/plugins/text_editor.cpp +++ b/editor/plugins/text_editor.cpp @@ -30,6 +30,7 @@ #include "text_editor.h" +#include "core/io/json.h" #include "core/os/keyboard.h" #include "editor/editor_node.h" #include "editor/editor_settings.h" @@ -67,12 +68,12 @@ void TextEditor::_load_theme_settings() { String TextEditor::get_name() { String name; - name = text_file->get_path().get_file(); + name = edited_res->get_path().get_file(); if (name.is_empty()) { // This appears for newly created built-in text_files before saving the scene. name = TTR("[unsaved]"); - } else if (text_file->is_built_in()) { - const String &text_file_name = text_file->get_name(); + } else if (edited_res->is_built_in()) { + const String &text_file_name = edited_res->get_name(); if (!text_file_name.is_empty()) { // If the built-in text_file has a custom resource name defined, // display the built-in text_file name as follows: `ResourceName (scene_file.tscn)` @@ -88,20 +89,29 @@ String TextEditor::get_name() { } Ref<Texture2D> TextEditor::get_theme_icon() { - return EditorNode::get_singleton()->get_object_icon(text_file.ptr(), ""); + return EditorNode::get_singleton()->get_object_icon(edited_res.ptr(), "TextFile"); } Ref<Resource> TextEditor::get_edited_resource() const { - return text_file; + return edited_res; } void TextEditor::set_edited_resource(const Ref<Resource> &p_res) { - ERR_FAIL_COND(text_file.is_valid()); + ERR_FAIL_COND(edited_res.is_valid()); ERR_FAIL_COND(p_res.is_null()); - text_file = p_res; + edited_res = p_res; + + Ref<TextFile> text_file = edited_res; + if (text_file != nullptr) { + code_editor->get_text_editor()->set_text(text_file->get_text()); + } + + Ref<JSON> json_file = edited_res; + if (json_file != nullptr) { + code_editor->get_text_editor()->set_text(json_file->get_parsed_text()); + } - code_editor->get_text_editor()->set_text(text_file->get_text()); code_editor->get_text_editor()->clear_undo_history(); code_editor->get_text_editor()->tag_saved_version(); @@ -118,6 +128,8 @@ void TextEditor::enable_editor(Control *p_shortcut_context) { _load_theme_settings(); + _validate_script(); + if (p_shortcut_context) { for (int i = 0; i < edit_hb->get_child_count(); ++i) { Control *c = cast_to<Control>(edit_hb->get_child(i)); @@ -143,7 +155,7 @@ PackedInt32Array TextEditor::get_breakpoints() { } void TextEditor::reload_text() { - ERR_FAIL_COND(text_file.is_null()); + ERR_FAIL_COND(edited_res.is_null()); CodeEdit *te = code_editor->get_text_editor(); int column = te->get_caret_column(); @@ -151,7 +163,16 @@ void TextEditor::reload_text() { int h = te->get_h_scroll(); int v = te->get_v_scroll(); - te->set_text(text_file->get_text()); + Ref<TextFile> text_file = edited_res; + if (text_file != nullptr) { + te->set_text(text_file->get_text()); + } + + Ref<JSON> json_file = edited_res; + if (json_file != nullptr) { + te->set_text(json_file->get_parsed_text()); + } + te->set_caret_line(row); te->set_caret_column(column); te->set_h_scroll(h); @@ -166,6 +187,20 @@ void TextEditor::reload_text() { void TextEditor::_validate_script() { emit_signal(SNAME("name_changed")); emit_signal(SNAME("edited_script_changed")); + + Ref<JSON> json_file = edited_res; + if (json_file != nullptr) { + CodeEdit *te = code_editor->get_text_editor(); + + te->set_line_background_color(code_editor->get_error_pos().x, Color(0, 0, 0, 0)); + code_editor->set_error(""); + + if (json_file->parse(te->get_text(), true) != OK) { + code_editor->set_error(json_file->get_error_message()); + code_editor->set_error_pos(json_file->get_error_line(), 0); + te->set_line_background_color(code_editor->get_error_pos().x, EDITOR_GET("text_editor/theme/highlighting/mark_color")); + } + } } void TextEditor::_update_bookmark_list() { @@ -204,13 +239,22 @@ void TextEditor::_bookmark_item_pressed(int p_idx) { } void TextEditor::apply_code() { - text_file->set_text(code_editor->get_text_editor()->get_text()); + Ref<TextFile> text_file = edited_res; + if (text_file != nullptr) { + text_file->set_text(code_editor->get_text_editor()->get_text()); + } + + Ref<JSON> json_file = edited_res; + if (json_file != nullptr) { + json_file->parse(code_editor->get_text_editor()->get_text(), true); + } + code_editor->get_text_editor()->get_syntax_highlighter()->update_cache(); } bool TextEditor::is_unsaved() { const bool unsaved = code_editor->get_text_editor()->get_version() != code_editor->get_text_editor()->get_saved_version() || - text_file->get_path().is_empty(); // In memory. + edited_res->get_path().is_empty(); // In memory. return unsaved; } @@ -431,7 +475,7 @@ void TextEditor::_convert_case(CodeTextEditor::CaseStyle p_case) { } static ScriptEditorBase *create_editor(const Ref<Resource> &p_resource) { - if (Object::cast_to<TextFile>(*p_resource)) { + if (Object::cast_to<TextFile>(*p_resource) || Object::cast_to<JSON>(*p_resource)) { return memnew(TextEditor); } return nullptr; @@ -656,4 +700,5 @@ TextEditor::~TextEditor() { } void TextEditor::validate() { + this->code_editor->validate_script(); } diff --git a/editor/plugins/text_editor.h b/editor/plugins/text_editor.h index 6db81508b3..85e0fee627 100644 --- a/editor/plugins/text_editor.h +++ b/editor/plugins/text_editor.h @@ -41,7 +41,7 @@ class TextEditor : public ScriptEditorBase { private: CodeTextEditor *code_editor = nullptr; - Ref<TextFile> text_file; + Ref<Resource> edited_res; bool editor_enabled = false; HBoxContainer *edit_hb = nullptr; diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index 073adb467a..2519928ea3 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -3223,6 +3223,7 @@ void ThemeTypeEditor::_update_stylebox_from_leading() { if (!leading_stylebox.pinned || leading_stylebox.stylebox.is_null()) { return; } + ERR_FAIL_COND_MSG(edited_theme.is_null(), "Leading stylebox does not have an edited theme to update"); // Prevent changes from immediately being reported while the operation is still ongoing. edited_theme->_freeze_change_propagation(); @@ -3706,7 +3707,11 @@ void ThemeEditorPlugin::edit(Object *p_node) { if (Object::cast_to<Theme>(p_node)) { theme_editor->edit(Object::cast_to<Theme>(p_node)); } else { - theme_editor->edit(Ref<Theme>()); + // We intentionally keep a reference to the last used theme to work around + // the the editor being hidden while base resources are edited. Uncomment + // the following line again and remove this comment once that bug has been + // fixed (scheduled for Godot 4.1 in PR 73098): + // theme_editor->edit(Ref<Theme>()); } } diff --git a/editor/plugins/tiles/tile_atlas_view.cpp b/editor/plugins/tiles/tile_atlas_view.cpp index fd651dd507..43c6d1a48b 100644 --- a/editor/plugins/tiles/tile_atlas_view.cpp +++ b/editor/plugins/tiles/tile_atlas_view.cpp @@ -404,13 +404,16 @@ void TileAtlasView::_draw_background_right() { } void TileAtlasView::set_atlas_source(TileSet *p_tile_set, TileSetAtlasSource *p_tile_set_atlas_source, int p_source_id) { - ERR_FAIL_COND(!p_tile_set); - ERR_FAIL_COND(!p_tile_set_atlas_source); + tile_set = p_tile_set; + tile_set_atlas_source = p_tile_set_atlas_source; + + if (!tile_set) { + return; + } + ERR_FAIL_COND(p_source_id < 0); ERR_FAIL_COND(p_tile_set->get_source(p_source_id) != p_tile_set_atlas_source); - tile_set = p_tile_set; - tile_set_atlas_source = p_tile_set_atlas_source; source_id = p_source_id; // Show or hide the view. diff --git a/editor/plugins/tiles/tile_map_editor.cpp b/editor/plugins/tiles/tile_map_editor.cpp index 04a09a97e7..4d9e2db682 100644 --- a/editor/plugins/tiles/tile_map_editor.cpp +++ b/editor/plugins/tiles/tile_map_editor.cpp @@ -2055,7 +2055,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { select_tool_button->set_flat(true); select_tool_button->set_toggle_mode(true); select_tool_button->set_button_group(tool_buttons_group); - select_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/selection_tool", "Selection", Key::S)); + select_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/selection_tool", TTR("Selection"), Key::S)); select_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTilesPlugin::_update_toolbar)); tilemap_tiles_tools_buttons->add_child(select_tool_button); @@ -2063,7 +2063,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { paint_tool_button->set_flat(true); paint_tool_button->set_toggle_mode(true); paint_tool_button->set_button_group(tool_buttons_group); - paint_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/paint_tool", "Paint", Key::D)); + paint_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/paint_tool", TTR("Paint"), Key::D)); paint_tool_button->set_tooltip_text(TTR("Shift: Draw line.") + "\n" + TTR("Shift+Ctrl: Draw rectangle.")); paint_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTilesPlugin::_update_toolbar)); tilemap_tiles_tools_buttons->add_child(paint_tool_button); @@ -2072,7 +2072,8 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { line_tool_button->set_flat(true); line_tool_button->set_toggle_mode(true); line_tool_button->set_button_group(tool_buttons_group); - line_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/line_tool", "Line", Key::L)); + // TRANSLATORS: This refers to the line tool in the tilemap editor. + line_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/line_tool", TTR("Line", "Tool"), Key::L)); line_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTilesPlugin::_update_toolbar)); tilemap_tiles_tools_buttons->add_child(line_tool_button); @@ -2080,7 +2081,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { rect_tool_button->set_flat(true); rect_tool_button->set_toggle_mode(true); rect_tool_button->set_button_group(tool_buttons_group); - rect_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/rect_tool", "Rect", Key::R)); + rect_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/rect_tool", TTR("Rect"), Key::R)); rect_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTilesPlugin::_update_toolbar)); tilemap_tiles_tools_buttons->add_child(rect_tool_button); @@ -2088,7 +2089,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { bucket_tool_button->set_flat(true); bucket_tool_button->set_toggle_mode(true); bucket_tool_button->set_button_group(tool_buttons_group); - bucket_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/bucket_tool", "Bucket", Key::B)); + bucket_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/bucket_tool", TTR("Bucket"), Key::B)); bucket_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTilesPlugin::_update_toolbar)); tilemap_tiles_tools_buttons->add_child(bucket_tool_button); toolbar->add_child(tilemap_tiles_tools_buttons); @@ -2104,7 +2105,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { picker_button = memnew(Button); picker_button->set_flat(true); picker_button->set_toggle_mode(true); - picker_button->set_shortcut(ED_SHORTCUT("tiles_editor/picker", "Picker", Key::P)); + picker_button->set_shortcut(ED_SHORTCUT("tiles_editor/picker", TTR("Picker"), Key::P)); picker_button->set_tooltip_text(TTR("Alternatively hold Ctrl with other tools to pick tile.")); picker_button->connect("pressed", callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport)); tools_settings->add_child(picker_button); @@ -2113,7 +2114,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { erase_button = memnew(Button); erase_button->set_flat(true); erase_button->set_toggle_mode(true); - erase_button->set_shortcut(ED_SHORTCUT("tiles_editor/eraser", "Eraser", Key::E)); + erase_button->set_shortcut(ED_SHORTCUT("tiles_editor/eraser", TTR("Eraser"), Key::E)); erase_button->set_tooltip_text(TTR("Alternatively use RMB to erase tiles.")); erase_button->connect("pressed", callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport)); tools_settings->add_child(erase_button); @@ -3180,7 +3181,7 @@ void TileMapEditorTerrainsPlugin::_update_terrains_tree() { terrain_set_tree_item->set_icon(0, main_vbox_container->get_theme_icon(SNAME("TerrainMatchSides"), SNAME("EditorIcons"))); matches = String(TTR("Matches Sides Only")); } - terrain_set_tree_item->set_text(0, vformat("Terrain Set %d (%s)", terrain_set_index, matches)); + terrain_set_tree_item->set_text(0, vformat(TTR("Terrain Set %d (%s)"), terrain_set_index, matches)); terrain_set_tree_item->set_selectable(0, false); for (int terrain_index = 0; terrain_index < tile_set->get_terrains_count(terrain_set_index); terrain_index++) { @@ -3329,7 +3330,7 @@ TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() { main_vbox_container = memnew(VBoxContainer); main_vbox_container->connect("tree_entered", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_theme)); main_vbox_container->connect("theme_changed", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_theme)); - main_vbox_container->set_name("Terrains"); + main_vbox_container->set_name(TTR("Terrains")); HSplitContainer *tilemap_tab_terrains = memnew(HSplitContainer); tilemap_tab_terrains->set_h_size_flags(Control::SIZE_EXPAND_FILL); @@ -3365,7 +3366,7 @@ TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() { paint_tool_button->set_toggle_mode(true); paint_tool_button->set_button_group(tool_buttons_group); paint_tool_button->set_pressed(true); - paint_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/paint_tool", "Paint", Key::D)); + paint_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/paint_tool", TTR("Paint"), Key::D)); paint_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_toolbar)); tilemap_tiles_tools_buttons->add_child(paint_tool_button); @@ -3373,7 +3374,7 @@ TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() { line_tool_button->set_flat(true); line_tool_button->set_toggle_mode(true); line_tool_button->set_button_group(tool_buttons_group); - line_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/line_tool", "Line", Key::L)); + line_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/line_tool", TTR("Line"), Key::L)); line_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_toolbar)); tilemap_tiles_tools_buttons->add_child(line_tool_button); @@ -3381,7 +3382,7 @@ TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() { rect_tool_button->set_flat(true); rect_tool_button->set_toggle_mode(true); rect_tool_button->set_button_group(tool_buttons_group); - rect_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/rect_tool", "Rect", Key::R)); + rect_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/rect_tool", TTR("Rect"), Key::R)); rect_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_toolbar)); tilemap_tiles_tools_buttons->add_child(rect_tool_button); @@ -3389,7 +3390,7 @@ TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() { bucket_tool_button->set_flat(true); bucket_tool_button->set_toggle_mode(true); bucket_tool_button->set_button_group(tool_buttons_group); - bucket_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/bucket_tool", "Bucket", Key::B)); + bucket_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/bucket_tool", TTR("Bucket"), Key::B)); bucket_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_toolbar)); tilemap_tiles_tools_buttons->add_child(bucket_tool_button); @@ -3406,7 +3407,7 @@ TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() { picker_button = memnew(Button); picker_button->set_flat(true); picker_button->set_toggle_mode(true); - picker_button->set_shortcut(ED_SHORTCUT("tiles_editor/picker", "Picker", Key::P)); + picker_button->set_shortcut(ED_SHORTCUT("tiles_editor/picker", TTR("Picker"), Key::P)); picker_button->connect("pressed", callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport)); tools_settings->add_child(picker_button); @@ -3414,7 +3415,7 @@ TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() { erase_button = memnew(Button); erase_button->set_flat(true); erase_button->set_toggle_mode(true); - erase_button->set_shortcut(ED_SHORTCUT("tiles_editor/eraser", "Eraser", Key::E)); + erase_button->set_shortcut(ED_SHORTCUT("tiles_editor/eraser", TTR("Eraser"), Key::E)); erase_button->connect("pressed", callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport)); tools_settings->add_child(erase_button); diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp index 912fdb03a9..fcefbb7d06 100644 --- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp +++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp @@ -34,6 +34,7 @@ #include "editor/editor_inspector.h" #include "editor/editor_node.h" +#include "editor/editor_property_name_processor.h" #include "editor/editor_scale.h" #include "editor/editor_settings.h" #include "editor/editor_undo_redo_manager.h" @@ -106,13 +107,13 @@ bool TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::_get(const StringN void TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::_get_property_list(List<PropertyInfo> *p_list) const { p_list->push_back(PropertyInfo(Variant::NIL, TTR("Atlas"), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_CATEGORY)); - p_list->push_back(PropertyInfo(Variant::INT, "id", PROPERTY_HINT_RANGE, "0," + itos(INT_MAX) + ",1")); - p_list->push_back(PropertyInfo(Variant::STRING, "name", PROPERTY_HINT_NONE, "")); - p_list->push_back(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D")); - p_list->push_back(PropertyInfo(Variant::VECTOR2I, "margins", PROPERTY_HINT_NONE, "suffix:px")); - p_list->push_back(PropertyInfo(Variant::VECTOR2I, "separation", PROPERTY_HINT_NONE)); - p_list->push_back(PropertyInfo(Variant::VECTOR2I, "texture_region_size", PROPERTY_HINT_NONE, "suffix:px")); - p_list->push_back(PropertyInfo(Variant::BOOL, "use_texture_padding", PROPERTY_HINT_NONE, "")); + p_list->push_back(PropertyInfo(Variant::INT, PNAME("id"), PROPERTY_HINT_RANGE, "0," + itos(INT_MAX) + ",1")); + p_list->push_back(PropertyInfo(Variant::STRING, PNAME("name"))); + p_list->push_back(PropertyInfo(Variant::OBJECT, PNAME("texture"), PROPERTY_HINT_RESOURCE_TYPE, "Texture2D")); + p_list->push_back(PropertyInfo(Variant::VECTOR2I, PNAME("margins"), PROPERTY_HINT_NONE, "suffix:px")); + p_list->push_back(PropertyInfo(Variant::VECTOR2I, PNAME("separation"))); + p_list->push_back(PropertyInfo(Variant::VECTOR2I, PNAME("texture_region_size"), PROPERTY_HINT_NONE, "suffix:px")); + p_list->push_back(PropertyInfo(Variant::BOOL, PNAME("use_texture_padding"))); } void TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::_bind_methods() { @@ -120,10 +121,9 @@ void TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::_bind_methods() { } void TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::edit(Ref<TileSet> p_tile_set, TileSetAtlasSource *p_tile_set_atlas_source, int p_source_id) { - ERR_FAIL_COND(!p_tile_set.is_valid()); ERR_FAIL_COND(!p_tile_set_atlas_source); ERR_FAIL_COND(p_source_id < 0); - ERR_FAIL_COND(p_tile_set->get_source(p_source_id) != p_tile_set_atlas_source); + ERR_FAIL_COND(p_tile_set.is_valid() && p_tile_set->get_source(p_source_id) != p_tile_set_atlas_source); if (p_tile_set == tile_set && p_tile_set_atlas_source == tile_set_atlas_source && p_source_id == source_id) { return; @@ -393,11 +393,11 @@ void TileSetAtlasSourceEditor::AtlasTileProxyObject::_get_property_list(List<Pro if (tiles.size() == 1) { if (tiles.front()->get().alternative == 0) { p_list->push_back(PropertyInfo(Variant::NIL, TTR("Base Tile"), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_CATEGORY)); - p_list->push_back(PropertyInfo(Variant::VECTOR2I, "atlas_coords")); - p_list->push_back(PropertyInfo(Variant::VECTOR2I, "size_in_atlas")); + p_list->push_back(PropertyInfo(Variant::VECTOR2I, PNAME("atlas_coords"))); + p_list->push_back(PropertyInfo(Variant::VECTOR2I, PNAME("size_in_atlas"))); } else { p_list->push_back(PropertyInfo(Variant::NIL, TTR("Alternative Tile"), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_CATEGORY)); - p_list->push_back(PropertyInfo(Variant::INT, "alternative_id")); + p_list->push_back(PropertyInfo(Variant::INT, PNAME("alternative_id"))); } } else { p_list->push_back(PropertyInfo(Variant::NIL, TTR("Tiles"), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_CATEGORY)); @@ -414,17 +414,17 @@ void TileSetAtlasSourceEditor::AtlasTileProxyObject::_get_property_list(List<Pro } if (all_alternatve_id_zero) { - p_list->push_back(PropertyInfo(Variant::NIL, "Animation", PROPERTY_HINT_NONE, "animation_", PROPERTY_USAGE_GROUP)); - p_list->push_back(PropertyInfo(Variant::INT, "animation_columns", PROPERTY_HINT_NONE, "")); - p_list->push_back(PropertyInfo(Variant::VECTOR2I, "animation_separation", PROPERTY_HINT_NONE, "")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "animation_speed", PROPERTY_HINT_NONE, "")); - p_list->push_back(PropertyInfo(Variant::INT, "animation_frames_count", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_ARRAY, "Frames,animation_frame_")); + p_list->push_back(PropertyInfo(Variant::NIL, GNAME("Animation", "animation_"), PROPERTY_HINT_NONE, "animation_", PROPERTY_USAGE_GROUP)); + p_list->push_back(PropertyInfo(Variant::INT, PNAME("animation_columns"))); + p_list->push_back(PropertyInfo(Variant::VECTOR2I, PNAME("animation_separation"))); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("animation_speed"))); + p_list->push_back(PropertyInfo(Variant::INT, PNAME("animation_frames_count"), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_ARRAY, "Frames,animation_frame_")); // Not optimal, but returns value for the first tile. This is similar to what MultiNodeEdit does. if (tile_set_atlas_source->get_tile_animation_frames_count(tiles.front()->get().tile) == 1) { p_list->push_back(PropertyInfo(Variant::FLOAT, "animation_frame_0/duration", PROPERTY_HINT_NONE, "suffix:s", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_READ_ONLY)); } else { for (int i = 0; i < tile_set_atlas_source->get_tile_animation_frames_count(tiles.front()->get().tile); i++) { - p_list->push_back(PropertyInfo(Variant::FLOAT, vformat("animation_frame_%d/duration", i), PROPERTY_HINT_NONE, "suffix:s")); + p_list->push_back(PropertyInfo(Variant::FLOAT, vformat("animation_frame_%d/%s", i, PNAME("duration")), PROPERTY_HINT_NONE, "suffix:s")); } } } @@ -611,6 +611,10 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() { tile_data_editors_tree->clear(); + if (tile_set.is_null()) { + return; + } + TreeItem *root = tile_data_editors_tree->create_item(); TreeItem *group; @@ -638,9 +642,9 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() { // List of editors. // --- Rendering --- - ADD_TILE_DATA_EDITOR_GROUP("Rendering"); + ADD_TILE_DATA_EDITOR_GROUP(TTR("Rendering")); - ADD_TILE_DATA_EDITOR(group, "Texture Origin", "texture_origin"); + ADD_TILE_DATA_EDITOR(group, TTR("Texture Origin"), "texture_origin"); if (!tile_data_editors.has("texture_origin")) { TileDataTextureOriginEditor *tile_data_texture_origin_editor = memnew(TileDataTextureOriginEditor); tile_data_texture_origin_editor->hide(); @@ -650,7 +654,7 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() { tile_data_editors["texture_origin"] = tile_data_texture_origin_editor; } - ADD_TILE_DATA_EDITOR(group, "Modulate", "modulate"); + ADD_TILE_DATA_EDITOR(group, TTR("Modulate"), "modulate"); if (!tile_data_editors.has("modulate")) { TileDataDefaultEditor *tile_data_modulate_editor = memnew(TileDataDefaultEditor()); tile_data_modulate_editor->hide(); @@ -660,7 +664,7 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() { tile_data_editors["modulate"] = tile_data_modulate_editor; } - ADD_TILE_DATA_EDITOR(group, "Z Index", "z_index"); + ADD_TILE_DATA_EDITOR(group, TTR("Z Index"), "z_index"); if (!tile_data_editors.has("z_index")) { TileDataDefaultEditor *tile_data_z_index_editor = memnew(TileDataDefaultEditor()); tile_data_z_index_editor->hide(); @@ -670,7 +674,7 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() { tile_data_editors["z_index"] = tile_data_z_index_editor; } - ADD_TILE_DATA_EDITOR(group, "Y Sort Origin", "y_sort_origin"); + ADD_TILE_DATA_EDITOR(group, TTR("Y Sort Origin"), "y_sort_origin"); if (!tile_data_editors.has("y_sort_origin")) { TileDataYSortEditor *tile_data_y_sort_editor = memnew(TileDataYSortEditor); tile_data_y_sort_editor->hide(); @@ -681,7 +685,7 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() { } for (int i = 0; i < tile_set->get_occlusion_layers_count(); i++) { - ADD_TILE_DATA_EDITOR(group, vformat("Occlusion Layer %d", i), vformat("occlusion_layer_%d", i)); + ADD_TILE_DATA_EDITOR(group, vformat(TTR("Occlusion Layer %d"), i), vformat("occlusion_layer_%d", i)); if (!tile_data_editors.has(vformat("occlusion_layer_%d", i))) { TileDataOcclusionShapeEditor *tile_data_occlusion_shape_editor = memnew(TileDataOcclusionShapeEditor()); tile_data_occlusion_shape_editor->hide(); @@ -697,7 +701,7 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() { } // --- Rendering --- - ADD_TILE_DATA_EDITOR(root, "Terrains", "terrain_set"); + ADD_TILE_DATA_EDITOR(root, TTR("Terrains"), "terrain_set"); if (!tile_data_editors.has("terrain_set")) { TileDataTerrainsEditor *tile_data_terrains_editor = memnew(TileDataTerrainsEditor); tile_data_terrains_editor->hide(); @@ -707,7 +711,7 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() { } // --- Miscellaneous --- - ADD_TILE_DATA_EDITOR(root, "Probability", "probability"); + ADD_TILE_DATA_EDITOR(root, TTR("Probability"), "probability"); if (!tile_data_editors.has("probability")) { TileDataDefaultEditor *tile_data_probability_editor = memnew(TileDataDefaultEditor()); tile_data_probability_editor->hide(); @@ -718,9 +722,9 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() { } // --- Physics --- - ADD_TILE_DATA_EDITOR_GROUP("Physics"); + ADD_TILE_DATA_EDITOR_GROUP(TTR("Physics")); for (int i = 0; i < tile_set->get_physics_layers_count(); i++) { - ADD_TILE_DATA_EDITOR(group, vformat("Physics Layer %d", i), vformat("physics_layer_%d", i)); + ADD_TILE_DATA_EDITOR(group, vformat(TTR("Physics Layer %d"), i), vformat("physics_layer_%d", i)); if (!tile_data_editors.has(vformat("physics_layer_%d", i))) { TileDataCollisionEditor *tile_data_collision_editor = memnew(TileDataCollisionEditor()); tile_data_collision_editor->hide(); @@ -736,9 +740,9 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() { } // --- Navigation --- - ADD_TILE_DATA_EDITOR_GROUP("Navigation"); + ADD_TILE_DATA_EDITOR_GROUP(TTR("Navigation")); for (int i = 0; i < tile_set->get_navigation_layers_count(); i++) { - ADD_TILE_DATA_EDITOR(group, vformat("Navigation Layer %d", i), vformat("navigation_layer_%d", i)); + ADD_TILE_DATA_EDITOR(group, vformat(TTR("Navigation Layer %d"), i), vformat("navigation_layer_%d", i)); if (!tile_data_editors.has(vformat("navigation_layer_%d", i))) { TileDataNavigationEditor *tile_data_navigation_editor = memnew(TileDataNavigationEditor()); tile_data_navigation_editor->hide(); @@ -754,14 +758,14 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() { } // --- Custom Data --- - ADD_TILE_DATA_EDITOR_GROUP("Custom Data"); + ADD_TILE_DATA_EDITOR_GROUP(TTR("Custom Data")); for (int i = 0; i < tile_set->get_custom_data_layers_count(); i++) { String editor_name = vformat("custom_data_%d", i); String prop_name = tile_set->get_custom_data_layer_name(i); Variant::Type prop_type = tile_set->get_custom_data_layer_type(i); if (prop_name.is_empty()) { - ADD_TILE_DATA_EDITOR(group, vformat("Custom Data %d", i), editor_name); + ADD_TILE_DATA_EDITOR(group, vformat(TTR("Custom Data %d"), i), editor_name); } else { ADD_TILE_DATA_EDITOR(group, prop_name, editor_name); } @@ -919,6 +923,10 @@ void TileSetAtlasSourceEditor::_update_atlas_view() { alternative_tiles_control->get_child(i)->queue_free(); } + if (tile_set.is_null()) { + return; + } + Vector2i pos; Vector2 texture_region_base_size = tile_set_atlas_source->get_texture_region_size(); int texture_region_base_size_min = MIN(texture_region_base_size.x, texture_region_base_size.y); @@ -2407,6 +2415,14 @@ void TileSetAtlasSourceEditor::_notification(int p_what) { } } } break; + + case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { + if (EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor/localize_settings")) { + EditorPropertyNameProcessor::Style style = EditorPropertyNameProcessor::get_singleton()->get_settings_style(); + atlas_source_inspector->set_property_name_style(style); + tile_inspector->set_property_name_style(style); + } + } break; } } @@ -2476,6 +2492,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() { tile_inspector->edit(tile_proxy_object); tile_inspector->set_use_folding(true); tile_inspector->connect("property_selected", callable_mp(this, &TileSetAtlasSourceEditor::_inspector_property_selected)); + tile_inspector->set_property_name_style(EditorPropertyNameProcessor::get_singleton()->get_settings_style()); middle_vbox_container->add_child(tile_inspector); tile_inspector_no_tile_selected_label = memnew(Label); @@ -2527,6 +2544,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() { atlas_source_inspector->set_v_size_flags(SIZE_EXPAND_FILL); atlas_source_inspector->set_show_categories(true); atlas_source_inspector->edit(atlas_source_proxy_object); + atlas_source_inspector->set_property_name_style(EditorPropertyNameProcessor::get_singleton()->get_settings_style()); middle_vbox_container->add_child(atlas_source_inspector); // -- Right side -- diff --git a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp index cc276597fa..101ec5f66c 100644 --- a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp +++ b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp @@ -32,6 +32,7 @@ #include "editor/editor_file_system.h" #include "editor/editor_node.h" +#include "editor/editor_property_name_processor.h" #include "editor/editor_resource_preview.h" #include "editor/editor_scale.h" #include "editor/editor_settings.h" @@ -362,6 +363,14 @@ void TileSetScenesCollectionSourceEditor::_notification(int p_what) { _update_scenes_list(); _update_action_buttons(); } break; + + case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { + if (EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor/localize_settings")) { + EditorPropertyNameProcessor::Style style = EditorPropertyNameProcessor::get_singleton()->get_settings_style(); + scenes_collection_source_inspector->set_property_name_style(style); + tile_inspector->set_property_name_style(style); + } + } break; } } @@ -503,6 +512,7 @@ TileSetScenesCollectionSourceEditor::TileSetScenesCollectionSourceEditor() { scenes_collection_source_inspector = memnew(EditorInspector); scenes_collection_source_inspector->set_vertical_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED); scenes_collection_source_inspector->edit(scenes_collection_source_proxy_object); + scenes_collection_source_inspector->set_property_name_style(EditorPropertyNameProcessor::get_singleton()->get_settings_style()); middle_vbox_container->add_child(scenes_collection_source_inspector); // Tile inspector. @@ -519,6 +529,7 @@ TileSetScenesCollectionSourceEditor::TileSetScenesCollectionSourceEditor() { tile_inspector->set_vertical_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED); tile_inspector->edit(tile_proxy_object); tile_inspector->set_use_folding(true); + tile_inspector->set_property_name_style(EditorPropertyNameProcessor::get_singleton()->get_settings_style()); middle_vbox_container->add_child(tile_inspector); // Scenes list. diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index dc019d8e7c..1d510703b0 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -2013,16 +2013,25 @@ void ProjectManager::_notification(int p_what) { } Ref<Texture2D> ProjectManager::_file_dialog_get_icon(const String &p_path) { - return singleton->icon_type_cache["ObjectHR"]; + if (p_path.get_extension().to_lower() == "godot") { + return singleton->icon_type_cache["GodotMonochrome"]; + } + + return singleton->icon_type_cache["Object"]; +} + +Ref<Texture2D> ProjectManager::_file_dialog_get_thumbnail(const String &p_path) { + if (p_path.get_extension().to_lower() == "godot") { + return singleton->icon_type_cache["GodotFile"]; + } + + return Ref<Texture2D>(); } void ProjectManager::_build_icon_type_cache(Ref<Theme> p_theme) { List<StringName> tl; p_theme->get_icon_list(SNAME("EditorIcons"), &tl); for (List<StringName>::Element *E = tl.front(); E; E = E->next()) { - if (!ClassDB::class_exists(E->get())) { - continue; - } icon_type_cache[E->get()] = p_theme->get_icon(E->get(), SNAME("EditorIcons")); } } @@ -2651,6 +2660,7 @@ ProjectManager::ProjectManager() { break; } EditorFileDialog::get_icon_func = &ProjectManager::_file_dialog_get_icon; + EditorFileDialog::get_thumbnail_func = &ProjectManager::_file_dialog_get_thumbnail; } // TRANSLATORS: This refers to the application where users manage their Godot projects. diff --git a/editor/project_manager.h b/editor/project_manager.h index d96f5e2641..60d9c1d45b 100644 --- a/editor/project_manager.h +++ b/editor/project_manager.h @@ -144,6 +144,7 @@ class ProjectManager : public Control { void _on_search_term_changed(const String &p_term); static Ref<Texture2D> _file_dialog_get_icon(const String &p_path); + static Ref<Texture2D> _file_dialog_get_thumbnail(const String &p_path); protected: void _notification(int p_what); diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index a43745b70f..374ce98d63 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -412,7 +412,7 @@ void ProjectSettingsEditor::_action_renamed(const String &p_old_name, const Stri Dictionary action = GLOBAL_GET(old_property_name); EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton(); - undo_redo->create_action(TTR("Rename Input Action Event")); + undo_redo->create_action(TTR("Rename Input Action")); // Do: clear old, set new undo_redo->add_do_method(ProjectSettings::get_singleton(), "clear", old_property_name); undo_redo->add_do_method(ProjectSettings::get_singleton(), "set", new_property_name, action); diff --git a/editor/renames_map_3_to_4.cpp b/editor/renames_map_3_to_4.cpp index 4c47eac6a5..277df4e66c 100644 --- a/editor/renames_map_3_to_4.cpp +++ b/editor/renames_map_3_to_4.cpp @@ -33,7 +33,27 @@ #ifndef DISABLE_DEPRECATED const char *RenamesMap3To4::enum_renames[][2] = { - //// constants + // Constants + // @GlobalScope + { "BUTTON_LEFT", "MOUSE_BUTTON_LEFT" }, + { "BUTTON_MASK_LEFT", "MOUSE_BUTTON_MASK_LEFT" }, + { "BUTTON_MASK_MIDDLE", "MOUSE_BUTTON_MASK_MIDDLE" }, + { "BUTTON_MASK_RIGHT", "MOUSE_BUTTON_MASK_RIGHT" }, + { "BUTTON_MASK_XBUTTON1", "MOUSE_BUTTON_MASK_XBUTTON1" }, + { "BUTTON_MASK_XBUTTON2", "MOUSE_BUTTON_MASK_XBUTTON2" }, + { "BUTTON_MIDDLE", "MOUSE_BUTTON_MIDDLE" }, + { "BUTTON_RIGHT", "MOUSE_BUTTON_RIGHT" }, + { "BUTTON_WHEEL_DOWN", "MOUSE_BUTTON_WHEEL_DOWN" }, + { "BUTTON_WHEEL_LEFT", "MOUSE_BUTTON_WHEEL_LEFT" }, + { "BUTTON_WHEEL_RIGHT", "MOUSE_BUTTON_WHEEL_RIGHT" }, + { "BUTTON_WHEEL_UP", "MOUSE_BUTTON_WHEEL_UP" }, + { "BUTTON_XBUTTON1", "MOUSE_BUTTON_XBUTTON1" }, + { "BUTTON_XBUTTON2", "MOUSE_BUTTON_XBUTTON2" }, + { "KEY_CONTROL", "KEY_CTRL" }, + { "SIDE_BOTTOM", "MARGIN_BOTTOM" }, + { "SIDE_LEFT", "MARGIN_LEFT" }, + { "SIDE_RIGHT", "MARGIN_RIGHT" }, + { "SIDE_TOP", "MARGIN_TOP" }, { "TYPE_COLOR_ARRAY", "TYPE_PACKED_COLOR_ARRAY" }, { "TYPE_FLOAT64_ARRAY", "TYPE_PACKED_FLOAT64_ARRAY" }, { "TYPE_INT64_ARRAY", "TYPE_PACKED_INT64_ARRAY" }, @@ -47,10 +67,10 @@ const char *RenamesMap3To4::enum_renames[][2] = { { "TYPE_VECTOR2_ARRAY", "TYPE_PACKED_VECTOR2_ARRAY" }, { "TYPE_VECTOR3_ARRAY", "TYPE_PACKED_VECTOR3_ARRAY" }, - // {"FLAG_MAX", "PARTICLE_FLAG_MAX"}, // CPUParticles2D - used in more classes - { "ALIGN_BEGIN", "ALIGNMENT_BEGIN" }, //AspectRatioContainer - { "ALIGN_CENTER", "ALIGNMENT_CENTER" }, //AspectRatioContainer - { "ALIGN_END", "ALIGNMENT_END" }, //AspectRatioContainer + // { "FLAG_MAX", "PARTICLE_FLAG_MAX" }, // CPUParticles2D -- Used in more classes. + { "ALIGN_BEGIN", "ALIGNMENT_BEGIN" }, // AspectRatioContainer + { "ALIGN_CENTER", "ALIGNMENT_CENTER" }, // AspectRatioContainer + { "ALIGN_END", "ALIGNMENT_END" }, // AspectRatioContainer { "ARRAY_COMPRESS_BASE", "ARRAY_COMPRESS_FLAGS_BASE" }, // Mesh { "ARVR_AR", "XR_AR" }, // XRInterface { "ARVR_EXCESSIVE_MOTION", "XR_EXCESSIVE_MOTION" }, // XRInterface @@ -64,20 +84,6 @@ const char *RenamesMap3To4::enum_renames[][2] = { { "ARVR_UNKNOWN_TRACKING", "XR_UNKNOWN_TRACKING" }, // XRInterface { "BAKE_ERROR_INVALID_MESH", "BAKE_ERROR_MESHES_INVALID" }, // LightmapGI { "BODY_MODE_CHARACTER", "BODY_MODE_RIGID_LINEAR" }, // PhysicsServer - { "BUTTON_LEFT", "MOUSE_BUTTON_LEFT" }, // Globals - { "BUTTON_MASK_LEFT", "MOUSE_BUTTON_MASK_LEFT" }, // Globals - { "BUTTON_MASK_MIDDLE", "MOUSE_BUTTON_MASK_MIDDLE" }, // Globals - { "BUTTON_MASK_RIGHT", "MOUSE_BUTTON_MASK_RIGHT" }, // Globals - { "BUTTON_MASK_XBUTTON1", "MOUSE_BUTTON_MASK_XBUTTON1" }, // Globals - { "BUTTON_MASK_XBUTTON2", "MOUSE_BUTTON_MASK_XBUTTON2" }, // Globals - { "BUTTON_MIDDLE", "MOUSE_BUTTON_MIDDLE" }, // Globals - { "BUTTON_RIGHT", "MOUSE_BUTTON_RIGHT" }, // Globals - { "BUTTON_WHEEL_DOWN", "MOUSE_BUTTON_WHEEL_DOWN" }, // Globals - { "BUTTON_WHEEL_LEFT", "MOUSE_BUTTON_WHEEL_LEFT" }, // Globals - { "BUTTON_WHEEL_RIGHT", "MOUSE_BUTTON_WHEEL_RIGHT" }, // Globals - { "BUTTON_WHEEL_UP", "MOUSE_BUTTON_WHEEL_UP" }, // Globals - { "BUTTON_XBUTTON1", "MOUSE_BUTTON_XBUTTON1" }, // Globals - { "BUTTON_XBUTTON2", "MOUSE_BUTTON_XBUTTON2" }, // Globals { "CLEAR_MODE_ONLY_NEXT_FRAME", "CLEAR_MODE_ONCE" }, // SubViewport { "COMPRESS_PVRTC4", "COMPRESS_PVRTC1_4" }, // Image { "CONNECT_ONESHOT", "CONNECT_ONE_SHOT" }, // Object @@ -108,7 +114,6 @@ const char *RenamesMap3To4::enum_renames[][2] = { { "JOINT_HINGE", "JOINT_TYPE_HINGE" }, // PhysicsServer3D { "JOINT_PIN", "JOINT_TYPE_PIN" }, // PhysicsServer2D { "JOINT_SLIDER", "JOINT_TYPE_SLIDER" }, // PhysicsServer3D - { "KEY_CONTROL", "KEY_CTRL" }, // Globals { "LOOP_PING_PONG", "LOOP_PINGPONG" }, // AudioStreamWAV { "MODE_KINEMATIC", "FREEZE_MODE_KINEMATIC" }, // RigidBody { "MODE_OPEN_ANY", "FILE_MODE_OPEN_ANY" }, // FileDialog @@ -129,23 +134,19 @@ const char *RenamesMap3To4::enum_renames[][2] = { { "PAUSE_MODE_STOP", "PROCESS_MODE_PAUSABLE" }, // Node { "RENDER_DRAW_CALLS_IN_FRAME", "RENDER_TOTAL_DRAW_CALLS_IN_FRAME" }, // Performance { "RENDER_OBJECTS_IN_FRAME", "RENDER_TOTAL_OBJECTS_IN_FRAME" }, // Performance - { "SIDE_BOTTOM", "MARGIN_BOTTOM" }, // Globals - { "SIDE_LEFT", "MARGIN_LEFT" }, // Globals - { "SIDE_RIGHT", "MARGIN_RIGHT" }, // Globals - { "SIDE_TOP", "MARGIN_TOP" }, // Globals { "TEXTURE_TYPE_2D_ARRAY", "TEXTURE_LAYERED_2D_ARRAY" }, // RenderingServer { "TEXTURE_TYPE_CUBEMAP", "TEXTURE_LAYERED_CUBEMAP_ARRAY" }, // RenderingServer { "TRACKER_LEFT_HAND", "TRACKER_HAND_LEFT" }, // XRPositionalTracker { "TRACKER_RIGHT_HAND", "TRACKER_HAND_RIGHT" }, // XRPositionalTracker { "TYPE_NORMALMAP", "TYPE_NORMAL_MAP" }, // VisualShaderNodeCubemap - /// enums - { "AlignMode", "AlignmentMode" }, //AspectRatioContainer + // Enums + { "AlignMode", "AlignmentMode" }, // AspectRatioContainer { "AnimationProcessMode", "AnimationProcessCallback" }, // AnimationTree, AnimationPlayer { "Camera2DProcessMode", "Camera2DProcessCallback" }, // Camera2D { "CubeMapSide", "CubeMapLayer" }, // RenderingServer { "DampedStringParam", "DampedSpringParam" }, // PhysicsServer2D - { "FFT_Size", "FFTSize" }, // AudioEffectPitchShift,AudioEffectSpectrumAnalyzer + { "FFT_Size", "FFTSize" }, // AudioEffectPitchShift, AudioEffectSpectrumAnalyzer { "PauseMode", "ProcessMode" }, // Node { "TimerProcessMode", "TimerProcessCallback" }, // Timer { "Tracking_status", "TrackingStatus" }, // XRInterface @@ -153,52 +154,52 @@ const char *RenamesMap3To4::enum_renames[][2] = { }; const char *RenamesMap3To4::gdscript_function_renames[][2] = { - // { "_set_name", "get_tracker_name"}, // XRPositionalTracker - CameraFeed use this - // { "_unhandled_input", "_unhandled_key_input"}, // BaseButton, ViewportContainer broke Node, FileDialog,SubViewportContainer - // { "create_gizmo", "_create_gizmo"}, // EditorNode3DGizmoPlugin - may be used - // { "get_dependencies", "_get_dependencies" }, // ResourceFormatLoader broke ResourceLoader - // { "get_extents", "get_size" }, // BoxShape, RectangleShape broke Decal, VoxelGI, GPUParticlesCollisionBox, GPUParticlesCollisionSDF, GPUParticlesCollisionHeightField, GPUParticlesAttractorBox, GPUParticlesAttractorVectorField, FogVolume - // { "get_h_offset", "get_drag_horizontal_offset"}, // Camera2D, broke PathFollow, Camera - // { "get_mode", "get_file_mode"}, // FileDialog broke Panel, Shader, CSGPolygon, Tilemap - // { "get_motion", "get_travel"}, // PhysicsTestMotionResult2D broke ParalaxLayer - // { "get_name", "get_tracker_name"}, // XRPositionalTracker broke OS, Node - // { "get_network_connected_peers", "get_peers"}, // MultiplayerAPI broke SceneTree - // { "get_network_peer", "has_multiplayer_peer"}, // MultiplayerAPI broke SceneTree - // { "get_network_unique_id", "get_unique_id"}, // MultiplayerAPI broke SceneTree - // { "get_offset", "get_position_offset" }, // GraphNode broke Gradient - // { "get_peer_port", "get_peer" }, // ENetMultiplayerPeer broke WebSocketServer - // { "get_process_mode", "get_process_callback" }, // ClippedCamera3D broke Node, Sky - // { "get_render_info", "get_rendering_info" }, // RenderingServer broke Viewport - // { "get_type", "get_tracker_type"}, // XRPositionalTracker broke GLTFAccessor, GLTFLight - // { "get_v_offset", "get_drag_vertical_offset"}, // Camera2D, broke PathFollow, Camera - // { "has_network_peer", "has_multiplayer_peer"}, // MultiplayerAPI broke SceneTree - // { "instance", "instantiate" }, // PackedScene, ClassDB - Broke FileSystemDock signal and also tscn files - [instance=ExtResource( 17 )] - this is implemented as custom rule - // { "is_listening", "is_bound"}, // PacketPeerUDP broke TCPServer, UDPServer - // { "is_refusing_new_network_connections", "is_refusing_new_connections"}, // MultiplayerAPI broke SceneTree - // { "is_valid", "has_valid_event" }, // Shortcut broke e.g. Callable - // { "listen", "bound"}, // PacketPeerUDP broke TCPServer, UDPServer - // { "load", "_load"}, // ResourceFormatLoader broke ConfigFile, Image, StreamTexture2D - // { "make_current", "set_current" }, // Camera2D broke Camera3D, Listener2D - // { "process", "_process" }, // AnimationNode - This word is commonly used - // { "save", "_save"}, // ResourceFormatLoader broke ConfigFile, Image, StreamTexture2D - // { "set_autowrap", "set_autowrap_mode" }, // AcceptDialog broke Label - Cyclic Rename - // { "set_color", "surface_set_color"}, // ImmediateMesh broke Light2D, Theme, SurfaceTool - // { "set_event", "set_shortcut" }, // BaseButton - Cyclic Rename - // { "set_extents", "set_size"}, // BoxShape, RectangleShape broke ReflectionProbe - // { "set_flag", "set_particle_flag"}, // ParticleProcessMaterial broke Window, HingeJoint3D - // { "set_h_offset", "set_drag_horizontal_offset" }, // Camera2D broke Camera3D, PathFollow3D, PathFollow2D - // { "set_margin", "set_offset" }, // Control broke Shape3D, AtlasTexture - // { "set_mode", "set_mode_file_mode" }, // FileDialog broke Panel, Shader, CSGPolygon, Tilemap - // { "set_normal", "surface_set_normal"}, // ImmediateGeometry broke SurfaceTool, WorldMarginShape2D - // { "set_offset", "set_progress" }, // PathFollow2D, PathFollow3D - Too common - // { "set_process_mode", "set_process_callback" }, // AnimationTree broke Node, Tween, Sky - // { "set_refuse_new_network_connections", "set_refuse_new_connections"}, // MultiplayerAPI broke SceneTree - // { "set_tooltip", "set_tooltip_text" }, // Control, breaks TreeItem, at least for now. - // { "set_uv", "surface_set_uv" }, // ImmediateMesh broke Polygon2D - // { "set_v_offset", "set_drag_vertical_offset" }, // Camera2D broke Camera3D, PathFollow3D, PathFollow2D - // {"get_points","get_points_id"},// Astar, broke Line2D, Convexpolygonshape - // {"get_v_scroll","get_v_scroll_bar"},//ItemList, broke TextView - // { "get_stylebox", "get_theme_stylebox" }, // Control - Will rename the method in Theme as well, skipping + // { "_set_name", "get_tracker_name" }, // XRPositionalTracker -- CameraFeed uses this. + // { "_unhandled_input", "_unhandled_key_input" }, // BaseButton, ViewportContainer -- Breaks Node, FileDialog, SubViewportContainer. + // { "create_gizmo", "_create_gizmo" }, // EditorNode3DGizmoPlugin -- May be used. + // { "get_dependencies", "_get_dependencies" }, // ResourceFormatLoader -- Breaks ResourceLoader. + // { "get_extents", "get_size" }, // BoxShape, RectangleShape -- Breaks Decal, VoxelGI, GPUParticlesCollisionBox, GPUParticlesCollisionSDF, GPUParticlesCollisionHeightField, GPUParticlesAttractorBox, GPUParticlesAttractorVectorField, FogVolume + // { "get_h_offset", "get_drag_horizontal_offset" }, // Camera2D -- Breaks PathFollow, Camera. + // { "get_mode", "get_file_mode" }, // FileDialog -- Breaks Panel, Shader, CSGPolygon, TileMap. + // { "get_motion", "get_travel" }, // PhysicsTestMotionResult2D -- Breaks ParallaxLayer. + // { "get_name", "get_tracker_name" }, // XRPositionalTracker -- Breaks OS, Node + // { "get_network_connected_peers", "get_peers" }, // MultiplayerAPI -- Breaks SceneTree. + // { "get_network_peer", "has_multiplayer_peer" }, // MultiplayerAPI -- Breaks SceneTree. + // { "get_network_unique_id", "get_unique_id"}, // MultiplayerAPI -- Breaks SceneTree. + // { "get_offset", "get_position_offset" }, // GraphNode -- Breaks Gradient. + // { "get_peer_port", "get_peer" }, // ENetMultiplayerPeer -- Breaks WebSocketServer. + // { "get_process_mode", "get_process_callback" }, // ClippedCamera3D -- Breaks Node, Sky. + // { "get_render_info", "get_rendering_info" }, // RenderingServer -- Breaks Viewport. + // { "get_type", "get_tracker_type" }, // XRPositionalTracker -- Breaks GLTFAccessor, GLTFLight. + // { "get_v_offset", "get_drag_vertical_offset" }, // Camera2D -- Breaks PathFollow, Camera. + // { "has_network_peer", "has_multiplayer_peer" }, // MultiplayerAPI -- Breaks SceneTree. + // { "instance", "instantiate" }, // PackedScene, ClassDB -- Breaks FileSystemDock signal, and also .tscn files ("[instance=ExtResource( 17 )]"). This is implemented as custom rule. + // { "is_listening", "is_bound"}, // PacketPeerUDP -- Breaks TCPServer, UDPServer. + // { "is_refusing_new_network_connections", "is_refusing_new_connections"}, // MultiplayerAPI -- Breaks SceneTree. + // { "is_valid", "has_valid_event" }, // Shortcut -- Breaks Callable, and more. + // { "listen", "bound"}, // PacketPeerUDP -- Breaks TCPServer, UDPServer. + // { "load", "_load"}, // ResourceFormatLoader -- Breaks ConfigFile, Image, StreamTexture2D. + // { "make_current", "set_current" }, // Camera2D -- Breaks Camera3D, Listener2D. + // { "process", "_process" }, // AnimationNode -- This word is too commonly used. + // { "save", "_save"}, // ResourceFormatLoader -- Breaks ConfigFile, Image, StreamTexture2D. + // { "set_autowrap", "set_autowrap_mode" }, // AcceptDialog -- Breaks Label, also a cyclic rename. + // { "set_color", "surface_set_color"}, // ImmediateMesh -- Breaks Light2D, Theme, SurfaceTool. + // { "set_event", "set_shortcut" }, // BaseButton -- Cyclic rename. + // { "set_extents", "set_size"}, // BoxShape, RectangleShape -- Breaks ReflectionProbe. + // { "set_flag", "set_particle_flag"}, // ParticleProcessMaterial -- Breaks Window, HingeJoint3D. + // { "set_h_offset", "set_drag_horizontal_offset" }, // Camera2D -- Breaks Camera3D, PathFollow3D, PathFollow2D. + // { "set_margin", "set_offset" }, // Control -- Breaks Shape3D, AtlasTexture. + // { "set_mode", "set_mode_file_mode" }, // FileDialog -- Breaks Panel, Shader, CSGPolygon, TileMap. + // { "set_normal", "surface_set_normal"}, // ImmediateGeometry -- Breaks SurfaceTool, WorldMarginShape2D. + // { "set_offset", "set_progress" }, // PathFollow2D, PathFollow3D -- Too common. + // { "set_process_mode", "set_process_callback" }, // AnimationTree -- Breaks Node, Tween, Sky. + // { "set_refuse_new_network_connections", "set_refuse_new_connections"}, // MultiplayerAPI -- Breaks SceneTree. + // { "set_tooltip", "set_tooltip_text" }, // Control -- Breaks TreeItem, at least for now. + // { "set_uv", "surface_set_uv" }, // ImmediateMesh -- Breaks Polygon2D. + // { "set_v_offset", "set_drag_vertical_offset" }, // Camera2D -- Breaks Camera3D, PathFollow3D, PathFollow2D. + // {"get_points","get_points_id" }, // AStar -- Breaks Line2D, ConvexPolygonShape. + // {"get_v_scroll","get_v_scroll_bar" }, // ItemList -- Breaks TextView. + // { "get_stylebox", "get_theme_stylebox" }, // Control -- Would rename the method in Theme as well, skipping. { "_about_to_show", "_about_to_popup" }, // ColorPickerButton { "_get_configuration_warning", "_get_configuration_warnings" }, // Node { "_set_current", "set_current" }, // Camera2D @@ -272,7 +273,7 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "get_applied_torque", "get_constant_torque" }, //RigidBody2D { "get_audio_bus", "get_audio_bus_name" }, // Area3D { "get_bound_child_nodes_to_bone", "get_bone_children" }, // Skeleton3D - { "get_camera", "get_camera_3d" }, // Viewport -> this is also convertible to get_camera_2d, broke GLTFNode + { "get_camera", "get_camera_3d" }, // Viewport -- This is also convertible to get_camera_2d. Breaks GLTFNode. { "get_cancel", "get_cancel_button" }, // ConfirmationDialog { "get_caption", "_get_caption" }, // AnimationNode { "get_cast_to", "get_target_position" }, // RayCast2D, RayCast3D @@ -281,8 +282,8 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "get_closest_point_to_segment_2d", "get_closest_point_to_segment" }, // Geometry2D { "get_closest_point_to_segment_uncapped_2d", "get_closest_point_to_segment_uncapped" }, // Geometry2D { "get_closest_points_between_segments_2d", "get_closest_point_to_segment" }, // Geometry2D - { "get_collision_layer_bit", "get_collision_layer_value" }, // CSGShape3D and a lot of others like GridMap - { "get_collision_mask_bit", "get_collision_mask_value" }, // CSGShape3D and a lot of others like GridMap + { "get_collision_layer_bit", "get_collision_layer_value" }, // CSGShape3D, and a lot of others like GridMap. + { "get_collision_mask_bit", "get_collision_mask_value" }, // CSGShape3D, and a lot of others like GridMap. { "get_color_types", "get_color_type_list" }, // Theme { "get_command", "is_command_or_control_pressed" }, // InputEventWithModifiers { "get_constant_types", "get_constant_type_list" }, // Theme @@ -290,6 +291,7 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "get_cull_mask_bit", "get_cull_mask_value" }, // Camera3D { "get_cursor_position", "get_caret_column" }, // LineEdit { "get_d", "get_distance" }, // LineShape2D + { "get_default_length", "get_length" }, // Bone2D { "get_depth_bias_enable", "get_depth_bias_enabled" }, // RDPipelineRasterizationState { "get_device", "get_output_device" }, // AudioServer { "get_device_list", "get_output_device_list" }, // AudioServer @@ -298,13 +300,13 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "get_enabled_focus_mode", "get_focus_mode" }, // BaseButton { "get_endian_swap", "is_big_endian" }, // File { "get_error_string", "get_error_message" }, // JSON - { "get_filename", "get_scene_file_path" }, // Node, WARNING, this may be used in a lot of other places + { "get_filename", "get_scene_file_path" }, // Node -- WARNING: This may be used in a lot of other places. { "get_focus_neighbour", "get_focus_neighbor" }, // Control { "get_follow_smoothing", "get_position_smoothing_speed" }, // Camera2D { "get_font_types", "get_font_type_list" }, // Theme { "get_frame_color", "get_color" }, // ColorRect { "get_global_rate_scale", "get_playback_speed_scale" }, // AudioServer - { "get_gravity_distance_scale", "get_gravity_point_unit_distance" }, // Area(2D/3D) + { "get_gravity_distance_scale", "get_gravity_point_unit_distance" }, // Area2D, Area3D { "get_gravity_vector", "get_gravity_direction" }, // Area(2D/3D) { "get_h_scrollbar", "get_h_scroll_bar" }, //ScrollContainer { "get_hand", "get_tracker_hand" }, // XRPositionalTracker @@ -344,11 +346,11 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "get_plugin_name", "_get_plugin_name" }, // EditorPlugin { "get_preset_count", "_get_preset_count" }, // EditorImportPlugin { "get_preset_name", "_get_preset_name" }, // EditorImportPlugin - { "get_recognized_extensions", "_get_recognized_extensions" }, // ResourceFormatLoader, EditorImportPlugin broke ResourceSaver + { "get_recognized_extensions", "_get_recognized_extensions" }, // ResourceFormatLoader, EditorImportPlugin -- Breaks ResourceSaver. { "get_render_info", "get_rendering_info" }, // RenderingServer { "get_render_targetsize", "get_render_target_size" }, // XRInterface { "get_resource_type", "_get_resource_type" }, // ResourceFormatLoader - { "get_result", "get_data" }, //JSON + { "get_result", "get_data" }, // JSON { "get_reverb_bus", "set_reverb_bus_name" }, // Area3D { "get_rpc_sender_id", "get_remote_sender_id" }, // Multiplayer API { "get_save_extension", "_get_save_extension" }, // EditorImportPlugin @@ -364,44 +366,44 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "get_spatial_node", "get_node_3d" }, // EditorNode3DGizmo { "get_speed", "get_velocity" }, // InputEventMouseMotion { "get_stylebox_types", "get_stylebox_type_list" }, // Theme - { "get_surface_material", "get_surface_override_material" }, // MeshInstance3D broke ImporterMesh + { "get_surface_material", "get_surface_override_material" }, // MeshInstance3D -- Breaks ImporterMesh. { "get_surface_material_count", "get_surface_override_material_count" }, // MeshInstance3D { "get_tab_disabled", "is_tab_disabled" }, // Tab { "get_tab_hidden", "is_tab_hidden" }, // Tab { "get_text_align", "get_text_alignment" }, // Button { "get_theme_item_types", "get_theme_item_type_list" }, // Theme { "get_timer_process_mode", "get_timer_process_callback" }, // Timer - { "get_translation", "get_position" }, // Node3D broke GLTFNode which is used rarely + { "get_translation", "get_position" }, // Node3D -- Breaks GLTFNode, but it is used rarely. { "get_unit_db", "get_volume_db" }, // AudioStreamPlayer3D { "get_unit_offset", "get_progress_ratio" }, // PathFollow2D, PathFollow3D { "get_use_in_baked_light", "is_baking_navigation" }, // GridMap { "get_used_cells_by_id", "get_used_cells" }, // TileMap - { "get_v_scrollbar", "get_v_scroll_bar" }, //ScrollContainer + { "get_v_scrollbar", "get_v_scroll_bar" }, // ScrollContainer { "get_visible_name", "_get_visible_name" }, // EditorImportPlugin { "get_window_layout", "_get_window_layout" }, // EditorPlugin { "get_word_under_cursor", "get_word_under_caret" }, // TextEdit - { "get_world", "get_world_3d" }, // Viewport, Spatial - { "get_zfar", "get_far" }, // Camera3D broke GLTFCamera - { "get_znear", "get_near" }, // Camera3D broke GLTFCamera + { "get_world", "get_world_3d" }, // Viewport, Node3D + { "get_zfar", "get_far" }, // Camera3D -- Breaks GLTFCamera + { "get_znear", "get_near" }, // Camera3D -- Breaks GLTFCamera { "groove_joint_create", "joint_make_groove" }, // PhysicsServer2D { "handle_menu_selected", "_handle_menu_selected" }, // EditorResourcePicker { "handles_type", "_handles_type" }, // ResourceFormatLoader - { "has_color", "has_theme_color" }, // Control broke Theme - { "has_color_override", "has_theme_color_override" }, // Control broke Theme + { "has_color", "has_theme_color" }, // Control -- Breaks Theme + { "has_color_override", "has_theme_color_override" }, // Control -- Breaks Theme { "has_constant", "has_theme_constant" }, // Control { "has_constant_override", "has_theme_constant_override" }, // Control { "has_filter", "_has_filter" }, // AnimationNode - { "has_font", "has_theme_font" }, // Control broke Theme + { "has_font", "has_theme_font" }, // Control -- Breaks Theme { "has_font_override", "has_theme_font_override" }, // Control - { "has_icon", "has_theme_icon" }, // Control broke Theme + { "has_icon", "has_theme_icon" }, // Control -- Breaks Theme { "has_icon_override", "has_theme_icon_override" }, // Control { "has_main_screen", "_has_main_screen" }, // EditorPlugin { "has_network_peer", "has_multiplayer_peer" }, // Multiplayer API - { "has_stylebox", "has_theme_stylebox" }, // Control broke Theme + { "has_stylebox", "has_theme_stylebox" }, // Control -- Breaks Theme { "has_stylebox_override", "has_theme_stylebox_override" }, // Control { "http_escape", "uri_encode" }, // String { "http_unescape", "uri_decode" }, // String - { "import_scene_from_other_importer", "_import_scene" }, //EditorSceneFormatImporter + { "import_scene_from_other_importer", "_import_scene" }, // EditorSceneFormatImporter { "instance_set_surface_material", "instance_set_surface_override_material" }, // RenderingServer { "interpolate", "sample" }, // Curve, Curve2D, Curve3D, Gradient { "intersect_polygons_2d", "intersect_polygons" }, // Geometry2D @@ -426,7 +428,7 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "is_shortcut", "matches_event" }, // Shortcut { "is_size_override_stretch_enabled", "is_size_2d_override_stretch_enabled" }, // SubViewport { "is_sort_enabled", "is_y_sort_enabled" }, // Node2D - { "is_static_body", "is_able_to_sleep" }, // PhysicalBone3D - TODO - not sure + { "is_static_body", "is_able_to_sleep" }, // PhysicalBone3D -- Not sure. { "is_v_drag_enabled", "is_drag_vertical_enabled" }, // Camera2D { "joint_create_cone_twist", "joint_make_cone_twist" }, // PhysicsServer3D { "joint_create_generic_6dof", "joint_make_generic_6dof" }, // PhysicsServer3D @@ -435,7 +437,7 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "joint_create_slider", "joint_make_slider" }, // PhysicsServer3D { "line_intersects_line_2d", "line_intersects_line" }, // Geometry2D { "load_from_globals", "load_from_project_settings" }, // InputMap - { "load_interactive", "load_threaded_request" }, // ResourceLoader - load_threaded_request is alternative, but is used differently + { "load_interactive", "load_threaded_request" }, // ResourceLoader -- "load_threaded_request" could be an alternative, but it is used differently. { "make_convex_from_brothers", "make_convex_from_siblings" }, // CollisionShape3D { "make_visible", "_make_visible" }, // EditorPlugin { "merge_polygons_2d", "merge_polygons" }, // Geometry2D @@ -457,7 +459,6 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "raise", "move_to_front" }, // CanvasItem { "recognize", "_recognize" }, // ResourceFormatLoader { "regen_normalmaps", "regen_normal_maps" }, // ArrayMesh - { "remove", "remove_at" }, // Array, broke Directory { "remove_animation", "remove_animation_library" }, // AnimationPlayer { "remove_color_override", "remove_theme_color_override" }, // Control { "remove_constant_override", "remove_theme_constant_override" }, // Control @@ -479,10 +480,10 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "set_as_normalmap", "set_as_normal_map" }, // NoiseTexture { "set_as_toplevel", "set_as_top_level" }, // CanvasItem { "set_audio_bus", "set_audio_bus_name" }, // Area3D - { "set_autowrap", "set_autowrap_mode" }, // Label broke AcceptDialog + { "set_autowrap", "set_autowrap_mode" }, // Label -- Breaks AcceptDialog. { "set_cast_to", "set_target_position" }, // RayCast2D, RayCast3D - { "set_collision_layer_bit", "set_collision_layer_value" }, // CSGShape3D and a lot of others like GridMap - { "set_collision_mask_bit", "set_collision_mask_value" }, // CSGShape3D and a lot of others like GridMap + { "set_collision_layer_bit", "set_collision_layer_value" }, // CSGShape3D, and a lot of others like GridMap. + { "set_collision_mask_bit", "set_collision_mask_value" }, // CSGShape3D, and a lot of others like GridMap. { "set_column_min_width", "set_column_custom_minimum_width" }, // Tree { "set_command", "set_meta_pressed" }, // InputEventWithModifiers { "set_control", "set_ctrl_pressed" }, // InputEventWithModifiers @@ -490,6 +491,7 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "set_cull_mask_bit", "set_cull_mask_value" }, // Camera3D { "set_cursor_position", "set_caret_column" }, // LineEdit { "set_d", "set_distance" }, // WorldMarginShape2D + { "set_default_length", "set_length" }, // Bone2D { "set_depth_bias_enable", "set_depth_bias_enabled" }, // RDPipelineRasterizationState { "set_device", "set_output_device" }, // AudioServer { "set_doubleclick", "set_double_click" }, // InputEventMouseButton @@ -498,13 +500,13 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "set_enabled_focus_mode", "set_focus_mode" }, // BaseButton { "set_endian_swap", "set_big_endian" }, // File { "set_expand_to_text_length", "set_expand_to_text_length_enabled" }, // LineEdit - { "set_filename", "set_scene_file_path" }, // Node, WARNING, this may be used in a lot of other places + { "set_filename", "set_scene_file_path" }, // Node -- WARNING: This may be used in a lot of other places. { "set_focus_neighbour", "set_focus_neighbor" }, // Control { "set_follow_smoothing", "set_position_smoothing_speed" }, // Camera2D { "set_frame_color", "set_color" }, // ColorRect { "set_global_rate_scale", "set_playback_speed_scale" }, // AudioServer - { "set_gravity_distance_scale", "set_gravity_point_unit_distance" }, // Area(2D/3D) - { "set_gravity_vector", "set_gravity_direction" }, // Area(2D/3D) + { "set_gravity_distance_scale", "set_gravity_point_unit_distance" }, // Area2D, Area3D + { "set_gravity_vector", "set_gravity_direction" }, // Area2D, Area3D { "set_h_drag_enabled", "set_drag_horizontal_enabled" }, // Camera2D { "set_icon_align", "set_icon_alignment" }, // Button { "set_interior_ambient", "set_ambient_color" }, // ReflectionProbe @@ -526,13 +528,13 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "set_physical_scancode", "set_physical_keycode" }, // InputEventKey { "set_proximity_fade", "set_proximity_fade_enabled" }, // Material { "set_refuse_new_network_connections", "set_refuse_new_connections" }, // Multiplayer API - { "set_region", "set_region_enabled" }, // Sprite2D, Sprite broke AtlasTexture + { "set_region", "set_region_enabled" }, // Sprite2D -- Sprite breaks AtlasTexture. { "set_region_filter_clip", "set_region_filter_clip_enabled" }, // Sprite2D { "set_reverb_bus", "set_reverb_bus_name" }, // Area3D { "set_rotate", "set_rotates" }, // PathFollow2D { "set_scancode", "set_keycode" }, // InputEventKey { "set_shift", "set_shift_pressed" }, // InputEventWithModifiers - { "set_size_override", "set_size_2d_override" }, // SubViewport broke ImageTexture + { "set_size_override", "set_size_2d_override" }, // SubViewport -- Breaks ImageTexture. { "set_size_override_stretch", "set_size_2d_override_stretch" }, // SubViewport { "set_slips_on_slope", "set_slide_on_slope" }, // SeparationRayShape2D, SeparationRayShape3D { "set_sort_enabled", "set_y_sort_enabled" }, // Node2D @@ -540,20 +542,20 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "set_spatial_node", "set_node_3d" }, // EditorNode3DGizmo { "set_speed", "set_velocity" }, // InputEventMouseMotion { "set_ssao_edge_sharpness", "set_ssao_sharpness" }, // Environment - { "set_surface_material", "set_surface_override_material" }, // MeshInstance3D broke ImporterMesh - { "set_tab_align", "set_tab_alignment" }, //TabContainer - { "set_tangent", "surface_set_tangent" }, // ImmediateGeometry broke SurfaceTool + { "set_surface_material", "set_surface_override_material" }, // MeshInstance3D -- Breaks ImporterMesh. + { "set_tab_align", "set_tab_alignment" }, // TabContainer + { "set_tangent", "surface_set_tangent" }, // ImmediateGeometry -- Breaks SurfaceTool. { "set_text_align", "set_text_alignment" }, // Button { "set_timer_process_mode", "set_timer_process_callback" }, // Timer - { "set_translation", "set_position" }, // Node3D - this broke GLTFNode which is used rarely + { "set_translation", "set_position" }, // Node3D -- This breaks GLTFNode, but it is used rarely. { "set_unit_db", "set_volume_db" }, // AudioStreamPlayer3D { "set_unit_offset", "set_progress_ratio" }, // PathFollow2D, PathFollow3D - { "set_uv2", "surface_set_uv2" }, // ImmediateMesh broke Surffacetool + { "set_uv2", "surface_set_uv2" }, // ImmediateMesh -- Breaks SurfaceTool. { "set_v_drag_enabled", "set_drag_vertical_enabled" }, // Camera2D { "set_valign", "set_vertical_alignment" }, // Label { "set_window_layout", "_set_window_layout" }, // EditorPlugin - { "set_zfar", "set_far" }, // Camera3D broke GLTFCamera - { "set_znear", "set_near" }, // Camera3D broke GLTFCamera + { "set_zfar", "set_far" }, // Camera3D -- Breaks GLTFCamera. + { "set_znear", "set_near" }, // Camera3D -- Breaks GLTFCamera. { "shortcut_match", "is_match" }, // InputEvent { "skeleton_allocate", "skeleton_allocate_data" }, // RenderingServer { "surface_update_region", "surface_update_attribute_region" }, // ArrayMesh @@ -574,22 +576,23 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "get_uniform_name", "get_parameter_name" }, // ParameterRef // Builtin types - // Remember to add them to builtin_types_excluded_functions variable, because for now this functions cannot be listed - // { "empty", "is_empty" }, // Array - Used as custom rule // Be careful, this will be used everywhere - { "clamped", "clamp" }, // Vector2 // Be careful, this will be used everywhere + // Remember to add them to the builtin_types_excluded_functions variable, because for now these functions cannot be listed. + // { "empty", "is_empty" }, // Array -- Used as custom rule. Be careful, this will be used everywhere. + // { "remove", "remove_at" }, // Array -- Breaks Directory and several more. + { "clamped", "clamp" }, // Vector2 -- Be careful, this will be used everywhere. { "get_rotation_quat", "get_rotation_quaternion" }, // Basis { "grow_margin", "grow_side" }, // Rect2 - { "invert", "reverse" }, // Array - TODO check // Be careful, this will be used everywhere + { "invert", "reverse" }, // Array -- Give it a check. Be careful, this will be used everywhere. { "is_abs_path", "is_absolute_path" }, // String { "is_valid_integer", "is_valid_int" }, // String { "linear_interpolate", "lerp" }, // Color { "find_last", "rfind" }, // Array, String { "to_ascii", "to_ascii_buffer" }, // String { "to_utf8", "to_utf8_buffer" }, // String - { "to_wchar", "to_utf32_buffer" }, // String // TODO - utf32 or utf16? + { "to_wchar", "to_utf32_buffer" }, // String -- utf32 or utf16? // @GlobalScope - // Remember to add them to builtin_types_excluded_functions variable, because for now this functions cannot be listed + // Remember to add them to the builtin_types_excluded_functions variable, because for now these functions cannot be listed. { "bytes2var", "bytes_to_var" }, { "bytes2var_with_objects", "bytes_to_var_with_objects" }, { "db2linear", "db_to_linear" }, @@ -605,7 +608,7 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "var2bytes_with_objects", "var_to_bytes_with_objects" }, // @GDScript - // Remember to add them to builtin_types_excluded_functions variable, because for now this functions cannot be listed + // Remember to add them to the builtin_types_excluded_functions variable, because for now these functions cannot be listed. { "dict2inst", "dict_to_inst" }, { "inst2dict", "inst_to_dict" }, @@ -614,54 +617,52 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { // gdscript_function_renames clone with CamelCase const char *RenamesMap3To4::csharp_function_renames[][2] = { - // { "_SetName", "GetTrackerName"}, // XRPositionalTracker - CameraFeed use this - // { "_UnhandledInput", "_UnhandledKeyInput"}, // BaseButton, ViewportContainer broke Node, FileDialog,SubViewportContainer - // { "CreateGizmo", "_CreateGizmo"}, // EditorNode3DGizmoPlugin - may be used - // { "GetDependencies", "_GetDependencies" }, // ResourceFormatLoader broke ResourceLoader - // { "GetExtents", "GetSize" }, // BoxShape, RectangleShape broke Decal, VoxelGI, GPUParticlesCollisionBox, GPUParticlesCollisionSDF, GPUParticlesCollisionHeightField, GPUParticlesAttractorBox, GPUParticlesAttractorVectorField, FogVolume - // { "GetHOffset", "GetDragHorizontalOffset"}, // Camera2D, broke PathFollow, Camera - // { "GetMode", "GetFileMode"}, // FileDialog broke Panel, Shader, CSGPolygon, Tilemap - // { "GetMotion", "GetTravel"}, // PhysicsTestMotionResult2D broke ParalaxLayer - // { "GetName", "GetTrackerName"}, // XRPositionalTracker broke OS, Node - // { "GetNetworkConnectedPeers", "GetPeers"}, // MultiplayerAPI broke SceneTree - // { "GetNetworkPeer", "HasMultiplayerPeer"}, // MultiplayerAPI broke SceneTree - // { "GetNetworkUniqueId", "GetUniqueId"}, // MultiplayerAPI broke SceneTree - // { "GetOffset", "GetPositionOffset" }, // GraphNode broke Gradient - // { "GetPeerPort", "GetPeer" }, // ENetMultiplayerPeer broke WebSocketServer - // { "GetProcessMode", "GetProcessCallback" }, // ClippedCamera3D broke Node, Sky - // { "GetRenderInfo", "GetRenderingInfo" }, // RenderingServer broke Viewport - // { "GetType", "GetTrackerType"}, // XRPositionalTracker broke GLTFAccessor, GLTFLight - // { "GetVOffset", "GetDragVerticalOffset"}, // Camera2D, broke PathFollow, Camera - // { "HasNetworkPeer", "HasMultiplayerPeer"}, // MultiplayerAPI broke SceneTree - // { "Instance", "Instantiate" }, // PackedScene, ClassDB - Broke FileSystemDock signal and also tscn files - [instance=ExtResource( 17 )] - this is implemented as custom rule - // { "IsListening", "IsBound"}, // PacketPeerUDP broke TCPServer, UDPServer - // { "IsRefusingNewNetworkConnections", "IsRefusingNewConnections"}, // MultiplayerAPI broke SceneTree - // { "IsValid", "HasValidEvent" }, // Shortcut broke e.g. Callable - // { "Listen", "Bound"}, // PacketPeerUDP broke TCPServer, UDPServer - // { "Load", "_Load"}, // ResourceFormatLoader broke ConfigFile, Image, StreamTexture2D - // { "MakeCurrent", "SetCurrent" }, // Camera2D broke Camera3D, Listener2D - // { "Process", "_Process" }, // AnimationNode - This word is commonly used - // { "Save", "_Save"}, // ResourceFormatLoader broke ConfigFile, Image, StreamTexture2D - // { "SetAutowrap", "SetAutowrapMode" }, // AcceptDialog broke Label - Cyclic Rename - // { "SetColor", "SurfaceSetColor"}, // ImmediateMesh broke Light2D, Theme, SurfaceTool - // { "SetEvent", "SetShortcut" }, // BaseButton - Cyclic Rename - // { "SetExtents", "SetSize"}, // BoxShape, RectangleShape broke ReflectionProbe - // { "SetFlag", "SetParticleFlag"}, // ParticleProcessMaterial broke Window, HingeJoint3D - // { "SetHOffset", "SetDragHorizontalOffset" }, // Camera2D broke Camera3D, PathFollow3D, PathFollow2D - // { "SetMargin", "SetOffset" }, // Control broke Shape3D, AtlasTexture - // { "SetMode", "SetModeFileMode" }, // FileDialog broke Panel, Shader, CSGPolygon, Tilemap - // { "SetNormal", "SurfaceSetNormal"}, // ImmediateGeometry broke SurfaceTool, WorldMarginShape2D - // { "SetOffset", "SetProgress" }, // PathFollow2D, PathFollow3D - Too common - // { "SetProcessMode", "SetProcessCallback" }, // AnimationTree broke Node, Tween, Sky - // { "SetRefuseNewNetworkConnections", "SetRefuseNewConnections"}, // MultiplayerAPI broke SceneTree - // { "SetTooltip", "SetTooltipText" }, // Control, breaks TreeItem, at least for now. - // { "SetUv", "SurfaceSetUv" }, // ImmediateMesh broke Polygon2D - // { "SetVOffset", "SetDragVerticalOffset" }, // Camera2D broke Camera3D, PathFollow3D, PathFollow2D - // {"GetPoints","GetPointsId"},// Astar, broke Line2D, Convexpolygonshape - // {"GetVScroll","GetVScrollBar"},//ItemList, broke TextView - // { "GetStylebox", "GetThemeStylebox" }, // Control - Will rename the method in Theme as well, skipping - { "AddSpatialGizmoPlugin", "AddNode3dGizmoPlugin" }, // EditorPlugin - { "RenderingServer", "GetTabAlignment" }, // Tab + // { "_SetName", "GetTrackerName" }, // XRPositionalTracker -- CameraFeed uses this. + // { "_UnhandledInput", "_UnhandledKeyInput" }, // BaseButton, ViewportContainer -- Breaks Node, FileDialog, SubViewportContainer. + // { "CreateGizmo", "_CreateGizmo" }, // EditorNode3DGizmoPlugin -- May be used. + // { "GetDependencies", "_GetDependencies" }, // ResourceFormatLoader -- Breaks ResourceLoader. + // { "GetExtents", "GetSize" }, // BoxShape, RectangleShape -- Breaks Decal, VoxelGI, GPUParticlesCollisionBox, GPUParticlesCollisionSDF, GPUParticlesCollisionHeightField, GPUParticlesAttractorBox, GPUParticlesAttractorVectorField, FogVolume. + // { "GetHOffset", "GetDragHorizontalOffset" }, // Camera2D -- Breaks PathFollow, Camera. + // { "GetMode", "GetFileMode" }, // FileDialog -- Breaks Panel, Shader, CSGPolygon, TileMap. + // { "GetMotion", "GetTravel" }, // PhysicsTestMotionResult2D -- Breaks ParallaxLayer. + // { "GetName", "GetTrackerName" }, // XRPositionalTracker -- Breaks OS, Node + // { "GetNetworkConnectedPeers", "GetPeers" }, // MultiplayerAPI -- Breaks SceneTree. + // { "GetNetworkPeer", "HasMultiplayerPeer" }, // MultiplayerAPI -- Breaks SceneTree. + // { "GetNetworkUniqueId", "GetUniqueId" }, // MultiplayerAPI -- Breaks SceneTree. + // { "GetOffset", "GetPositionOffset" }, // GraphNode -- Breaks Gradient. + // { "GetPeerPort", "GetPeer" }, // ENetMultiplayerPeer -- Breaks WebSocketServer. + // { "GetProcessMode", "GetProcessCallback" }, // ClippedCamera3D -- Breaks Node, Sky. + // { "GetRenderInfo", "GetRenderingInfo" }, // RenderingServer -- Breaks Viewport. + // { "GetType", "GetTrackerType" }, // XRPositionalTracker -- Breaks GLTFAccessor, GLTFLight. + // { "GetVOffset", "GetDragVerticalOffset" }, // Camera2D -- Breaks PathFollow, Camera. + // { "HasNetworkPeer", "HasMultiplayerPeer" }, // MultiplayerAPI -- Breaks SceneTree. + // { "Instance", "Instantiate" }, // PackedScene, ClassDB -- Breaks FileSystemDock signal, and also .tscn files ("[instance=ExtResource( 17 )]"). This is implemented as custom rule. + // { "IsListening", "IsBound"}, // PacketPeerUDP -- Breaks TCPServer, UDPServer. + // { "IsRefusingNewNetworkConnections", "IsRefusingNewConnections"}, // MultiplayerAPI -- Breaks SceneTree. + // { "IsValid", "HasValidEvent" }, // Shortcut -- Breaks Callable, and more. + // { "Listen", "Bound"}, // PacketPeerUDP -- Breaks TCPServer, UDPServer. + // { "Load", "_Load"}, // ResourceFormatLoader -- Breaks ConfigFile, Image, StreamTexture2D. + // { "MakeCurrent", "SetCurrent" }, // Camera2D -- Breaks Camera3D, Listener2D. + // { "Process", "_Process" }, // AnimationNode -- This word is too commonly used. + // { "Save", "_Save"}, // ResourceFormatLoader -- Breaks ConfigFile, Image, StreamTexture2D. + // { "SetAutowrap", "SetAutowrapMode" }, // AcceptDialog -- Breaks Label, also a cyclic rename. + // { "SetColor", "SurfaceSetColor"}, // ImmediateMesh -- Breaks Light2D, Theme, SurfaceTool. + // { "SetEvent", "SetShortcut" }, // BaseButton -- Cyclic rename. + // { "SetExtents", "SetSize"}, // BoxShape, RectangleShape -- Breaks ReflectionProbe. + // { "SetFlag", "SetParticleFlag"}, // ParticleProcessMaterial -- Breaks Window, HingeJoint3D. + // { "SetHOffset", "SetDragHorizontalOffset" }, // Camera2D -- Breaks Camera3D, PathFollow3D, PathFollow2D. + // { "SetMargin", "SetOffset" }, // Control -- Breaks Shape3D, AtlasTexture. + // { "SetMode", "SetModeFileMode" }, // FileDialog -- Breaks Panel, Shader, CSGPolygon, TileMap. + // { "SetNormal", "SurfaceSetNormal"}, // ImmediateGeometry -- Breaks SurfaceTool, WorldMarginShape2D. + // { "SetOffset", "SetProgress" }, // PathFollow2D, PathFollow3D -- Too common. + // { "SetProcessMode", "SetProcessCallback" }, // AnimationTree -- Breaks Node, Tween, Sky. + // { "SetRefuseNewNetworkConnections", "SetRefuseNewConnections"}, // MultiplayerAPI -- Breaks SceneTree. + // { "SetTooltip", "SetTooltipText" }, // Control -- Breaks TreeItem, at least for now. + // { "SetUv", "SurfaceSetUv" }, // ImmediateMesh -- Breaks Polygon2D. + // { "SetVOffset", "SetDragVerticalOffset" }, // Camera2D -- Breaks Camera3D, PathFollow3D, PathFollow2D. + // {"GetPoints","GetPointsId" }, // AStar -- Breaks Line2D, ConvexPolygonShape. + // {"GetVScroll","GetVScrollBar" }, // ItemList -- Breaks TextView. + // { "GetStylebox", "GetThemeStylebox" }, // Control -- Would rename the method in Theme as well, skipping. { "_AboutToShow", "_AboutToPopup" }, // ColorPickerButton { "_GetConfigurationWarning", "_GetConfigurationWarnings" }, // Node { "_SetCurrent", "SetCurrent" }, // Camera2D @@ -679,6 +680,7 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "AddForce", "AddConstantForce" }, //RigidBody2D { "AddIconOverride", "AddThemeIconOverride" }, // Control { "AddSceneImportPlugin", "AddSceneFormatImporterPlugin" }, //EditorPlugin + { "AddSpatialGizmoPlugin", "AddNode3dGizmoPlugin" }, // EditorPlugin { "AddStyleboxOverride", "AddThemeStyleboxOverride" }, // Control { "AddTorque", "AddConstantTorque" }, //RigidBody2D { "AgentSetNeighborDist", "AgentSetNeighborDistance" }, // NavigationServer2D, NavigationServer3D @@ -731,7 +733,7 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "GetAppliedTorque", "GetConstantTorque" }, //RigidBody2D { "GetAudioBus", "GetAudioBusName" }, // Area3D { "GetBoundChildNodesToBone", "GetBoneChildren" }, // Skeleton3D - { "GetCamera", "GetCamera3d" }, // Viewport -> this is also convertible to getCamera2d, broke GLTFNode + { "GetCamera", "GetCamera3d" }, // Viewport -- This is also convertible to GetCamera2d. Breaks GLTFNode. { "GetCancel", "GetCancelButton" }, // ConfirmationDialog { "GetCaption", "_GetCaption" }, // AnimationNode { "GetCastTo", "GetTargetPosition" }, // RayCast2D, RayCast3D @@ -740,8 +742,8 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "GetClosestPointToSegment2d", "GetClosestPointToSegment" }, // Geometry2D { "GetClosestPointToSegmentUncapped2d", "GetClosestPointToSegmentUncapped" }, // Geometry2D { "GetClosestPointsBetweenSegments2d", "GetClosestPointToSegment" }, // Geometry2D - { "GetCollisionLayerBit", "GetCollisionLayerValue" }, // CSGShape3D and a lot of others like GridMap - { "GetCollisionMaskBit", "GetCollisionMaskValue" }, // CSGShape3D and a lot of others like GridMap + { "GetCollisionLayerBit", "GetCollisionLayerValue" }, // CSGShape3D, and a lot of others like GridMap. + { "GetCollisionMaskBit", "GetCollisionMaskValue" }, // CSGShape3D, and a lot of others like GridMap. { "GetColorTypes", "GetColorTypeList" }, // Theme { "GetCommand", "IsCommandPressed" }, // InputEventWithModifiers { "GetConstantTypes", "GetConstantTypeList" }, // Theme @@ -749,6 +751,7 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "GetCullMaskBit", "GetCullMaskValue" }, // Camera3D { "GetCursorPosition", "GetCaretColumn" }, // LineEdit { "GetD", "GetDistance" }, // LineShape2D + { "GetDefaultLength", "GetLength" }, // Bone2D { "GetDepthBiasEnable", "GetDepthBiasEnabled" }, // RDPipelineRasterizationState { "GetDevice", "GetOutputDevice" }, // AudioServer { "GetDeviceList", "GetOutputDeviceList" }, // AudioServer @@ -762,9 +765,9 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "GetFontTypes", "GetFontTypeList" }, // Theme { "GetFrameColor", "GetColor" }, // ColorRect { "GetGlobalRateScale", "GetPlaybackSpeedScale" }, // AudioServer - { "GetGravityDistanceScale", "GetGravityPointDistanceScale" }, //Area2D - { "GetGravityVector", "GetGravityDirection" }, //Area2D - { "GetHScrollbar", "GetHScrollBar" }, //ScrollContainer + { "GetGravityDistanceScale", "GetGravityPointDistanceScale" }, // Area2D + { "GetGravityVector", "GetGravityDirection" }, // Area2D + { "GetHScrollbar", "GetHScrollBar" }, // ScrollContainer { "GetHand", "GetTrackerHand" }, // XRPositionalTracker { "GetHandleName", "_GetHandleName" }, // EditorNode3DGizmo { "GetHandleValue", "_GetHandleValue" }, // EditorNode3DGizmo @@ -801,11 +804,11 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "GetPluginName", "_GetPluginName" }, // EditorPlugin { "GetPresetCount", "_GetPresetCount" }, // EditorImportPlugin { "GetPresetName", "_GetPresetName" }, // EditorImportPlugin - { "GetRecognizedExtensions", "_GetRecognizedExtensions" }, // ResourceFormatLoader, EditorImportPlugin broke ResourceSaver + { "GetRecognizedExtensions", "_GetRecognizedExtensions" }, // ResourceFormatLoader, EditorImportPlugin -- Breaks ResourceSaver. { "GetRenderInfo", "GetRenderingInfo" }, // RenderingServer { "GetRenderTargetsize", "GetRenderTargetSize" }, // XRInterface { "GetResourceType", "_GetResourceType" }, // ResourceFormatLoader - { "GetResult", "GetData" }, //JSON + { "GetResult", "GetData" }, // JSON { "GetReverbBus", "GetReverbBusName" }, // Area3D { "GetRpcSenderId", "GetRemoteSenderId" }, // Multiplayer API { "GetSaveExtension", "_GetSaveExtension" }, // EditorImportPlugin @@ -819,45 +822,45 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "GetSpatialNode", "GetNode3d" }, // EditorNode3DGizmo { "GetSpeed", "GetVelocity" }, // InputEventMouseMotion { "GetStyleboxTypes", "GetStyleboxTypeList" }, // Theme - { "GetSurfaceMaterial", "GetSurfaceOverrideMaterial" }, // MeshInstance3D broke ImporterMesh + { "GetSurfaceMaterial", "GetSurfaceOverrideMaterial" }, // MeshInstance3D -- Breaks ImporterMesh. { "GetSurfaceMaterialCount", "GetSurfaceOverrideMaterialCount" }, // MeshInstance3D { "GetTabDisabled", "IsTabDisabled" }, // Tab { "GetTabHidden", "IsTabHidden" }, // Tab { "GetTextAlign", "GetTextAlignment" }, // Button { "GetThemeItemTypes", "GetThemeItemTypeList" }, // Theme { "GetTimerProcessMode", "GetTimerProcessCallback" }, // Timer - { "GetTranslation", "GetPosition" }, // Node3D broke GLTFNode which is used rarely + { "GetTranslation", "GetPosition" }, // Node3D -- Breaks GLTFNode, but it is used rarely. { "GetUnitDb", "GetVolumeDb" }, // AudioStreamPlayer3D { "GetUnitOffset", "GetProgressRatio" }, // PathFollow2D, PathFollow3D { "GetUseInBakedLight", "IsBakingNavigation" }, // GridMap { "GetUsedCellsById", "GetUsedCells" }, // TileMap - { "GetVScrollbar", "GetVScrollBar" }, //ScrollContainer + { "GetVScrollbar", "GetVScrollBar" }, // ScrollContainer { "GetVisibleName", "_GetVisibleName" }, // EditorImportPlugin { "GetWindowLayout", "_GetWindowLayout" }, // EditorPlugin { "GetWordUnderCursor", "GetWordUnderCaret" }, // TextEdit - { "GetWorld", "GetWorld3d" }, // Viewport, Spatial - { "GetZfar", "GetFar" }, // Camera3D broke GLTFCamera - { "GetZnear", "GetNear" }, // Camera3D broke GLTFCamera + { "GetWorld", "GetWorld3d" }, // Viewport, Node3D + { "GetZfar", "GetFar" }, // Camera3D -- Breaks GLTFCamera + { "GetZnear", "GetNear" }, // Camera3D -- Breaks GLTFCamera { "GrooveJointCreate", "JointMakeGroove" }, // PhysicsServer2D { "HandleMenuSelected", "_HandleMenuSelected" }, // EditorResourcePicker { "HandlesType", "_HandlesType" }, // ResourceFormatLoader - { "HasColor", "HasThemeColor" }, // Control broke Theme - { "HasColorOverride", "HasThemeColorOverride" }, // Control broke Theme + { "HasColor", "HasThemeColor" }, // Control -- Breaks Theme + { "HasColorOverride", "HasThemeColorOverride" }, // Control -- Breaks Theme { "HasConstant", "HasThemeConstant" }, // Control { "HasConstantOverride", "HasThemeConstantOverride" }, // Control { "HasFilter", "_HasFilter" }, // AnimationNode - { "HasFont", "HasThemeFont" }, // Control broke Theme + { "HasFont", "HasThemeFont" }, // Control -- Breaks Theme { "HasFontOverride", "HasThemeFontOverride" }, // Control - { "HasIcon", "HasThemeIcon" }, // Control broke Theme + { "HasIcon", "HasThemeIcon" }, // Control -- Breaks Theme { "HasIconOverride", "HasThemeIconOverride" }, // Control { "HasMainScreen", "_HasMainScreen" }, // EditorPlugin { "HasNetworkPeer", "HasMultiplayerPeer" }, // Multiplayer API - { "HasStylebox", "HasThemeStylebox" }, // Control broke Theme + { "HasStylebox", "HasThemeStylebox" }, // Control -- Breaks Theme { "HasStyleboxOverride", "HasThemeStyleboxOverride" }, // Control { "HttpEscape", "UriEncode" }, // String { "HttpUnescape", "UriDecode" }, // String - { "ImportAnimationFromOtherImporter", "_ImportAnimation" }, //EditorSceneFormatImporter - { "ImportSceneFromOtherImporter", "_ImportScene" }, //EditorSceneFormatImporter + { "ImportAnimationFromOtherImporter", "_ImportAnimation" }, // EditorSceneFormatImporter + { "ImportSceneFromOtherImporter", "_ImportScene" }, // EditorSceneFormatImporter { "InstanceSetSurfaceMaterial", "InstanceSetSurfaceOverrideMaterial" }, // RenderingServer { "IntersectPolygons2d", "IntersectPolygons" }, // Geometry2D { "IntersectPolylineWithPolygon2d", "IntersectPolylineWithPolygon" }, // Geometry2D @@ -879,7 +882,7 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "IsShortcut", "MatchesEvent" }, // Shortcut { "IsSizeOverrideStretchEnabled", "IsSize2dOverrideStretchEnabled" }, // SubViewport { "IsSortEnabled", "IsYSortEnabled" }, // Node2D - { "IsStaticBody", "IsAbleToSleep" }, // PhysicalBone3D - TODO - not sure + { "IsStaticBody", "IsAbleToSleep" }, // PhysicalBone3D -- Not sure. { "IsVDragEnabled", "IsDragVerticalEnabled" }, // Camera2D { "JointCreateConeTwist", "JointMakeConeTwist" }, // PhysicsServer3D { "JointCreateGeneric6dof", "JointMakeGeneric6dof" }, // PhysicsServer3D @@ -907,7 +910,6 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "PropertyListChangedNotify", "NotifyPropertyListChanged" }, // Object { "Recognize", "_Recognize" }, // ResourceFormatLoader { "RegenNormalmaps", "RegenNormalMaps" }, // ArrayMesh - { "Remove", "RemoveAt" }, // Array, broke Directory { "RemoveAnimation", "RemoveAnimationLibrary" }, // AnimationPlayer { "RemoveColorOverride", "RemoveThemeColorOverride" }, // Control { "RemoveConstantOverride", "RemoveThemeConstantOverride" }, // Control @@ -928,10 +930,10 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "SetAsNormalmap", "SetAsNormalMap" }, // NoiseTexture { "SetAsToplevel", "SetAsTopLevel" }, // CanvasItem { "SetAudioBus", "SetAudioBusName" }, // Area3D - { "SetAutowrap", "SetAutowrapMode" }, // Label broke AcceptDialog + { "SetAutowrap", "SetAutowrapMode" }, // Label -- Breaks AcceptDialog. { "SetCastTo", "SetTargetPosition" }, // RayCast2D, RayCast3D - { "SetCollisionLayerBit", "SetCollisionLayerValue" }, // CSGShape3D and a lot of others like GridMap - { "SetCollisionMaskBit", "SetCollisionMaskValue" }, // CSGShape3D and a lot of others like GridMap + { "SetCollisionLayerBit", "SetCollisionLayerValue" }, // CSGShape3D, and a lot of others like GridMap. + { "SetCollisionMaskBit", "SetCollisionMaskValue" }, // CSGShape3D, and a lot of others like GridMap. { "SetColumnMinWidth", "SetColumnCustomMinimumWidth" }, // Tree { "SetCommand", "SetCommandPressed" }, // InputEventWithModifiers { "SetControl", "SetCtrlPressed" }, // InputEventWithModifiers @@ -939,6 +941,7 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "SetCullMaskBit", "SetCullMaskValue" }, // Camera3D { "SetCursorPosition", "SetCaretColumn" }, // LineEdit { "SetD", "SetDistance" }, // WorldMarginShape2D + { "SetDefaultLength", "SetLength" }, // Bone2D { "SetDepthBiasEnable", "SetDepthBiasEnabled" }, // RDPipelineRasterizationState { "SetDevice", "SetOutputDevice" }, // AudioServer { "SetDoubleclick", "SetDoubleClick" }, // InputEventMouseButton @@ -960,7 +963,7 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "SetIsPrimary", "SetPrimary" }, // XRInterface { "SetIterationsPerSecond", "SetPhysicsTicksPerSecond" }, // Engine { "SetLayerMaskBit", "SetLayerMaskValue" }, // VisualInstance3D - { "SetMarginsPreset", "SetOffsetsPreset" }, // Control + { "SetMarginsPreset", "SetOffsetsPreset" }, // Control { "SetMaxAtlasSize", "SetMaxTextureSize" }, // LightmapGI { "SetMetakey", "SetMetaPressed" }, // InputEventWithModifiers { "SetMidHeight", "SetHeight" }, // CapsuleMesh @@ -971,13 +974,13 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "SetPhysicalScancode", "SetPhysicalKeycode" }, // InputEventKey { "SetProximityFade", "SetProximityFadeEnabled" }, // Material { "SetRefuseNewNetworkConnections", "SetRefuseNewConnections" }, // Multiplayer API - { "SetRegion", "SetRegionEnabled" }, // Sprite2D, Sprite broke AtlasTexture + { "SetRegion", "SetRegionEnabled" }, // Sprite2D -- Sprite breaks AtlasTexture. { "SetRegionFilterClip", "SetRegionFilterClipEnabled" }, // Sprite2D { "SetReverbBus", "SetReverbBusName" }, // Area3D { "SetRotate", "SetRotates" }, // PathFollow2D { "SetScancode", "SetKeycode" }, // InputEventKey { "SetShift", "SetShiftPressed" }, // InputEventWithModifiers - { "SetSizeOverride", "SetSize2dOverride" }, // SubViewport broke ImageTexture + { "SetSizeOverride", "SetSize2dOverride" }, // SubViewport -- Breaks ImageTexture. { "SetSizeOverrideStretch", "SetSize2dOverrideStretch" }, // SubViewport { "SetSlipsOnSlope", "SetSlideOnSlope" }, // SeparationRayShape2D, SeparationRayShape3D { "SetSortEnabled", "SetYSortEnabled" }, // Node2D @@ -985,21 +988,21 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "SetSpatialNode", "SetNode3d" }, // EditorNode3DGizmo { "SetSpeed", "SetVelocity" }, // InputEventMouseMotion { "SetSsaoEdgeSharpness", "SetSsaoSharpness" }, // Environment - { "SetSurfaceMaterial", "SetSurfaceOverrideMaterial" }, // MeshInstance3D broke ImporterMesh - { "SetTabAlign", "SetTabAlignment" }, //TabContainer - { "SetTangent", "SurfaceSetTangent" }, // ImmediateGeometry broke SurfaceTool + { "SetSurfaceMaterial", "SetSurfaceOverrideMaterial" }, // MeshInstance3D -- Breaks ImporterMesh. + { "SetTabAlign", "SetTabAlignment" }, // TabContainer + { "SetTangent", "SurfaceSetTangent" }, // ImmediateGeometry -- Breaks SurfaceTool. { "SetTextAlign", "SetTextAlignment" }, // Button { "SetTimerProcessMode", "SetTimerProcessCallback" }, // Timer { "SetTonemapAutoExposure", "SetTonemapAutoExposureEnabled" }, // Environment - { "SetTranslation", "SetPosition" }, // Node3D - this broke GLTFNode which is used rarely + { "SetTranslation", "SetPosition" }, // Node3D -- This breaks GLTFNode, but it is used rarely. { "SetUnitDb", "SetVolumeDb" }, // AudioStreamPlayer3D { "SetUnitOffset", "SetProgressRatio" }, // PathFollow2D, PathFollow3D - { "SetUv2", "SurfaceSetUv2" }, // ImmediateMesh broke Surffacetool + { "SetUv2", "SurfaceSetUv2" }, // ImmediateMesh -- Breaks SurfaceTool. { "SetVDragEnabled", "SetDragVerticalEnabled" }, // Camera2D { "SetValign", "SetVerticalAlignment" }, // Label { "SetWindowLayout", "_SetWindowLayout" }, // EditorPlugin - { "SetZfar", "SetFar" }, // Camera3D broke GLTFCamera - { "SetZnear", "SetNear" }, // Camera3D broke GLTFCamera + { "SetZfar", "SetFar" }, // Camera3D -- Breaks GLTFCamera. + { "SetZnear", "SetNear" }, // Camera3D -- Breaks GLTFCamera. { "ShortcutMatch", "IsMatch" }, // InputEvent { "SkeletonAllocate", "SkeletonAllocateData" }, // RenderingServer { "SurfaceUpdateRegion", "SurfaceUpdateAttributeRegion" }, // ArrayMesh @@ -1021,17 +1024,18 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "GetUniformName", "GetParameterName" }, // ParameterRef // Builtin types - // { "Empty", "IsEmpty" }, // Array - Used as custom rule // Be careful, this will be used everywhere - { "Clamped", "Clamp" }, // Vector2 // Be careful, this will be used everywhere + // { "Empty", "IsEmpty" }, // Array -- Used as custom rule. Be careful, this will be used everywhere. + // { "Remove", "RemoveAt" }, // Array -- Breaks Directory and several more. + { "Clamped", "Clamp" }, // Vector2 -- Be careful, this will be used everywhere. { "GetRotationQuat", "GetRotationQuaternion" }, // Basis { "GrowMargin", "GrowSide" }, // Rect2 - { "Invert", "Reverse" }, // Array - TODO check // Be careful, this will be used everywhere + { "Invert", "Reverse" }, // Array -- Give it a check. Be careful, this will be used everywhere. { "IsAbsPath", "IsAbsolutePath" }, // String { "IsValidInteger", "IsValidInt" }, // String { "LinearInterpolate", "Lerp" }, // Color { "ToAscii", "ToAsciiBuffer" }, // String { "ToUtf8", "ToUtf8Buffer" }, // String - { "ToWchar", "ToUtf32Buffer" }, // String // TODO - utf32 or utf16? + { "ToWchar", "ToUtf32Buffer" }, // String -- utf32 or utf16? // @GlobalScope { "Bytes2Var", "BytesToVar" }, @@ -1055,23 +1059,24 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { nullptr, nullptr }, }; -// Some needs to be disabled, because users can use this names as variables const char *RenamesMap3To4::gdscript_properties_renames[][2] = { - // // { "d", "distance" }, //WorldMarginShape2D - TODO, looks that polish letters ą ę are treaten as space, not as letter, so `będą` are renamed to `będistanceą` - // // {"alt","alt_pressed"}, // This may broke a lot of comments and user variables - // // {"command","command_pressed"},// This may broke a lot of comments and user variables - // // {"control","ctrl_pressed"},// This may broke a lot of comments and user variables - // // {"extends","size"}, // BoxShape3D, LightmapGI broke ReflectionProbe - // // {"meta","meta_pressed"},// This may broke a lot of comments and user variables - // // {"pause_mode","process_mode"}, // Node - Cyclic rename, look for others - // // {"rotate","rotates"}, // PathFollow2D - probably function exists with same name - // // {"offset","progress"}, // PathFollow2D, PathFollow3D - Name is way too vague - // // {"shift","shift_pressed"},// This may broke a lot of comments and user variables + // Some need to be disabled, because users frequently use these names for variables. + // // { "d", "distance" }, // WorldMarginShape2D -- TODO: looks like polish letters "ą" "ę" are treaten as space, not as letters. As such, "będą" is renamed to "będistanceą". + // // { "alt", "alt_pressed" }, // This may break a lot of comments and user variables. + // // { "command", "command_pressed" }, // This may break a lot of comments and user variables. + // // { "control", "ctrl_pressed" }, // This may break a lot of comments and user variables. + // // { "extends", "size" }, // BoxShape3D, LightmapGI -- Breaks ReflectionProbe. + // // { "meta", "meta_pressed" }, // This may break a lot of comments and user variables. + // // { "pause_mode", "process_mode" }, // Node -- Cyclic rename, look for others. + // // { "rotate", "rotates" }, // PathFollow2D - probably function exists with same name. + // // { "offset", "progress" }, // PathFollow2D, PathFollow3D -- Way too vague. + // // { "shift", "shift_pressed" }, // This may break a lot of comments and user variables. // { "autowrap", "autowrap_mode" }, // Label // { "cast_to", "target_position" }, // RayCast2D, RayCast3D - // { "device", "output_device"}, // AudioServer - Too vague, most likely breaks comments & variables + // { "device", "output_device" }, // AudioServer - Too vague, most likely breaks comments & variables // { "doubleclick", "double_click" }, // InputEventMouseButton // { "group", "button_group" }, // BaseButton + // { "percent_visible, "show_percentage }, // ProgressBar -- Breaks Label and RichTextLabel. Could it be worth it? // { "process_mode", "process_callback" }, // AnimationTree, Camera2D // { "scancode", "keycode" }, // InputEventKey // { "toplevel", "top_level" }, // Node @@ -1080,7 +1085,7 @@ const char *RenamesMap3To4::gdscript_properties_renames[][2] = { // { "zfar", "far" }, // Camera3D // { "znear", "near" }, // Camera3D // { "filename", "scene_file_path" }, // Node - // { "pressed", "button_pressed" }, // BaseButton - Will also rename the signal, skipping for now + // { "pressed", "button_pressed" }, // BaseButton -- Would also rename the signal, skipping for now. { "as_normalmap", "as_normal_map" }, // NoiseTexture { "bbcode_text", "text" }, // RichTextLabel { "bg", "panel" }, // Theme @@ -1120,10 +1125,10 @@ const char *RenamesMap3To4::gdscript_properties_renames[][2] = { { "icon_align", "icon_alignment" }, // Button { "iterations_per_second", "physics_ticks_per_second" }, // Engine { "invert_enable", "invert_enabled" }, // Polygon2D - { "margin_bottom", "offset_bottom" }, // Control broke NinePatchRect, StyleBox - { "margin_left", "offset_left" }, // Control broke NinePatchRect, StyleBox - { "margin_right", "offset_right" }, // Control broke NinePatchRect, StyleBox - { "margin_top", "offset_top" }, // Control broke NinePatchRect, StyleBox + { "margin_bottom", "offset_bottom" }, // Control -- Breaks NinePatchRect, StyleBox. + { "margin_left", "offset_left" }, // Control -- Breaks NinePatchRect, StyleBox. + { "margin_right", "offset_right" }, // Control -- Breaks NinePatchRect, StyleBox. + { "margin_top", "offset_top" }, // Control -- Breaks NinePatchRect, StyleBox. { "mid_height", "height" }, // CapsuleMesh { "neighbor_dist", "neighbor_distance" }, // NavigationAgent2D, NavigationAgent3D { "offset_h", "drag_horizontal_offset" }, // Camera2D @@ -1165,7 +1170,7 @@ const char *RenamesMap3To4::gdscript_properties_renames[][2] = { { "tab_align", "tab_alignment" }, // TabContainer { "table_hseparation", "table_h_separation" }, // Theme { "table_vseparation", "table_v_separation" }, // Theme - { "translation", "position" }, // Node3D - broke GLTFNode + { "translation", "position" }, // Node3D -- Breaks GLTFNode { "unit_db", "volume_db" }, // AudioStreamPlayer3D { "unit_offset", "progress_ratio" }, // PathFollow2D, PathFollow3D { "vseparation", "v_separation" }, // Theme @@ -1174,23 +1179,23 @@ const char *RenamesMap3To4::gdscript_properties_renames[][2] = { { nullptr, nullptr }, }; -// Some needs to be disabled, because users can use this names as variables const char *RenamesMap3To4::csharp_properties_renames[][2] = { - // // { "D", "Distance" }, //WorldMarginShape2D - TODO, looks that polish letters ą ę are treaten as space, not as letter, so `będą` are renamed to `będistanceą` - // // {"Alt","AltPressed"}, // This may broke a lot of comments and user variables - // // {"Command","CommandPressed"},// This may broke a lot of comments and user variables - // // {"Control","CtrlPressed"},// This may broke a lot of comments and user variables - // // {"Extends","Size"}, // BoxShape3D, LightmapGI broke ReflectionProbe - // // {"Meta","MetaPressed"},// This may broke a lot of comments and user variables - // // {"PauseMode","ProcessMode"}, // Node - Cyclic rename, look for others - // // {"Rotate","Rotates"}, // PathFollow2D - probably function exists with same name - // // {"Offset","Progress"}, // PathFollow2D, PathFollow3D - Name is way too vague - // // {"Shift","ShiftPressed"},// This may broke a lot of comments and user variables + // Some need to be disabled, because users frequently use these names for variables. + // // { "D", "Distance" }, // WorldMarginShape2D -- TODO: looks like polish letters "ą" "ę" are treaten as space, not as letters. As such, "będą" is renamed to "będistanceą". + // // { "Alt", "AltPressed" }, // This may break a lot of comments and user variables. + // // { "Command", "CommandPressed" }, // This may break a lot of comments and user variables. + // // { "Control", "CtrlPressed" }, // This may break a lot of comments and user variables. + // // { "Extends", "Size" }, // BoxShape3D, LightmapGI -- Breaks ReflectionProbe. + // // { "Meta", "MetaPressed" }, // This may break a lot of comments and user variables. + // // { "PauseMode", "ProcessMode" }, // Node -- Cyclic rename, look for others. + // // { "Rotate", "Rotates" }, // PathFollow2D - probably function exists with same name. + // // { "Offset", "Progress" }, // PathFollow2D, PathFollow3D -- Way too vague. + // // { "Shift", "ShiftPressed" }, // This may break a lot of comments and user variables. // { "Autowrap", "AutowrapMode" }, // Label // { "CastTo", "TargetPosition" }, // RayCast2D, RayCast3D // { "Doubleclick", "DoubleClick" }, // InputEventMouseButton // { "Group", "ButtonGroup" }, // BaseButton - // { "PercentVisible, "ShowPercentage}, // ProgressBar, conflicts with Label and RichTextLabel, but may be a worth it. + // { "PercentVisible, "ShowPercentage}, // ProgressBar -- Breaks Label and RichTextLabel. Could it be worth it? // { "ProcessMode", "ProcessCallback" }, // AnimationTree, Camera2D // { "Scancode", "Keycode" }, // InputEventKey // { "Toplevel", "TopLevel" }, // Node @@ -1198,7 +1203,7 @@ const char *RenamesMap3To4::csharp_properties_renames[][2] = { // { "WrapEnabled", "WrapMode" }, // TextEdit // { "Zfar", "Far" }, // Camera3D // { "Znear", "Near" }, // Camera3D - // { "Pressed", "ButtonPressed" }, // BaseButton - Will also rename the signal, skipping for now + // { "Pressed", "ButtonPressed" }, // BaseButton -- Would also rename the signal, skipping for now. { "AsNormalmap", "AsNormalMap" }, // NoiseTexture { "BbcodeText", "Text" }, // RichTextLabel { "CaretBlinkSpeed", "CaretBlinkInterval" }, // TextEdit, LineEdit @@ -1231,10 +1236,10 @@ const char *RenamesMap3To4::csharp_properties_renames[][2] = { { "IconAlign", "IconAlignment" }, // Button { "IterationsPerSecond", "PhysicsTicksPerSecond" }, // Engine { "InvertEnable", "InvertEnabled" }, // Polygon2D - { "MarginBottom", "OffsetBottom" }, // Control broke NinePatchRect, StyleBox - { "MarginLeft", "OffsetLeft" }, // Control broke NinePatchRect, StyleBox - { "MarginRight", "OffsetRight" }, // Control broke NinePatchRect, StyleBox - { "MarginTop", "OffsetTop" }, // Control broke NinePatchRect, StyleBox + { "MarginBottom", "OffsetBottom" }, // Control -- Breaks NinePatchRect, StyleBox. + { "MarginLeft", "OffsetLeft" }, // Control -- Breaks NinePatchRect, StyleBox. + { "MarginRight", "OffsetRight" }, // Control -- Breaks NinePatchRect, StyleBox. + { "MarginTop", "OffsetTop" }, // Control -- Breaks NinePatchRect, StyleBox. { "MidHeight", "Height" }, // CapsuleMesh { "NeighborDist", "NeighborDistance" }, // NavigationAgent2D, NavigationAgent3D { "OffsetH", "DragHorizontalOffset" }, // Camera2D @@ -1272,7 +1277,7 @@ const char *RenamesMap3To4::csharp_properties_renames[][2] = { { "TabAlign", "TabAlignment" }, // TabContainer { "TableHseparation", "TableHSeparation" }, // Theme { "TableVseparation", "TableVSeparation" }, // Theme - { "Translation", "Position" }, // Node3D - broke GLTFNode + { "Translation", "Position" }, // Node3D -- Breaks GLTFNode { "UnitDb", "VolumeDb" }, // AudioStreamPlayer3D { "UnitOffset", "ProgressRatio" }, // PathFollow2D, PathFollow3D { "Vseparation", "VSeparation" }, // Theme @@ -1281,10 +1286,10 @@ const char *RenamesMap3To4::csharp_properties_renames[][2] = { }; const char *RenamesMap3To4::gdscript_signals_renames[][2] = { - // {"instantiate","instance"}, // FileSystemDock - // { "hide", "hidden" }, // CanvasItem - function with same name exists - // { "tween_all_completed","loop_finished"}, // Tween - TODO, not sure - // {"changed","settings_changed"}, // EditorSettings + // { "instantiate", "instance" }, // FileSystemDock + // { "hide", "hidden" }, // CanvasItem -- Function with same name exists. + // { "tween_all_completed", "loop_finished" }, // Tween -- TODO, not sure. + // { "changed", "settings_changed" }, // EditorSettings { "about_to_show", "about_to_popup" }, // Popup { "button_release", "button_released" }, // XRController3D { "cancelled", "canceled" }, // AcceptDialog @@ -1294,8 +1299,8 @@ const char *RenamesMap3To4::gdscript_signals_renames[][2] = { { "network_peer_packet", "peer_packet" }, // MultiplayerAPI { "node_unselected", "node_deselected" }, // GraphEdit { "offset_changed", "position_offset_changed" }, // GraphNode - { "settings_changed", "changed" }, // TileMap broke EditorSettings - { "skeleton_updated", "pose_updated" }, // + { "settings_changed", "changed" }, // TileMap -- Breaks EditorSettings + { "skeleton_updated", "pose_updated" }, // Skeleton3D { "tab_close", "tab_closed" }, // TextEdit { "tab_hover", "tab_hovered" }, // TextEdit { "text_entered", "text_submitted" }, // LineEdit @@ -1306,10 +1311,10 @@ const char *RenamesMap3To4::gdscript_signals_renames[][2] = { }; const char *RenamesMap3To4::csharp_signals_renames[][2] = { - // {"Instantiate","Instance"}, // FileSystemDock - // { "Hide", "Hidden" }, // CanvasItem - function with same name exists - // { "TweenAllCompleted","LoopFinished"}, // Tween - TODO, not sure - // {"Changed","SettingsChanged"}, // EditorSettings + // { "Instantiate", "Instance" }, // FileSystemDock + // { "Hide", "Hidden" }, // CanvasItem -- Function with same name exists. + // { "TweenAllCompleted", "LoopFinished" }, // Tween -- TODO, not sure. + // { "Changed", "SettingsChanged" }, // EditorSettings { "AboutToShow", "AboutToPopup" }, // Popup { "ButtonRelease", "ButtonReleased" }, // XRController3D { "NetworkPeerConnected", "PeerConnected" }, // MultiplayerAPI @@ -1317,7 +1322,7 @@ const char *RenamesMap3To4::csharp_signals_renames[][2] = { { "NetworkPeerPacket", "PeerPacket" }, // MultiplayerAPI { "NodeUnselected", "NodeDeselected" }, // GraphEdit { "OffsetChanged", "PositionOffsetChanged" }, // GraphNode - { "SettingsChanged", "Changed" }, // TileMap broke EditorSettings + { "SettingsChanged", "Changed" }, // TileMap -- Breaks EditorSettings { "SkeletonUpdated", "PoseUpdated" }, // { "TabClose", "TabClosed" }, // TextEdit { "TabHover", "TabHovered" }, // TextEdit @@ -1347,7 +1352,7 @@ const char *RenamesMap3To4::project_settings_renames[][2] = { { "network/limits/debugger_stdout/max_messages_per_frame", "network/limits/debugger/max_queued_messages" }, { "network/limits/debugger_stdout/max_warnings_per_second", "network/limits/debugger/max_warnings_per_second" }, { "network/ssl/certificates", "network/tls/certificate_bundle_override" }, - { "physics/2d/thread_model", "physics/2d/run_on_thread" }, // TODO not sure + { "physics/2d/thread_model", "physics/2d/run_on_thread" }, // TODO: Not sure. { "rendering/environment/default_clear_color", "rendering/environment/defaults/default_clear_color" }, { "rendering/environment/default_environment", "rendering/environment/defaults/default_environment" }, { "rendering/quality/depth_prepass/disable_for_vendors", "rendering/driver/depth_prepass/disable_for_vendors" }, @@ -1419,15 +1424,15 @@ const char *RenamesMap3To4::shaders_renames[][2] = { }; const char *RenamesMap3To4::class_renames[][2] = { - // { "BulletPhysicsDirectBodyState", "BulletPhysicsDirectBodyState3D" }, // Class is not visible in ClassDB - // { "BulletPhysicsServer", "BulletPhysicsServer3D" }, // Class is not visible in ClassDB - // { "GDScriptFunctionState", "Node3D" }, // TODO - not sure to which should be changed - // { "GDScriptNativeClass", "Node3D" }, // TODO - not sure to which should be changed - // { "InputDefault",""}, // TODO ? - // { "Physics2DDirectBodyStateSW", "GodotPhysicsDirectBodyState2D" }, // Class is not visible in ClassDB - // { "Physics2DShapeQueryResult", "PhysicsShapeQueryResult2D" }, // Class is not visible in ClassDB - // { "PhysicsShapeQueryResult", "PhysicsShapeQueryResult3D" }, // Class is not visible in ClassDB - // { "NativeScript","GDExtension"}, ?? + // { "BulletPhysicsDirectBodyState", "BulletPhysicsDirectBodyState3D" }, // Class is not visible in ClassDB. + // { "BulletPhysicsServer", "BulletPhysicsServer3D" }, // Class is not visible in ClassDB. + // { "GDScriptFunctionState", "Node3D" }, // TODO: Not sure to which this should be changed. + // { "GDScriptNativeClass", "Node3D" }, // TODO: Not sure to which this should be changed. + // { "InputDefault",""}, // TODO: ? + // { "Physics2DDirectBodyStateSW", "GodotPhysicsDirectBodyState2D" }, // Class is not visible in ClassDB. + // { "Physics2DShapeQueryResult", "PhysicsShapeQueryResult2D" }, // Class is not visible in ClassDB. + // { "PhysicsShapeQueryResult", "PhysicsShapeQueryResult3D" }, // Class is not visible in ClassDB. + // { "NativeScript","GDExtension"}, // ?? { "ARVRAnchor", "XRAnchor3D" }, { "ARVRCamera", "XRCamera3D" }, { "ARVRController", "XRController3D" }, @@ -1438,8 +1443,8 @@ const char *RenamesMap3To4::class_renames[][2] = { { "ARVRServer", "XRServer" }, { "AStar", "AStar3D" }, { "AnimatedSprite", "AnimatedSprite2D" }, - { "AnimationTreePlayer", "AnimationTree" }, - { "Area", "Area3D" }, // Be careful, this will be used everywhere + { "AnimationTreePlayer", "AnimationTree" }, // Was deprecated since Godot 3.1. + { "Area", "Area3D" }, // Be careful, this will be used everywhere. { "AudioStreamOGGVorbis", "AudioStreamOggVorbis" }, { "AudioStreamRandomPitch", "AudioStreamRandomizer" }, { "AudioStreamSample", "AudioStreamWAV" }, @@ -1458,7 +1463,7 @@ const char *RenamesMap3To4::class_renames[][2] = { { "CSGShape", "CSGShape3D" }, { "CSGSphere", "CSGSphere3D" }, { "CSGTorus", "CSGTorus3D" }, - { "Camera", "Camera3D" }, // Be careful, this will be used everywhere + { "Camera", "Camera3D" }, // Be careful, this will be used everywhere. { "CapsuleShape", "CapsuleShape3D" }, { "ClippedCamera", "Camera3D" }, { "CollisionObject", "CollisionObject3D" }, @@ -1484,7 +1489,7 @@ const char *RenamesMap3To4::class_renames[][2] = { { "GIProbe", "VoxelGI" }, { "GIProbeData", "VoxelGIData" }, { "Generic6DOFJoint", "Generic6DOFJoint3D" }, - { "Geometry", "Geometry2D" }, // Geometry class is split between Geometry2D and Geometry3D so we need to choose one + { "Geometry", "Geometry2D" }, // Geometry class is split between Geometry2D and Geometry3D, so we need to choose one. { "GeometryInstance", "GeometryInstance3D" }, { "GradientTexture", "GradientTexture2D" }, { "HeightMapShape", "HeightMapShape3D" }, @@ -1509,9 +1514,9 @@ const char *RenamesMap3To4::class_renames[][2] = { { "MultiMeshInstance", "MultiMeshInstance3D" }, { "MultiplayerPeerGDNative", "MultiplayerPeerExtension" }, { "Navigation", "Node3D" }, - { "Navigation2D", "Node2D" }, + { "Navigation2D", "Node2D" }, // Replaced by other 2D Navigation nodes. { "Navigation2DServer", "NavigationServer2D" }, - { "Navigation3D", "Node3D" }, + { "Navigation3D", "Node3D" }, // Replaced by other 3D Navigation nodes. { "NavigationAgent", "NavigationAgent3D" }, { "NavigationMeshInstance", "NavigationRegion3D" }, { "NavigationObstacle", "NavigationObstacle3D" }, @@ -1525,10 +1530,10 @@ const char *RenamesMap3To4::class_renames[][2] = { { "PHashTranslation", "OptimizedTranslation" }, { "PacketPeerGDNative", "PacketPeerExtension" }, { "PanoramaSky", "Sky" }, - { "Particles", "GPUParticles3D" }, // Be careful, this will be used everywhere + { "Particles", "GPUParticles3D" }, // Be careful, this will be used everywhere. { "Particles2D", "GPUParticles2D" }, { "ParticlesMaterial", "ParticleProcessMaterial" }, - { "Path", "Path3D" }, // Be careful, this will be used everywhere + { "Path", "Path3D" }, // Be careful, this will be used everywhere. { "PathFollow", "PathFollow3D" }, { "PhysicalBone", "PhysicalBone3D" }, { "Physics2DDirectBodyState", "PhysicsDirectBodyState2D" }, @@ -1552,12 +1557,12 @@ const char *RenamesMap3To4::class_renames[][2] = { { "RayCast", "RayCast3D" }, { "RayShape", "SeparationRayShape3D" }, { "RayShape2D", "SeparationRayShape2D" }, - { "Reference", "RefCounted" }, // Be careful, this will be used everywhere + { "Reference", "RefCounted" }, // Be careful, this will be used everywhere. { "RemoteTransform", "RemoteTransform3D" }, { "ResourceInteractiveLoader", "ResourceLoader" }, { "RigidBody", "RigidBody3D" }, { "SceneTreeTween", "Tween" }, - { "Shape", "Shape3D" }, // Be careful, this will be used everywhere + { "Shape", "Shape3D" }, // Be careful, this will be used everywhere. { "ShortCut", "Shortcut" }, { "Skeleton", "Skeleton3D" }, { "SkeletonIK", "SkeletonIK3D" }, @@ -1580,9 +1585,9 @@ const char *RenamesMap3To4::class_renames[][2] = { { "StreamTexture2DArray", "CompressedTexture2DArray" }, { "StreamTextureLayered", "CompressedTextureLayered" }, { "TCP_Server", "TCPServer" }, - { "Tabs", "TabBar" }, // Be careful, this will be used everywhere + { "Tabs", "TabBar" }, // Be careful, this will be used everywhere. { "TextFile", "Node3D" }, - { "Texture", "Texture2D" }, // May broke TextureRect + { "Texture", "Texture2D" }, // May break TextureRect. { "TextureArray", "Texture2DArray" }, { "TextureProgress", "TextureProgressBar" }, { "ToolButton", "Button" }, @@ -1628,17 +1633,18 @@ const char *RenamesMap3To4::class_renames[][2] = { { "WebRTCMultiplayer", "WebRTCMultiplayerPeer" }, { "WebRTCPeerConnectionGDNative", "WebRTCPeerConnectionExtension" }, { "WindowDialog", "Window" }, - { "World", "World3D" }, // Be careful, this will be used everywhere + { "World", "World3D" }, // Be careful, this will be used everywhere. { "XRAnchor", "XRAnchor3D" }, { "XRController", "XRController3D" }, { "XROrigin", "XROrigin3D" }, - { "YSort", "Node2D" }, + { "YSort", "Node2D" }, // CanvasItem has a new "y_sort_enabled" property. - { "CullInstance", "Node3D" }, // Probably this type needs to be added to Godot 4.0, since it is for now only available only in Godot 3.x - { "RoomGroup", "Node3D" }, // Probably this type needs to be added to Godot 4.0, since it is for now only available only in Godot 3.x - { "Room", "Node3D" }, // Probably this type needs to be added to Godot 4.0, since it is for now only available only in Godot 3.x - { "RoomManager", "Node3D" }, // Probably this type needs to be added to Godot 4.0, since it is for now only available only in Godot 3.x - { "Portal", "Node3D" }, // Probably this type needs to be added to Godot 4.0, since it is for now only available only in Godot 3.x + // Portal and room occlusion culling was replaced by raster occlusion culling. + { "CullInstance", "Node3D" }, + { "RoomGroup", "Node3D" }, + { "Room", "Node3D" }, + { "RoomManager", "Node3D" }, + { "Portal", "Node3D" }, { nullptr, nullptr }, }; |